/* =========================================================================
   Collection « Calendrier de l'Avent » — 8-14 ans
   =========================================================================
   Ces pages ne ressemblent pas au reste du site, et c'est voulu : le bordeaux
   des livres pour adultes n'a rien à dire à un enfant de dix ans. Chaque
   calendrier reprend les couleurs de SON intérieur, pour qu'il reconnaisse
   son livre.

   Trois contraintes qui commandent toutes les valeurs ci-dessous :
   - texte d'au moins 18 px et boutons d'au moins 48 px (le brief, et un doigt
     d'enfant) ;
   - la bonne et la mauvaise réponse se distinguent par un SIGNE (✓ / ✗) et un
     mot, pas seulement par la couleur — daltonisme, écran au soleil ;
   - rien d'externe : la seule police chargée est Anton, servie par le site.
   ========================================================================= */

@font-face {
  font-family: "Anton";
  src: url("/assets/polices/anton-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.avent {
  --fond: #20232C;
  --fond-clair: #2C3040;
  --accent: #E3101B;
  --or: #FFC61A;
  --juste: #178A47;
  --juste-clair: #27A85B;
  --faux: #D42234;
  --encre: #FFFFFF;
  --encre-doux: #CFD4E4;
  --rayon: 14px;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.avent--foot { --fond: #14306E; --fond-clair: #1C4091; --accent: #D42234; --or: #F4B41A; }
.avent--auto { --fond: #20232C; --fond-clair: #2C3040; --accent: #E3101B; --or: #FFC61A; }
.avent--basket { --fond: #20232C; --fond-clair: #2C3040; --accent: #E3101B; --or: #FFC61A; }

body.avent {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

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

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.visuellement-cache:focus {
  position: static; width: auto; height: auto; clip: auto; clip-path: none;
  display: inline-block; padding: 10px 14px; background: var(--or); color: #111;
}

/* ------------------------------------------------------------- l'en-tête */

.avent-tete {
  padding: 14px 18px 10px;
  border-bottom: 2px solid rgba(255, 255, 255, .14);
}
.avent-marque, .avent-fil { display: flex; align-items: center; gap: 8px; margin: 0; }
.avent-marque {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--or); font-weight: 700;
}
.avent-fil { margin-top: 4px; font-size: 15px; color: var(--encre-doux); }
.avent-picto { flex: none; }

/* ------------------------------------------------------------- le jour */

.avent-jour { padding: 22px 18px 10px; max-width: 640px; margin: 0 auto; }

.avent-numero {
  display: flex; align-items: baseline; gap: 10px; margin: 0;
  font-family: "Anton", var(--sans);
  text-transform: uppercase;
}
.avent-numero span { font-size: 20px; letter-spacing: .12em; color: var(--encre-doux); }
.avent-numero b { font-size: 64px; line-height: .9; color: var(--or); font-weight: 400; }
.avent-date { margin: 2px 0 0; color: var(--encre-doux); font-size: 17px; }
.avent-theme {
  font-family: "Anton", var(--sans);
  font-weight: 400;
  font-size: clamp(26px, 7.4vw, 34px);
  line-height: 1.1;
  margin: 10px 0 22px;
  text-transform: uppercase;
  letter-spacing: .01em;
}

/* --------------------------------------------------------- le savais-tu */

.avent-savais {
  background: var(--fond-clair);
  border-left: 6px solid var(--or);
  border-radius: var(--rayon);
  padding: 16px 18px;
  margin: 0 0 28px;
}
.avent-savais h2 {
  font-family: "Anton", var(--sans); font-weight: 400;
  font-size: 20px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--or); margin: 0 0 6px;
}
.avent-savais p { margin: 0; }

/* ------------------------------------------------------------- le quiz */

.avent-quiz h2 {
  font-family: "Anton", var(--sans); font-weight: 400;
  font-size: 22px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 4px;
}
.avent-consigne { margin: 0 0 20px; color: var(--encre-doux); font-size: 17px; }

.avent-questions { list-style: none; margin: 0; padding: 0; }
.avent-q { margin: 0 0 30px; }
.avent-q-titre { margin: 0 0 12px; font-weight: 700; font-size: 19px; }
.avent-q-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-right: 10px; vertical-align: -6px;
  border-radius: 50%; background: var(--accent); color: #fff;
  font-family: "Anton", var(--sans); font-size: 18px;
}

.avent-choix {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; margin: 0 0 10px; padding: 12px 16px;
  text-align: left; font: inherit; color: var(--encre);
  background: var(--fond-clair);
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: var(--rayon);
  cursor: pointer;
}
.avent-choix:hover:not([disabled]) { border-color: var(--or); }
.avent-choix:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.avent-choix[disabled] { cursor: default; }
.avent-marque-rep {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; line-height: 1;
}
.avent-choix-texte { flex: 1; }

/* Le signe, pas seulement la couleur. */
.avent-choix.est-juste { background: var(--juste); border-color: var(--juste-clair); }
.avent-choix.est-juste .avent-marque-rep { background: #fff; color: var(--juste); border-color: #fff; }
.avent-choix.est-juste .avent-marque-rep::after { content: "\2713"; }
.avent-choix.est-faux { background: var(--faux); border-color: #F05A68; }
.avent-choix.est-faux .avent-marque-rep { background: #fff; color: var(--faux); border-color: #fff; }
.avent-choix.est-faux .avent-marque-rep::after { content: "\2717"; }
.avent-choix.est-pale { opacity: .55; }

.avent-explication {
  margin: 10px 0 0; padding: 12px 14px;
  background: rgba(255, 255, 255, .08);
  border-radius: var(--rayon);
  font-size: 17px;
}
.avent-explication[hidden] { display: none; }
.avent-verdict { font-weight: 700; }
.avent-verdict::after { content: " "; }

.avent-score {
  margin: 26px 0 0; padding: 16px 18px;
  background: var(--or); color: #1A1A1A;
  border-radius: var(--rayon);
  font-family: "Anton", var(--sans); font-size: 22px; text-transform: uppercase;
  text-align: center; letter-spacing: .02em;
}
.avent-rejouer { margin: 14px 0 0; text-align: center; }
.avent-bouton {
  min-height: 52px; padding: 12px 26px;
  font: inherit; font-weight: 700;
  color: var(--encre); background: transparent;
  border: 2px solid var(--or); border-radius: 999px; cursor: pointer;
}
.avent-bouton:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

/* ------------------------------------------------------- la navigation */

.avent-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  margin: 34px 0 0; padding: 18px 0 0;
  border-top: 2px solid rgba(255, 255, 255, .14);
}
.avent-nav a {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 10px 14px;
  color: var(--encre); text-decoration: none; font-weight: 700;
  border: 2px solid rgba(255, 255, 255, .22); border-radius: var(--rayon);
}
.avent-nav a:hover, .avent-nav a:focus-visible { border-color: var(--or); color: var(--or); }
.avent-nav-toutes { background: rgba(255, 255, 255, .08); }
.avent-nav-vide { display: block; }

/* ---------------------------------------------------------- le pied */

.avent-pied {
  margin-top: 30px; padding: 20px 18px 30px;
  border-top: 2px solid rgba(255, 255, 255, .14);
  font-size: 15px; color: var(--encre-doux);
  text-align: center;
}
.avent-pied p { margin: 0; }
/* 48 px de haut, comme les boutons de réponse : ce sont les deux seuls liens
   d'une page bonus, et c'est un doigt d'enfant qui les vise. Mesurés à 20 px
   le 14/11/2026, le reste de la page était déjà au plancher. */
.avent-pied a {
  color: var(--or);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 4px 14px;
}
.avent-independant { font-size: 13.5px; opacity: .85; margin-top: 14px; }

/* ====================================================================== */
/* La page du livre : elle vit dans le site normal, elle n'hérite donc de  */
/* rien de ce qui précède — seules ces règles-ci s'y appliquent.           */
/* ====================================================================== */

.avent-head.avent--foot { background: radial-gradient(120% 90% at 85% 0%, #1C4091 0%, #14306E 48%, #0B1C44 100%); }
.avent-head.avent--auto,
.avent-head.avent--basket { background: radial-gradient(120% 90% at 85% 0%, #343A4E 0%, #20232C 48%, #121419 100%); }
.avent-head .kicker { display: flex; align-items: center; gap: 8px; }
.avent-age { margin: 10px 0 0; font-weight: 700; letter-spacing: .02em; }

.avent-presentation { display: grid; gap: 26px; }
/* La classe tombe sur <picture> (voir image() dans build.py) : il faut
   viser les deux, sinon l'arrondi et l'ombre ne portent sur rien. */
.avent-couverture { display: block; width: 100%; }
.avent-couverture img { width: 100%; height: auto; display: block;
  border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); }
.avent-accroche { font-size: 1.12em; font-weight: 700; }
.avent-encadre {
  padding: 14px 16px; border-radius: 10px;
  background: #FFF6E2; border-left: 4px solid #E0A526;
}
.avent-encadre p { margin: 0; }
.avent-encadre p + p { margin-top: 12px; }
/* Le lien d'exemple est une cible, pas un mot dans une phrase : noyé dans le
   texte il tombait à 23 px dès que la ligne ne se coupait pas. */
.avent-exemple {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 8px 16px;
  border: 2px solid #E0A526; border-radius: 999px;
  text-decoration: none; font-weight: 700; color: #6B4405;
}
.avent-exemple:hover, .avent-exemple:focus-visible { background: #FBE9C4; }
@media (min-width: 760px) {
  .avent-presentation { grid-template-columns: 300px 1fr; align-items: start; gap: 34px; }
}

/* La grille des 24 cases, sur la page du livre. */
/* minmax(0, …) et pas 1fr seul : avec 1fr, la colonne ne descend pas sous
   le plus long mot du thème et la grille déborde de l'écran (mesuré :
   397 px dans 375). */
.avent-grille { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.avent-case {
  display: flex; flex-direction: column; justify-content: flex-start;
  min-height: 86px; padding: 10px 10px 8px;
  border: 2px solid rgba(0, 0, 0, .12); border-radius: 12px;
  text-decoration: none; color: inherit; background: #fff;
  position: relative;
}
.avent-case:hover, .avent-case:focus-visible { border-color: #E0A526; }
.avent-case-num { font-family: "Anton", var(--sans); font-size: 26px; line-height: 1; color: #B4121F; }
.avent-case-theme {
  margin-top: 4px; font-size: 12.5px; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.avent-case-fait { display: none; position: absolute; top: 8px; right: 10px; color: #178A47; font-weight: 700; }
.avent-case-fait::after { content: "\2713"; }
.avent-case.est-faite .avent-case-fait { display: block; }
.avent-case.est-faite { border-color: #178A47; }
@media (min-width: 560px) { .avent-grille { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 860px) { .avent-grille { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Les trois cartes du catalogue. */
.avent-cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.avent-carte a {
  display: flex; gap: 16px; align-items: center;
  padding: 14px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 12px;
  text-decoration: none; color: inherit; background: #fff;
}
.avent-carte a:hover, .avent-carte a:focus-visible { border-color: #E0A526; }
.avent-carte img, .avent-carte picture { width: 92px; flex: none; }
.avent-carte img { width: 92px; height: auto; border-radius: 6px; }
.avent-carte-texte { display: flex; flex-direction: column; gap: 2px; }
.avent-carte-sur { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: #84591A; }
.avent-carte-texte b { font-family: "Anton", var(--sans); font-size: 22px; font-weight: 400; text-transform: uppercase; }
.avent-carte-etat { font-size: 14px; color: #5A5560; }
@media (min-width: 720px) { .avent-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media print {
  .avent-nav, .avent-rejouer { display: none; }
  body.avent { background: #fff; color: #111; }
  .avent-savais, .avent-choix { background: #fff; color: #111; }
}
