/* =====================================================================
   SYSTÈME DE DESIGN DU SITE
   Couleurs et polices : css/theme.css (ne rien écrire en dur ici).
   Mobile d'abord : tout est pensé pour 360-430 px, puis élargi.
   ===================================================================== */

/* ---------- 1. Variables du système ---------- */
:root {
  /* espacements : une échelle, pas de valeurs au hasard */
  --e-1: 4px;  --e-2: 8px;  --e-3: 12px; --e-4: 16px;
  --e-5: 24px; --e-6: 32px; --e-7: 48px; --e-8: 64px;
  --gouttiere: 18px;
  --colonne: 560px;
  --colonne-large: 980px;

  /* tailles de texte : jamais sous 16 px pour ce qui se lit */
  --t-petit: 14px;       /* mentions, légendes */
  --t-texte: 17px;
  --t-question: 21px;
  --t-titre: 30px;
  --t-une: 40px;

  /* formes */
  --rayon: 10px;
  --rayon-petit: 6px;
  --cible: 54px;         /* hauteur minimale d'une cible tactile */

  /* mouvement : utile et rapide */
  --d-vite: 160ms;
  --d-pose: 420ms;
  --d-lent: 700ms;
  --glisse: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--c-fond); color: var(--c-texte);
  font: 400 var(--t-texte)/1.45 var(--f-texte);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-texte); outline-offset: 3px; }
.cache-visuel { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cadre { width: 100%; max-width: calc(var(--colonne) + 2 * var(--gouttiere)); margin: 0 auto; padding: 0 var(--gouttiere); }
.cadre-large { max-width: calc(var(--colonne-large) + 2 * var(--gouttiere)); }
.saut { position: absolute; left: var(--e-2); top: -60px; z-index: 50; padding: var(--e-2) var(--e-3); background: var(--c-accent); color: var(--c-sur-accent); border-radius: var(--rayon-petit); }
.saut:focus { top: var(--e-2); }

/* ---------- 3. Typographie ---------- */
.titre, h1, h2, h3 { font-family: var(--f-titre); font-weight: var(--titre-graisse); text-transform: var(--titre-casse); letter-spacing: var(--titre-espace); line-height: 1; margin: 0; }
h1 { font-size: var(--t-une); }
h2 { font-size: var(--t-titre); }
h3 { font-size: 22px; }
p { margin: 0; }
.surtitre { font: 600 15px/1.15 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-texte); }
.doux { color: var(--c-texte-doux); }
.petit { font-size: var(--t-petit); }
.chiffre { font-family: var(--f-titre); font-variant-numeric: tabular-nums; }
.pile > * + * { margin-top: var(--e-4); }
.pile-serree > * + * { margin-top: var(--e-2); }

/* ---------- 4. En-tête et pied ---------- */
.barre { padding: var(--e-3) 0 var(--e-2); }
.barre .cadre { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); }
.marque { display: flex; align-items: center; gap: 9px; font: 700 21px/1 var(--f-titre); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.marque-nom { display: inline-flex; align-items: center; gap: 3px; text-transform: none; letter-spacing: .01em; font-weight: 600; font-size: 23px; }
.marque-vtc { display: inline-grid; place-items: center; height: 22px; padding: 0 5px; margin-left: 2px; border: 2px solid currentColor; border-radius: 4px; font-size: 16px; font-weight: 700; letter-spacing: .06em; line-height: 1; }
.barre-theme { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--c-trait-fort); background: transparent; cursor: pointer; }
.barre-theme svg { width: 22px; height: 22px; }
.barre-theme:hover { border-color: var(--c-texte); }
.barre-theme .soleil, :root[data-theme="clair"] .barre-theme .lune { display: block; }
.barre-theme .lune, :root[data-theme="clair"] .barre-theme .soleil { display: none; }
.marque-signe { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid currentColor; position: relative; }
.marque-signe::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: currentColor; }
.barre-droite { display: flex; align-items: center; gap: var(--e-2); }
.independant { font-size: 13px; line-height: 1.2; color: var(--c-texte-doux); text-align: right; }
.barre-lien { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--e-3); border: 1.5px solid var(--c-trait-fort); border-radius: var(--rayon-petit); font: 600 15px/1 var(--f-titre); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.barre-lien:hover { border-color: var(--c-texte); }
.barre-compte { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--c-trait-fort); }
.barre-compte svg { width: 22px; height: 22px; }
.barre-compte:hover { border-color: var(--c-texte); }
.barre-compte.connecte { border-color: var(--c-accent-trace); color: var(--c-accent-trace); }

