/* =========================================================================
   AGENTFOOT ACADEMY — PAGE DE VENTE
   =========================================================================

   PLAN DE DESIGN (arrêté avant d'écrire une règle, cf. skill frontend-design)

   Sujet : l'examen d'Agent de Football FIFA. Son monde n'est pas celui du
   sport, c'est celui du DROIT — des règlements numérotés, des articles, des
   renvois. Toute la formation est construite sur des citations d'article, et
   ce projet impose déjà cette convention à son contenu.

   SIGNATURE. La référence d'article, en monospace. Chaque section de la page
   porte une cote — « § 3 · POUR QUI » — dans la forme même des citations qui
   structurent le cours. Ce n'est pas un ornement : c'est le vocabulaire du
   sujet, et il dit au lecteur ce qu'il achète.

   HÉROS. Une accroche — arriver à l'examen sans mauvaise surprise — suivie
   d'une bande donnant LES CONDITIONS DE L'ÉPREUVE : 20 questions, 60
   minutes, 75 %. Pas des statistiques de vente : la spécification du test
   que le lecteur redoute, posée telle quelle.

   À droite, L'INSCRIPTION GRATUITE, qui est l'action principale de la page.
   Modèle « value first » : on ouvre le module 1 avant de parler d'argent.
   La carte est la seule surface claire du héros — tout le reste lui cède le
   contraste, pour qu'il n'y ait aucun doute sur ce qu'on attend du visiteur.

   Une première version ouvrait sur l'index des onze règlements. Écarté : un
   sommaire n'est pas une accroche, et une page de vente doit dire au lecteur
   ce qu'il y gagne avant de lui montrer le sommaire. L'index a été redescendu
   en § 2, où il dit ce que « le programme en entier » recouvre.

   COULEUR. Dérivée des jetons réels de l'application (src/index.css), pour
   que la page et le produit soient visiblement la même maison :
     --encre        #0D1621   fond, hsl(210 40% 9%)
     --encre-haute  #131F2D   strates
     --carte        #1A2634   hsl(210 32% 15%)
     --emeraude     #00C78C   hsl(162 100% 39%) — la primaire du produit
     --or           hsl(44 90% 61%)   — l'accent, valeur de l'app
     --craie        #F2F4F7   texte
     --craie-faible hsl(210 12% 55%) — texte secondaire, valeur de l'app

   TYPE. Trois rôles, choisis pour ce sujet :
     Fraunces      — display variable, axe « wonk » : institutionnel sans
                     être la serif par défaut des pages de vente.
     Public Sans   — police de l'administration américaine, littéralement le
                     caractère du texte réglementaire. Corps de texte.
     IBM Plex Mono — les cotes et les références.

   MOUVEMENT. Une seule séquence orchestrée : l'index du corpus se compose
   ligne à ligne quand il entre à l'écran. Comme il n'est plus au-dessus de
   la ligne de flottaison, le déclencheur est le défilement et non le
   chargement — et sans JavaScript, l'index s'affiche simplement, entier.
   Rien d'autre ne bouge, hors états de survol. `prefers-reduced-motion`
   respecté.

   RETRAIT (l'accessoire ôté avant de sortir) : le rail d'index latéral
   numéroté a été supprimé. La cote de section porte déjà l'information ;
   deux systèmes de numérotation en auraient fait de la décoration.
   ========================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,600;9..144,700&family=Public+Sans:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --encre: #0d1621;
  --encre-haute: #131f2d;
  --carte: #1a2634;
  --emeraude: #00c78c;
  --emeraude-sourd: #0a6a4c;
  /* hsl(44 90% 61%) = --accent de l'application. */
  --or: hsl(44 90% 61%);
  --craie: #f2f4f7;
  /* hsl(210 12% 55%) = --muted-foreground de l'application. */
  --craie-faible: hsl(210 12% 55%);
  /* hsl(210 18% 22%) = --border de l'application. */
  --trait: hsl(210 18% 22%);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --corps: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cote: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --colonne: 68rem;
  --respiration: clamp(4rem, 9vw, 7.5rem);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--encre);
  color: var(--craie);
  font-family: var(--corps);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--or);
}

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Le lien d'évitement, pour qui navigue au clavier. */
.evitement {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--or);
  color: var(--encre);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  z-index: 50;
}
.evitement:focus {
  left: 1rem;
  top: 1rem;
}

