/* Compagnon de révision — interface (charte CalebasseCalvasse).
   Fond blanc, encre, rouge = action, bleu = structure, jaune = surlignage.
   Rayon 2 px, bordures 2 px d'encre, ombre dure 4 px = cliquable. Pas de mode sombre. */
:root {
  color-scheme: light;
  --blanc: #FFFFFF; --ink: #17150F; --rouge: #E2382A; --bleu: #2447D6; --jaune: #F7C325;
  --trait: #E9E5DC; --gris: #6E675B; --vert: #6E9232;
  --r: 2px; --ombre: 4px 4px 0 var(--ink);
  --haut-entete: 68px;
  --police: "General Sans", "Segoe UI", system-ui, sans-serif;
  --titres: Anton, Impact, "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--blanc); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--blanc); color: var(--ink);
  font-family: var(--police); font-size: 16px; line-height: 1.55;
  overflow-x: hidden; max-width: 100vw;
}
a { color: var(--bleu); font-weight: 500; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
[hidden] { display: none !important; }
svg.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--jaune); color: var(--ink); padding: 10px 14px; border: 2px solid var(--ink); }
.evitement:focus { top: 8px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; cursor: pointer; text-decoration: none;
  font-weight: 600; font-size: .95rem; line-height: 1.2;
  background: var(--blanc); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--ombre);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn-rouge { background: var(--rouge); color: #fff; }
.btn-bleu { background: var(--bleu); color: #fff; }
.btn[disabled] { border-style: dashed; border-color: var(--gris); box-shadow: none; color: var(--gris); cursor: not-allowed; transform: none; }
.btn-petit { min-height: 44px; padding: 6px 12px; font-size: .9rem; }
.btn-icone { width: 44px; height: 44px; min-height: 44px; padding: 0; }
.btn[aria-pressed="true"] { background: var(--jaune); }
.btn[aria-pressed="true"] svg.ico { fill: currentColor; }
.btn-lien { background: none; border: none; padding: 10px 4px; min-height: 44px; color: var(--bleu); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ---------- En-tête ---------- */
.entete-app {
  position: sticky; top: 0; z-index: 30; height: var(--haut-entete);
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: var(--blanc); border-bottom: 4px solid var(--ink);
}
.marque { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1; margin-right: auto; min-width: 0; }
.marque-sur { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bleu); }
.marque-titre { font-family: var(--titres); font-size: 1.55rem; text-transform: uppercase; letter-spacing: .02em; margin-top: 3px; white-space: nowrap; }
.onglets { display: flex; gap: 10px; }
.onglets a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 13px;
  border: 2px solid var(--ink); border-radius: var(--r); background: var(--blanc); color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: .95rem; box-shadow: var(--ombre);
  transition: transform .08s, box-shadow .08s;
}
.onglets a:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.onglets a[aria-current="page"] { background: var(--bleu); color: #fff; transform: translate(4px, 4px); box-shadow: none; }
.seul-mobile { display: none !important; }

/* ---------- Cadre : navigation latérale + contenu ---------- */
.cadre { display: grid; grid-template-columns: 310px minmax(0, 1fr); max-width: 1440px; margin: 0 auto; }
.nav-laterale {
  position: sticky; top: var(--haut-entete); height: calc(100vh - var(--haut-entete));
  overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 40px 20px;
  border-right: 2px solid var(--trait); background: var(--blanc);
}
main { min-width: 0; padding: 26px 36px 90px; outline: none; }
.voile { display: none; }

.nav-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.nav-tete span { font-family: var(--titres); text-transform: uppercase; font-size: 1.3rem; }
.nav-bloc + .nav-bloc { margin-top: 20px; }
.nav-sur { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bleu); }
.nav-cours { margin: 2px 0 8px; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.nav-sections { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--trait); }
.nav-sections a { display: block; padding: 6px 8px 6px 12px; margin-left: -2px; border-left: 3px solid transparent; color: var(--ink); text-decoration: none; font-weight: 400; font-size: .95rem; line-height: 1.35; min-height: 32px; }
.nav-sections li.n3 a { padding-left: 26px; font-size: .9rem; color: #3b372e; }
.nav-sections a:hover { color: var(--bleu); text-decoration: underline; }
.nav-sections a.actif { border-left-color: var(--bleu); color: var(--bleu); font-weight: 600; }
.nav-ps { display: flex; gap: 8px; margin-top: 12px; }
.nav-ps .btn { flex: 1; font-size: .85rem; padding: 6px 8px; }
.nav-matiere { border-bottom: 1px solid var(--trait); }
.nav-matiere > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 2px; font-weight: 600; font-size: .95rem;
}
.nav-matiere > summary::-webkit-details-marker { display: none; }
.nav-matiere > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); flex: none; margin-right: 4px; transition: transform .12s; }
.nav-matiere[open] > summary::before { transform: rotate(45deg); }
.nav-matiere .compte { margin-left: auto; font-size: .8rem; color: var(--gris); font-weight: 500; }
.nav-matiere ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 16px; }
.nav-matiere li a { display: block; padding: 7px 8px; color: var(--ink); text-decoration: none; font-weight: 400; font-size: .92rem; line-height: 1.3; border-radius: var(--r); }
.nav-matiere li a:hover { color: var(--bleu); text-decoration: underline; }
.nav-matiere li a[aria-current="page"] { background: var(--jaune); font-weight: 600; }
.nav-matiere li.nav-bloc { padding: 10px 8px 3px; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); }
.nav-matiere li.nav-bloc:first-child { padding-top: 2px; }
.h-bloc { font-size: .95rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); margin: 20px 0 10px; padding-bottom: 4px; border-bottom: 2px solid var(--trait); }