.pied { margin-top: var(--e-7); padding: var(--e-5) 0 var(--e-6); border-top: 1px solid var(--c-trait); font-size: var(--t-petit); color: var(--c-texte-doux); }
.pied nav { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-4); margin-top: var(--e-3); }
.pied nav a { color: var(--c-texte); display: inline-block; padding: var(--e-1) 0; }
.pied-mention { max-width: 60ch; }

/* ---------- 5. Boutons, liens, champs ---------- */
.bouton {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: var(--cible); padding: var(--e-3) var(--e-4);
  background: var(--c-accent); color: var(--c-sur-accent);
  border: 0; border-radius: var(--rayon); cursor: pointer;
  font: 700 20px/1.1 var(--f-titre); letter-spacing: .05em; text-transform: uppercase; text-align: center; text-decoration: none;
  transition: transform var(--d-vite), filter var(--d-vite), opacity var(--d-vite);
}
.bouton::after { content: ""; flex: none; width: 9px; height: 9px; border: solid currentColor; border-width: 2.5px 2.5px 0 0; transform: rotate(45deg); }
.bouton:hover { filter: brightness(1.07); }
.bouton:active { transform: translateY(1px) scale(.99); }
.bouton:disabled, .bouton[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.bouton.second { background: transparent; color: var(--c-texte); border: 1.5px solid var(--c-texte); }
.bouton.second::after, .bouton.sans-fleche::after { display: none; }
.bouton.google { background: var(--c-texte); color: var(--c-fond); }
.bouton.google::after { display: none; }
.bouton-g { width: 20px; height: 20px; flex: none; }
.bouton + .bouton { margin-top: var(--e-3); }
.lien { display: block; width: 100%; padding: var(--e-3); background: none; border: 0; color: var(--c-texte-doux); font-size: 15px; text-decoration: underline; cursor: pointer; text-align: center; }
.lien:hover { color: var(--c-texte); }

.champ { display: block; width: 100%; min-height: var(--cible); padding: var(--e-3) var(--e-4); background: var(--c-papier); color: var(--c-papier-texte); border: 2px solid var(--c-texte); border-radius: var(--rayon); font-size: var(--t-texte); }
.champ::placeholder { color: var(--c-papier-doux); }
.champ:focus { outline: none; border-color: var(--c-accent-trace); box-shadow: 0 0 0 4px var(--c-accent-halo); }
.etiquette { display: block; margin-bottom: var(--e-2); font-weight: 600; }
.case { display: grid; grid-template-columns: 28px 1fr; gap: var(--e-3); align-items: start; cursor: pointer; font-size: 16px; line-height: 1.4; }
.case input { appearance: none; -webkit-appearance: none; width: 28px; height: 28px; margin: 0; border: 2px solid var(--c-texte); border-radius: var(--rayon-petit); display: grid; place-items: center; cursor: pointer; background: transparent; }
.case input:checked { background: var(--c-accent); border-color: var(--c-accent); }
.case input:checked::after { content: ""; width: 12px; height: 7px; border: solid var(--c-sur-accent); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
.case input:focus-visible { outline: 2px solid var(--c-texte); outline-offset: 3px; }

/* ---------- 6. Messages ---------- */
.alerte { padding: var(--e-3) var(--e-4); border-left: 3px solid var(--c-texte); background: var(--c-surface); border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0; font-size: 16px; }
.alerte.ok { border-color: var(--c-accent-trace); }
.alerte b { display: block; margin-bottom: 2px; }
.bandeau-demo { background: var(--c-surface); border-bottom: 1px solid var(--c-trait); font-size: var(--t-petit); color: var(--c-texte-doux); padding: var(--e-2) 0; }
.bandeau-demo b { color: var(--c-texte); }

/* ---------- 7. Le trajet : la progression comme un itinéraire ---------- */
.trajet-infos { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e-3); font: 600 15px/1.2 var(--f-titre); letter-spacing: .06em; text-transform: uppercase; color: var(--c-texte-doux); }
.trajet-infos .surtitre { letter-spacing: .06em; }
.trajet-infos > :last-child { white-space: nowrap; }
.voie { --n: 6; list-style: none; margin: var(--e-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr) 26px; align-items: center; position: relative; height: 26px; }
.voie::before { content: ""; position: absolute; left: 7px; right: 13px; top: 50%; height: 3px; margin-top: -1.5px; background: repeating-linear-gradient(90deg, var(--c-trait-fort) 0 10px, transparent 10px 18px); }
.voie::after { content: ""; position: absolute; left: 7px; top: 50%; height: 3px; margin-top: -1.5px; width: calc((100% - 20px) * var(--avance, 0)); background: var(--c-accent-trace); border-radius: 2px; transition: width var(--d-pose) var(--glisse); }
.voie li { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--c-fond); border: 2px solid var(--c-texte-doux); transition: background var(--d-vite), border-color var(--d-vite), transform var(--d-pose) var(--glisse); }
.voie li.juste { background: var(--c-accent-trace); border-color: var(--c-accent-trace); }
.voie li.faux { border-color: var(--c-texte); background: linear-gradient(45deg, transparent 43%, var(--c-texte) 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, var(--c-texte) 43% 57%, transparent 57%) var(--c-fond); }
.voie li.fait { background: var(--c-texte-doux); border-color: var(--c-texte-doux); }
.voie li.courant { border-color: var(--c-accent-trace); transform: scale(1.35); box-shadow: 0 0 0 5px var(--c-accent-halo); }
.voie li.arrivee { width: 26px; height: 26px; border-radius: var(--rayon-petit); justify-self: end; display: grid; place-items: center; transform: none; box-shadow: none; }
.voie li.arrivee::after { content: ""; width: 12px; height: 9px; border: 2px solid var(--c-texte-doux); border-radius: 2px; }
.voie li.arrivee.atteinte { background: var(--c-accent-trace); border-color: var(--c-accent-trace); }
.voie li.arrivee.atteinte::after { border-color: var(--c-sur-accent); }