/* ─── Trame commune ─────────────────────────────────────────────────── */

.bande {
  padding-block: var(--respiration);
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.bande--strate {
  background: var(--encre-haute);
  border-block: 1px solid var(--trait);
}

.dedans {
  max-width: var(--colonne);
  margin-inline: auto;
}

/* LA SIGNATURE : la cote de section, dans la forme des citations d'article
   qui structurent tout le contenu de la formation. */
.cote {
  font-family: var(--cote);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--emeraude);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}

.cote::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--trait), transparent);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 0, "WONK" 1;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1.1rem;
  max-width: 62ch;
}

.mineur {
  color: var(--craie-faible);
}

/* ─── Héros : accroche et fiche de l'épreuve ─────────────────────────── */

.heros {
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: var(--respiration);
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}

/* Une seule lueur, très basse, pour décoller le héros du reste. */
.heros::before {
  content: "";
  position: absolute;
  inset: -30% 40% auto -20%;
  height: 70vh;
  background: radial-gradient(closest-side, rgba(0, 199, 140, 0.14), transparent);
  pointer-events: none;
}

.heros > .dedans {
  position: relative;
}

.marque {
  font-family: var(--cote);
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--craie-faible);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.marque b {
  color: var(--craie);
  font-weight: 500;
}

.marque__logo {
  display: block;
  width: clamp(170px, 40vw, 220px);
  height: auto;
}

.heros__these {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
  .heros__these {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    align-items: start;
  }
}

.heros__accroche p {
  font-size: 1.1875rem;
  color: var(--craie-faible);
}

.heros__accroche strong {
  color: var(--craie);
  font-weight: 500;
}

/* L'INDEX DU CORPUS — le héros proprement dit. */
.corpus {
  border: 1px solid var(--trait);
  background: linear-gradient(180deg, var(--carte), var(--encre-haute));
  border-radius: 4px;
  padding: 1.5rem clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 2.5rem;
}

/* Au-delà de deux colonnes de largeur, une liste de onze lignes devient une
   colonne trop longue à parcourir : elle se scinde. */
@media (min-width: 48rem) {
  .corpus ol {
    columns: 2;
    column-gap: 2.5rem;
  }
  .corpus li {
    break-inside: avoid;
  }
}

.corpus__titre {
  font-family: var(--cote);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--craie-faible);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--trait);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.corpus ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: reglement;
}

.corpus li {
  counter-increment: reglement;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(42, 56, 73, 0.5);
  font-size: 0.9375rem;
}

/* La séquence de composition ne se déclenche QUE si le script a posé la
   classe. Sans JavaScript, l'index reste visible et entier : une animation
   en `backwards` laisserait sinon la liste invisible pour toujours. */
.corpus--anime li {
  animation: composer 0.5s ease-out backwards;
  animation-delay: calc(var(--rang, 0) * 65ms);
}

.corpus li:last-child {
  border-bottom: 0;
}

.corpus li::before {
  content: counter(reglement, decimal-leading-zero);
  font-family: var(--cote);
  font-size: 0.75rem;
  color: var(--emeraude);
}

