/* Familydle — portail, version thématique (maquette validée le 05/12/2026).
   Ordinateur par défaut ; téléphone sous 600 px. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #F3F5F9;
  color: #14161C;
  font-family: Inter, system-ui, sans-serif;
}

/* Place réservée au menu commun pendant son chargement (pas de saut de 48 px) ;
   le menu se masque lui-même s'il ne peut pas se charger. */
dle-navigation { display: block; min-height: 48px; background: #14161C; }

a { color: inherit; }

.visuellement-cache {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid #2B4FA8; outline-offset: 3px; }

/* ---------------------------------------------------------------- haut de page */

.entete {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.entete__date {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #545B6B;
}

.entete__titre {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.entete__accroche { margin: 12px 0 0; font-size: 18px; color: #3A3F4B; }

.encadres { display: flex; gap: 12px; flex-wrap: wrap; }

.encadre {
  background: #FFFFFF;
  border: 1px solid #DDE1E9;
  border-radius: 12px;
  padding: 14px 18px;
}

.encadre__etiquette { font-size: 13px; color: #545B6B; }

.encadre__valeur {
  margin-top: 2px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.encadre__valeur--chiffres { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- grille */

.contenu {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.pied { margin: 40px 0 0; font-size: 14px; color: #545B6B; text-align: center; }

.erreur {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #DDE1E9;
  color: #3A3F4B;
  text-align: center;
}

/* ---------------------------------------------------------------- éléments communs */

.carte {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
}

.carte__corps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-grow: 1;
  padding: 26px 26px 20px;
}

.carte__tete { display: flex; align-items: center; gap: 14px; }
.carte__textes {
  flex-grow: 1;
  display: flex;
  flex-wrap: wrap;           /* la pastille passe sous le titre si la carte est étroite */
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}
.carte__noms { flex: 1 1 auto; }
.carte__titre { margin: 0; }
.carte__sous-titre { margin-top: 4px; font-size: 14px; }

.pastille {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pastille--fait     { background: #DCFCE7; color: #14532D; }
.pastille--en_cours { background: #FEF3C7; color: #78350F; border-color: #D9A441; }
.pastille--a_faire  { background: #E4E7EE; color: #3A3F4B; }
.pastille__coche { flex: none; }

.modes {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}
.mode { display: flex; align-items: center; gap: 10px; }
.mode__icone { flex: none; width: 20px; height: 20px; }
.mode__nom { flex-grow: 1; }

.bouton {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 10px;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}
.bouton:hover { filter: brightness(1.08); }

/* ---------------------------------------------------------------- thème pirate */

.carte--pirate {
  background: #F4E7C9;
  border: 2px solid #8B5E34;
  box-shadow: inset 0 0 0 6px #F4E7C9, inset 0 0 0 8px #C79A63;
  color: #3B2410;
}
.carte--pirate .rose {
  position: absolute;
  right: -30px;
  top: -30px;
  opacity: .14;
}
.carte--pirate .medaillon {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px #C79A63;
}
.carte--pirate .medaillon svg { width: 30px; height: 30px; }
.carte--pirate .carte__titre {
  font-family: 'Pirata One', serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  color: #3B2410;
}
.carte--pirate .carte__sous-titre { color: #5B3A1A; }
.carte--pirate .modes { border-top: 1.5px dashed #B08452; color: #3B2410; }
.carte--pirate .vagues { display: block; width: 100%; height: 28px; }

/* ---------------------------------------------------------------- thème pixel */

.carte--pixel {
  background: #FFFFFF;
  border: 2px solid #14161C;
  box-shadow: 6px 6px 0 #14161C;
}
.carte--pixel .bandeau { position: relative; height: 64px; }
.carte--pixel .bandeau > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.carte--pixel .vignette {
  position: absolute;
  left: 24px; bottom: -27px;
  width: 54px; height: 54px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 2px solid #14161C;
  display: flex; align-items: center; justify-content: center;
}
.carte--pixel .vignette svg { width: 30px; height: 30px; }
.carte--pixel .bandeau .pastille { position: absolute; right: 20px; top: 18px; }
.carte--pixel .carte__corps { padding-top: 40px; }
.carte--pixel .carte__titre {
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  color: #14161C;
}
.carte--pixel .carte__sous-titre { margin-top: 6px; color: #545B6B; }
.carte--pixel .modes { border-top: 2px dotted #14161C; }
.carte--pixel .mode__detail { color: #545B6B; }
.carte--pixel .bouton { border-radius: 8px; border: 2px solid #14161C; }
.carte--pixel .herbe { display: block; width: 100%; height: 24px; }

/* ---------------------------------------------------------------- thème neutre (inconnu) */

.carte--neutre {
  background: #FFFFFF;
  border: 1px solid #DDE1E9;
}
.carte--neutre .lisere { height: 8px; }
.carte--neutre .medaillon {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
}
.carte--neutre .carte__titre {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  line-height: 1.1;
}
.carte--neutre .carte__sous-titre { color: #545B6B; }
.carte--neutre .modes { border-top: 1px solid #DDE1E9; }
.carte--neutre .mode__detail { color: #545B6B; }

/* ---------------------------------------------------------------- bientôt */

.carte--bientot {
  border: 2px dashed #B9BFCC;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  gap: 14px;
  min-height: 300px;
}
.carte--bientot .point {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: #E4E7EE;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: #6B7282;
}
.carte--bientot .carte__titre {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  color: #3A3F4B;
}
.carte--bientot .pastille { padding: 5px 12px; }
.carte--bientot .carte__texte { margin: 0; font-size: 14px; color: #545B6B; }

/* ---------------------------------------------------------------- téléphone */

.seulement-telephone { display: none; }

@media (max-width: 600px) {
  .entete { display: block; padding: 28px 16px 0; }
  .entete__date { margin-bottom: 6px; font-size: 13px; }
  .entete__titre { font-size: 40px; }
  .entete__accroche { margin-top: 10px; font-size: 16px; }
  .encadres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
  .encadre { padding: 12px 14px; }
  .encadre__etiquette { font-size: 12px; }
  .encadre__valeur { font-size: 18px; }

  .contenu { padding: 20px 16px 32px; }
  .grille { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pied { margin-top: 24px; font-size: 13px; }

  /* textes raccourcis à l'écran, conservés pour les lecteurs d'écran */
  .seulement-ordinateur {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }

  .carte__corps { padding: 20px 20px 16px; gap: 14px; }
  .carte__tete { gap: 12px; }
  .carte__sous-titre { display: none; }
  .pastille { font-size: 12px; padding: 4px 10px; }
  .modes { padding-top: 12px; gap: 8px; font-size: 14px; }
  .mode__icone { width: 18px; height: 18px; }

  .carte--pirate { box-shadow: inset 0 0 0 5px #F4E7C9, inset 0 0 0 7px #C79A63; }
  .carte--pirate .rose { display: none; }
  .carte--pirate .medaillon { width: 44px; height: 44px; }
  .carte--pirate .medaillon svg { width: 24px; height: 24px; }
  .carte--pirate .carte__titre { font-size: 28px; }
  .carte--pirate .vagues { height: 22px; }

  .carte--pixel { box-shadow: 5px 5px 0 #14161C; margin-right: 5px; }
  .carte--pixel .bandeau { height: 52px; }
  .carte--pixel .vignette { left: 18px; bottom: -22px; width: 44px; height: 44px; border-radius: 10px; }
  .carte--pixel .vignette svg { width: 24px; height: 24px; }
  .carte--pixel .bandeau .pastille { right: 14px; top: 14px; }
  .carte--pixel .bandeau .pastille__coche { display: none; }
  .carte--pixel .carte__corps { padding-top: 32px; }
  .carte--pixel .carte__titre { font-size: 16px; }
  .carte--pixel .herbe { height: 20px; }

  .carte--neutre .medaillon { width: 44px; height: 44px; border-radius: 12px; font-size: 21px; }
  .carte--neutre .carte__titre { font-size: 22px; }

  .carte--bientot {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    min-height: 0;
    padding: 16px 18px;
    gap: 12px;
  }
  .carte--bientot .point { flex: none; width: 44px; height: 44px; border-radius: 10px; font-size: 19px; }
  .carte--bientot .carte__titre { flex-grow: 1; font-size: 18px; color: #545B6B; }
  .carte--bientot .pastille { padding: 4px 10px; }
  .carte--bientot .carte__texte { display: none; }
}
