/* MY PSYCHO — auto-école du psychométrique.
   Système visuel : piste 200-800, anneaux par domaine, parcours par chapitre. */

:root {
  --encre: #211b3a;
  --encre-2: #5b5478;
  --encre-3: #6a638a;   /* 4,5:1 minimum sur page, carte, violet et jaune clairs */
  --page: #f7f4ff;
  --carte: #ffffff;
  --trait: #eae4f8;
  --violet: #5b3df5;
  --violet-clair: #ece7ff;
  --menthe: #00a880;
  --menthe-clair: #d9f5ed;
  --corail: #f5416c;
  --corail-clair: #ffe5ec;
  --jaune: #ffc23c;
  --jaune-clair: #fff3d6;
  --asphalte: #2b2740;
  /* jetons de texte et de surface que le mode nuit redéfinit (mêmes valeurs qu'avant en clair) */
  --violet-texte: #5b3df5;
  --menthe-texte: #00a880;
  --corail-texte: #f5416c;
  --jaune-texte: #8a5a00;
  --menthe-fonce: #00734f;
  --corail-fonce: #b3234a;
  --doux-texte: #5b3df5;
  --menthe-jauge: #00a880;
  --gris-clair: #ece8f7;
  --sur-encre: #ffffff;
  --bouton-blanc: #ffffff;
  --verre: rgba(255, 255, 255, .95);
  --verre-haut: rgba(255, 255, 255, .88);
  --page-0: rgba(247, 244, 255, 0);
  --voile: rgba(247, 244, 255, .9);
  --dom: var(--violet);
  --dom-clair: var(--violet-clair);
  --dom-texte: var(--violet-texte);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --ombre: 0 1px 2px rgba(33, 27, 58, .04), 0 10px 26px rgba(33, 27, 58, .07);
  --ombre-basse: 0 1px 2px rgba(33, 27, 58, .06);
  --large: 1120px;
  color-scheme: light;
}

/* ------------------------------------------------------------------ mode nuit (maquette 1-sprint, colonne 4)
   Forcé par data-theme="nuit" (réglage du compte), ou automatique quand le système est en sombre
   et que rien n'a été forcé en clair. Les deux blocs portent exactement les mêmes jetons. */
:root[data-theme="nuit"] {
  --page: #16122b; --carte: #221c40; --trait: #322a58;
  --encre: #ece9f8; --encre-2: #b9b2dc; --encre-3: #8d85b8;
  --violet-clair: #2f2755; --menthe-clair: #0f3b33; --corail-clair: #4a1f33; --jaune-clair: #3d3216;
  --violet-texte: #a78bfa; --menthe-texte: #34d399; --corail-texte: #ff7a9a; --jaune-texte: #ffc23c;
  --menthe-fonce: #34d399; --corail-fonce: #ff8fab; --doux-texte: #c4b5fd; --menthe-jauge: #34d399;
  --gris-clair: #2f2755; --sur-encre: #16122b; --bouton-blanc: #ece9f8; --asphalte: #0d0a1c;
  --verre: rgba(34, 28, 64, .95); --verre-haut: rgba(22, 18, 43, .88);
  --page-0: rgba(22, 18, 43, 0); --voile: rgba(22, 18, 43, .9);
  --ombre: none; --ombre-basse: none;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    --page: #16122b; --carte: #221c40; --trait: #322a58;
    --encre: #ece9f8; --encre-2: #b9b2dc; --encre-3: #8d85b8;
    --violet-clair: #2f2755; --menthe-clair: #0f3b33; --corail-clair: #4a1f33; --jaune-clair: #3d3216;
    --violet-texte: #a78bfa; --menthe-texte: #34d399; --corail-texte: #ff7a9a; --jaune-texte: #ffc23c;
    --menthe-fonce: #34d399; --corail-fonce: #ff8fab; --doux-texte: #c4b5fd; --menthe-jauge: #34d399;
    --gris-clair: #2f2755; --sur-encre: #16122b; --bouton-blanc: #ece9f8; --asphalte: #0d0a1c;
    --verre: rgba(34, 28, 64, .95); --verre-haut: rgba(22, 18, 43, .88);
    --page-0: rgba(22, 18, 43, 0); --voile: rgba(22, 18, 43, .9);
    --ombre: none; --ombre-basse: none;
    color-scheme: dark;
  }
}
/* Les figures des questions sont tracées en noir sur fond transparent : en nuit, on les inverse
   (traits clairs, aplats gris foncé) sans toucher aux teintes. */
:root[data-theme="nuit"] .figure svg { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) .figure svg { filter: invert(1) hue-rotate(180deg); }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--encre);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .chiffre, .brand, .btn {
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
}

h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 6px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 38px 0 14px; }
h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
h4 { font-size: 14px; font-weight: 700; margin: 0 0 8px; color: var(--encre-2); }
p { margin: 0 0 12px; }
a { color: var(--violet-texte); }

.sous-titre { color: var(--encre-2); font-size: 17px; margin: 0 0 24px; max-width: 62ch; }
.meta { color: var(--encre-2); font-size: 14px; }
.rappel { color: var(--encre-3); font-size: 13.5px; }
.chiffre { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }

/* ------------------------------------------------------------------ chrome */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 10px 24px;
  background: var(--verre-haut);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--trait);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--encre); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: block; }
.brand-my { color: var(--violet-texte); }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--encre-2);
  text-decoration: none; font-size: 14.5px; font-weight: 600; white-space: nowrap;
}
.nav a:hover { background: var(--violet-clair); color: var(--violet-texte); }
.nav a.actif { background: var(--encre); color: var(--sur-encre); }
.topbar-fin { display: flex; align-items: center; gap: 10px; }

.chip-serie {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--jaune-clair); color: var(--jaune-texte);
  border-radius: 999px; padding: 6px 13px; font-weight: 700; font-size: 13.5px; white-space: nowrap;
}
.chrono-global {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 21px;
  font-variant-numeric: tabular-nums; color: var(--menthe-texte);
  background: var(--menthe-clair); border-radius: 12px; padding: 4px 14px;
}
.chrono-global.alerte { color: var(--corail-texte); background: var(--corail-clair); }

.app { max-width: var(--large); margin: 0 auto; padding: 28px 24px 80px; }
.pied { text-align: center; color: var(--encre-3); font-size: 13px; padding: 0 24px 34px; }
.chargement { color: var(--encre-2); padding: 40px 0; }

.tabbar { display: none; }

/* ------------------------------------------------------------------ cartes */
.carte {
  background: var(--carte); border-radius: var(--r-l); padding: 22px;
  box-shadow: var(--ombre);
}
.carte.accent { background: var(--violet-clair); box-shadow: none; }
.carte.or { background: var(--jaune-clair); box-shadow: none; }
.carte.plat { box-shadow: none; border: 1px solid var(--trait); }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.grille.deux { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

/* ------------------------------------------------------------------ boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 14px;
  border: 1.5px solid var(--trait); background: var(--carte); color: var(--encre);
  font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover { border-color: var(--encre-3); }
.btn:active { transform: translateY(1px); }
.btn.primaire { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.primaire:hover { background: #4a2fe0; border-color: #4a2fe0; }
.btn.sombre { background: var(--encre); border-color: var(--encre); color: var(--sur-encre); }
.btn.petit { min-height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.btn.doux { background: var(--violet-clair); border-color: transparent; color: var(--doux-texte); }
.btn.danger { color: var(--corail-texte); border-color: var(--corail-clair); background: var(--corail-clair); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* ------------------------------------------------------------------ pastilles */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--violet-clair); color: var(--violet-texte);
  border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.badge.ok { background: var(--menthe-clair); color: var(--menthe-texte); }