/* ---------- 8. La question ---------- */
.consigne { display: flex; gap: var(--e-3); align-items: flex-start; }
.consigne-signe { flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--c-accent); color: var(--c-sur-accent); display: grid; place-items: center; }
.consigne-signe svg { width: 26px; height: 26px; }
.question { font: 600 var(--t-question)/1.24 var(--f-texte); letter-spacing: -.005em; }
.aide-choix { margin-top: var(--e-2); font-size: 16px; color: var(--c-texte-doux); }

.choix-liste { display: grid; gap: var(--e-2); margin-top: var(--e-4); }
.choix {
  display: grid; grid-template-columns: 34px 1fr 24px; gap: var(--e-3); align-items: center;
  width: 100%; min-height: var(--cible); padding: 9px var(--e-3); text-align: left;
  background: var(--c-surface); border: 1.5px solid var(--c-trait); border-radius: var(--rayon); cursor: pointer;
  position: relative; overflow: hidden;
  transition: border-color var(--d-vite), transform var(--d-vite);
}
.choix::before { content: ""; position: absolute; inset: 0; background: var(--c-accent); transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--glisse); }
.choix > * { position: relative; }
.choix:hover:not(:disabled) { border-color: var(--c-trait-fort); }
.choix:focus-visible { outline: none; border-color: var(--c-accent-trace); }
.choix:active:not(:disabled) { transform: scale(.985); }
.choix-lettre { height: 26px; border-radius: 5px; border: 1.5px solid currentColor; display: grid; place-items: center; font: 700 16px/1 var(--f-titre); letter-spacing: .04em; }
.choix-texte { font-size: 16.5px; line-height: 1.28; }
.choix-marque { width: 24px; height: 24px; border-radius: var(--rayon-petit); border: 2px solid var(--c-trait-fort); display: grid; place-items: center; }
/* cochée, avant validation */
.choix[aria-pressed="true"] { border-color: var(--c-accent-trace); }
.choix[aria-pressed="true"] .choix-marque { background: var(--c-accent); border-color: var(--c-accent); }
.choix[aria-pressed="true"] .choix-marque::after { content: ""; width: 11px; height: 6px; border: solid var(--c-sur-accent); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
/* après validation */
.choix:disabled { cursor: default; color: var(--c-texte-doux); }
.choix.bonne { color: var(--c-sur-accent); border-color: var(--c-accent); }
.choix.bonne::before { transform: scaleX(1); }
.choix.bonne .choix-texte { font-weight: 600; }
.choix.bonne .choix-marque { border-color: var(--c-sur-accent); background: transparent; }
.choix.bonne .choix-marque::after { content: ""; width: 12px; height: 7px; border: solid var(--c-sur-accent); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
.choix.erreur { color: var(--c-texte); border-color: var(--c-texte); }
.choix.erreur .choix-texte { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.choix.erreur .choix-marque { background: none; border-color: var(--c-texte); }
.choix.erreur .choix-marque::after { content: "×"; font: 700 22px/1 var(--f-texte); color: var(--c-texte); transform: translateY(-1px); border: 0; width: auto; height: auto; }
.choix.oubliee { border-style: dashed; border-color: var(--c-accent-trace); }

.retour { margin-top: var(--e-4); padding-left: var(--e-4); border-left: 3px solid var(--c-texte); animation: monte var(--d-pose) var(--glisse); }
.retour.juste { border-color: var(--c-accent-trace); }
.retour b { display: block; font: 700 19px/1.1 var(--f-titre); letter-spacing: .05em; text-transform: uppercase; }
.retour p { margin-top: var(--e-1); color: var(--c-texte-doux); font-size: 16px; }
.source { display: block; margin-top: var(--e-2); font-size: 13.5px; color: var(--c-texte-doux); }
@keyframes monte { from { opacity: 0; transform: translateY(8px); } }

/* ---------- 9. La réponse à écrire ---------- */
.saisie { display: block; width: 100%; min-height: 140px; padding: var(--e-4); resize: vertical; background: var(--c-papier); color: var(--c-papier-texte); border: 2px solid var(--c-texte); border-radius: var(--rayon); font: 400 17px/1.5 var(--f-texte); }
.saisie::placeholder { color: var(--c-papier-doux); }
.saisie:focus { outline: none; border-color: var(--c-accent-trace); box-shadow: 0 0 0 4px var(--c-accent-halo); }
.saisie-pied { display: flex; justify-content: space-between; gap: var(--e-3); margin-top: var(--e-2); min-height: 20px; font-size: var(--t-petit); color: var(--c-texte-doux); }

/* ---------- 10. La correction d'une réponse écrite ---------- */
.copie { padding: var(--e-4); border-radius: var(--rayon); background: var(--c-papier); color: var(--c-papier-texte); border: 1.5px solid var(--c-trait); font-size: 16.5px; position: relative; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.copie mark { background: none; color: inherit; font-weight: 600; box-shadow: inset 0 -.42em 0 transparent; transition: box-shadow 500ms var(--glisse); }
.copie.lue mark { box-shadow: inset 0 -.42em 0 var(--c-accent-surligne); }
.copie.en-lecture::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--c-accent-trace); animation: balaie 1.3s linear infinite; }
@keyframes balaie { from { left: 0; } to { left: 100%; } }
.lecture { font: 600 15px/1.2 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-texte); }
.bareme { list-style: none; margin: 0; padding: 0; position: relative; }
.bareme::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 2px; background: var(--c-trait); }
.critere { display: grid; grid-template-columns: 22px 1fr auto; gap: var(--e-3); align-items: start; padding: 9px 0; position: relative; color: var(--c-texte-doux); }
.critere-marque { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--c-texte-doux); background: var(--c-fond); transition: background var(--d-vite), border-color var(--d-vite), transform var(--d-pose) var(--glisse); }
.critere-texte b { display: block; font-weight: 500; color: inherit; }
.critere-texte span { display: block; margin-top: 2px; font-size: 16px; color: var(--c-texte-doux); }
.critere-points { font: 700 20px/1.1 var(--f-titre); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.critere.acquis { color: var(--c-texte); }
.critere.acquis .critere-marque { background: var(--c-accent-trace); border-color: var(--c-accent-trace); transform: scale(1.12); }
.critere.acquis .critere-points { color: var(--c-accent-texte); }
.critere.partiel .critere-marque { background: linear-gradient(90deg, var(--c-accent-trace) 50%, var(--c-fond) 50%); border-color: var(--c-accent-trace); }
.critere.manque .critere-marque { border-color: var(--c-texte); }
.critere.manque { color: var(--c-texte); }
.note-ligne { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--e-3); border-top: 1.5px solid var(--c-trait); font: 600 16px/1 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; }
.note-ligne strong { font: 700 40px/1 var(--f-titre); color: var(--c-accent-texte); font-variant-numeric: tabular-nums; }
.modele { font-size: 16px; color: var(--c-texte-doux); }
.modele b { color: var(--c-texte); font-weight: 600; }

