/* Version ordinateur d'Objectif 32 (specs 84 à 88, décision du 30 novembre 2026).
   Chargée par index.html avec media="(min-width: 1024px)", après style.css : sous 1024 px, aucune règle ne s'applique.
   style.css n'est jamais modifié pour l'ordinateur. Couleurs : seulement les variables de style.css (thème sombre
   compris), jamais de couleur en dur. Une seule surface jaune pleine par écran (l'action principale).
   Garde-fou du mobile : node scripts/non-regression-mobile.mjs --compare <référence>. */

/* ---------- Système visuel (spec 84) ---------- */
:root{
  --d-max:1200px;   /* conteneur centré */
  --d-gut:48px;     /* marges latérales */
  --d-read:680px;   /* colonne de lecture : question, mini-fiche, explications */
  --d-gap:56px;     /* gouttière des grilles à deux colonnes */
}
@media (max-width:1279.98px){ :root{--d-gut:32px; --d-gap:48px} }

/* En-tête : logo et nom à gauche ; liens (insérés par app.js à partir de 1024 px seulement), puis les langues, à droite. */
.top.app-top{max-width:var(--d-max); padding:16px var(--d-gut) 12px; flex-wrap:nowrap; gap:0 32px}
.app-top .brand{font-size:24px}
.app-top .brand-mark{width:28px; height:28px}
.d-nav{display:flex; align-items:center; gap:28px; margin-left:auto}
.d-nav a{display:inline-flex; align-items:center; min-height:44px; font-size:16px; font-weight:700; color:var(--ink); text-decoration:none; text-underline-offset:4px; white-space:nowrap}
.d-nav a:hover{text-decoration:underline; text-decoration-color:var(--ink-soft)}
.d-nav + .langs{margin-left:0; padding-left:24px; border-left:1px solid var(--line)}
body.prefecture .d-nav{visibility:hidden}

/* Contenu : centré ; main garde sa colonne de 640 px tant qu'un écran n'a pas de mise en page ordinateur propre. */
main{padding-top:16px; padding-bottom:56px}

/* Pied : provenance et liens à gauche, Partager et Soutenir à droite, sur une ligne. */
.foot{max-width:var(--d-max); width:100%; margin:0 auto; padding:28px var(--d-gut) 40px; border-top:1px solid var(--line); text-align:left;
  display:grid; grid-template-columns:minmax(0,1fr) max-content max-content; column-gap:12px; align-items:start}
.foot > p:not(.foot-support){grid-column:1; margin:0 0 8px; max-width:var(--d-read); padding-right:32px}
.foot > .partage{grid-column:2; grid-row:1 / span 3; margin:0}
.foot > .foot-support{grid-column:3; grid-row:1 / span 3; margin:0; max-width:260px}
.foot .partage .btn{min-height:44px; min-width:0; padding:8px 20px}
.foot .partage-msg{min-height:0}

/* ---------- Accueils (spec 85) ---------- */
/* Deux colonnes 7/5 : app.js regroupe, sur ordinateur seulement, les blocs consécutifs de gauche (.d-main) et de droite
   (.d-side) sans changer leur ordre ; le reste (mémorisation, liens) suit en pleine largeur. */
#app:has(> .d-home){max-width:var(--d-max); padding-left:var(--d-gut); padding-right:var(--d-gut)}
.d-home{display:grid; grid-template-columns:minmax(0,7fr) minmax(0,5fr); column-gap:var(--d-gap)}
.d-main,.d-side{min-width:0}
.d-new{align-items:start; padding-top:clamp(16px, 4vh, 40px)}
.d-new > .d-side{display:grid; gap:16px}
.d-hab{align-items:start; margin-top:8px}
/* La colonne de droite peut être longue : bouton principal et estimation restent visibles pendant le défilement. */
.d-hab .d-main{position:sticky; top:24px}