.badge.ko { background: var(--corail-clair); color: var(--corail-texte); }
.badge.neutre { background: var(--page); color: var(--encre-2); }
.verbal { --dom: var(--violet); --dom-clair: var(--violet-clair); }
.quantitatif { --dom: var(--menthe); --dom-clair: var(--menthe-clair); }
.anglais { --dom: var(--corail); --dom-clair: var(--corail-clair); }
.verbal { --dom-texte: var(--violet-texte); }
.quantitatif { --dom-texte: var(--menthe-texte); }
.anglais { --dom-texte: var(--corail-texte); }
.redaction { --dom: #8a5a00; --dom-clair: var(--jaune-clair); --dom-texte: var(--jaune-texte); }
.badge.verbal, .badge.quantitatif, .badge.anglais, .badge.redaction { background: var(--dom-clair); color: var(--dom-texte); }

/* ------------------------------------------------------------------ la piste */
.piste { background: var(--carte); border-radius: var(--r-l); padding: 24px 26px 20px; box-shadow: var(--ombre); }
.piste-entete { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.piste-score { font-size: 46px; line-height: 1; }
.piste-score span { font-size: 15px; font-weight: 600; color: var(--encre-2); margin-left: 8px; font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: 0; }
.piste-objectif { margin-left: auto; display: flex; align-items: baseline; gap: 6px; color: var(--encre-2); font-size: 14px; }
.piste-objectif .etiq-obj { font-weight: 700; font-size: 13px; }
.piste-objectif b { font-size: 22px; color: var(--violet-texte); }
.piste-objectif .unite { color: var(--encre-3); font-size: 13px; }
.piste > svg { width: 100%; height: auto; display: block; margin: 6px 0 2px; }
.piste-legende { color: var(--encre-2); font-size: 14.5px; margin: 0; }

/* ------------------------------------------------------------------ anneaux */
.anneaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.anneau { background: var(--carte); border-radius: var(--r-l); padding: 18px; box-shadow: var(--ombre); display: flex; align-items: center; gap: 14px; }
.anneau svg { flex: none; }
.anneau .val { font-size: 26px; line-height: 1.1; }
.anneau .nom { font-weight: 700; font-size: 14.5px; }
.anneau .det { color: var(--encre-2); font-size: 13px; }

/* ------------------------------------------------------------------ parcours */
.parcours { display: grid; gap: 10px; }
.etape {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 14px;
  background: var(--carte); border-radius: var(--r-m); padding: 12px 16px; box-shadow: var(--ombre-basse);
  text-decoration: none; color: inherit; border: 1.5px solid transparent;
}
.etape:hover { border-color: var(--dom); }
.etape .pastille { width: 38px; height: 38px; border-radius: 12px; background: var(--dom-clair); color: var(--dom-texte); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.etape > span:nth-child(2) { display: block; min-width: 0; }
.etape .nom { display: block; font-weight: 700; font-size: 15px; }
.etape .jauge { display: block; height: 7px; border-radius: 4px; background: var(--page); overflow: hidden; margin-top: 7px; }
.etape .jauge i { display: block; height: 100%; background: var(--dom); border-radius: 4px; }
.etape .etat { font-size: 13px; font-weight: 700; color: var(--dom-texte); white-space: nowrap; }
.etape.vierge .etat, .etape.vierge .pastille { color: var(--encre-3); background: var(--page); }
.etape.faible .etat { color: var(--corail-texte); }
.etape.maitrise .etat { color: var(--menthe-texte); }

/* ------------------------------------------------------------------ trophées */
.trophees { display: flex; flex-wrap: wrap; gap: 10px; }
.trophee {
  display: flex; align-items: center; gap: 10px; background: var(--carte);
  border-radius: var(--r-m); padding: 10px 14px; box-shadow: var(--ombre-basse); font-size: 13.5px; font-weight: 600;
}
.trophee .rond { width: 30px; height: 30px; border-radius: 10px; background: var(--jaune-clair); display: grid; place-items: center; }
.trophee.verrouille { background: transparent; box-shadow: none; border: 1.5px dashed var(--trait); color: var(--encre-3); font-weight: 500; }
.trophee.verrouille .rond { background: var(--page); filter: grayscale(1); opacity: .6; }

/* ------------------------------------------------------------------ tableaux */
.defil { overflow-x: auto; border-radius: var(--r-m); }
.tableau { width: 100%; border-collapse: collapse; background: var(--carte); border-radius: var(--r-m); overflow: hidden; font-size: 14.5px; }
.tableau th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--encre-2); padding: 12px 14px; background: var(--page); white-space: nowrap; }
.tableau td { padding: 12px 14px; border-top: 1px solid var(--trait); }
.tableau tr.clic { cursor: pointer; }
.tableau tr.clic:hover td { background: var(--violet-clair); }
.tableau tr.ok td { background: rgba(0, 168, 128, .06); }
.tableau tr.ko td { background: rgba(245, 65, 108, .05); }
.md-table { border-collapse: collapse; margin: 10px 0; font-size: 14px; background: var(--carte); border-radius: var(--r-s); overflow: hidden; }
.md-table th, .md-table td { border: 1px solid var(--trait); padding: 6px 10px; text-align: right; }
.md-table th { background: var(--page); font-weight: 700; }
.md-table td:first-child, .md-table th:first-child { text-align: left; }
.barre-prog { height: 8px; border-radius: 4px; background: var(--page); overflow: hidden; min-width: 90px; }
.barre-prog span { display: block; height: 100%; background: var(--menthe); border-radius: 4px; }
.barre { height: 10px; background: var(--violet-clair); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.barre > div { height: 100%; background: var(--violet); border-radius: 999px; transition: width .6s ease; }

/* ------------------------------------------------------------------ formulaires */
.filtres { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.champ { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.champ > label { font-size: 12.5px; font-weight: 700; color: var(--encre-2); }
select, input[type=number], input[type=date], input[type=text], input[type=email], input[type=password] {
  font-family: inherit; font-size: 15px; color: var(--encre); background: var(--carte);
  border: 1.5px solid var(--trait); border-radius: 12px; padding: 10px 12px; min-height: 44px;
}
.auth-carte input { font-size: 16px; } /* 16 px : pas de zoom automatique sur iPhone */
.auth-carte input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-clair); }
.formulaire .champ { min-width: 0; }
.case { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; cursor: pointer; }
.case input { width: 19px; height: 19px; accent-color: var(--violet); }
textarea {
  width: 100%; min-height: 320px; font-family: inherit; font-size: 16px; line-height: 1.7; color: var(--encre);
  border: 1.5px solid var(--trait); border-radius: var(--r-m); padding: 16px; resize: vertical; background: var(--carte);
}
.compteur { color: var(--encre-2); font-size: 13.5px; margin-top: 8px; }

/* ------------------------------------------------------------------ session */
.session-entete {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--carte); border-radius: var(--r-l); padding: 14px 20px; box-shadow: var(--ombre-basse); margin-bottom: 14px;
}
.session-entete .titre { font-weight: 800; font-family: "Bricolage Grotesque", sans-serif; }
.session-entete .progression { color: var(--encre-2); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.session-entete .actions { margin: 0 0 0 auto; }
.rail { height: 8px; border-radius: 999px; background: var(--carte); overflow: hidden; margin-bottom: 18px; box-shadow: var(--ombre-basse); }
.rail i { display: block; height: 100%; background: var(--dom); border-radius: 999px; transition: width .3s ease; }
.session { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 18px; align-items: start; }
.session-corps { min-width: 0; }
.lateral { position: sticky; top: 74px; }

.question { background: var(--carte); border-radius: var(--r-l); padding: 24px 26px; box-shadow: var(--ombre); margin-bottom: 16px; }
.question .numero { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; color: var(--encre-2); font-size: 13.5px; font-weight: 600; }
.question .numero .btn { margin-left: auto; }
.enonce { font-size: 18px; line-height: 1.6; white-space: pre-wrap; }
.enonce.en { font-size: 17px; }
.question.juste { border-left: 5px solid var(--menthe); }
.question.faux { border-left: 5px solid var(--corail); }

.options { display: grid; gap: 9px; margin-top: 18px; }
.option {
  display: flex; align-items: center; gap: 13px; padding: 13px 16px;
  border: 2px solid var(--trait); border-radius: var(--r-m); cursor: pointer; font-size: 16.5px; line-height: 1.45;
  transition: border-color .12s ease, background-color .12s ease;
}
.option:hover { border-color: var(--dom); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .cle {
  flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--page); color: var(--encre-2);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; font-family: "Bricolage Grotesque", sans-serif;
}
.option.choisie { border-color: var(--dom); background: var(--dom-clair); }
.option.choisie .cle { background: var(--dom); color: #fff; }
.option.bonne { border-color: var(--menthe); background: var(--menthe-clair); }
.option.bonne .cle { background: var(--menthe); color: #fff; }
.option.fausse { border-color: var(--corail); background: var(--corail-clair); }
.option.fausse .cle { background: var(--corail); color: #fff; }
.nav-q { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }

.figure { margin: 18px 0 4px; text-align: center; }
.figure svg { max-width: 100%; height: auto; }
.passage { background: var(--carte); border-radius: var(--r-l); padding: 20px 24px; box-shadow: var(--ombre-basse); margin-bottom: 16px; }
.passage .texte { white-space: pre-wrap; font-size: 16px; line-height: 1.65; max-height: 220px; overflow: hidden; position: relative; }
.passage .texte.ouvert { max-height: none; }
.passage .texte:not(.ouvert)::after { content: ""; position: absolute; inset: auto 0 0; height: 60px; background: linear-gradient(transparent, var(--carte)); }

.grille-num { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.num {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  background: var(--page); color: var(--encre-2); font-size: 13px; font-weight: 700; cursor: pointer;
}
.num.repondu { background: var(--dom-clair); color: var(--dom-texte); }
.num.courant { background: var(--encre); color: var(--sur-encre); }
.num.marque { box-shadow: inset 0 0 0 2px var(--jaune); }
.grille-rep { display: grid; gap: 4px; max-height: 60vh; overflow: auto; }
.ligne-rep { display: grid; grid-template-columns: 26px repeat(4, 1fr); gap: 4px; align-items: center; }
.ligne-rep .n { font-size: 12px; color: var(--encre-3); text-align: right; }
.ligne-rep button { border: 1.5px solid var(--trait); background: var(--carte); border-radius: 8px; padding: 5px 0; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--encre-2); }
.ligne-rep button.choisie { background: var(--dom); border-color: var(--dom); color: #fff; font-weight: 700; }
.ligne-rep.annulee { opacity: .4; }

.explication { background: var(--page); border-radius: var(--r-m); padding: 14px 16px; margin-top: 16px; font-size: 14.5px; line-height: 1.6; }
.explication .distracteur { color: var(--corail-texte); display: inline-block; margin-top: 6px; }
.interlude { text-align: center; max-width: 560px; margin: 40px auto; }
.interlude .actions { justify-content: center; }
.redaction-zone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.avert { background: var(--jaune-clair); border-radius: var(--r-m); padding: 14px 18px; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.info { background: var(--violet-clair); border-radius: var(--r-m); padding: 14px 18px; font-size: 14.5px; color: var(--encre-2); }

/* ------------------------------------------------------------------ résultat */
.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.score { background: var(--carte); border-radius: var(--r-l); padding: 18px; box-shadow: var(--ombre); }
.score .g { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 34px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--dom-texte); }
.score .l { color: var(--encre-2); font-size: 13.5px; }

/* ------------------------------------------------------------------ annales */
.visionneuse { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.visionneuse .barre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--carte); border-radius: var(--r-m); padding: 10px 14px; height: auto; overflow: visible; box-shadow: var(--ombre-basse); }
.visionneuse img { --largeur: 900px; width: 100%; max-width: var(--largeur); margin: 0 auto; border-radius: var(--r-m); box-shadow: var(--ombre); background: #fff; }
.pages { --zoom: 100%; display: grid; gap: 12px; }
.pages img { width: var(--zoom); max-width: 100%; border-radius: var(--r-m); box-shadow: var(--ombre-basse); background: #fff; }
.zoom { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }

.liste-sections { display: grid; gap: 5px; margin: 12px 0 0; font-size: 13.5px; color: var(--encre-2); }
.liste-sections span { display: flex; gap: 8px; align-items: center; }


/* ------------------------------------------------------------------ accueil : cartes teintées, héros, à travailler */
.anneau.teinte { background: var(--dom-clair); box-shadow: none; }
.anneau .det b { font-weight: 700; color: var(--dom-texte); }
.accueil-duo { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.hero {
  background: linear-gradient(135deg, #5b3df5 0%, #8b5cf6 52%, #ec4899 100%);
  color: #fff; border-radius: var(--r-l); padding: 26px 28px;
  box-shadow: 0 14px 34px rgba(91, 61, 245, .28);
}
.hero h2 { margin: 0 0 8px; font-size: 26px; color: #fff; }
.hero p { margin: 0 0 18px; color: rgba(255, 255, 255, .92); }
.hero .actions { margin-top: 0; }
.hero .btn { border: 0; }
.hero .btn.blanc { background: var(--bouton-blanc); color: #4a2fe0; }
.hero .btn.fonce { background: rgba(17, 8, 46, .28); color: #fff; }
.hero .puces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero .puce { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .16); border-radius: 13px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.hero .puce span { width: 20px; height: 20px; border-radius: 7px; background: rgba(255, 255, 255, .85); display: grid; place-items: center; font-size: 12px; }
.travail .ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--trait); font-size: 15px; }
.travail .ligne:last-of-type { border-bottom: 0; }
.travail a.ligne { text-decoration: none; color: inherit; }
.travail a.ligne:hover .nom { color: var(--violet-texte); }
.pourcent { border-radius: 999px; padding: 5px 13px; font-weight: 700; font-size: 13px; background: var(--dom-clair); color: var(--dom-texte); white-space: nowrap; }
@media (max-width: 900px) { .accueil-duo { grid-template-columns: 1fr; } }


/* ------------------------------------------------------------------ réglages en pastille (date de l'examen, objectif) */
.reglage {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--carte); border: 1.5px solid var(--trait); border-radius: 16px;
  padding: 7px 10px 7px 13px; box-shadow: var(--ombre-basse);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.reglage:hover { border-color: var(--encre-3); }
.reglage:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-clair); }
.reglage svg { color: var(--violet-texte); flex: none; display: block; }
.reglage .etiq { font-size: 13px; font-weight: 700; color: var(--encre-2); }
.reglage input {
  border: 0; background: transparent; padding: 0; min-height: 0; border-radius: 0;
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif; font-weight: 800; font-size: 16px;
  color: var(--encre); font-variant-numeric: tabular-nums; cursor: pointer; width: auto;
}
.reglage input:focus { outline: none; }
.reglage input[type=number] { width: 62px; cursor: text; -moz-appearance: textfield; }
.reglage input[type=number]::-webkit-outer-spin-button,
.reglage input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.reglage input[type=date]::-webkit-calendar-picker-indicator {
  opacity: .5; cursor: pointer; padding: 3px; border-radius: 6px; margin-left: 2px;
}
.reglage input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--violet-clair); }
.reglage .compte {
  background: var(--violet); color: #fff; border-radius: 999px; padding: 4px 11px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.reglage .compte.proche { background: var(--corail); }
.reglage .unite { color: var(--encre-3); font-size: 13px; font-weight: 600; }
.reglages-accueil { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
button.reglage { cursor: pointer; font-family: inherit; }
.reglage .val-date { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 15px; color: var(--encre); }
.reglage .val-date.vide { color: var(--encre-3); font-weight: 700; letter-spacing: .02em; }

/* calendrier maison */
.cal-pop {
  position: absolute; z-index: 60; width: 300px; background: var(--carte);
  border: 1px solid var(--trait); border-radius: 18px; box-shadow: var(--ombre); padding: 14px;
}
.cal-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-tete b { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 16px; }
.cal-tete button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--violet-clair); color: var(--violet-texte); font-size: 18px; cursor: pointer; }
.cal-tete button:hover { background: var(--violet); color: #fff; }
.cal-jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.cal-jours span { text-align: center; font-size: 11px; font-weight: 700; color: var(--encre-3); }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grille button {
  aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; color: var(--encre);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.cal-grille button:hover { background: var(--violet-clair); }
.cal-grille button.passe { color: var(--encre-3); font-weight: 500; }
.cal-grille button.auj { box-shadow: inset 0 0 0 2px var(--jaune); }
.cal-grille button.sel { background: var(--violet); color: #fff; font-weight: 800; }
.cal-effacer { width: 100%; margin-top: 10px; border: 0; border-radius: 12px; background: var(--page); color: var(--encre-2); font-family: inherit; font-weight: 700; font-size: 13.5px; padding: 9px; cursor: pointer; }
.cal-effacer:hover { background: var(--corail-clair); color: var(--corail-texte); }

/* ------------------------------------------------------------------ carnet d'erreurs */
.carnet-banniere {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, #f5416c, #ec4899 60%, #8b5cf6); color: #fff;
  border-radius: var(--r-l); padding: 16px 20px; margin: 0 0 16px; box-shadow: 0 10px 26px rgba(245, 65, 108, .22);
}
.carnet-banniere .cb-ico { font-size: 26px; flex: none; }
.carnet-banniere .cb-txt { display: flex; flex-direction: column; line-height: 1.35; }
.carnet-banniere .cb-txt b { font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; }
.carnet-banniere .cb-txt span { font-size: 13.5px; opacity: .92; }
.carnet-banniere .cb-go { margin-left: auto; background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.carnet-suite { margin-top: 10px; background: var(--menthe-clair); color: var(--menthe-fonce); border-radius: var(--r-m); padding: 11px 14px; font-size: 14.5px; font-weight: 600; }

/* ------------------------------------------------------------------ comptes */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, var(--violet), #8b5cf6); color: #fff;
  display: grid; place-items: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 15px;
  text-decoration: none; box-shadow: var(--ombre-basse);
}
.avatar-grand { width: 52px; height: 52px; font-size: 22px; border-radius: 16px; }
/* Cibles tactiles d'au moins 44 px sans grossir le dessin : la zone cliquable déborde autour */
.avatar, .brand { position: relative; }
.avatar::after { content: ""; position: absolute; inset: -5px; }
.brand { min-height: 44px; }
.plan-retour { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 4px -6px; padding: 0 6px; border-radius: 10px;
  color: var(--encre-2); font-weight: 700; font-size: 14px; text-decoration: none; }
.plan-retour:hover { color: var(--violet-texte); background: var(--violet-clair); }
.rp-cta { margin-top: 12px; }
body.sansnav .nav, body.sansnav .tabbar, body.sansnav #chip-serie, body.sansnav #lien-compte, body.sansnav .pied { display: none !important; }

.auth { min-height: calc(100vh - 160px); display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.auth-carte { width: 100%; max-width: 400px; margin: 0 auto; background: var(--carte); border-radius: var(--r-l); box-shadow: var(--ombre); padding: 32px 30px; text-align: center; }
.auth-carte img { margin-bottom: 14px; }
.auth-carte h1 { font-size: 26px; margin-bottom: 6px; }
.auth-carte .formulaire { text-align: left; display: grid; gap: 12px; }
/* Essai : quota en pourcentage, façon Claude */
.chip-jetons { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 7px; border-radius: 999px; min-height: 32px;
  background: var(--violet-clair); color: var(--violet-texte); font-weight: 800; font-size: 13px; text-decoration: none; white-space: nowrap; }
.chip-jetons.bas { background: var(--corail-clair, #ffe3ea); color: #b3234a; }
.jauge-mini { width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: conic-gradient(currentColor calc(var(--pct, 0) * 1%), rgba(91, 61, 245, .18) 0);
  -webkit-mask: radial-gradient(circle, transparent 4.5px, #000 5px); mask: radial-gradient(circle, transparent 4.5px, #000 5px); }
body.sansnav #chip-jetons { display: none !important; }
.cpt-essai { padding: 16px 18px; margin-bottom: 14px; }
.cpt-essai-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.cpt-essai-tete span { color: var(--encre-2); font-size: 14px; }
.cpt-essai-barre { height: 10px; border-radius: 999px; background: var(--violet-clair); overflow: hidden; }
.cpt-essai-barre i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), #8b5cf6); transition: width .5s ease; }
.cpt-essai.bas .cpt-essai-barre i { background: linear-gradient(90deg, #f5416c, #ff7a59); }
.cpt-essai .mini { margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) { .cpt-essai-barre i { transition: none; } }
.auth-etape { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
.auth-etape[hidden] { display: none; }
.auth-etapes { list-style: none; display: flex; justify-content: center; gap: 8px; margin: -6px 0 18px; padding: 0; }
.auth-etapes li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--page); color: var(--encre-3); font-size: 13px; font-weight: 700; }
.auth-etapes li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--trait); color: var(--encre-2); font-size: 12px; }
.auth-etapes li.actif { background: var(--violet-clair); color: var(--violet-texte); }
.auth-etapes li.actif span { background: var(--violet); color: #fff; }
.auth-etapes li.fait span { background: #00a880; color: #fff; }
.auth-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .auth-duo { grid-template-columns: 1fr; } }
.facultatif { font-weight: 600; color: var(--encre-3); font-size: 11.5px; margin-left: 4px; }
.adr { position: relative; }
.adr-liste { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--carte); border-radius: 16px; box-shadow: 0 12px 32px rgba(33, 27, 58, .18); border: 1px solid var(--trait); text-align: left; }
.adr-liste li { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 11px; cursor: pointer; min-height: 44px; justify-content: center; }
.adr-liste li b { font-size: 14.5px; color: var(--encre); }
.adr-liste li span { font-size: 12.5px; color: var(--encre-3); }
.adr-liste li:hover, .adr-liste li.actif { background: var(--violet-clair); }
.adr-liste li.actif b { color: var(--violet-texte); }
.auth-carte .champ { min-width: 0; }
.auth-err { background: var(--corail-clair); color: var(--corail-fonce); border-radius: 12px; padding: 10px 13px; font-size: 14px; }
.auth-bascule { font-size: 14.5px; color: var(--encre-2); margin: 16px 0 0; }
.mdp-boite { position: relative; }
.mdp-boite input { width: 100%; padding-right: 50px; }
.mdp-oeil { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none;
  color: var(--encre-3); border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.mdp-oeil[aria-pressed="true"] { color: var(--violet-texte); }
.mdp-oeil:focus-visible { outline: 2px solid var(--violet); outline-offset: -4px; }
.mdp-regle { font-size: 12.5px; color: var(--encre-3); }
.mdp-regle.ok { color: #00734f; font-weight: 700; }
.email-suggestion { align-self: flex-start; border: 0; background: var(--jaune-clair); color: var(--encre); border-radius: 10px;
  padding: 7px 10px; font: inherit; font-size: 13.5px; cursor: pointer; min-height: 36px; text-align: left; }
.email-suggestion b { color: var(--violet-texte); }
.auth-rassure { margin: -2px 0 0; text-align: center; font-size: 13px; color: var(--encre-3); }
.auth-invite { display: block; margin: 10px auto 0; border: 0; background: none; color: var(--encre-2); font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; padding: 10px 12px; min-height: 44px; border-radius: 10px; }
.auth-invite:hover { color: var(--violet-texte); background: var(--violet-clair); }
.auth-bascule a { font-weight: 700; text-decoration: none; }
.auth-ou { display: flex; align-items: center; gap: 12px; color: var(--encre-3); font-size: 12.5px; margin: 16px 0; }
.auth-ou::before, .auth-ou::after { content: ""; flex: 1; height: 1px; background: var(--trait); }

/* ------------------------------------------------------------------ puces, étiquettes (maquettes « auto-école ») */
.mini { font-size: 13px; color: var(--encre-3); line-height: 1.45; }
.etiquette { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--encre-3); margin: 20px 0 8px 2px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; padding: 4px 12px; font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap;
  background: var(--dom-clair); color: var(--dom-texte); border: 0;
}
.chip.v { background: var(--violet-clair); color: var(--violet-texte); }
.chip.q { background: var(--menthe-clair); color: var(--menthe-texte); }
.chip.e { background: var(--corail-clair); color: var(--corail-texte); }
.chip.gris { background: var(--gris-clair); color: var(--encre-2); }
.carte .chip.gris { background: var(--page); }
/* puce touchable : 44 px de cible, pastille visible de 34 px (bordure transparente) */
button.chip, a.chip { cursor: pointer; text-decoration: none; }
.chip.tap { min-height: 44px; padding: 0 15px; border: 5px solid transparent; border-left-width: 0; border-right-width: 0; background-clip: padding-box; font-size: 13.5px; }
.chip.v.choisie { background: var(--violet); color: #fff; }
.chip.q.choisie { background: var(--menthe); color: #fff; }
.chip.e.choisie { background: var(--corail); color: #fff; }
.chip.gris.choisie { background: var(--encre-2); color: var(--sur-encre); }
.tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.tete h1 { margin: 0; }
.lien-retour { font-size: 14px; font-weight: 700; color: var(--encre-3); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
.lien-retour:hover { color: var(--violet-texte); }
@media (max-width: 719.98px) { .seul-bureau { display: none !important; } }
@media (min-width: 720px) { .seul-mobile { display: none !important; } }

/* ------------------------------------------------------------------ annales : une année, trois gestes */
.annales { max-width: 820px; }
.annales .tete h1 { font-size: 30px; }
.annales-sous { color: var(--encre-2); font-size: 15px; margin: 0 0 14px; }
.annee-rangee {
  display: flex; gap: 7px; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.annee-rangee::-webkit-scrollbar { display: none; }
.annee-chip { flex: none; font-variant-numeric: tabular-nums; }
.annee-chip.active { background: var(--encre); color: var(--sur-encre); }
.annee-chip:not(.active):hover { color: var(--encre); }
.ann-nite { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ann-nite-carte { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 8px; align-items: center;
  background: var(--carte); border-radius: 20px; padding: 16px; text-decoration: none; color: var(--encre); box-shadow: var(--ombre);
  border: 2px solid transparent; min-height: 44px; transition: transform .15s ease, border-color .15s ease; }
.ann-nite-carte:hover, .ann-nite-carte:focus-visible { border-color: var(--violet); transform: translateY(-2px); outline: none; }
.ann-nite-carte.recente { background: var(--jaune-clair); }
.ann-nite-an { grid-row: 1 / 3; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 30px; letter-spacing: -.03em; color: var(--violet-texte); }
.ann-nite-session { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.ann-nite-dl { display: inline-flex; align-items: center; gap: 6px; justify-self: start; background: var(--encre); color: var(--sur-encre);
  border-radius: 999px; padding: 6px 12px 6px 9px; font-weight: 700; font-size: 13.5px; }
.ann-nite-suite { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .ann-nite-carte { transition: none; } .ann-nite-carte:hover { transform: none; } }
.ann-carte { background: var(--jaune-clair); border-radius: 20px; padding: 16px; }
.ann-carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ann-session { font-size: 17px; display: block; line-height: 1.3; }
.ann-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ann-actions .btn { min-height: 50px; border-radius: 16px; font-size: 16px; padding: 0 12px; }
.ann-actions .ann-passer { grid-column: 1 / -1; }
.ann-actions .ann-doux { background: var(--carte); border-color: transparent; color: var(--violet-texte); }
.carte.ann-ligne {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 10px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06);
  text-decoration: none; color: inherit; min-height: 48px;
}
.ann-ligne > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.ann-ligne .ann-note { font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; font-variant-numeric: tabular-nums; }
.ann-ligne.repere > span:first-child { font-size: 14.5px; }
.ann-ligne:hover { box-shadow: 0 0 0 2px var(--violet-clair), 0 2px 10px rgba(33, 27, 58, .06); }
.ann-tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ann-tuile { background: var(--page); border-radius: 14px; padding: 13px 14px; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.ann-tuile b { font-size: 14px; }
.ann-tuile a.mini { text-decoration: none; }
.ann-tuile a.mini:hover, a.ann-tuile:hover b { color: var(--violet-texte); }
.ann-plus { margin-top: 14px; font-size: 13.5px; color: var(--encre-2); }
.ann-plus summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 8px; list-style: none; }
.ann-plus summary::-webkit-details-marker { display: none; }
.ann-plus summary::after { content: "▾"; color: var(--encre-3); transition: transform .15s ease; }
.ann-plus[open] summary::after { transform: rotate(180deg); }
.ann-plus-liens { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ann-plus-liens a { border: 1.5px solid var(--trait); border-radius: 12px; padding: 8px 13px; font-weight: 700; text-decoration: none; color: var(--encre); }
.ann-plus-liens a:hover { border-color: var(--violet); color: var(--violet-texte); }

@media (min-width: 720px) {
  .annee-rangee { margin: 0; padding: 12px 18px; flex-wrap: wrap; overflow: visible; border-bottom: 1px solid var(--trait); }
  .ann-bloc { background: var(--carte); border-radius: var(--r-l); box-shadow: var(--ombre); overflow: hidden; }
  .ann-carte { background: transparent; border-radius: 0; padding: 18px 20px 20px; }
  .ann-carte-tete { align-items: baseline; }
  .ann-session { font-family: "Bricolage Grotesque", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
  .ann-carte-tete > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex: 1; flex-wrap: wrap; }
  .ann-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0; }
  .ann-actions .btn { min-height: 46px; border-radius: 13px; font-size: 14.5px; padding: 0 18px; }
  .ann-actions .ann-passer { background: var(--violet); border-color: var(--violet); }
  .ann-actions .ann-passer:hover { background: #4a2fe0; }
  .ann-actions .ann-doux { background: var(--carte); border-color: var(--trait); color: var(--encre); }
  .ann-actions .ann-doux:hover { border-color: var(--encre-3); }
}

/* passer : tout ou une seule épreuve */
.cfg-annale { max-width: 560px; }
.cfg-annale .tete h1 { font-size: 28px; }
.carte.choix { padding: 14px 16px; margin-bottom: 12px; border: 2px solid transparent; cursor: pointer; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); }
.choix.coche { border-color: var(--violet); }
.choix-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.choix-tete b { font-size: 15.5px; }
.coche-rond { width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; visibility: hidden; }
.choix.coche .coche-rond { visibility: visible; }
.choix-puces { display: flex; flex-wrap: wrap; gap: 0 6px; margin-top: 6px; }
.carte.cond { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; margin-bottom: 12px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); cursor: pointer; }
.cond > span { display: flex; flex-direction: column; }
.cond b { font-size: 15px; }
.interrupteur { position: relative; flex: none; width: 56px; height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.interrupteur::before { content: ""; position: absolute; left: 6px; top: 9px; width: 44px; height: 26px; border-radius: 99px; background: var(--trait); transition: background-color .15s ease; }
.interrupteur::after { content: ""; position: absolute; left: 9px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(33, 27, 58, .2); transition: transform .15s ease; }
.interrupteur[aria-checked="true"]::before { background: var(--violet); }
.interrupteur[aria-checked="true"]::after { transform: translateX(18px); }
.cfg-rappel { margin: 6px 2px 16px; }
.pouce {
  position: sticky; bottom: 16px; z-index: 20; margin-top: 8px; padding: 12px 0 0;
  background: linear-gradient(var(--page-0), var(--page) 14px);
}
.pouce .btn { width: 100%; min-height: 54px; border-radius: 16px; font-size: 16.5px; box-shadow: 0 10px 24px rgba(91, 61, 245, .25); }

/* feuilleter, au pouce */
.vis-tete { display: flex; justify-content: space-between; align-items: center; margin: -8px 0 -4px; }
.vis-tete a { font-size: 14px; font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px; }
.vis-tete a:first-child { color: var(--encre-2); }
.visionneuse #pageimg { touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.vis-pouce { position: sticky; bottom: 16px; z-index: 20; background: var(--page); padding: 8px 0 0; }
.vis-nav { display: flex; align-items: center; gap: 10px; }
.vis-fleche {
  flex: none; width: 46px; height: 46px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--carte); color: var(--encre); font-size: 15px; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(33, 27, 58, .08);
}
.vis-fleche.suiv { background: var(--violet); color: #fff; }
.vis-fleche[disabled] { opacity: .4; cursor: default; }
.vis-curseur { flex: 1; min-width: 0; text-align: center; }
.vis-curseur input[type=range] { width: 100%; margin: 0; height: 28px; accent-color: var(--violet); }
.vis-sauts { display: flex; gap: 0 7px; overflow-x: auto; margin: 4px -16px 0; padding: 0 16px; scrollbar-width: none; }
.vis-sauts::-webkit-scrollbar { display: none; }
.vis-sauts .chip { flex: none; }

/* barème officiel, dans l'écran de résultat */
details.bareme { margin-top: 22px; background: var(--carte); border-radius: var(--r-l); box-shadow: var(--ombre-basse); }
details.bareme > summary { cursor: pointer; padding: 14px 20px; min-height: 48px; font-weight: 700; font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; list-style-position: inside; }
details.bareme[open] { padding-bottom: 16px; }
details.bareme > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.bareme h4 { margin-top: 18px; }
details.bareme .tableau { font-size: 13.5px; }
details.bareme .tableau th, details.bareme .tableau td { padding: 8px 10px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .session { grid-template-columns: 1fr; }
  .lateral { position: static; }
  .redaction-zone { grid-template-columns: 1fr; }
  .anneaux { grid-template-columns: 1fr; }
  .anneau { padding: 14px; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .app { padding: 20px 16px 96px; }
  .topbar { padding: 8px 16px; }
  .brand span:last-child { display: none; }
  .topbar-fin { margin-left: auto; }
  .tabbar {
    display: flex; position: fixed; inset: auto 0 0; z-index: 40;
    background: var(--verre); backdrop-filter: blur(12px);
    border-top: 1px solid var(--trait); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 0;
    color: var(--encre-3); text-decoration: none; font-size: 10.5px; font-weight: 700;
  }
  .tabbar a.actif { color: var(--violet-texte); }
  .tabbar svg { width: 22px; height: 22px; }
  .piste { padding: 18px 16px 16px; }
  .piste-score { font-size: 38px; }
  .question { padding: 18px 16px; }
  .passage { padding: 16px; }
  .carte { padding: 18px; }
  .pied { display: none; }
  .pouce, .vis-pouce { bottom: calc(66px + env(safe-area-inset-bottom)); padding-bottom: 8px; }
}

/* ------------------------------------------------------------------ sprint de 3 minutes (maquette 1-sprint) */
.sprint { max-width: 560px; margin: 0 auto; }
.sprint .tete h1 { font-size: 30px; }
.sprint-carte {
  background: linear-gradient(135deg, #5b3df5, #8b5cf6 55%, #ec4899); color: #fff;
  border-radius: var(--r-l); padding: 20px; box-shadow: 0 14px 34px rgba(91, 61, 245, .28);
}
.sprint-surtitre { font-size: 13px; font-weight: 700; letter-spacing: .02em; opacity: .9; }
.sprint-gros { font-size: 40px; line-height: 1; }
.sprint-carte .sprint-gros { margin: 6px 0 2px; }
.sprint-carte p { margin: 0 0 14px; font-size: 14px; opacity: .95; }
.sprint-go {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px;
  border: 0; border-radius: 16px; background: var(--bouton-blanc); color: #4a2fe0; cursor: pointer; text-decoration: none;
  font-family: "Plus Jakarta Sans", sans-serif; font-size: 16px; font-weight: 700;
  transition: transform .12s ease;
}
.sprint-go:active { transform: translateY(1px); }
.sprint-pile { display: grid; gap: 12px; }
.carte.sprint-compacte {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px;
  padding: 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); text-decoration: none; color: inherit;
}
.sprint-compacte > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.sprint-compacte b { font-size: 15px; }
.sprint-compacte:hover { box-shadow: 0 0 0 2px var(--violet-clair), 0 2px 10px rgba(33, 27, 58, .06); }
.sprint-puces { display: flex; flex-wrap: wrap; gap: 0 6px; }
.sprint-libre { margin-top: 6px; }

/* question */
.sprint-entete { display: flex; justify-content: space-between; align-items: center; margin: -10px 0 2px; }
.sprint-etape { font-size: 13px; font-weight: 700; color: var(--encre-3); }
.points { display: flex; gap: 5px; margin-bottom: 14px; }
.points i { flex: 1; height: 5px; border-radius: 99px; background: var(--trait); }
.points i.fait { background: var(--menthe); }
.points i.rate { background: var(--corail); }
.points i.ici { background: var(--violet); }
.sprint-ligne { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.chrono-anneau { flex: none; display: block; }
.chrono-anneau text { font-family: "Bricolage Grotesque", sans-serif; font-variant-numeric: tabular-nums; }
.chrono-anneau circle, .chrono-anneau text { transition: stroke .2s ease, fill .2s ease; }
.sprint-enonce { font-size: 17px; line-height: 1.5; margin: 0 0 16px; white-space: pre-wrap; }
.sprint-enonce.petit { font-size: 15.5px; margin: 10px 0 12px; }
.sprint .passage { margin-bottom: 14px; }
.sprint-options { display: grid; gap: 9px; }
.option.sprint-option {
  width: 100%; min-height: 48px; margin: 0; padding: 12px 14px; gap: 12px;
  background: var(--carte); color: var(--encre); font-family: inherit; font-size: 15.5px; text-align: left; border-radius: 16px;
}
div.option.sprint-option { cursor: default; }
.sprint-option b {
  flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--page); color: var(--encre-2);
  display: grid; place-items: center; font-size: 13px; font-family: "Bricolage Grotesque", sans-serif;
}
.sprint-option .mini { margin-left: auto; padding-left: 8px; white-space: nowrap; }
.option.sprint-option.juste { border-color: var(--menthe); background: var(--menthe-clair); }
.option.sprint-option.juste b { background: var(--menthe); color: #fff; }
.option.sprint-option.faux { border-color: var(--corail); background: var(--corail-clair); }
.option.sprint-option.faux b { background: var(--corail); color: #fff; }
.btn.sprint-passe { width: 100%; margin-top: 4px; min-height: 48px; background: transparent; border-color: transparent; color: var(--encre-2); font-weight: 600; }
.btn.sprint-passe:hover { color: var(--encre); border-color: transparent; }

/* correction */
.sprint-verdict { display: flex; align-items: center; gap: 8px; border-radius: 20px; padding: 14px 16px; margin-bottom: 12px; }
.sprint-verdict span { font-size: 22px; line-height: 1; }
.sprint-verdict.juste { background: var(--menthe-clair); color: var(--menthe-fonce); }
.sprint-verdict.rate { background: var(--corail-clair); color: var(--corail-fonce); }
.sprint-verdict.temps { background: var(--jaune-clair); color: var(--jaune-texte); }
.sprint-verdict.passe { background: var(--gris-clair); color: var(--encre-2); }
.carte.sprint-piege, .carte.sprint-xp { padding: 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); margin-top: 12px; }
.sprint-piege .chip { margin-bottom: 8px; }
.sprint-piege p { margin: 0; font-size: 15px; }
.sprint-piege p + p { margin-top: 10px; }
.carte.sprint-xp { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.btn.menthe { background: var(--menthe); border-color: var(--menthe); color: #fff; }
.btn.menthe:hover { border-color: var(--menthe); filter: brightness(.94); }
.pouce .btn.menthe { box-shadow: 0 10px 24px rgba(0, 168, 128, .28); }
body.concentration .tabbar, body.concentration #chrono-global { display: none !important; }

/* fin */
.sprint-fin { text-align: center; padding-top: 18px; }
.sprint-emoji { font-size: 52px; line-height: 1.1; }
.sprint-fin .sprint-gros { margin: 8px 0 4px; font-size: 44px; }
.sprint-bilan { margin: 0 0 18px; font-size: 14px; }
.carte.sprint-chapitre { text-align: left; padding: 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); margin-bottom: 14px; }
.sprint-chapitre-tete { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-weight: 600; }
.sprint-chapitre-tete b { color: var(--menthe-texte); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sprint-chapitre-tete b.baisse { color: var(--corail-texte); }
.progres { height: 6px; border-radius: 99px; background: var(--trait); overflow: hidden; }
.progres i { display: block; height: 100%; background: var(--menthe-jauge); border-radius: 99px; transition: width .6s ease; }
.btn.sprint-large { width: 100%; min-height: 52px; border-radius: 16px; font-size: 16px; margin-bottom: 10px; }
.sprint-revue { text-align: left; }
.carte.sprint-revue-q { margin-top: 12px; padding: 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); }

@media (max-width: 720px) {
  body.concentration .app { padding-bottom: 120px; }
  .pouce.sprint-pouce {   /* bouton principal dans la zone du pouce, barre d'onglets masquée */
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; margin: 0;
    padding: 14px 16px calc(12px + env(safe-area-inset-bottom));
  }
}

/* ------------------------------------------------------------------ repères (maquette 5-reperes) */
.gros { font-family: "Bricolage Grotesque", sans-serif; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.reperes { display: grid; gap: 12px; margin-bottom: 8px; }
.reperes > *, .rp-cote > *, .rp-defis-grille > * { min-width: 0; }
.reperes .carte { padding: 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); }
.reperes h2 { margin: 22px 0 10px; }
.rp-cote { display: grid; gap: 12px; align-content: start; }
.rp-titre { font-size: 19px; margin: 0 0 10px; }
.rp-note { display: flex; align-items: baseline; gap: 10px; }
.rp-courbe { display: block; width: 100%; height: auto; margin-top: 10px; }
.rp-phrase { margin: 6px 0 0; font-size: 15px; }
.rp-source { margin: 8px 0 0; }
.rp-objectif b { font-size: 15px; }
.rp-objectif p { margin: 6px 0 0; font-size: 14.5px; }
.carte.rp-record { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rp-record b { font-size: 15px; }
.rp-xp-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rp-xp-tete > b { font-size: 20px; }
.rp-series { display: flex; gap: 6px; flex-wrap: wrap; }
.chip.rp-feu { background: var(--jaune-clair); color: var(--jaune-texte); }
.rp-barre-xp { height: 10px; margin-bottom: 6px; }
.rp-barre-xp i { background: var(--violet); }
.rp-defis-grille { display: grid; gap: 12px; }
.carte.rp-defi { margin: 0; }
.carte.rp-defi.actif { background: var(--menthe-clair); box-shadow: none; }
.rp-defi-titre { display: block; font-size: 16px; margin: 8px 0 4px; line-height: 1.35; }
.rp-defi p.mini { margin: 0; }
.rp-defi .progres { margin-top: 10px; }
.rp-defi.actif .progres, .rp-defi.actif .chip { background: var(--carte); }
.rp-defi-sous { margin-top: 6px; }
.rp-pied { margin: 14px 2px 0; }
.story {
  background: linear-gradient(160deg, #5b3df5, #8b5cf6 50%, #ec4899); color: #fff;
  border-radius: 22px; padding: 22px; aspect-ratio: 4 / 5; max-width: 420px;
  display: flex; flex-direction: column; box-shadow: 0 14px 34px rgba(91, 61, 245, .25);
}
.story-sur { font-size: 12px; font-weight: 700; opacity: .9; letter-spacing: .02em; }
.story .story-gros { font-size: 52px; margin: 14px 0 2px; }
.story-sous { font-size: 15px; opacity: .95; }
.story-lignes { margin-top: 22px; display: grid; gap: 12px; }
.story-lignes div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, .25); padding-bottom: 9px; }
.story-lignes div:last-child { border-bottom: 0; padding-bottom: 0; }
.story-lignes b { text-align: right; }
.story-vide { flex: 1; }
.story-marque { font-size: 12px; opacity: .8; }
.rp-boutons { display: flex; gap: 8px; margin-top: 12px; max-width: 420px; }
.rp-boutons .btn { flex: 1; min-height: 50px; border-radius: 16px; font-size: 16px; }
.grille-trophees { display: flex; flex-wrap: wrap; gap: 10px; }
.grille-trophees .tr-cond { display: none; }
.trophees .trophee.tous { background: transparent; box-shadow: none; color: var(--violet-texte); font-weight: 700; text-decoration: none; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80;
  max-width: calc(100vw - 32px); background: var(--encre); color: var(--sur-encre); border-radius: 16px;
  padding: 12px 18px; font-weight: 700; font-size: 14.5px; box-shadow: 0 10px 30px rgba(33, 27, 58, .3);
}
@media (min-width: 900px) {
  .reperes { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "situer cote" "xp xp" "defis defis" "semaine trophees"; gap: 16px; align-items: start; }
  .rp-situer { grid-area: situer; } .rp-cote { grid-area: cote; } .rp-xp { grid-area: xp; }
  .rp-defis { grid-area: defis; } .rp-semaine { grid-area: semaine; } .rp-trophees { grid-area: trophees; }
  .rp-defis-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reperes h2 { margin-top: 18px; }
}
@media (max-width: 720px) {
  .grille-trophees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .grille-trophees .trophee { flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 6px; font-size: 12.5px; line-height: 1.3; }
  .grille-trophees .tr-cond { display: block; font-size: 12px; }
  .story { max-width: none; }
  .rp-boutons { max-width: none; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------------ plan jusqu'au jour J (maquette 3-plan) */
.serie { background: var(--jaune-clair); color: var(--jaune-texte); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.plan { max-width: 980px; margin: 0 auto; }
.plan .tete { margin: 0 0 12px; }
.plan .tete h1 { font-size: 30px; }
.plan-intro { margin: -4px 0 12px; }
.plan-grille { display: grid; gap: 0 18px; }
.plan-grille > * { min-width: 0; }
.plan .carte { padding: 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); margin-bottom: 12px; }
.plan .etiquette { margin: 16px 0 8px 2px; }
.plan-jour {
  background: linear-gradient(135deg, #5b3df5, #8b5cf6 55%, #ec4899); color: #fff;
  border-radius: 20px; padding: 16px; margin-bottom: 12px; box-shadow: 0 14px 34px rgba(91, 61, 245, .24);
}
.plan-jour-sur { font-size: 13px; font-weight: 700; opacity: .9; letter-spacing: .02em; }
.plan-jour-titre { font-size: 19px; font-weight: 700; margin: 6px 0 2px; line-height: 1.3; }
.plan-jour p { margin: 0 0 12px; font-size: 14px; opacity: .95; }
.plan-go {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px;
  border: 0; border-radius: 16px; background: var(--bouton-blanc); color: #4a2fe0; text-decoration: none;
  font-size: 16px; font-weight: 700; transition: transform .12s ease;
}
.plan-go:active { transform: translateY(1px); }
.plan-ensuite-carnet {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 6px;
  color: #fff; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.plan-jour-fait { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 16px; background: rgba(255, 255, 255, .2); font-weight: 700; }
.plan-sem-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.plan-sem-tete b { font-size: 15px; }
.plan .progres i, .plan-depart .progres i { background: var(--violet); }
.plan-resume { margin-top: 10px; }
.carte.plan-ensuite { padding: 13px 16px; opacity: .6; }
.plan-ensuite b { font-size: 15px; }
.plan-plus { margin: -2px 2px 12px; }
.plan-mois-tete { margin: 16px 0 12px; }
.plan-mois-tete h2 { margin: 0; font-size: 19px; }
.plan-cal-jours, .plan-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; text-align: center; }
.plan-cal-jours { font-size: 11px; color: var(--encre-3); margin-bottom: 8px; }
.plan-cal > * { display: block; padding: 7px 0; border: 0; border-radius: 9px; font-family: inherit; font-size: 12px; line-height: 1.5; }
.plan-cal .vide { background: none; }
.plan-cal .fait { background: var(--menthe-clair); color: var(--menthe-fonce); font-weight: 700; }
.plan-cal .manque { background: var(--corail-clair); color: var(--corail-fonce); font-weight: 700; cursor: pointer; }
.plan-cal button.manque:hover { box-shadow: inset 0 0 0 2px var(--corail-fonce); }
.plan-cal .examen { background: var(--jaune-clair); color: var(--jaune-texte); font-weight: 700; }
.plan-cal .auj { background: var(--violet); color: #fff; font-weight: 700; }
.plan-cal .prevu { background: var(--violet-clair); color: var(--violet-texte); }
.plan-cal .hors { background: var(--page); color: var(--encre-3); }
.plan-cal .ici { box-shadow: inset 0 0 0 2px var(--violet-texte); }
.plan-legende { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.plan-legende .l-manque { color: var(--corail-fonce); }
.plan-legende .l-examen { color: var(--jaune-texte); }
.plan-legende .l-prevu { color: var(--violet-texte); }
.plan-rattrape { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--trait); }
.plan-rattrape > span { display: flex; flex-direction: column; min-width: 0; font-size: 14.5px; }
.plan-rattrape .btn { flex: none; }
.plan-projection b { font-size: 15px; }
.plan-proj { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 8px 0 6px; }
.plan-proj .gros { font-size: 34px; }
.plan-proj-vide { margin: 8px 0 0; }
.plan-reglages { margin: 4px 2px 0; }
.carte.plan-compacte .chip { flex: none; }
@media (min-width: 900px) {
  .plan-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .plan-mois-tete { margin-top: 0; }
}

/* premier lancement : trois étapes, puis le test de niveau */
.plan-depart { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; min-height: min(680px, calc(100svh - 190px)); }
.plan-depart .points { margin: 4px 0 22px; }
.plan-q { font-size: 26px; margin: 0 0 6px; }
.plan-q2 { font-size: 18px; margin: 18px 0 8px; }
.plan-sous { margin: 0 0 20px; font-size: 14px; }
.plan-cible { color: var(--violet-texte); text-align: center; font-size: 56px; font-variant-numeric: tabular-nums; }
.plan-range { width: 100%; height: 28px; margin: 14px 0 6px; accent-color: #5b3df5; cursor: pointer; }
.plan-bornes { display: flex; justify-content: space-between; }
.carte.plan-pct { margin-top: 20px; padding: 16px; border-radius: 20px; background: var(--jaune-clair); box-shadow: none; }
.plan-pct p { margin: 0; font-size: 14.5px; }
.cal-pop.cal-ligne { position: static; width: 100%; max-width: 360px; box-shadow: none; margin: 6px 0 10px; }
.cal-grille button[disabled] { opacity: .35; cursor: default; background: transparent; }
.plan-sansdate { align-self: flex-start; }
.plan-note { margin: 0; }
.plan-puces { display: flex; flex-wrap: wrap; gap: 0 8px; }
.carte.plan-dom { display: flex; align-items: center; gap: 12px; padding: 16px; margin-bottom: 12px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); }
.plan-dom b { font-size: 15px; }
.plan-dom .chip { flex: none; min-width: 34px; }
.plan-dom-corps { flex: 1; min-width: 0; }
.plan-dom-corps .plan-sem-tete { margin-bottom: 6px; }
.plan-depart .espace { flex: 1; min-height: 16px; }
.plan-pouce {
  position: sticky; bottom: 12px; z-index: 20; display: grid; gap: 4px; padding-top: 12px;
  background: linear-gradient(var(--page-0), var(--page) 14px);
}
.plan-pouce .btn { width: 100%; min-height: 54px; border-radius: 16px; font-size: 16px; }
.plan-pouce .btn.primaire { box-shadow: 0 10px 24px rgba(91, 61, 245, .25); }
.plan-pouce .btn.menthe { box-shadow: 0 10px 24px rgba(0, 168, 128, .28); }
.btn.fant { background: transparent; border-color: transparent; color: var(--encre-2); font-weight: 600; }
.btn.fant:hover { color: var(--encre); border-color: transparent; }
.plan-chrono { font-family: "Bricolage Grotesque", sans-serif; font-size: 14px; font-variant-numeric: tabular-nums; }
.plan-chrono.fini { background: var(--corail-clair); color: var(--corail-texte); }

/* ------------------------------------------------------------------ mon compte (maquette 6-compte, colonne 4) */
.compte { max-width: 560px; margin: 0 auto; }
.compte .tete { margin: 0 0 12px; }
.compte .tete h1 { font-size: 30px; }
.compte .carte { padding: 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(33, 27, 58, .06); margin-bottom: 12px; }
.carte.cpt-profil { display: flex; gap: 13px; align-items: center; flex-wrap: wrap; }
.cpt-avatar {
  width: 46px; height: 46px; border-radius: 15px; background: var(--violet); color: #fff; flex: none;
  display: grid; place-items: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 19px;
}
.cpt-id { min-width: 0; flex: 1; }
.cpt-id b { font-size: 16px; display: block; overflow-wrap: anywhere; }
.cpt-id .mini { overflow-wrap: anywhere; }
.cpt-invite .btn { flex: none; }
.cpt-etiquette { margin: 16px 0 8px 2px; }
.cpt-bloc { position: relative; }
.compte .carte.cpt-ligne {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  min-height: 48px; padding: 13px; border: 0; text-align: left; color: var(--encre);
  font-family: inherit; font-size: 14.5px; line-height: 1.4; cursor: pointer;
  transition: box-shadow .12s ease;
}
.compte button.cpt-ligne:hover, .cpt-bloc.ouvert > .cpt-ligne { box-shadow: 0 0 0 2px var(--violet-clair), 0 2px 10px rgba(33, 27, 58, .06); }
.compte .carte.cpt-ligne.cpt-statique { cursor: default; padding-top: 6px; padding-bottom: 6px; }
.cpt-lib { min-width: 0; }
.cpt-val { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 60%; }
.cpt-val b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpt-val .chip.tap { min-height: 44px; }
.cpt-chevron { font-size: 20px; line-height: 1; color: var(--encre-3); }
.compte .carte.cpt-danger { color: var(--corail-texte); }
.cpt-bloc.ouvert > .cpt-ligne { margin-bottom: 8px; }
.compte .carte.cpt-panneau { margin: 0 0 14px; padding: 16px; box-shadow: 0 0 0 2px var(--violet-clair); }
.cpt-panneau-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.cpt-panneau-tete b { font-family: "Bricolage Grotesque", sans-serif; font-size: 17px; }
.cpt-fermer { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--page); color: var(--encre-2); font-size: 15px; cursor: pointer; flex: none; }
.cpt-fermer:hover { background: var(--violet-clair); color: var(--violet-texte); }
.cpt-voile { display: none; }
.cpt-form { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.cpt-form.cpt-colonne { flex-direction: column; }
.cpt-champ {
  flex: 1; min-width: 0; min-height: 48px; border: 1.5px solid var(--trait); border-radius: 14px; padding: 0 14px;
  font-family: inherit; font-size: 16px; color: var(--encre); background: var(--carte);
}
.cpt-champ:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-clair); }
.cpt-form .btn { min-height: 48px; }
.cpt-note { margin: 0 0 12px; font-size: 14px; }
.cpt-panneau .plan-cible { font-size: 48px; }
.cpt-panneau .plan-range { margin-top: 6px; }
.cpt-panneau .cpt-ok { width: 100%; min-height: 48px; margin-top: 4px; }
.cpt-panneau .auth-err { margin-top: 10px; }
.cpt-cal.cal-pop.cal-ligne { border: 0; padding: 0; margin: 0 auto; }
.cpt-cal + .cal-effacer { min-height: 44px; }
.btn.cpt-rouge { background: var(--corail); border-color: var(--corail); color: #fff; }
.btn.cpt-rouge:hover { background: #e0305b; border-color: #e0305b; }
@media (max-width: 719.98px) {   /* les panneaux d'édition deviennent des feuilles qui montent depuis le bas */
  .cpt-voile { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(33, 27, 58, .38); }
  .compte .carte.cpt-panneau {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0; max-height: 86svh; overflow-y: auto;
    border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 34px rgba(33, 27, 58, .22); animation: cpt-monte .18s ease-out;
  }
  .cpt-bloc.ouvert > .cpt-ligne { margin-bottom: 12px; }
}
@keyframes cpt-monte { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* rappel du soir, sur l'accueil */
.rappel-bandeau {
  display: flex; align-items: center; gap: 12px; background: var(--encre); color: var(--sur-encre);
  border-radius: 20px; padding: 12px 12px 12px 16px; margin: 0 0 16px; box-shadow: 0 10px 26px rgba(33, 27, 58, .2);
}
.rb-ico { font-size: 22px; flex: none; }
.rb-txt { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.rb-go {
  flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 44px;
  border-radius: 14px; background: var(--menthe); color: #fff; font-weight: 800; text-decoration: none;
  font-family: "Bricolage Grotesque", sans-serif; font-size: 16px;
}
.rb-go:hover { filter: brightness(.94); }

/* sauvegarde proposée après le premier sprint (colonne 3) */
.relance {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: var(--voile); backdrop-filter: blur(6px);
}
.relance .carte.relance-carte { width: 100%; max-width: 360px; text-align: center; padding: 22px 18px 14px; border-radius: 20px; box-shadow: var(--ombre); }
.relance-emoji { font-size: 40px; line-height: 1.2; }
.relance h2 { margin: 8px 0 4px; font-size: 21px; }
.relance .mini { margin: 0 0 16px; font-size: 13.5px; }
.relance-btn { width: 100%; min-height: 50px; border-radius: 16px; font-size: 16px; }
.relance .btn.primaire { margin-bottom: 4px; box-shadow: 0 10px 24px rgba(91, 61, 245, .25); }

/* ------------------------------------------------------------------ animations légères (F7)
   Uniquement transform et opacity (et le halo en box-shadow), 400 ms au plus sauf les confettis.
   Aucune boucle infinie. Tout se coupe en mouvement réduit (bloc en fin de fichier). */
:root { --halo-menthe: rgba(0, 168, 128, .18); --halo-menthe-fort: rgba(0, 168, 128, .32); }
:root[data-theme="nuit"] { --halo-menthe: rgba(52, 211, 153, .2); --halo-menthe-fort: rgba(52, 211, 153, .36); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) { --halo-menthe: rgba(52, 211, 153, .2); --halo-menthe-fort: rgba(52, 211, 153, .36); }
}

/* transitions d'écran : chaque enfant de #app glisse de 6 px en fondu ; fondu seul s'il contient un élément fixe */
.entree { animation: entree .18s ease-out both; }
.entree.fondu { animation-name: entree-fondu; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes entree-fondu { from { opacity: 0; } to { opacity: 1; } }

/* retour sur la réponse, au moment de la correction (sprint et entraînement) */
.sprint-jeu .option.juste, .entr-corrige .option.bonne {
  box-shadow: 0 0 0 4px var(--halo-menthe);
  transition: border-color .12s ease, background-color .12s ease, box-shadow .24s ease;
  animation: juste .24s ease-out both;
}
.sprint-jeu .option.faux + .option.juste { animation-delay: .2s; }   /* la bonne se révèle après la secousse */
.sprint-jeu .option.faux, .entr-corrige .option.fausse { animation: secoue .26s ease-in-out both; }
@keyframes juste {
  0% { transform: scale(1); box-shadow: 0 0 0 0 var(--halo-menthe-fort); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 7px var(--halo-menthe-fort); }
  100% { transform: scale(1); box-shadow: 0 0 0 4px var(--halo-menthe); }
}
@keyframes secoue {
  0%, 100% { transform: translateX(0); }
  16%, 50%, 83% { transform: translateX(-4px); }
  33%, 66% { transform: translateX(4px); }
}

/* « +N XP » monte et apparaît */
.sprint-xp .chip { animation: xp .32s ease-out .12s both; }
@keyframes xp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* barres et anneaux qui partent de 0 (état posé au rendu, retiré à l'image suivante) */
.barre > div, .progres i, .jauge i { transform-origin: left center; }
.barre > div { transition: width .6s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
.progres i { transition: width .6s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
.jauge i { transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.jauge-zero { transform: scaleX(0) !important; transition: none !important; }
.anneau-arc { transition: stroke-dasharray .4s cubic-bezier(.2, .8, .2, 1); }

/* la série qui augmente : un sursaut, une fois par jour */
.chip-serie.sursaut { animation: sursaut .4s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes sursaut {
  0% { transform: scale(1); }
  40% { transform: scale(1.18) translateY(-2px); }
  70% { transform: scale(.96); }
  100% { transform: scale(1); }
}

/* célébration : carte modale, icône en pop, confettis aux couleurs de la marque */
.celeb {
  position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: var(--voile); backdrop-filter: blur(6px); animation: entree-fondu .2s ease-out both;
}
.celeb .carte.celeb-carte {
  width: 100%; max-width: 360px; max-height: calc(100svh - 32px); overflow-y: auto; text-align: center;
  padding: 22px 18px 14px; border-radius: 24px; box-shadow: 0 18px 48px rgba(33, 27, 58, .18);
  animation: entree .22s ease-out both;
}
.celeb-sur {
  display: inline-block; background: var(--violet-clair); color: var(--violet-texte); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.celeb-icone {
  width: 88px; height: 88px; margin: 16px auto 12px; border-radius: 28px; background: var(--jaune-clair);
  display: grid; place-items: center; font-size: 46px; line-height: 1; font-weight: 800;
  font-family: "Bricolage Grotesque", sans-serif; color: var(--jaune-texte);
  animation: pop .36s cubic-bezier(.2, .9, .3, 1.2) .06s both;
}
@keyframes pop {
  0% { opacity: 0; transform: scale(.6); }
  65% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
.celeb h2 { margin: 0 0 4px; font-size: 24px; }
.celeb-texte { margin: 0 0 16px; font-size: 14.5px; color: var(--encre-2); line-height: 1.45; }
.celeb-liste { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: left; }
.celeb-liste li { display: flex; align-items: center; gap: 10px; background: var(--page); border-radius: 14px; padding: 8px 12px; }
.celeb-liste .rond {
  flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--jaune-clair); color: var(--jaune-texte);
  display: grid; place-items: center; font-size: 18px; font-weight: 800;
}
.celeb-liste b { display: block; font-size: 14.5px; line-height: 1.3; }
.celeb-liste .mini { display: block; }
.btn.celeb-btn { width: 100%; min-height: 52px; border-radius: 16px; font-size: 16px; margin-top: 2px; box-shadow: 0 10px 24px rgba(0, 168, 128, .28); }
.confetti {
  position: fixed; top: 0; z-index: 100; width: 8px; height: 13px; border-radius: 2px; pointer-events: none;
  animation: confetti 1s cubic-bezier(.25, .55, .55, 1) both;
}
.confetti.rond { width: 9px; height: 9px; border-radius: 50%; }
@keyframes confetti {
  0% { opacity: 1; transform: translate3d(0, -20vh, 0) rotate(0deg); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--dx, 0px), 110vh, 0) rotate(var(--rot, 360deg)); }
}
.piste-note { font-weight: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .entree { animation: none !important; }   /* pas de transition d'écran */
  .confetti { display: none !important; }
  /* les retours d'état (couleur juste ou faux, halo) restent : ce sont les états finaux, sans mouvement */
}

/* ------------------------------------------------------------------ méga-menu mobile (720 px et moins)
   Barre du bas à quatre onglets + « Menu », qui ouvre une feuille plein écran montant depuis le bas (app.js). */
.mm { display: none; }
@media (max-width: 720px) {
  body.mm-ouvert { position: fixed; left: 0; right: 0; overflow: hidden; }   /* page dessous figée (top posé par app.js) */

  /* barre du bas : l'onglet actif porte une pilule derrière son icône */
  .tabbar a, .tabbar .tab-menu {
    position: relative; flex: 1; display: grid; justify-items: center; align-content: center; gap: 1px;
    min-height: 48px; padding: 4px 0; line-height: 1.4;
    color: var(--encre-3); text-decoration: none; font-size: 10.5px; font-weight: 700;
  }
  .tabbar .tab-menu { background: none; border: 0; margin: 0; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 52px; height: 28px; padding: 3px 15px; border-radius: 999px; transition: background-color .15s ease; }
  .tabbar a.actif, .tabbar .tab-menu.actif, .tabbar .tab-menu[aria-expanded="true"] { color: var(--violet-texte); }
  .tabbar a.actif svg, .tabbar .tab-menu.actif svg, .tabbar .tab-menu[aria-expanded="true"] svg { background: var(--violet-clair); }
  .tab-pastille {
    position: absolute; top: 0; left: calc(50% + 5px); min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 999px; border: 2px solid var(--carte); background: var(--corail); color: #fff;
    font-size: 10.5px; font-weight: 800; line-height: 15px; text-align: center; font-variant-numeric: tabular-nums;
  }

  /* la feuille */
  .mm { display: block; position: fixed; inset: 0; z-index: 85; }
  .mm:not(.ouvert) { pointer-events: none; }
  .mm-voile { position: absolute; inset: 0; background: rgba(33, 27, 58, .42); opacity: 0; transition: opacity .26s ease; }
  .mm.ouvert .mm-voile { opacity: 1; }
  .mm-feuille {
    position: absolute; left: 0; right: 0; bottom: 0; top: max(12px, env(safe-area-inset-top));
    display: flex; flex-direction: column; background: var(--page); color: var(--encre);
    border-radius: 24px 24px 0 0; box-shadow: 0 -10px 34px rgba(33, 27, 58, .22);
    transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); will-change: transform;
  }
  .mm.ouvert .mm-feuille { transform: none; }
  .mm-feuille.glisse { transition: none; }
  .mm-tete { position: relative; flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 24px 16px 6px; touch-action: none; }
  .mm-poignee { position: absolute; top: 8px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 999px; background: var(--trait); }
  .mm-tete-txt { flex: 1; min-width: 0; }
  .mm-tete h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
  .mm-tete p { margin: 4px 0 0; color: var(--encre-2); font-size: 14.5px; }
  .mm-fermer {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border-radius: 14px; border: 1.5px solid var(--trait); background: var(--carte); color: var(--encre); cursor: pointer;
  }
  .mm-fermer svg { width: 22px; height: 22px; }
  .mm-corps {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 8px 16px calc(28px + env(safe-area-inset-bottom));
  }
  .mm-sec-titre {
    margin: 20px 0 8px; font-family: "Plus Jakarta Sans", sans-serif; font-size: 12px; font-weight: 800;
    letter-spacing: .09em; text-transform: uppercase; color: var(--encre-3);
  }
  .mm-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

  /* les tuiles, teintées par domaine */
  .mm-tuile {
    --t: var(--violet); --t-clair: var(--violet-clair); --t-texte: var(--violet-texte);
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; margin: 0; padding: 10px 12px 10px 10px;
    border-radius: 18px; border: 1.5px solid var(--trait); background: var(--carte); box-shadow: var(--ombre-basse);
    color: var(--encre); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: transform .12s ease, border-color .12s ease, background-color .12s ease;
  }
  .mm-tuile:active { transform: scale(.985); }
  .mm-tuile.menthe { --t: var(--menthe); --t-clair: var(--menthe-clair); --t-texte: var(--menthe-texte); }
  .mm-tuile.corail { --t: var(--corail); --t-clair: var(--corail-clair); --t-texte: var(--corail-texte); }
  .mm-tuile.jaune { --t: var(--jaune); --t-clair: var(--jaune-clair); --t-texte: var(--jaune-texte); }
  .mm-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--t-clair); color: var(--t-texte); }
  .mm-ico svg { width: 24px; height: 24px; }
  .mm-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
  .mm-txt b { font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif; font-size: 16.5px; font-weight: 700; line-height: 1.25; }
  .mm-txt small { color: var(--encre-2); font-size: 13px; line-height: 1.35; }
  .mm-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
  .mm-fleche { flex: none; width: 18px; height: 18px; color: var(--encre-3); }
  .mm-badge {
    flex: none; border-radius: 999px; padding: 1px 9px; white-space: nowrap; line-height: 1.5;
    background: var(--t-clair); color: var(--t-texte); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  }
  .mm-badge.alerte { background: var(--corail); color: #fff; }
  .mm-badge.ok { background: var(--menthe-clair); color: var(--menthe-texte); }
  .mm-badge.attente { background: var(--jaune-clair); color: var(--jaune-texte); }
  /* tu es ici */
  .mm-tuile.actif { border-color: var(--t); background: var(--t-clair); box-shadow: none; }
  .mm-tuile.actif .mm-ico { background: var(--t); color: #fff; }
  .mm-tuile.jaune.actif .mm-ico { color: #211b3a; }
  .mm-tuile.actif .mm-fleche { color: var(--t-texte); }

  /* l'élément utile du moment */
  .mm-maintenant {
    display: flex; align-items: center; gap: 12px; min-height: 72px; margin: 6px 0 2px; padding: 14px 12px 14px 16px;
    border-radius: 20px; background: var(--encre); color: var(--sur-encre); text-decoration: none;
    box-shadow: 0 10px 26px rgba(33, 27, 58, .2);
  }
  .mm-m-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
  .mm-m-eti { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .7; }
  .mm-m-txt b { font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif; font-size: 17px; font-weight: 700; line-height: 1.25; }
  .mm-m-txt small { font-size: 13px; line-height: 1.35; opacity: .8; }
  .mm-go {
    flex: none; display: grid; place-items: center; min-width: 58px; min-height: 44px; border-radius: 14px;
    background: var(--menthe); color: #fff; font-family: "Bricolage Grotesque", sans-serif; font-size: 16px; font-weight: 800;
  }

  /* interrupteur du mode nuit */
  .mm-interrupteur { flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--gris-clair); transition: background-color .2s ease; }
  .mm-interrupteur i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(33, 27, 58, .3); transition: transform .2s ease; }
  .mm-nuit[aria-checked="true"] .mm-interrupteur { background: var(--violet); }
  .mm-nuit[aria-checked="true"] .mm-interrupteur i { transform: translateX(20px); }
}
body.sansnav .mm { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .mm-voile, .mm-feuille, .mm-tuile, .tabbar svg, .mm-interrupteur, .mm-interrupteur i { transition: none !important; }
}