/* ---------- 11. Le score ---------- */
.compteur { display: flex; align-items: flex-end; gap: 6px; margin: 0; font: 700 132px/.8 var(--f-titre); color: var(--c-accent-texte); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.compteur small { font-size: 44px; line-height: 1; color: var(--c-texte-doux); padding-bottom: 6px; }
.compteur.moyen { font-size: 104px; }
.detail { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); font: 600 15px/1.2 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--c-texte-doux); }
.detail b { color: var(--c-texte); font-weight: 700; }
.phrase { font: 600 20px/1.25 var(--f-texte); }

/* ---------- 12. Sections claires (l'autre couleur principale) ---------- */
.clair { --c-accent-texte: var(--c-inverse-accent); --c-accent-trace: var(--c-inverse-accent); --c-texte-doux: var(--c-inverse-doux); --c-trait: var(--c-inverse-trait); background: var(--c-inverse-fond); color: var(--c-inverse-texte); padding: var(--e-6) 0 var(--e-7); }
.clair .doux, .clair p.doux { color: var(--c-inverse-doux); }
.clair :focus-visible { outline-color: var(--c-inverse-texte); }
.clair .bouton.second { color: var(--c-inverse-texte); border-color: var(--c-inverse-texte); }
.clair .alerte { background: transparent; border-color: var(--c-inverse-texte); }
.clair + .pied { margin-top: 0; }
.plan { list-style: none; margin: var(--e-4) 0 0; padding: 0; position: relative; }
.plan::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px; width: 2px; background: repeating-linear-gradient(180deg, currentColor 0 8px, transparent 8px 14px); opacity: .35; }
.plan li { display: grid; grid-template-columns: 14px 1fr auto; gap: var(--e-4); align-items: center; padding: 8px 0; font-weight: 500; }
.plan li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; background: var(--c-inverse-fond); position: relative; }
.plan li span { font: 600 14px/1 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; opacity: .68; white-space: nowrap; }