/* Nouveau visiteur et test fait : titre, bouton principal jamais étiré, liens secondaires sur une ligne. */
.d-new h1{font-size:clamp(44px, 3.9vw, 56px); line-height:1.08; letter-spacing:-.02em; margin:8px 0 14px; text-wrap:balance}
.d-new .home-kicker{font-size:15px}
.d-new .home-sub{font-size:20px; margin:0 0 24px; max-width:34em}
.d-new .home-cta,.d-new .t5-cta{max-width:420px}
.d-new .home-alt{display:flex; flex-wrap:wrap; gap:4px 28px; margin-top:18px}
.d-new .proofs{margin-top:28px}

/* Aperçu d'une vraie question : statique, aucun élément focusable. Repris de la correction (.opts, .feedback). */
.d-preview{margin:0; padding:16px 20px 4px; background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius)}
.d-preview-t{font-size:15px; font-weight:700; color:var(--ink-soft); margin:0 0 10px}
.d-pq{font-size:19px; line-height:1.3; font-weight:700; margin:0 0 12px; text-wrap:pretty}
.d-pq .to{display:block; margin-top:4px; font-size:15px; color:var(--ink-soft); font-weight:700}
.d-opts{list-style:none; margin:0; padding:0; display:grid; gap:6px}
.d-opt{display:grid; grid-template-columns:30px 1fr; gap:4px 10px; align-items:start; padding:7px 12px; border:2px solid var(--line); border-radius:var(--radius); font-size:16px; line-height:1.3}
.d-opt b{display:inline-grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--paper); color:var(--ink-soft); font-size:14px}
.d-opt .to{display:block; font-size:14px}
.d-opt.ok{border-color:var(--ok); background:var(--ok-bg)}
.d-opt.ok b{background:var(--ok); color:var(--white)}
.d-opt .tag{grid-column:2; display:inline-flex; align-items:center; gap:6px; font-size:15px; font-weight:700; color:var(--ok)}
.d-pfb{margin:10px 0 12px; padding:8px 14px; font-size:15px; line-height:1.4}
.d-pfb p{margin:0 0 4px}
.d-pfb .tr{margin:4px 0 0; padding-top:4px}

/* Continuer sur le téléphone : carte compacte sous l'aperçu. Le QR garde son fond blanc, y compris en thème sombre. */
.d-phone{display:grid; grid-template-columns:112px minmax(0,1fr); gap:20px; align-items:center; padding:16px 20px; background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius)}
.d-phone img{display:block; width:112px; height:112px; border-radius:8px}
.d-phone h2{margin:0 0 4px; font-size:18px}
.d-phone p{margin:0; font-size:15px; line-height:1.45}
.d-phone a{display:inline-flex; align-items:center; min-height:44px; font-weight:700}
/* Demande d'accès à la séance de groupe (spec 93) : même carte que le bloc téléphone, sans image. */
.d-phone.d-ask{grid-template-columns:minmax(0,1fr)}
.d-ask p + p{margin-top:4px}

/* Habitué : bouton principal en tête de la colonne de gauche, estimation agrandie (barre du mobile, repère 32). */
.d-hab .home-cta{min-height:96px; margin-top:0}
.d-hab .home-cta .l{font-size:24px}
.d-hab .home-cta .s{font-size:16px}
.d-hab .home-est{margin:20px 0 0; padding:20px 24px}
.d-hab .est-num{margin:4px 0 14px; font-size:22px}
.d-hab .est-num b{font-size:80px}
.d-hab .est-bar{height:18px; margin-bottom:30px}
.d-hab .est-mark{top:-6px; bottom:-6px; width:4px; margin-left:-2px}
.d-hab .est-mark span{font-size:15px}
.d-hab .streak{background:none; color:var(--ink); padding:0; border-radius:0}
.d-home:has(.d-date) .est-days{display:none}
/* Colonne de droite : date d'examen, accès, puis les autres blocs. Aucun aplat jaune ici (une seule surface par écran). */
.d-side > :first-child{margin-top:0}
.d-side .btn.sun{background:var(--ink); color:var(--paper)}
.d-date{margin:0 0 16px; padding:16px 20px; background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius)}
.d-date h2{margin:0; font-size:22px}
.d-date p{margin:4px 0 0}
.d-date-when{font-size:18px}
.d-date .t5-linkbtn{margin:0; padding:12px 0}
.d-hab .home-nav{margin:0 0 16px}
.d-sync h2{font-size:18px}
.d-sync a{display:inline-flex; align-items:center; min-height:44px; font-weight:700}

