/* Livre d'images en bandes : chaque chapitre est une bande pleine largeur, avec un jouet interactif au centre */
:root {
  --bg: #FFF4D2;          /* papier beurre */
  --bg-alt: #FFE9A8;      /* bande alternée */
  --ink: #1F2347;         /* encre bleu nuit */
  --ink-soft: #4D5280;
  --card: #FFFFFF;
  --sat: #F7931A;         /* orange bitcoin = les billes */
  --sat-deep: #C8690A;
  --bolt: #FFD23F;        /* jaune éclair */
  --mint: #2EC4A0;
  --coral: #FF6B6B;
  --sky: #5BA8FF;
  --line: #1F2347;
  --shadow: 4px 4px 0 var(--line);
  --f-display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --f-body: "Lexend", "Segoe UI", system-ui, sans-serif;
  --f-hand: "Patrick Hand", "Comic Sans MS", "Chalkboard SE", cursive;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14172E; --bg-alt: #1C2042; --ink: #FFF4D2; --ink-soft: #C2C5E8; --card: #262B55;
    --sat: #FFA43A; --sat-deep: #E07E14; --bolt: #FFD23F; --mint: #3FE0B8; --coral: #FF8080; --sky: #7DBBFF;
    --line: #0A0C1C; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14172E; --bg-alt: #1C2042; --ink: #FFF4D2; --ink-soft: #C2C5E8; --card: #262B55;
  --sat: #FFA43A; --sat-deep: #E07E14; --bolt: #FFD23F; --mint: #3FE0B8; --coral: #FF8080; --sky: #7DBBFF;
  --line: #0A0C1C; color-scheme: dark;
}

* { box-sizing: border-box; }
:root { color-scheme: light; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 1.05rem; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.05; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(2rem, 6vw, 3.2rem); }
h3 { font-size: 1.4rem; }
p { margin: 0; max-width: 62ch; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px dashed var(--sky); outline-offset: 3px; }

.band { padding-block: clamp(48px, 8vw, 88px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band.alt { background: var(--bg-alt); }
.wrap { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.chap { font-family: var(--f-hand); font-size: 1.5rem; color: var(--sat-deep); }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.note { font-family: var(--f-hand); font-size: 1.35rem; line-height: 1.2; color: var(--ink-soft); }

.btn {
  border: 3px solid var(--line); background: var(--bolt); color: #1F2347; border-radius: 14px;
  padding: 10px 18px; font-weight: 700; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.btn.orange { background: var(--sat); }
.btn.mint { background: var(--mint); }
.btn.ghost { background: var(--card); color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.panel { background: var(--card); border: 3px solid var(--line); border-radius: 22px; box-shadow: 6px 6px 0 var(--line); padding: clamp(16px, 4vw, 28px); display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 80px); }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 32px; }
.hero h1 { font-size: clamp(3rem, 11vw, 6.4rem); color: var(--ink); }
.hero h1 .z { color: var(--sat); display: inline-block; transform: rotate(-3deg); }
.hero-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.bolt-svg { width: 100%; max-width: 340px; justify-self: center; filter: drop-shadow(6px 6px 0 var(--line)); }
.bolt-svg .flash { animation: flash 2.6s infinite; transform-origin: center; }
@keyframes flash { 0%, 86%, 100% { opacity: 1; } 89% { opacity: .2; } 92% { opacity: 1; } 95% { opacity: .4; } }
.bolt-svg .spark { animation: twinkle 1.8s infinite ease-in-out; }
.bolt-svg .spark:nth-of-type(2) { animation-delay: .6s; }
.bolt-svg .spark:nth-of-type(3) { animation-delay: 1.2s; }
@keyframes twinkle { 50% { transform: scale(.4); opacity: .3; } }
.bolt-svg .spark { transform-box: fill-box; transform-origin: center; }

.cast { display: flex; flex-wrap: wrap; gap: 14px; }
.who { display: flex; align-items: center; gap: 8px; background: var(--card); border: 3px solid var(--line); border-radius: 999px; padding: 4px 14px 4px 4px; font-weight: 700; }
.who svg { width: 40px; height: 40px; }

/* ---------- Grand cahier ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.two > * { min-width: 0; }
.book { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.page { aspect-ratio: 3/4; background: var(--card); border: 3px solid var(--line); border-radius: 6px 12px 12px 6px; position: relative; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.page i { display: block; height: 3px; background: var(--ink-soft); opacity: .35; border-radius: 2px; }
.page b { position: absolute; bottom: 4px; right: 6px; font-family: var(--f-hand); font-size: .95rem; color: var(--sat-deep); }
.page.new { animation: pop .5s; background: var(--bolt); }
@keyframes pop { from { transform: scale(.3) rotate(-10deg); } }

/* ---------- Canal ---------- */
.channel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; text-align: center; }
.person svg { width: clamp(56px, 12vw, 84px); height: auto; }
.person .count { font-family: var(--f-display); font-size: 1.8rem; color: var(--sat-deep); line-height: 1; }
.tube { position: relative; height: 56px; border: 3px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--sky) 18%, var(--card)); overflow: hidden; min-width: 0; }
.bead { position: absolute; top: 50%; width: 8.4%; aspect-ratio: 1; max-width: 40px; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE2B5 0 18%, var(--sat) 22% 70%, var(--sat-deep) 100%); border: 2px solid var(--line);
  transition: left .45s cubic-bezier(.5, 1.6, .5, 1); display: grid; place-items: center; font-family: var(--f-display); font-size: clamp(.6rem, 1.6vw, .9rem); color: #1F2347; }