/* ---------- Titres et textes des vues ---------- */
.vue { max-width: 56rem; }
.vue-titre { font-family: var(--titres); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 8px; }
.chapeau { margin: 0 0 20px; max-width: 62ch; color: #3b372e; }
.muted { color: var(--gris); }
.carte { background: var(--blanc); border: 2px solid var(--ink); border-radius: var(--r); padding: 18px 20px; margin: 18px 0; }
.carte > h2:first-child { margin-top: 0; }
.h-section { font-family: var(--titres); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: 1.5rem; line-height: 1.1; margin: 34px 0 12px; display: flex; align-items: center; gap: 10px; }
.h-section::before { content: ""; width: .55em; height: .55em; background: var(--rouge); flex: none; }
.h-section.bleu::before { background: var(--bleu); }
.retour { display: flex; gap: 10px; align-items: baseline; border: 2px solid var(--ink); border-left: 8px solid var(--etat, var(--bleu)); border-radius: var(--r); padding: 10px 14px; margin: 0 0 18px; background: var(--blanc); }
.etat-vide { border: 2px dashed var(--gris); border-radius: var(--r); padding: 26px 18px; text-align: center; color: #3b372e; }
.chargement { color: var(--gris); padding: 30px 0; }
.pastille { display: inline-block; background: var(--jaune); color: var(--ink); font-size: .78rem; font-weight: 600; padding: 1px 7px; border-radius: var(--r); letter-spacing: .02em; }

/* ---------- Accueil des fiches ---------- */
.reprendre { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 2px solid var(--ink); border-left: 8px solid var(--rouge); padding: 14px 16px; margin: 0 0 22px; }
.reprendre-txt { flex: 1 1 220px; min-width: 0; }
.reprendre-txt strong { display: block; }
.sauts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.sauts button { min-height: 44px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--blanc); font-weight: 500; font-size: .9rem; cursor: pointer; }
.sauts button:hover { background: var(--jaune); }
.liste-fiches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.carte-fiche {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px;
  border: 2px solid var(--ink); border-radius: var(--r); background: var(--blanc); color: var(--ink);
  text-decoration: none; box-shadow: var(--ombre); transition: transform .08s, box-shadow .08s;
}
.carte-fiche:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.carte-fiche:active { transform: translate(4px, 4px); box-shadow: none; }
.carte-fiche .cours { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.carte-fiche .ens { font-size: .88rem; color: var(--gris); font-weight: 400; line-height: 1.35; }
.carte-fiche .pastille { align-self: flex-start; margin-top: 4px; }
.matiere-bloc { scroll-margin-top: calc(var(--haut-entete) + 10px); }

/* ---------- Lecture ---------- */
.lecture-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.lecture-barre .fil { font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); margin-right: auto; min-width: 0; }
.surlignage-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 2px solid var(--ink); border-left: 8px solid var(--jaune); padding: 6px 12px; margin: 0 0 16px; }
.surlignage-info span { flex: 1 1 200px; }
mark.surligne { background: var(--jaune); color: var(--ink); padding: 0 1px; }
mark.surligne.courant { outline: 2px solid var(--ink); }
.lecture .titre-marquable { display: flex; align-items: flex-start; gap: 10px; }
.lecture .titre-marquable > .titre-texte { flex: 1; min-width: 0; }
.marque-section {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -8px -4px -8px 0; border: 2px solid transparent; border-radius: var(--r);
  background: none; color: var(--gris); cursor: pointer;
}
.marque-section:hover { border-color: var(--ink); color: var(--ink); }
.marque-section[aria-pressed="true"] { color: var(--ink); background: var(--jaune); border-color: var(--ink); }
.marque-section[aria-pressed="true"] svg.ico { fill: currentColor; }
.marque-section svg.ico { width: 20px; height: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .flash { animation: flash 1.6s ease-out; }
  @keyframes flash { 0%, 30% { background: var(--jaune); } 100% { background: transparent; } }
}
.prec-suiv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 10px; max-width: 50rem; }
.prec-suiv a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--ombre); color: var(--ink); text-decoration: none; transition: transform .08s, box-shadow .08s; }
.prec-suiv a:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.prec-suiv a.suiv { grid-column: 2; text-align: right; }
.prec-suiv .sens { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); }
.prec-suiv .nom { font-weight: 600; line-height: 1.3; }