/* Mémorisation par thème, pleine largeur : nom, barre de 300 px, pourcentage, « M'entraîner ». */
#app:has(> .d-hab) > h2{margin-top:40px}
#app:has(> .d-hab) .themes li{grid-template-columns:minmax(0,1fr) 300px 4.5em 10em; gap:16px; min-height:52px; padding:4px 0}
#app:has(> .d-hab) .themes .bar{grid-column:2; grid-row:1; height:12px}
#app:has(> .d-hab) .themes .n{grid-column:3; text-align:right}
.d-train{grid-column:4; justify-self:end; margin:0; padding:12px 4px}

/* ---------- Séance (spec 86) ---------- */
/* Écran de question de la séance et de la lecture d'un thème : progression pleine largeur, question et réponses à gauche
   (7/11, .d-q), correction #fb puis panneau d'aide à droite (4/11, .d-aside), collant à 24 px du haut. Les réponses ne
   changent ni de place ni de taille après la réponse : l'étiquette « Bonne réponse » / « Votre réponse » se pose sur le
   bord haut du bouton au lieu d'ajouter une ligne. */
#app:has(> .d-q){max-width:var(--d-max); padding-left:var(--d-gut); padding-right:var(--d-gut);
  display:grid; grid-template-columns:minmax(0,7fr) minmax(0,4fr); column-gap:var(--d-gap); align-items:start; align-content:start}
#app:has(> .d-q){padding-top:8px}
#app:has(> .d-q) > *{grid-column:1 / -1}
#app:has(> .d-q) > .d-q{grid-column:1; min-width:0}
#app:has(> .d-q) > .d-aside{grid-column:2; min-width:0; position:sticky; top:24px; padding-top:12px}
.d-q .q{font-size:28px; line-height:1.25; margin:6px 0 14px}
.d-q .q .sit{font-size:15px}
.d-q .trbar{margin:0 0 8px}
.d-q .trbar .btn{min-height:44px; padding:8px 18px}
.d-q .tq{margin:0 0 12px}
.d-q .tq-q{font-size:18px}
.d-q .opts{gap:12px}
.d-q .opts button{position:relative; min-height:64px; font-size:20px; padding:12px 18px 12px 16px; grid-template-columns:36px 1fr; align-items:center}
.d-q .opts button b{width:34px; height:34px; font-size:16px}
.d-q .opts .to{font-size:16px}
.d-q .opts .tag{position:absolute; top:-12px; right:14px; padding:0 10px; line-height:22px; border:2px solid currentColor; border-radius:999px; background:var(--white); font-size:15px}
.d-aside .feedback{margin:0 0 4px; font-size:17px}
.d-aside #fb .actions{margin:12px 0 16px}
.d-aside #fb .actions .btn{width:100%; min-height:56px}
/* Panneau d'aide : estimation (comme l'accueil, en petit), masquée après la réponse ; mini-fiche et raccourcis repliés. */
.d-aid{display:grid; gap:12px}
.d-aid-est{padding:14px 18px 4px; background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius)}
.d-aid-est h2{margin:0; font-size:15px; color:var(--ink-soft)}
.d-aid-est .est-num{margin:0 0 8px}
.d-aid-est .est-num b{font-size:32px}
.d-aid-est .est-bar{margin-bottom:24px}
.d-aside:has(#fb .feedback) .d-aid-est{display:none}
.d-aid details{background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius)}
.d-aid summary{display:flex; flex-direction:column; justify-content:center; gap:2px; min-height:52px; padding:10px 16px 10px 40px; cursor:pointer; list-style:none; position:relative}
.d-aid summary::-webkit-details-marker{display:none}
.d-aid summary::before{content:"›"; position:absolute; left:16px; top:12px; font-weight:700; transition:transform .15s}
.d-aid details[open] > summary::before{transform:rotate(90deg)}
.d-aid summary:focus-visible{outline:3px solid var(--sun); outline-offset:2px; border-radius:var(--radius)}
.d-sum{font-weight:700; font-size:16px}
.d-mini-t{font-size:15px; color:var(--ink-soft)}
.d-mini-body.lesson{margin:0 12px 12px; padding:4px 14px 10px; font-size:16px}
.d-mini-body > h2{display:none}
.d-mini-body .tip{font-size:15px}
.d-keys ul{list-style:none; margin:0; padding:0 16px 12px; display:grid; gap:8px; font-size:15px}
.d-kk{display:inline-flex; gap:4px; align-items:center; margin-right:6px}
.d-keys kbd{display:inline-grid; place-items:center; min-width:26px; height:26px; padding:0 6px; font:inherit; font-size:14px; font-weight:700; border:1.5px solid var(--line); border-bottom-width:3px; border-radius:6px; background:var(--paper); color:var(--ink)}
@media (prefers-reduced-motion:reduce){ .d-aid summary::before{transition:none} }