.lock-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { background: var(--bg-alt); border: 2px solid var(--line); border-radius: 12px; padding: 6px 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat strong { font-family: var(--f-display); font-weight: 400; color: var(--sat-deep); font-size: 1.2rem; }
.bubble { font-family: var(--f-hand); font-size: 1.35rem; line-height: 1.25; background: var(--bolt); color: #1F2347; border: 3px solid var(--line); border-radius: 18px; padding: 10px 16px; position: relative; min-height: 3.2em; }
.bubble.warn { background: var(--coral); }
.bubble.ok { background: var(--mint); }

/* ---------- Course ---------- */
.lane { display: grid; grid-template-columns: 9rem 1fr; gap: 12px; align-items: center; }
.lane-label { font-weight: 700; line-height: 1.2; }
.lane-label small { display: block; font-weight: 400; color: var(--ink-soft); }
.track { position: relative; height: 54px; border: 3px solid var(--line); border-radius: 14px; background: repeating-linear-gradient(90deg, transparent 0 28px, color-mix(in srgb, var(--ink) 8%, transparent) 28px 30px), var(--card); min-width: 0; }
.runner { position: absolute; top: 50%; left: 0; width: 46px; height: 46px; transform: translateY(-50%); }
.track::after { content: "🏁"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; }

/* ---------- Réseau ---------- */
.net-wrap { overflow-x: auto; }
.net { width: 100%; min-width: 520px; height: auto; display: block; }
.net .edge { stroke: var(--ink-soft); stroke-width: 6; stroke-linecap: round; opacity: .35; transition: stroke .3s, opacity .3s; }
.net .edge.on { stroke: var(--sat); opacity: 1; }
.net .edge.back { stroke: var(--mint); opacity: 1; }
.net .label { font-family: var(--f-body); font-weight: 700; font-size: 18px; fill: var(--ink); }
.net .tag { font-family: var(--f-hand); font-size: 20px; fill: var(--sat-deep); }
.net .lockicon { transition: opacity .3s; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.dot.on { background: var(--sat); }

/* ---------- Quiz ---------- */
.quiz { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.q { gap: 12px; }
.q h3 { font-family: var(--f-body); font-weight: 700; font-size: 1.1rem; line-height: 1.35; }
.q .opts { display: flex; flex-direction: column; gap: 8px; }
.q .opt { text-align: left; border: 2px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 12px; padding: 8px 12px; }
.q .opt.right { background: var(--mint); color: #1F2347; }
.q .opt.wrong { background: var(--coral); color: #1F2347; }
.q .fb { font-family: var(--f-hand); font-size: 1.25rem; line-height: 1.2; min-height: 1.3em; }
.score { font-family: var(--f-display); font-size: 1.6rem; }

/* ---------- Mots ---------- */
.words { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.word { border: 3px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.word dt { font-family: var(--f-display); font-size: 1.3rem; color: var(--sat-deep); }
.word dd { margin: 0; }

footer { text-align: center; padding-block: 40px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
footer p { margin: 0 auto; }

@media (max-width: 760px) {
  .hero .wrap, .two, .quiz { grid-template-columns: 1fr; }
  .bolt-svg { max-width: 200px; grid-row: 1; }
  .lane { grid-template-columns: 1fr; gap: 6px; }
  .book { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Composants communs aux cours ---------- */
a { color: inherit; }
.crumbs { font-weight: 600; font-size: .95rem; }
.crumbs a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.badge-age { align-self: flex-start; font-weight: 700; font-size: .85rem; padding: 3px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 3px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 0; width: 100%;
}
.field input:focus-visible, .field textarea:focus-visible { outline: 3px dashed var(--sky); outline-offset: 2px; }
.hash { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9rem; word-break: break-all; background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; line-height: 1.45; }
.hash .z { color: var(--mint); font-weight: 700; }
.hash.bad { background: color-mix(in srgb, var(--coral) 35%, var(--bg)); }
.hash.good { background: color-mix(in srgb, var(--mint) 30%, var(--bg)); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cols3 > * { min-width: 0; }
.tbl-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { border-bottom: 2px solid color-mix(in srgb, var(--ink) 15%, transparent); padding: 6px 10px; text-align: left; }
.tbl th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
input[type="range"] { width: 100%; accent-color: var(--sat); }
.chip { display: inline-block; padding: 2px 10px; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .85rem; background: var(--card); }
.chip.ok { background: var(--mint); color: #1F2347; }
.chip.ko { background: var(--coral); color: #1F2347; }
.key-note { border-left: 6px solid var(--sat); padding: 4px 0 4px 14px; font-weight: 600; max-width: 62ch; }
@media (max-width: 760px) { .cols3 { grid-template-columns: 1fr; } }

/* ---------- Parcours 12-14 ans : cahier quadrillé bleu, moins de manuscrit ---------- */
body.ado {
  --bg: #EEF3FF; --bg-alt: #DCE6FF; --ink: #16193A; --ink-soft: #454B7A; --card: #FFFFFF; --sky: #3D7BFF;
  background-image: linear-gradient(color-mix(in srgb, var(--sky) 9%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--sky) 9%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.ado { --bg: #0F1430; --bg-alt: #161D42; --ink: #EEF3FF; --ink-soft: #B9C2EC; --card: #1E2652; --sky: #7DA6FF; }
}
:root[data-theme="dark"] body.ado { --bg: #0F1430; --bg-alt: #161D42; --ink: #EEF3FF; --ink-soft: #B9C2EC; --card: #1E2652; --sky: #7DA6FF; }
body.ado .band.alt { background-color: color-mix(in srgb, var(--bg-alt) 85%, transparent); }
body.ado .chap { font-family: var(--f-body); font-weight: 700; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); }

/* ---------- Films : scènes SVG animées dans un faux lecteur vidéo ---------- */
.vid { display: flex; flex-direction: column; gap: 10px; }
.vid-stage { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border: 4px solid var(--line); border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 30%, var(--card)) 0 72%, color-mix(in srgb, var(--mint) 35%, var(--card)) 72% 100%);
  box-shadow: 6px 6px 0 var(--line); }
body.ado .vid-stage { background: #0E1330; }
.vid-stage .scene { display: none; position: absolute; inset: 0; }
.vid-stage .scene.on { display: block; }
.vid-stage .scene > svg { width: 100%; height: 100%; display: block; }
.vid.paused .scene * { animation-play-state: paused !important; }
.vid-badge { position: absolute; top: 10px; left: 12px; z-index: 2; font: 700 .75rem var(--f-body); letter-spacing: .1em; text-transform: uppercase; background: var(--coral); color: #1F2347; border: 2px solid var(--line); border-radius: 8px; padding: 2px 8px; }
.vid-big, .vid-end { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; align-content: center; gap: 14px; background: color-mix(in srgb, var(--line) 45%, transparent); border: 0; color: #fff; cursor: pointer; font: inherit; }
.vid.poster .vid-big { display: grid; }
.vid.ended .vid-end { display: grid; cursor: default; }
.vid-big .disc { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--bolt); border: 4px solid var(--line); box-shadow: 4px 4px 0 var(--line); animation: vid-pulse 1.6s ease-in-out infinite; }
.vid-big .disc svg { width: 34px; height: 34px; margin-left: 6px; }
.vid-big .t, .vid-end .t { font-family: var(--f-display); font-size: clamp(1.1rem, 3.5vw, 1.8rem); text-shadow: 2px 2px 0 var(--line); text-align: center; padding-inline: 16px; }
.vid-end .row { justify-content: center; }
@keyframes vid-pulse { 50% { transform: scale(1.08); } }
.vid-bar { display: flex; align-items: center; gap: 10px; }
.vid-play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--line); background: var(--bolt); color: #1F2347; display: grid; place-items: center; box-shadow: 3px 3px 0 var(--line); }
.vid-play svg { width: 18px; height: 18px; }
.vid-play:focus-visible, .vid-seg:focus-visible { outline: 3px dashed var(--sky); outline-offset: 3px; }
.vid-segs { flex: 1; display: flex; gap: 4px; min-width: 0; }
.vid-seg { flex: 1; height: 12px; padding: 0; border: 2px solid var(--line); border-radius: 999px; background: var(--card); overflow: hidden; cursor: pointer; }
.vid-seg i { display: block; height: 100%; width: 0; background: var(--sat); }
.vid-time { flex: none; font-size: .85rem; color: var(--ink-soft); }
.vid-cap { margin: 0; min-height: 2.6em; font-family: var(--f-hand); font-size: 1.35rem; line-height: 1.25; text-align: center; max-width: none; }
body.ado .vid-cap { font-family: var(--f-body); font-size: 1.05rem; font-weight: 600; }
@media (max-width: 520px) { .vid-time { display: none; } .vid-cap { font-size: 1.15rem; } }

/* Briques d'animation des scènes. La position écrite dans le SVG est la position finale :
   sans animation (mouvement réduit), la scène reste lisible. Ne pas les mettre sur un élément
   qui a déjà un attribut transform : envelopper dans un <g>. */
.scene .mv   { animation: v-in var(--t, 1s) var(--d, 0s) cubic-bezier(.3, 1.25, .5, 1) both; }
.scene .lin  { animation-timing-function: linear; }
.scene .pop  { transform-box: fill-box; transform-origin: center; animation: v-pop .6s var(--d, 0s) both; }
.scene .fade { animation: v-fade var(--t, .6s) var(--d, 0s) both; }
.scene .out  { animation: v-out var(--t, .5s) var(--d, 0s) both; }
.scene .draw { stroke-dasharray: 1; animation: v-draw var(--t, 1.5s) var(--d, 0s) ease-in-out both; }
.scene .bob  { animation: v-bob 1.6s var(--d, 0s) ease-in-out infinite; }
.scene .spin { transform-box: fill-box; transform-origin: center; animation: v-spin var(--t, 1s) linear infinite; }
.scene .shake { animation: v-shake .4s var(--d, 0s) 4 both; }
.scene .blink { animation: v-blink 1s steps(2) infinite; }
.scene .loop { animation: v-loop var(--t, 1.2s) var(--d, 0s) linear infinite; }
.scene .glow { animation: v-glow 1.2s var(--d, 0s) ease-in-out infinite; }
@keyframes v-in    { from { transform: translate(var(--x, 0px), var(--y, 0px)); } }
@keyframes v-pop   { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } }
@keyframes v-fade  { from { opacity: 0; } }
@keyframes v-out   { to { opacity: 0; } }
@keyframes v-draw  { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes v-bob   { 50% { transform: translateY(-8px); } }
@keyframes v-spin  { to { transform: rotate(360deg); } }
@keyframes v-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes v-blink { 50% { opacity: 0; } }
@keyframes v-loop  { from { transform: translate(var(--x, 0px), var(--y, 0px)); } to { transform: translate(var(--x2, 0px), var(--y2, 0px)); } }
@keyframes v-glow  { 50% { opacity: .35; } }
.scene text { font-family: var(--f-body); }
.scene .ttl { font-family: var(--f-display); }
.scene .mono, .scene .mono text { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- Mode pas à pas / page entière ---------- */
.mode-switch {
  display: flex; border: 3px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: 3px 3px 0 var(--line); overflow: hidden; }
.mode-switch button { border: 0; background: transparent; color: var(--ink); font: 700 .85rem var(--f-body); padding: 6px 12px; }
.mode-switch button[aria-pressed="true"] { background: var(--bolt); color: #1F2347; }
.mode-switch button:focus-visible { outline: 3px dashed var(--sky); outline-offset: -4px; }
.wiz-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 3px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.wiz-inner { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.wiz-mid { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wiz-track { position: relative; height: 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--bg); }
.wiz-fill { height: 100%; width: 0; background: var(--sat); border-radius: 999px; transition: width .4s; }
.wiz-runner { position: absolute; top: 50%; left: 0; width: 30px; height: 30px; transform: translate(-50%, -55%); transition: left .4s cubic-bezier(.4, 1.6, .5, 1); }
.wiz-runner svg { width: 100%; height: 100%; animation: v-bob 1.4s ease-in-out infinite; }
.wiz-runner.done svg { animation: v-spin 1s linear infinite; }
.wiz-count { font-size: .85rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-next { animation: wiz-nudge 2.4s ease-in-out infinite; }
.wiz-next:hover, .wiz-next:focus-visible { animation: none; }
@keyframes wiz-nudge { 0%, 80%, 100% { transform: none; } 88% { transform: translateX(5px); } 94% { transform: translateX(-2px); } }
.wiz-prev, .wiz-next { white-space: nowrap; }
body.wizard { padding-bottom: 96px; }
body.wizard .step-in { animation: step-in .45s cubic-bezier(.3, 1.2, .5, 1); }
body.wizard .step-back { animation: step-back .45s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes step-in { from { opacity: 0; transform: translateX(40px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-40px); } }
@media (max-width: 640px) {
  .wiz-inner { grid-template-columns: auto 1fr auto; gap: 8px; }
  .wiz-lbl { display: none; }
  .wiz-prev, .wiz-next { padding: 8px 12px; }
}
/* Sans animation, la scène montre son état final : ce qui doit disparaître est caché d'office */
@media (prefers-reduced-motion: reduce) { .scene .out { opacity: 0; } }

/* ---------- Consignes « À toi de jouer » ---------- */
.howto { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg); border: 3px dashed var(--sat); border-radius: 16px; }
.howto ol { list-style: none; margin: 0; padding: 0; counter-reset: h; display: flex; flex-direction: column; gap: 8px; }
.howto-title { font-family: var(--f-display); font-size: 1.25rem; color: var(--sat-deep); }
.howto li { counter-increment: h; display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; transition: opacity .3s; }
.howto li::before { content: counter(h); flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--bolt); color: #1F2347; border: 2px solid var(--line); font-weight: 700; font-size: .9rem; }
.howto li.done { opacity: .6; }
.howto li.done::before { content: "✓"; background: var(--mint); }
.howto li.now { font-weight: 600; }
.hint { animation: hint-ring 1.4s ease-in-out infinite; }
@keyframes hint-ring { 0%, 100% { box-shadow: var(--shadow), 0 0 0 0 color-mix(in srgb, var(--sat) 70%, transparent); }
  50% { box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--sat) 0%, transparent); } }
/* le titre reçoit le focus à chaque étape (lecteurs d'écran) : pas de cadre visible */
[tabindex="-1"]:focus { outline: none; }