/* ---------- 13. Tableaux et notes par matière ---------- */
.tableau { width: 100%; border-collapse: collapse; font-size: 16px; }
.tableau th { text-align: left; font: 600 13.5px/1.2 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--c-texte-doux); padding: 0 var(--e-2) var(--e-2) 0; }
.tableau td { padding: 10px var(--e-2) 10px 0; border-top: 1px solid var(--c-trait); vertical-align: top; }
.tableau td.nombre, .tableau th.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 12px; }
.lettre { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 5px; border-radius: 5px; border: 1.5px solid currentColor; font: 700 15px/1 var(--f-titre); letter-spacing: .04em; }

.matieres { list-style: none; margin: 0; padding: 0; }
.matiere { padding: var(--e-3) 0; border-top: 1px solid var(--c-trait); }
.matiere-tete { display: flex; align-items: baseline; gap: var(--e-3); }
.matiere-nom { flex: 1; font-weight: 500; line-height: 1.25; }
.matiere-note { font: 700 24px/1 var(--f-titre); font-variant-numeric: tabular-nums; white-space: nowrap; }
.matiere-note small { font-size: 15px; color: var(--c-texte-doux); }
.matiere-jauge { position: relative; height: 8px; margin-top: var(--e-2); border-radius: 4px; background: var(--c-trait); }
.matiere-jauge i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c-texte-doux); width: 0; transition: width var(--d-lent) var(--glisse); }
.matiere-jauge .seuil { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--c-texte); }
.matiere-pied { display: flex; justify-content: space-between; gap: var(--e-3); margin-top: 6px; font-size: 13.5px; color: var(--c-texte-doux); }
.matiere.elimine .matiere-note { color: var(--c-texte); }
.matiere.elimine .matiere-jauge i { background: repeating-linear-gradient(45deg, var(--c-texte) 0 4px, transparent 4px 8px); }
.matiere.pire { background: var(--c-surface); margin: 0 calc(var(--e-3) * -1); padding-left: var(--e-3); padding-right: var(--e-3); border-radius: var(--rayon-petit); border-top-color: transparent; }
.matiere.pire .matiere-jauge i { background: var(--c-accent-trace); }
.etiquette-alerte { display: inline-block; padding: 2px 7px; border: 1.5px solid currentColor; border-radius: 4px; font: 700 12.5px/1.2 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- 14. Correction verrouillée : hachures, pas de flou ---------- */
.verrou { display: grid; grid-template-columns: 36px 1fr; gap: var(--e-3); align-items: center; padding: var(--e-4); border-radius: var(--rayon); border: 1.5px dashed var(--c-trait-fort); background: repeating-linear-gradient(135deg, var(--c-surface) 0 10px, var(--c-fond) 10px 20px); }
.verrou svg { width: 30px; height: 30px; }
.verrou b { display: block; }
.verrou span { color: var(--c-texte-doux); font-size: 16px; }

/* ---------- 15. Blocs repliables ---------- */
.repli { border-top: 1px solid var(--c-trait); }
.repli summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--e-3); min-height: var(--cible); cursor: pointer; font-weight: 600; }
.repli summary::-webkit-details-marker { display: none; }
.repli summary::after { content: ""; flex: none; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-3px); transition: transform var(--d-vite); }
.repli[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.repli-corps { padding-bottom: var(--e-4); }
.clair .repli { border-color: var(--c-inverse-trait); }

/* ---------- 16. L'attente : une voiture qui roule ---------- */
.route-attente { position: relative; height: 26px; margin: var(--e-4) 0; }
.route-attente::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: repeating-linear-gradient(90deg, var(--c-trait-fort) 0 10px, transparent 10px 18px); animation: defile .6s linear infinite; }
.route-attente::after { content: ""; position: absolute; top: 50%; left: 0; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--c-accent-trace); box-shadow: 0 0 0 6px var(--c-accent-halo); animation: avance 2.4s var(--glisse) infinite; }
@keyframes defile { to { background-position: -18px 0; } }
@keyframes avance { 0% { left: 0; } 50% { left: calc(100% - 18px); } 100% { left: 0; } }