/* Test de niveau et mode éclair (pas de correction #fb) : colonne centrée de lecture, échelle ordinateur. */
#app:has(> .opts):not(:has(> .exam-nav)):not(:has(> .pref-head)){max-width:calc(var(--d-read) + 32px)}
#app:has(> .opts):not(:has(> .exam-nav)):not(:has(> .pref-head)) .q{font-size:28px; line-height:1.25}
#app:has(> .opts):not(:has(> .exam-nav)):not(:has(> .pref-head)) .opts button{min-height:64px; font-size:20px; align-items:center}

/* Mini-fiche en début de séance : colonne centrée de 680 px, « Compris, aux questions » collé en bas si la fiche dépasse. */
#app:has(> .progress.with-pause):has(> #lesson){max-width:calc(var(--d-read) + 32px)}
#app:has(> .progress.with-pause):has(> #lesson) > .actions:last-child{position:sticky; bottom:0; z-index:1; margin:0; padding:12px 0 16px; background:var(--paper)}
#app:has(> .progress.with-pause):has(> #lesson) > .actions:last-child .btn{min-height:56px}

/* ---------- Examen blanc et mode Préfecture (spec 87) ---------- */
/* Examen blanc : même grille que la séance (spec 86). Chrono collé en haut ; grille des 40 questions, compteur et
   « Terminer et corriger » dans la colonne de droite, collante. */
#app:has(> .d-exam) > .d-exam-top{position:sticky; top:0; z-index:2; margin:0; padding:12px 0; background:var(--paper); border-bottom:1px solid var(--line)}
.d-exam-top .timer{font-size:22px}
.d-exam .actions{margin-top:20px}
.d-exam-side{padding-top:20px}
.d-exam-side .exam-nav{display:grid; grid-template-columns:repeat(auto-fill, minmax(44px, 1fr)); gap:8px; margin:0 0 12px}
.d-exam-side .exam-nav button{width:auto}
.d-exam-side .actions{flex-direction:column; gap:10px; margin:16px 0}
.d-exam-side .actions .btn{width:100%; min-height:56px; flex:none}
/* Spec 89 : tant qu'une question reste sans réponse, « Terminer et corriger » prend le style secondaire (comme « Quitter ») ;
   jaune plein seulement quand les 40 ont une réponse (classe .d-all posée par app.js). Logique de fin inchangée. */
.d-exam-side:not(.d-all) #submit{background:transparent; color:var(--ink); border:1.5px solid var(--line)}

/* Préfecture : barre fixe en haut (fond de surface, filet bas), en-tête de l'app masqué derrière elle ; colonne de 760 px. */
body.prefecture .app-top{visibility:hidden}
/* Spec 89 : écran austère, aucune sortie hors du bouton Quitter de la barre ; display:none retire aussi le pied de
   l'ordre de tabulation. */
body.prefecture .foot{display:none}
.d-pref-bar{position:fixed; top:0; left:0; right:0; z-index:10; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:24px;
  padding:12px max(var(--d-gut), calc((100vw - var(--d-max)) / 2 + var(--d-gut))); background:var(--white); border-bottom:1.5px solid var(--line)}