/* ---------- Recherche ---------- */
.champ-recherche { display: flex; flex-wrap: wrap; gap: 10px; }
.champ-recherche input, .champ-recherche select, .champ select {
  min-height: 48px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--blanc); font-size: 1rem;
}
.champ-recherche input { flex: 1 1 260px; min-width: 0; }
.champ-recherche select { flex: 0 1 260px; min-width: 0; max-width: 100%; }
.aide { font-size: .9rem; color: var(--gris); margin: 8px 0 16px; }
.etat-recherche { font-weight: 600; margin: 8px 0 12px; }
.resultats { list-style: none; margin: 0; padding: 0; }
.resultat { border: 2px solid var(--ink); border-radius: var(--r); padding: 12px 14px; margin: 0 0 14px; }
.resultat-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.resultat-tete a { font-weight: 600; font-size: 1.05rem; }
.resultat .mat { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); }
.resultat .nb { font-size: .85rem; color: var(--gris); margin-left: auto; }
.extraits { list-style: none; margin: 8px 0 0; padding: 0; }
.extraits li { border-top: 1px solid var(--trait); padding: 8px 0 2px; font-size: .95rem; }
.extraits a { color: var(--ink); text-decoration: none; font-weight: 400; display: block; }
.extraits a:hover .ext { text-decoration: underline; }
.extraits .sec { display: block; font-size: .82rem; font-weight: 600; color: var(--bleu); }
.extraits mark { background: var(--jaune); color: var(--ink); }

/* ---------- Marque-pages ---------- */
.marques { list-style: none; margin: 0; padding: 0; }
.marque-ligne { display: flex; align-items: center; gap: 10px; border: 2px solid var(--ink); border-radius: var(--r); padding: 8px 8px 8px 14px; margin: 0 0 12px; }
.marque-ligne .txt { flex: 1; min-width: 0; }
.marque-ligne a { font-weight: 600; display: block; line-height: 1.3; }
.marque-ligne .sous { font-size: .85rem; color: var(--gris); }
.marque-ligne .type { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bleu); }