/* ---------- 17. Offres et prix ---------- */
.offre { position: relative; padding: var(--e-5) var(--e-4) var(--e-4); border-radius: var(--rayon); border: 2px solid var(--c-accent-trace); background: var(--c-surface); }
.offre-badge { position: absolute; top: -13px; left: var(--e-4); padding: 4px 10px; border-radius: 5px; background: var(--c-accent); color: var(--c-sur-accent); font: 700 14px/1 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; }
.offre-prix { font: 700 72px/.9 var(--f-titre); font-variant-numeric: tabular-nums; }
.offre-prix small { font-size: 22px; color: var(--c-texte-doux); letter-spacing: .02em; }
.offre ul { list-style: none; margin: var(--e-4) 0 0; padding: 0; }
.offre li { position: relative; padding: 6px 0 6px 28px; }
.liste-coches { list-style: none; margin: 0; padding: 0; }
.liste-coches li { position: relative; padding: 6px 0 6px 28px; }
.liste-coches li::before, .offre li::before, .liste-coches li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px; border: solid var(--c-accent-trace); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.places { font: 600 15px/1.2 var(--f-titre); letter-spacing: .06em; text-transform: uppercase; color: var(--c-texte-doux); }
.places-jauge { height: 6px; margin-top: var(--e-2); border-radius: 3px; background: var(--c-trait); overflow: hidden; }
.places-jauge i { display: block; height: 100%; background: var(--c-accent-trace); }
.garantie { display: grid; grid-template-columns: 52px 1fr; gap: var(--e-4); align-items: start; padding: var(--e-4); border-radius: var(--rayon); border: 1.5px solid var(--c-texte); }
.garantie svg { width: 52px; height: 52px; }
.garantie b { display: block; font: 700 22px/1.05 var(--f-titre); text-transform: uppercase; letter-spacing: .03em; }
.garantie p { margin-top: var(--e-2); font-size: 16px; color: var(--c-texte-doux); }
.confiance { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-4); font-size: var(--t-petit); color: var(--c-texte-doux); }
.confiance span { display: inline-flex; align-items: center; gap: 6px; }
.confiance svg { width: 16px; height: 16px; }