.d-pref-v{display:flex; flex-direction:column; line-height:1.3}
.d-pref-v strong{font-size:18px}
.d-pref-v span{font-size:15px; color:var(--ink-soft)}
.d-pref-bar .timer{font-size:34px; font-variant-numeric:tabular-nums; line-height:1.1}
.d-pref-r{display:flex; align-items:center; justify-content:flex-end; gap:16px; font-size:16px}
.d-pref-r .btn{flex:none; min-width:0; min-height:44px; padding:8px 18px}
#app:has(> .d-pref-bar){max-width:calc(760px + 32px); padding-top:24px}
#app:has(> .d-pref-bar) .q{font-size:28px; line-height:1.25}
#app:has(> .d-pref-bar) .opts button{min-height:64px; font-size:20px; align-items:center}
#app:has(> .d-pref-bar) #pref-ok{min-height:56px}

/* Intro, corrigé et verdict : inchangés, en colonne de lecture de 680 px. */
#app:has(> .pref-intro),#app:has(> .result){max-width:calc(var(--d-read) + 32px)}

/* ---------- Carte du programme (spec 88) ---------- */
/* Deux volets : les cinq thèmes à gauche (5/12), les fiches du thème choisi à droite (7/12). L'état d'une fiche est
   toujours dit par une icône et un texte, jamais par la seule couleur. */
#app:has(> .d-map){max-width:var(--d-max); padding-left:var(--d-gut); padding-right:var(--d-gut)}
.d-map-intro{max-width:var(--d-read); margin:0 0 24px}
.d-map{display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); column-gap:var(--d-gap); align-items:start}
.d-themes{list-style:none; margin:0; padding:0; display:grid; gap:10px; position:sticky; top:24px}
.d-th{width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; align-items:center; text-align:left; font:inherit; color:var(--ink);
  background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius); padding:14px 18px; cursor:pointer; min-height:44px}
.d-th[aria-pressed="true"]{border:2px solid var(--ink); box-shadow:inset 6px 0 0 var(--ink); padding-left:22px}
.d-th-n{font-weight:700; font-size:18px}
.d-th-p{font-weight:700; font-size:18px}
.d-th .bar{grid-column:1 / -1; height:10px; background:var(--line); border-radius:999px; overflow:hidden}
.d-th .bar i{display:block; height:100%; background:var(--sun)}
.d-th .bar i.good{background:var(--ok)}
.d-th-s{grid-column:1 / -1; font-size:15px; color:var(--ink-soft)}
.d-th-s.weak{color:var(--ink); font-weight:700}
.d-panel{min-width:0; padding:20px 24px; background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius)}
.d-panel h2{margin:0 0 4px; font-size:26px}
.d-panel .actions{margin:12px 0 8px}
.d-panel .actions .btn{flex:0 1 auto; min-height:52px}
.d-map-help{margin:0 0 14px}
.d-counts{list-style:none; margin:0 0 12px; padding:10px 0; display:flex; flex-wrap:wrap; gap:8px 24px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); font-size:15px}
.d-counts li{display:inline-flex; align-items:center; gap:6px}
.d-counts .done .ico,.d-f-st.done .ico{color:var(--ok)}
.d-counts .prog .ico,.d-f-st.prog .ico{color:var(--ink)}
.d-counts .new .ico,.d-f-st.new .ico{color:var(--ink-soft)}
.d-fiches{list-style:none; margin:0; padding:0}
.d-fiches li{border-top:1px solid var(--line)}
.d-fiches li:first-child{border-top:0}
.d-fiches button,.d-f-off{width:100%; display:grid; grid-template-columns:10.5em minmax(0,1fr); gap:12px; align-items:center; min-height:48px; padding:8px 4px; text-align:left; font:inherit; font-size:16px; color:var(--ink); background:none; border:0}
.d-fiches button{cursor:pointer; border-radius:8px}
.d-fiches button:hover .d-f-t{text-decoration:underline; text-underline-offset:3px}
.d-f-off{color:var(--ink-soft)}
.d-f-st{display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:700}
.d-f-st .ico{flex:none}