/* ---------- Quiz ---------- */
.champ { margin: 0 0 16px; border: none; padding: 0; min-width: 0; }
.champ > label, .champ > legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.champ select { width: 100%; max-width: 460px; }
.choix-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-seg label { position: relative; }
.choix-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix-seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 2px solid var(--ink); border-radius: var(--r); cursor: pointer; font-weight: 500; background: var(--blanc); }
.choix-seg input:checked + span { background: var(--bleu); color: #fff; font-weight: 600; }
.choix-seg input:focus-visible + span { outline: 3px solid var(--jaune); outline-offset: 2px; }
.choix-seg input:disabled + span { border-style: dashed; color: var(--gris); cursor: not-allowed; }
.case { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; }
.case input { width: 22px; height: 22px; accent-color: var(--bleu); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; align-items: center; }
.qz-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.qz-tete .qz-num { font-family: var(--titres); text-transform: uppercase; font-size: 1.3rem; letter-spacing: .02em; }
.qz-tete .qz-ctx { font-size: .85rem; color: var(--gris); flex: 1 1 200px; }
.qz-barre { height: 10px; border: 2px solid var(--ink); border-radius: var(--r); margin-bottom: 16px; }
.qz-barre div { height: 100%; background: var(--bleu); }
.qz-type { margin: 0 0 6px; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); }
.qz-question { font-size: 1.2rem; line-height: 1.4; font-weight: 600; margin: 0 0 16px; }
.qz-choix { display: grid; gap: 10px; }
.qz-choix button {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%; min-height: 48px;
  padding: 10px 12px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--blanc);
  box-shadow: var(--ombre); cursor: pointer; font-size: 1rem; line-height: 1.4; transition: transform .08s, box-shadow .08s;
}
.qz-choix button:hover:not([disabled]) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.qz-choix button[disabled] { cursor: default; box-shadow: none; transform: translate(4px, 4px); }
.qz-choix .lettre { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--ink); font-weight: 600; font-size: .9rem; }
.qz-choix button.juste { border-left: 10px solid var(--vert); }
.qz-choix button.juste .lettre { background: var(--vert); color: #fff; border-color: var(--vert); }
.qz-choix button.faux { border-left: 10px solid var(--rouge); }
.qz-choix button.faux .lettre { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.qz-retour { margin-top: 16px; border: 2px solid var(--ink); border-left: 8px solid var(--etat, var(--bleu)); padding: 10px 14px; }
.qz-retour p { margin: 4px 0; }
.qz-reponse { margin-top: 14px; border: 2px solid var(--ink); border-left: 8px solid var(--bleu); padding: 10px 14px; }
.qz-bilan-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.qz-bilan-chiffres div { border: 2px solid var(--ink); border-top: 8px solid var(--c, var(--bleu)); padding: 10px; text-align: center; }
.qz-bilan-chiffres strong { display: block; font-family: var(--titres); font-size: 2rem; font-weight: 400; line-height: 1.1; }
.qz-liste { padding-left: 20px; }
.qz-liste li { margin: 6px 0; }
.suivi { width: 100%; border-collapse: collapse; font-size: .95rem; }
.suivi th, .suivi td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.suivi th { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); border-bottom: 2px solid var(--ink); }
.suivi td.num { white-space: nowrap; }
.jauge { display: inline-block; width: 70px; height: 10px; border: 2px solid var(--ink); vertical-align: middle; margin-right: 6px; }
.jauge i { display: block; height: 100%; background: var(--vert); }
.tableau-defile { overflow-x: auto; }

/* ---------- Pied, bouton haut, modales ---------- */
.pied-app { margin-top: 60px; padding-top: 12px; border-top: 2px solid var(--trait); font-size: .88rem; color: var(--gris); max-width: 56rem; }
.pied-app .btn-lien { padding: 0; min-height: 0; font-size: .88rem; }
.btn-haut { position: fixed; right: 20px; bottom: 20px; z-index: 25; }
dialog { border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink); padding: 0; max-width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--ink); background: var(--blanc); }
dialog::backdrop { background: rgba(23, 21, 15, .45); }
.modale-tete { display: flex; align-items: center; gap: 12px; padding: 12px 12px 10px 20px; border-bottom: 4px solid var(--ink); position: sticky; top: 0; background: var(--blanc); }
.modale-tete h2 { flex: 1; margin: 0; font-family: var(--titres); font-weight: 400; text-transform: uppercase; font-size: 1.5rem; letter-spacing: .02em; }
.modale-corps { padding: 12px 20px 20px; }
.modale-corps h3 { font-size: 1rem; margin: 16px 0 4px; }
.modale-corps p, .modale-corps li { margin: 4px 0; }
.modale-corps ul { padding-left: 20px; }
.modale-corps kbd { border: 2px solid var(--ink); border-radius: var(--r); padding: 0 5px; font-family: var(--police); font-size: .85rem; }
#loupe { max-width: calc(100vw - 24px); }
#loupe img { display: block; max-width: calc(100vw - 60px); max-height: calc(100vh - 170px); margin: 0 auto; background: #fff; }
#loupe .loupe-corps { padding: 12px; }
#loupe p { margin: 8px 4px 0; font-size: .9rem; color: var(--gris); font-style: italic; }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 1100px) {
  .onglets a { padding: 6px 10px; }
  .cadre { grid-template-columns: 270px minmax(0, 1fr); }
  main { padding: 22px 24px 90px; }
}
@media (max-width: 900px) {
  :root { --haut-entete: 60px; }
  .seul-mobile { display: inline-flex !important; }
  .nav-tete.seul-mobile { display: flex !important; }
  .entete-app { gap: 10px; padding: 0 12px; }
  .marque-titre { font-size: 1.3rem; }
  .marque-sur { font-size: .72rem; }
  /* onglets : barre fixe en bas d'écran */
  .onglets {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 0;
    display: grid; grid-template-columns: .95fr 1.15fr 1.35fr .8fr; /* libellés de longueurs inégales */
    background: var(--blanc); border-top: 3px solid var(--ink);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .onglets a {
    flex-direction: column; gap: 2px; min-height: 60px; padding: 6px 2px; border: none; border-radius: 0;
    box-shadow: none; font-size: 14px; font-weight: 500; transform: none !important; min-width: 0;
  }
  .onglets a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .onglets a:hover { box-shadow: none; }
  .onglets a[aria-current="page"] { box-shadow: none; }
  .cadre { display: block; }
  .nav-laterale {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; height: auto;
    width: min(88vw, 380px); padding: 12px 16px 40px; border-right: 3px solid var(--ink);
    transform: translateX(-105%); visibility: hidden; transition: transform .2s, visibility .2s;
  }
  .nav-laterale.ouverte { transform: none; visibility: visible; }
  .voile.ouvert { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(23, 21, 15, .45); }
  main { padding: 18px 16px 110px; }
  .btn-haut { right: 14px; bottom: 76px; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .marque-sur { display: none; }
  .vue-titre { font-size: 1.9rem; }
  .h-section { font-size: 1.3rem; margin-top: 28px; }
  .liste-fiches { grid-template-columns: 1fr; gap: 12px; }
  .carte { padding: 14px; }
  .prec-suiv { grid-template-columns: 1fr; }
  .prec-suiv a.suiv { grid-column: 1; }
  .qz-question { font-size: 1.08rem; }
  .qz-bilan-chiffres strong { font-size: 1.6rem; }
  .suivi { font-size: .88rem; }
  .jauge { width: 44px; }
  .modale-corps { padding: 10px 16px 18px; }
  dialog { max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .entete-app, .nav-laterale, .onglets, .lecture-barre, .prec-suiv, .btn-haut, .pied-app, .marque-section, .surlignage-info { display: none !important; }
  .cadre { display: block; }
  main { padding: 0; }
}