/* ---------- 18. L'examen ---------- */
.examen-tete { position: sticky; top: 0; z-index: 10; background: var(--c-fond); border-bottom: 1px solid var(--c-trait); padding: var(--e-2) 0 var(--e-3); }
.examen-tete .cadre { display: grid; gap: var(--e-2); }
.examen-ligne { display: flex; justify-content: space-between; align-items: center; gap: var(--e-3); }
.epreuve-nom { display: flex; align-items: center; gap: var(--e-2); min-width: 0; font: 600 16px/1.15 var(--f-titre); letter-spacing: .05em; text-transform: uppercase; }
.epreuve-nom span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chrono { font: 700 26px/1 var(--f-titre); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--c-accent-texte); white-space: nowrap; }
.chrono.presse { animation: clignote 1s steps(2) infinite; }
@keyframes clignote { 50% { opacity: .45; } }
.voie.epreuves { --n: 7; margin-top: 0; }
.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille { min-width: 38px; height: 38px; padding: 0 6px; border-radius: var(--rayon-petit); border: 1.5px solid var(--c-trait-fort); background: transparent; font: 600 15px/1 var(--f-titre); cursor: pointer; font-variant-numeric: tabular-nums; }
.pastille.repondue { background: var(--c-texte-doux); color: var(--c-fond); border-color: transparent; }
.pastille.courante { border-color: var(--c-accent-trace); box-shadow: 0 0 0 3px var(--c-accent-halo); }
.examen-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--e-3); margin-top: var(--e-5); }
.examen-nav .bouton { margin: 0; }
.texte-support { padding: var(--e-4); border-radius: var(--rayon); background: var(--c-papier); color: var(--c-papier-texte); border: 1.5px solid var(--c-trait); font-size: 16.5px; line-height: 1.55; max-height: 46vh; overflow: auto; }
.texte-support h3 { margin-bottom: var(--e-2); font-size: 20px; }
.texte-support p + p { margin-top: var(--e-3); }