@keyframes composer {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.corpus__pied {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--trait);
  font-family: var(--cote);
  font-size: 0.75rem;
  color: var(--craie-faible);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.corpus__pied b {
  color: var(--or);
  font-weight: 500;
}

/* ─── La bande de l'épreuve (héros) ────────────────────────────────── */

.epreuve {
  margin: 2rem 0;
  padding: 1rem 0;
  border-block: 1px solid var(--trait);
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
}

.epreuve > div {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.epreuve dt {
  font-size: 0.8125rem;
  color: var(--craie-faible);
}

.epreuve dd {
  margin: 0;
  font-family: var(--cote);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--craie);
  line-height: 1;
}

/* Le seuil est le chiffre qui décide : il est le seul en or. */
.epreuve > div:last-child dd {
  color: var(--or);
}

/* ─── L'inscription gratuite (action principale) ────────────────────── */

.inscription {
  border: 1px solid var(--or);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(245, 197, 66, 0.08), var(--carte) 45%);
  padding: clamp(1.5rem, 3vw, 2rem);
  /* Elle reste sous les yeux pendant qu'on parcourt le héros sur grand
     écran. Désactivé plus bas quand la colonne passe sous le texte. */
  position: sticky;
  top: 1.5rem;
}

@media (max-width: 59.99rem) {
  .inscription {
    position: static;
  }
}

.inscription__titre {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.inscription__sous {
  color: var(--craie-faible);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  max-width: none;
}

.inscription__sous b {
  color: var(--craie);
  font-weight: 500;
}

.inscription__mentions {
  margin: 1.1rem 0 0;
  font-size: 0.75rem;
  color: var(--craie-faible);
  max-width: none;
}

/* Le lien secondaire du héros : présent, mais qui ne dispute rien au
   bouton d'inscription. */
.lien-discret {
  font-size: 0.9375rem;
  color: var(--craie-faible);
  text-decoration: none;
  border-bottom: 1px solid var(--trait);
  padding-bottom: 2px;
}

.lien-discret:hover {
  color: var(--emeraude);
  border-color: var(--emeraude);
}

/* ─── Boutons ───────────────────────────────────────────────────────── */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--corps);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.9rem 1.85rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.bouton:hover {
  transform: translateY(-1px);
}

.bouton[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.bouton--or {
  background: var(--or);
  color: var(--encre);
}

.bouton--or:hover {
  background: #ffd95c;
}

.bouton--contour {
  background: transparent;
  color: var(--craie);
  border-color: var(--trait);
}

.bouton--contour:hover {
  border-color: var(--emeraude);
  color: var(--emeraude);
}

.bouton--large {
  width: 100%;
}

/* ─── Bénéfices ─────────────────────────────────────────────────────── */

.grille {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-top: 2.5rem;
}

.fiche {
  border: 1px solid var(--trait);
  border-radius: 4px;
  padding: 1.5rem;
  background: var(--carte);
}

.fiche h3 {
  margin-bottom: 0.6rem;
}

.fiche p {
  margin: 0;
  color: var(--craie-faible);
  font-size: 0.9375rem;
}

.fiche__chiffre {
  font-family: var(--cote);
  font-size: 0.75rem;
  color: var(--emeraude);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.9rem;
}

/* ─── Pour qui ──────────────────────────────────────────────────────── */

.profils {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--trait);
}

.profils li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--trait);
}

@media (min-width: 48rem) {
  .profils li {
    grid-template-columns: 15rem 1fr;
    gap: 2rem;
    align-items: baseline;
  }
}

.profils b {
  font-family: var(--display);
  font-variation-settings: "WONK" 1;
  font-size: 1.125rem;
  font-weight: 600;
}

.profils span {
  color: var(--craie-faible);
  font-size: 0.9375rem;
}

/* ─── Formulaire ────────────────────────────────────────────────────── */

.capture {
  border: 1px solid var(--trait);
  border-radius: 4px;
  background: var(--carte);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 44rem;
  margin-top: 2.5rem;
}

.champ {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.champ label {
  font-family: var(--cote);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--craie-faible);
}

.champ input,
.champ select {
  font-family: var(--corps);
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  background: var(--encre);
  border: 1px solid var(--trait);
  border-radius: 4px;
  color: var(--craie);
}

.champ input:focus,
.champ select:focus {
  border-color: var(--emeraude);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 199, 140, 0.16);
}

.champ .aide-champ {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--craie-faible);
}

/* Mot de passe : bouton « Afficher » posé dans le champ. */
.champ__mdp {
  position: relative;
  display: grid;
}