/* ---------- Écrans secondaires (spec 90) ---------- */
/* Lecture d'un thème, fiche ouverte depuis la carte (et fiche hors parcours), mini-fiche de début de séance, réglages,
   guide pratique, « Suis-je concerné ? » et ses réponses, Le jour J, à propos, intro de l'examen blanc : colonne de
   lecture de 680 px centrée, échelle ordinateur (titre d'écran 38 px, titre de fiche 28 px, corps 18 px, aides 15 px,
   rien sous 14 px). Chaque écran est reconnu par son contenu (:has), sans balisage ajouté ni changé. */
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)){max-width:calc(var(--d-read) + 32px)}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) > h1{font-size:38px; line-height:1.15; margin:24px 0 12px}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) > .eyebrow + h1{margin-top:6px}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) .eyebrow{font-size:15px}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) > .lesson h2{font-size:28px; line-height:1.2}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) > .resume h2,#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) .guide h2,#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) :is(.sync,.backup) h2{font-size:24px}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) .field textarea.code{font-size:14px}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child), :has(> .progress.with-pause):has(> #lesson), :has(#lg), :has(#elig), :has(.guide-choices), :has(> .about), :has(> .pref-intro)) > .actions .btn{flex:1 1 auto; min-width:0; min-height:56px; white-space:nowrap}

/* Lecture d'un thème et fiche de la carte : actions sur une ligne (« Fiche suivante » en bleu nuit, les autres en
   secondaire), 16 px pour que le plus long libellé (uk) tienne sans retour ; barre collée en bas si la fiche dépasse,
   comme la mini-fiche de la séance (spec 86). */
