:root {
  --fond: #030603; --panneau: #07110a; --texte: #BFF5CD; --vert: #39FF6A; --vert2: #1FBF52; --vert3: #174D27;
  --rose: #FF4FA3; --bleu: #3FA9FF; --jaune: #FFE94F;
  --police: "Cascadia Mono", Consolas, "SF Mono", ui-monospace, Menlo, "Lucida Console", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-size: 16px; line-height: 1.5;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--bleu); }
[hidden] { display: none !important; }
.haut { position: sticky; top: 0; z-index: 5; background: var(--fond); border-bottom: 1px solid var(--vert3); padding: 10px 14px 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.marque { color: var(--vert); font-weight: 700; text-decoration: none; font-size: 18px; }
.curseur { color: var(--rose); animation: clignote 1.1s steps(2) infinite; }
@keyframes clignote { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .curseur { animation: none; } }
.chrono { margin-left: auto; color: var(--jaune); font-size: 20px; font-variant-numeric: tabular-nums; }
#fil { flex: 1 0 100%; min-height: 20px; font-size: 13px; color: var(--vert2); overflow-x: auto; white-space: nowrap; }
#fil a { color: var(--vert2); text-decoration: none; }
#fil a:hover, #fil a:focus-visible { text-decoration: underline; }
main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 14px 14px 40px; outline: none; }
/* While the page is still "Chargement…", keep the footer below the fold so it does not jump when the content arrives (layout shift, LE-199). */
main:has(> .charge) { min-height: 100vh; }
.bas { text-align: center; font-size: 12px; color: var(--vert2); padding: 10px; border-top: 1px solid var(--vert3); }
h1 { color: var(--vert); font-size: 22px; line-height: 1.25; margin: 6px 0 4px; }
h1::before { content: "C:\\BSP\\OREILLE> "; color: var(--vert2); font-weight: 400; font-size: 13px; display: block; }
h2 { color: var(--vert); font-size: 18px; margin: 22px 0 8px; }
h3 { color: var(--bleu); font-size: 15px; margin: 16px 0 6px; }
p { margin: 8px 0; }
strong { color: var(--vert); }
.dim { color: var(--vert2); font-size: 14px; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }

button, .bouton {
  font-family: var(--police); font-size: 16px; min-height: 48px; padding: 8px 16px; border-radius: 8px; cursor: pointer;
  border: 2px solid var(--vert); background: transparent; color: var(--vert); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center;
  touch-action: manipulation;
}
button:hover, .bouton:hover { background: #0b2412; }
button.plein, .bouton.plein { background: var(--vert); color: var(--fond); font-weight: 700; }
button.plein:hover { background: #5dff86; }
button[disabled] { opacity: .45; cursor: not-allowed; }
button.discret { border-color: var(--vert3); color: var(--vert2); min-height: 40px; font-size: 14px; }
button.grand { min-height: 64px; font-size: 20px; width: 100%; }

.carte { display: block; background: var(--panneau); border: 1px solid var(--vert3); border-left: 4px solid var(--vert2); border-radius: 8px; padding: 12px 14px; margin: 10px 0; color: inherit; text-decoration: none; }
a.carte:hover, a.carte:focus-visible { border-color: var(--vert); background: #0a1a0e; }
.carte.futur { border-left-color: var(--vert3); opacity: .72; }
.carte.rose { border-left-color: var(--rose); }
.carte .titre { color: var(--vert); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.carte .sous { font-size: 14px; margin-top: 2px; }
.pastille { font-size: 12px; border: 1px solid var(--vert3); border-radius: 999px; padding: 0 8px; color: var(--vert2); white-space: nowrap; }
.pastille.ok { border-color: var(--vert); color: var(--vert); }
.barre { height: 8px; background: var(--vert3); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.barre > i { display: block; height: 100%; background: var(--vert); width: 0; }
.grille-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 10px 0; }
.stat { background: var(--panneau); border: 1px solid var(--vert3); border-radius: 8px; padding: 8px 10px; }
.stat b { display: block; font-size: 26px; color: var(--vert); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--vert2); }

/* la question */
.question .entete { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; font-size: 13px; color: var(--vert2); }
.lecteur { position: sticky; top: 74px; z-index: 4; background: var(--fond); padding: 8px 0 10px; border-bottom: 1px solid var(--vert3); }
.versions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.versions button { min-height: 60px; flex-direction: column; font-size: 15px; line-height: 1.2; }
.versions button small { font-size: 11px; color: inherit; opacity: .8; }
.versions button[aria-pressed="true"] { background: var(--vert); color: var(--fond); font-weight: 700; }
.versions button.ref { border-color: var(--bleu); color: var(--bleu); }
.versions button.ref[aria-pressed="true"] { background: var(--bleu); color: var(--fond); }
.versions button.moi { border-color: var(--rose); color: var(--rose); }
.versions button.moi[aria-pressed="true"] { background: var(--rose); color: var(--fond); }
.transport { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.ruban { flex: 1 1 140px; height: 10px; background: var(--vert3); border-radius: 5px; overflow: hidden; }
.ruban > i { display: block; height: 100%; width: 0; background: var(--rose); }
.choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.choix.serree { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.choix.double { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.choix button { min-height: 52px; }
.choix button[aria-pressed="true"] { background: var(--jaune); color: var(--fond); border-color: var(--jaune); font-weight: 700; }
.choix button.juste { background: var(--vert); color: var(--fond); border-color: var(--vert); }
.choix button.faux { background: var(--rose); color: var(--fond); border-color: var(--rose); }
.curseur-ligne { margin: 14px 0; }
.curseur-ligne label { display: flex; justify-content: space-between; gap: 8px; color: var(--vert); font-weight: 700; }
.curseur-ligne output { color: var(--jaune); font-variant-numeric: tabular-nums; }
.curseur-ligne.donne output { color: var(--vert2); }
input[type=range] { width: 100%; height: 44px; accent-color: var(--rose); background: transparent; }
input[type=range]:disabled { opacity: .4; }
.verdict { margin: 12px 0; padding: 12px 14px; border-radius: 8px; border: 2px solid var(--vert); background: #0a1a0e; }
.verdict.rate { border-color: var(--rose); background: #1a0a12; }
.verdict h2 { margin: 0 0 4px; }
.verdict.rate h2 { color: var(--rose); }
.aide { border: 1px dashed var(--vert3); border-radius: 8px; padding: 8px 12px; margin: 10px 0; font-size: 14px; }
.aide summary { cursor: pointer; color: var(--vert2); min-height: 32px; display: flex; align-items: center; }
.charge, .fab { color: var(--vert2); text-align: center; padding: 30px 0; }
.liste-niveaux { list-style: none; padding: 0; margin: 8px 0; }
.liste-niveaux li { display: flex; gap: 8px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--vert3); padding: 6px 0; font-size: 14px; }
.liste-niveaux li.courant { color: var(--vert); font-weight: 700; }
.bilan table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bilan th, .bilan td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--vert3); }
.bilan th { color: var(--vert2); font-weight: 400; }
.erreur { color: var(--rose); border: 1px solid var(--rose); border-radius: 8px; padding: 10px; margin: 10px 0; }
@media (max-width: 520px) { .lecteur { top: 92px; } }
/* Version web (27/11/2026) : lien de retour au site et lien d'évitement */
.retour-site { font-size: 13px; color: var(--vert2); text-decoration: none; }
.retour-site:hover, .retour-site:focus-visible { text-decoration: underline; }
.saut { position: absolute; left: -999px; top: 0; background: var(--fond); color: var(--vert); padding: 8px 12px; z-index: 10; }
.saut:focus { left: 0; }
/* Suivi (29/11/2026, LE-180) : échauffement du jour et courbes « où j'en suis » */
.rappel { border-left: 4px solid var(--rose); background: var(--panneau); padding: 8px 12px; margin: 8px 0; font-size: 14px; border-radius: 0 8px 8px 0; }
.famille .titre h2 { margin: 0; font-size: 17px; }
.courbe { display: block; width: 100%; height: auto; max-height: 120px; margin: 6px 0 2px; }