.champ__mdp input {
  padding-right: 5.5rem;
}

.champ__oeil {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--cote);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--craie-faible);
  background: transparent;
  border: 1px solid var(--trait);
  border-radius: 3px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.champ__oeil:hover {
  color: var(--craie);
  border-color: var(--craie-faible);
}

/* Les critères du mot de passe, cochés pendant la saisie. */
.criteres {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--craie-faible);
}

.criteres[hidden] {
  display: none;
}

.criteres li::before {
  content: "○";
  display: inline-block;
  width: 1.1em;
  font-family: var(--cote);
}

.criteres li[data-ok="oui"] {
  color: var(--emeraude);
}

.criteres li[data-ok="oui"]::before {
  content: "✓";
}

/* Retiré de l'écran, mais toujours lu par les lecteurs d'écran
   (le champ y renvoie par aria-describedby). */
.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Raccourci vers le formulaire : utile seulement quand il est sous le texte. */
.heros__raccourci {
  margin-top: 1.5rem;
}

@media (min-width: 60rem) {
  .heros__raccourci {
    display: none;
  }
}

.consentement {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  margin: 1.35rem 0;
  font-size: 0.875rem;
  color: var(--craie-faible);
}

.consentement input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--emeraude);
}

.message {
  margin-top: 1rem;
  font-size: 0.9375rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--trait);
}

.message[hidden] {
  display: none;
}

.message[data-ton="ok"] {
  border-color: var(--emeraude-sourd);
  color: var(--emeraude);
  background: rgba(0, 199, 140, 0.08);
}

.message[data-ton="erreur"] {
  border-color: #7a3030;
  color: #ff9d9d;
  background: rgba(160, 50, 50, 0.1);
}

.appel-final {
  margin-top: 2.5rem;
}

/* ─── FAQ ───────────────────────────────────────────────────────────── */

.faq {
  margin-top: 2.5rem;
  border-top: 1px solid var(--trait);
}

.faq details {
  border-bottom: 1px solid var(--trait);
}

.faq summary {
  cursor: pointer;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-family: var(--display);
  font-variation-settings: "WONK" 1;
  font-size: 1.0625rem;
  font-weight: 600;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 1.1rem;
  font-family: var(--cote);
  color: var(--emeraude);
  font-size: 1.25rem;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  padding-bottom: 1.35rem;
  color: var(--craie-faible);
  font-size: 0.9375rem;
  margin: 0;
}

/* ─── Réassurance et pied ───────────────────────────────────────────── */

.reassurance {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: 2.5rem;
  padding: 0;
  list-style: none;
}

.reassurance li {
  border-left: 2px solid var(--emeraude);
  padding-left: 1rem;
}

.reassurance b {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.2rem;
}

.reassurance span {
  color: var(--craie-faible);
  font-size: 0.875rem;
}

.pied {
  border-top: 1px solid var(--trait);
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem);
  font-size: 0.8125rem;
  color: var(--craie-faible);
}

.pied .dedans {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}

/* ─── Maquettes de l'application ────────────────────────────────────────
 *
 * Ces blocs REPRODUISENT l'interface reelle, ils ne l'interpretent pas.
 * Toutes les valeurs ci-dessous sont relevees dans `src/index.css` et dans
 * les composants eux-memes, pas choisies pour l'occasion :
 *
 *   fond des cartes   hsl(210 32% 15%)  = --card
 *   bordure           hsl(210 18% 22%)  = --border
 *   texte attenue     hsl(210 12% 55%)  = --muted-foreground
 *   piste des barres  hsl(210 22% 20%)  = --muted
 *   primaire          hsl(162 100% 39%) = --primary
 *   accent            hsl(44 90% 61%)   = --accent
 *   rayon des cartes  16px              = rounded-2xl
 *   police            Plus Jakarta Sans
 *
 * Le degrade des boutons est celui de `.gold-gradient`, qui malgre son nom
 * va de l'emeraude au bleu (162 -> 207). Le reproduire dore aurait ete
 * l'erreur type d'une reconstitution « de memoire ».
 *
 * Les donnees affichees sont INVENTEES. La mention de transparence sous les
 * maquettes n'est pas une precaution de style : trois ecrans qui ressemblent
 * a des captures ne doivent pas pouvoir etre pris pour des captures.
 */