#app:has(> .actions > #rd-next) > .actions .btn{font-size:16px; padding:8px 16px}
#app:is(:has(> .actions > #rd-next), :has(> .lesson:first-child)) > .actions:last-child{position:sticky; bottom:0; z-index:1; margin:0; padding:12px 0 16px; background:var(--paper)}
html:has(#app > .actions > #rd-next, #app > .lesson:first-child, #app > .progress.with-pause ~ #lesson){scroll-padding-bottom:96px}

/* Réglages : champs de 480 px au plus, boutons de rappel sur une ligne, sections Telegram et code de sauvegarde
   séparées par un filet. */
#app:has(#lg) .field :is(select,input){max-width:480px}
#app:has(#lg) .field .actions .btn{flex:1 1 auto; min-width:0; white-space:nowrap}
#app:has(#lg) :is(.sync,.backup){margin-top:28px; padding-top:4px; border-top:1px solid var(--line)}

/* « Suis-je concerné ? » : choix en liste sur 680 px, libellés à 18 px sur une ligne jusqu'à 80 caractères environ. */
#app:has(.guide-choices) .guide-choices button{padding:16px 18px}

/* ---------- Pages publiques (spec 91) ---------- */
/* Fiches, listes, guides, questions pratiques, à propos : générées par scripts/build-fiches.mjs depuis templates/, qui
   chargent cette feuille avec media="(min-width: 1024px)" après style.css. Leur HTML ne change pas : même en-tête que
   l'app (conteneur, logo, hauteur), colonne de lecture de 680 px, échelle ordinateur. Le sous-titre reste à droite du
   logo, sur la même ligne ; les drapeaux deviennent des liens texte comme dans l'app (langue courante masquée, nom de
   chaque langue dans sa propre écriture ; le nom accessible reste l'aria-label de la page). */
.top:not(.app-top){max-width:var(--d-max); padding:16px var(--d-gut) 12px; flex-wrap:nowrap; gap:0 32px}
.top:not(.app-top) .brand{font-size:24px}
.top:not(.app-top) .brand-mark{width:28px; height:28px}
.top:not(.app-top) .brand-block{display:flex; align-items:center; gap:0 16px}
.top:not(.app-top) .tagline{margin:0; padding-left:16px; border-left:1px solid var(--line); font-size:15px}
.top:not(.app-top) .top-end{margin-left:auto; gap:16px}
.top:not(.app-top) .lang{display:flex; align-items:center; gap:8px}
.top:not(.app-top) .lang a{position:static; overflow:visible; isolation:auto; display:inline-flex; align-items:center; min-height:44px; min-width:0; padding:0 4px;
  border:0; border-radius:0; box-shadow:none; background:none; font-size:16px; font-weight:400; color:var(--ink); text-decoration:none}
.top:not(.app-top) .lang a[aria-current]{display:none}
.top:not(.app-top) .lang a::before{content:none}
.top:not(.app-top) .lang a:not([aria-current]) ~ a:not([aria-current])::before{content:"·"; display:inline-block; position:static; margin-right:12px; color:var(--ink-soft); background:none}
.top:not(.app-top) .lang a span{display:inline; padding:0; border-radius:0; background:none; color:inherit; font-size:0; line-height:inherit;
  text-decoration:underline; text-decoration-color:var(--ink-soft); text-underline-offset:4px}
.top:not(.app-top) .lang a span::after{font-size:16px}
.top:not(.app-top) .lang a[data-lang="fr"] span::after{content:"Français"}
.top:not(.app-top) .lang a[data-lang="uk"] span::after{content:"Українська"}
.top:not(.app-top) .lang a[data-lang="en"] span::after{content:"English"}
.top:not(.app-top) .lang a:hover span{text-decoration-color:var(--ink)}

/* Colonne de lecture et échelle : H1 38 px, corps 18 px, aides 15 px. */
main:not(#app){max-width:calc(var(--d-read) + 32px)}
main:not(#app) h1{font-size:38px; line-height:1.15}
main:not(#app) .eyebrow,main:not(#app) .crumbs{font-size:15px}
main:not(#app) h2,.fiche-page main .lesson h2{font-size:24px}
/* Appels vers l'app (« Testez-vous », « Commencer l'entraînement gratuit »…) : 420 px au plus, jamais étirés. */
main:not(#app) a.btn.sun{flex:0 1 auto; max-width:420px}

/* ---------- Pages publiques, fiche (spec 94) ---------- */
/* Deux colonnes dans le conteneur de 1200 px : contenu à gauche (680 px au plus), à droite l'entrée du quiz et la ligne
   sur Objectif 32 (.fiche-appel, seul conteneur ajouté au gabarit), alignées sur le h1 et collantes au défilement.
   Placement par grid-column et grid-row seulement : l'ordre du HTML, donc la lecture et le focus, ne change pas.
   La fiche n'a ni bloc du bot ni appel « Commencer l'entraînement gratuit » (retirés par la spec 73) : rien n'est ajouté. */
main:not(#app):has(> article.fiche){max-width:var(--d-max); padding-left:var(--d-gut); padding-right:var(--d-gut)}
article.fiche{display:grid; grid-template-columns:minmax(0, var(--d-read)) minmax(340px, 360px); column-gap:64px; align-items:start}
article.fiche > *{grid-column:1; min-width:0}
/* Les marges ne fusionnent pas entre éléments d'une grille : on garde la seule marge basse, comme dans le flux. */
article.fiche > :not(.fiche-appel, h1, .eyebrow){margin-top:0}
article.fiche > :is(.lesson, .quiz, .questions-fiche){margin-top:24px}
article.fiche > .fiche-appel{grid-column:2; grid-row:2 / span 40; position:sticky; top:24px; margin:4px 0 0;
  padding:20px 24px 24px; background:var(--white); border:1.5px solid var(--line); border-radius:var(--radius)}
.fiche-appel .fiche-contexte{margin:0 0 16px; font-size:17px}
.fiche-appel .fiche-entree{margin:0}
main:not(#app) .fiche-appel a.btn.sun{display:flex; width:100%; max-width:none; min-height:56px; min-width:0}

/* Bonne réponse : encadré vert de l'app, coche décorative (le texte dit déjà la réponse). */
article.fiche > .answer{position:relative; margin:16px 0 8px; padding:16px 18px 16px 62px; border:2px solid var(--ok); border-radius:var(--radius); background:var(--ok-bg); font-size:20px; line-height:1.4}
article.fiche > .answer::before{content:"✓" / ""; position:absolute; left:18px; top:17px; display:grid; place-items:center; width:30px; height:30px; border-radius:50%;
  background:var(--ok); color:var(--white); font-size:17px; line-height:1}

/* ---------- Pages publiques, liste (spec 95) ---------- */
/* Liste des fiches (fiches/<langue>/) : en-tête 7/5 (h1 et intro à gauche ; démarches, « Suis-je concerné ? » et appel
   dans une carte à droite), rangée d'ancres vers les thèmes, puis chaque thème sur deux colonnes de liens. Conteneurs
   neutres du gabarit (.fiches-tete, .fiches-appel, .fiches-theme-tete), ordre du HTML inchangé. La rangée d'ancres et
   les compteurs portent l'attribut hidden : ils n'apparaissent qu'ici, pour que le rendu mobile reste identique. */
main:not(#app):has(> .fiches-tete){max-width:var(--d-max); padding-left:var(--d-gut); padding-right:var(--d-gut)}
.fiches-tete{display:grid; grid-template-columns:minmax(0,7fr) minmax(0,5fr); column-gap:var(--d-gap); align-items:start;
  padding-bottom:32px; border-bottom:1px solid var(--line)}
.fiches-tete > h1, .fiches-tete > p{grid-column:1; max-width:var(--d-read)}
.fiches-tete > p{margin:0}
.fiches-appel{grid-column:2; grid-row:1 / span 2; margin-top:16px; padding:20px 24px 24px; background:var(--white);
  border:1.5px solid var(--line); border-radius:var(--radius)}
.fiches-appel p{margin:0 0 12px; font-size:16px}
.fiches-appel p.actions{margin:20px 0 0; display:block}
main:not(#app) .fiches-appel a.btn.sun{display:flex; width:100%; max-width:420px; min-height:56px; min-width:0}

/* Rangée d'ancres : texte exact du h2 suivi du compteur. */
.fiches-themes[hidden]{display:block}
.fiches-themes{margin:24px 0 8px}
.fiches-themes ul{list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:10px}
.fiches-themes a{display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:8px 16px; border:1.5px solid var(--line);
  border-radius:999px; background:var(--white); font-size:16px; font-weight:700; text-decoration:none}
.fiches-themes a span{font-weight:400; color:var(--ink-soft)}
.fiches-themes a:hover{border-color:var(--ink)}
:where(.fiche-page) h2[id^="theme-"]{scroll-margin-top:16px}

/* Titre de thème : h2 à 28 px, compteur aligné à droite sur la même ligne. */
.fiches-theme-tete{display:flex; align-items:baseline; justify-content:space-between; gap:24px; margin:48px 0 12px}
.fiches-theme-tete h2{margin:0; font-size:28px; line-height:1.2}
.fiches-compte[hidden]{display:inline}
.fiches-compte{flex:none; font-size:15px; color:var(--ink-soft)}

/* Liens d'un thème : deux colonnes, une ligne par lien avec filet, flèche discrète à droite, soulignés au survol et au
   focus seulement ; la flèche et le filet signalent le lien sans la couleur. */
.fiches-tete ~ section .fiches-list{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:40px}
.fiches-tete ~ section .fiches-list li{margin:0; border-top:1px solid var(--line)}
.fiches-tete ~ section .fiches-list a{display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:56px; height:100%;
  padding:10px 0; text-decoration:none; line-height:1.35}
.fiches-tete ~ section .fiches-list a::after{content:"→" / ""; flex:none; color:var(--ink-soft)}
.fiches-tete ~ section .fiches-list a:is(:hover, :focus-visible){text-decoration:underline; text-underline-offset:4px}
.fiches-tete ~ section .fiches-list a:is(:hover, :focus-visible)::after{color:var(--ink)}

/* Appel de fin de page : centré, 420 px au plus. */
.fiches-tete ~ p.actions:last-child{justify-content:center; margin-top:48px}
.fiches-tete ~ p.actions:last-child a.btn.sun{width:100%; min-height:56px}