body:not(.en-examen) .examen-tete { display: none; }
body.en-examen .barre, body.en-examen .pied, body.en-examen .bandeau-demo { display: none; }
.revue { padding: var(--e-3) 0; border-top: 1px solid var(--c-trait); }
.revue-q { font-weight: 600; line-height: 1.3; }
.revue-r { margin-top: 6px; font-size: 16px; }
.revue-r span { display: block; }
.revue-r .ok { color: var(--c-accent-texte); }

/* ---------- 19. Textes longs (mentions, CGV, FAQ) ---------- */
.prose { max-width: 66ch; }
.prose h2 { margin: var(--e-6) 0 var(--e-3); font-size: 24px; }
.prose h3 { margin: var(--e-5) 0 var(--e-2); font-size: 19px; }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--e-3); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: var(--e-1); }
.a-completer { background: var(--c-accent-halo); border-bottom: 2px solid var(--c-accent-trace); padding: 0 3px; }

/* ---------- 20. Mise en page de l'accueil ---------- */
.accroche h1 { font-size: 39px; line-height: .98; }
.accroche h1 span { display: block; color: var(--c-texte-doux); }
.accroche h1 strong { display: block; font-weight: inherit; }
body.lance .accroche { display: none; }
.preuves { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e-3); margin-top: var(--e-5); }
.preuve b { display: block; font: 700 34px/1 var(--f-titre); font-variant-numeric: tabular-nums; }
.preuve span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.3; }
/* Le duel « Vous – L'examen » : un panneau, pas un tableau d'affichage sportif */
.duel { display: grid; grid-template-columns: 1fr auto 18px auto 1fr; align-items: center; gap: var(--e-3); margin-top: var(--e-4); padding: var(--e-3) var(--e-4); border: 2px solid var(--c-texte); border-radius: var(--rayon-petit); }
.duel-camp { font: 600 15px/1.1 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--c-texte-doux); }
.duel-camp:last-child { text-align: right; }
.duel strong { font: 700 52px/.9 var(--f-titre); font-variant-numeric: tabular-nums; }
.duel .duel-vous { color: var(--c-accent-texte); }
.duel i { height: 4px; background: var(--c-texte); border-radius: 2px; }
.chiffres { display: grid; gap: var(--e-4); margin-top: var(--e-5); }
.chiffres .preuve { display: grid; grid-template-columns: 96px 1fr; gap: 2px var(--e-3); align-items: baseline; }
.chiffres .preuve b { grid-row: span 2; font: 700 34px/1 var(--f-titre); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chiffres .preuve span { margin: 0; font-size: 16px; line-height: 1.35; }
.chiffres .preuve small { font-size: 13px; line-height: 1.35; }
.installer { display: grid; grid-template-columns: 44px 1fr; gap: var(--e-3); align-items: center; padding: var(--e-3) var(--e-4); border-radius: var(--rayon); border: 1.5px solid var(--c-trait-fort); }
.installer img { width: 44px; height: 44px; border-radius: 10px; }

/* ---------- 21. Écrans plus larges ---------- */
@media (min-width: 720px) {
  :root { --gouttiere: 28px; --t-une: 48px; }
  .accroche h1 { font-size: 52px; }
  .compteur { font-size: 160px; }
}

/* ---------- 22. Moins d'animations ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .route-attente::after { left: 40%; }
}