.apercu {
  --app-fond: hsl(210 40% 9%);
  --app-carte: hsl(210 32% 15%);
  --app-bord: hsl(210 18% 22%);
  --app-texte: hsl(210 20% 96%);
  --app-attenue: hsl(210 12% 55%);
  --app-piste: hsl(210 22% 20%);
  --app-primaire: hsl(162 100% 39%);
  --app-info: hsl(207 100% 50%);
  --app-accent: hsl(44 90% 61%);
  --app-succes: hsl(142 71% 45%);
  --app-orange: hsl(38 92% 50%);
  --app-rouge: hsl(0 84% 60%);
  --app-police: "Plus Jakarta Sans", var(--corps);
}

.maquettes {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
  .maquettes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* L'ecran du score porte le message : il occupe toute la largeur. */
  .maquette--large {
    grid-column: 1 / -1;
  }
}

/* La carte, a l'identique de `.bg-card border border-border rounded-2xl p-6`. */
.maquette {
  font-family: var(--app-police);
  background: var(--app-carte);
  border: 1px solid var(--app-bord);
  border-radius: 16px;
  padding: 1.5rem;
  color: var(--app-texte);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.875rem;
  line-height: 1.5;
  /* Decoratif : rien ici n'est un vrai controle. */
  user-select: none;
}

.maquette__titre {
  font-family: var(--app-police);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: 0;
  color: var(--app-texte);
}

/* ── Ecran 1 : le score de preparation ── */

.mq-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 34rem) {
  .mq-score {
    flex-direction: row;
    align-items: center;
  }
}

.mq-jauge {
  position: relative;
  flex-shrink: 0;
  width: 140px;
  height: 140px;
}

.mq-jauge svg {
  transform: rotate(-90deg);
}

.mq-jauge__centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mq-jauge__valeur {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
}

.mq-jauge__sur {
  font-size: 10px;
  color: var(--app-attenue);
  font-weight: 500;
}

.mq-score__detail {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.mq-palier {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  max-width: none;
}

.mq-palier--or {
  color: hsl(50 90% 50%);
}

.mq-ligne {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.mq-ligne__nom {
  font-size: 0.75rem;
  color: var(--app-attenue);
  width: 5rem;
  flex-shrink: 0;
}

.mq-piste {
  flex: 1;
  height: 6px;
  background: var(--app-piste);
  border-radius: 999px;
  overflow: hidden;
}

.mq-piste__fond {
  height: 100%;
  border-radius: 999px;
}

.mq-ligne__valeur {
  font-size: 10px;
  color: var(--app-attenue);
  font-weight: 500;
  width: 2.5rem;
  text-align: right;
}

/* Values moved out of inline style="" attributes so the CSP needs no
   'unsafe-inline' in style-src. One class per width used in index.html. */
.mq-piste__fond--or { background: hsl(50 90% 50%); }
.mq-piste__fond--vert { background: hsl(142 71% 45%); }
.mq-piste__fond--ambre { background: hsl(38 92% 50%); }
.mq-piste__fond--rouge { background: hsl(0 84% 60%); }
.mq-w-41 { width: 41%; }
.mq-w-52 { width: 52%; }
.mq-w-60 { width: 60%; }
.mq-w-64 { width: 64%; }
.mq-w-67 { width: 67%; }
.mq-w-69 { width: 69%; }
.mq-w-73 { width: 73%; }
.mq-w-76 { width: 76%; }
.mq-w-88 { width: 88%; }

/* ── Ecran 2 : l'analyse par theme ── */

.mq-theme {
  margin-bottom: 0.9rem;
}

.mq-theme__entete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8125rem;
  margin-bottom: 0.3rem;
}

.mq-theme__nom {
  font-weight: 500;
}

.mq-theme__chiffre {
  color: var(--app-attenue);
  font-size: 0.75rem;
}

.mq-theme--dernier {
  margin-bottom: 0;
}

.mq-theme .mq-piste {
  height: 10px;
}

/* ── Ecran 3 : l'examen en cours ── */

.mq-exam__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--app-bord);
  margin-bottom: 1.1rem;
}

.mq-chrono {
  font-family: "JetBrains Mono", var(--cote);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--app-accent);
}

.mq-exam__rang {
  font-size: 0.8125rem;
  color: var(--app-attenue);
  font-weight: 500;
}

.mq-question {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: none;
  line-height: 1.45;
}

.mq-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--app-bord);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.mq-option--choisie {
  border-color: var(--app-primaire);
  background: hsl(162 100% 39% / 0.08);
}

.mq-option__lettre {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: var(--app-piste);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mq-option--choisie .mq-option__lettre {
  background: var(--app-primaire);
  color: #fff;
}

.mq-grille {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--app-bord);
}

.mq-grille span {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--app-piste);
  color: var(--app-attenue);
}

.mq-grille span[data-etat="repondu"] {
  background: var(--app-primaire);
  color: #fff;
}

.mq-grille span[data-etat="courant"] {
  background: transparent;
  color: var(--app-accent);
  box-shadow: inset 0 0 0 2px var(--app-accent);
}

/* ── La mention de transparence ── */

.apercu__mention {
  margin-top: 2rem;
  border: 1px solid var(--or);
  border-left-width: 3px;
  background: rgba(245, 197, 66, 0.07);
  border-radius: 4px;
  padding: 0.9rem 1.15rem;
  font-size: 0.9375rem;
  max-width: 70ch;
}

.apercu__mention b {
  color: var(--or);
}

/* ─── Pages légales ─────────────────────────────────────────────────── */

.legal .pied-legal {
  font-size: 0.8125rem;
  margin-top: 2rem;
}

.legal h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 0.5rem;
}

.legal h2 {
  font-size: 1.375rem;
  margin-top: 3rem;
  margin-bottom: 0.9rem;
}

.legal p,
.legal li {
  max-width: 70ch;
}

.legal__liste {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.55rem;
}

.legal__liste li {
  font-size: 0.9375rem;
  color: var(--craie-faible);
}

.legal__liste b {
  color: var(--craie);
  font-weight: 500;
}

/* Un espace réservé doit se voir. Il ne s'agit pas de décorer une omission
   mais de rendre impossible de la publier sans la remarquer. */
.a-completer {
  font-family: var(--cote);
  font-size: 0.8125em;
  background: rgba(245, 197, 66, 0.14);
  border: 1px dashed var(--or);
  color: var(--or);
  padding: 0.1em 0.45em;
  border-radius: 2px;
}

.avertissement {
  border: 1px solid var(--or);
  border-left-width: 3px;
  background: rgba(245, 197, 66, 0.07);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  max-width: 70ch;
  margin: 2rem 0;
}

.retour {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: none;
}

/* ─── Page de confirmation ──────────────────────────────────────────── */

.merci {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem clamp(1.25rem, 5vw, 3rem);
  text-align: left;
}

.merci__carte {
  max-width: 38rem;
  width: 100%;
  border: 1px solid var(--trait);
  border-radius: 4px;
  background: var(--carte);
  padding: clamp(1.75rem, 5vw, 3rem);
}

.merci__etat {
  font-family: var(--cote);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--craie-faible);
}

.merci__etat[data-ton="ok"] {
  color: var(--emeraude);
}

.merci__etat[data-ton="attente"] {
  color: var(--or);
}

.merci__etat[data-ton="erreur"] {
  color: #ff9d9d;
}

/* Le point qui bat pendant l'attente d'activation. */
.battement {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.5rem;
  animation: battre 1.4s ease-in-out infinite;
}

@keyframes battre {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
