/* À vos tables ! — interface tactile d'abord, grosses cibles, couleurs vives mais lisibles. */
@font-face { font-family: 'Lexend'; font-weight: 100 900; font-display: swap; src: url('/vendor/lexend-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lexend'; font-weight: 100 900; font-display: swap; src: url('/vendor/lexend-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'OpenDyslexic'; font-weight: 400; font-display: swap; src: url('/vendor/opendyslexic-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'OpenDyslexic'; font-weight: 700; font-display: swap; src: url('/vendor/opendyslexic-latin-700-normal.woff2') format('woff2'); }

:root {
  --scale: 1;
  --bg: #fff8ec;
  --card: #ffffff;
  --ink: #243b53;
  --muted: #5d7089;
  --line: #e6dccb;
  --brand: #ff6b4a;
  --brand-dark: #d94a2b;
  --teal: #1f9d8f;
  --teal-dark: #167a6f;
  --sun: #ffc93c;
  --good: #1f9d55;
  --good-bg: #dff5e6;
  --bad: #d64545;
  --bad-bg: #fde4e4;
  --skip: #c77700;
  --skip-bg: #fff0d6;
  --shadow: 0 3px 0 rgba(36, 59, 83, 0.12), 0 8px 20px rgba(36, 59, 83, 0.08);
  --radius: 20px;
  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --track: normal;
  --lh: 1.45;
}
:root[data-font='dys'] { --font: 'OpenDyslexic', 'Lexend', system-ui, sans-serif; }
:root[data-spacing='large'] { --track: 0.06em; --lh: 1.9; }
:root[data-contrast='high'] {
  --bg: #ffffff; --ink: #000; --muted: #222; --line: #000; --brand: #c2410c; --brand-dark: #7c2d12; --teal: #0b5d55; --teal-dark: #063e39;
  --good: #0a6b30; --good-bg: #c9f2d6; --bad: #a80000; --bad-bg: #ffd5d5; --skip: #7a4300; --skip-bg: #ffe3b0;
}

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--scale)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font);
  line-height: var(--lh); letter-spacing: var(--track); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
:root[data-contrast='high'] .panel, :root[data-contrast='high'] .mode, :root[data-contrast='high'] .tile, :root[data-contrast='high'] .answer { border: 2px solid #000; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 0.6rem; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid #3a86ff; outline-offset: 2px; }
.muted { color: var(--muted); font-size: 0.9rem; }
.center { text-align: center; }
.lead { font-size: 1.1rem; }

/* ----- Barre du haut ----- */
#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: var(--card); border-bottom: 2px solid var(--line); }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.15rem; color: var(--brand-dark); white-space: nowrap; }
.brand img { border-radius: 10px; }
.spacer { flex: 1; }
.chip, .avatar-btn { display: flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0.2rem 0.7rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; }
.avatar-btn > span:first-child { font-size: 1.5rem; line-height: 1; }
.icon-btn { min-width: 44px; min-height: 44px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn.back { font-weight: 800; }
.belt-icon { display: inline-flex; }
@media (max-width: 560px) { .chip-text { display: none; } .brand span { font-size: 1rem; } }
@media (max-width: 440px) { .brand span { display: none; } #topbar { gap: 0.35rem; padding: 0.5rem; } }

#view { max-width: 920px; margin: 0 auto; padding: 1rem 0.9rem 3rem; }

/* ----- Boutons / panneaux ----- */
.panel { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.btn { min-height: 52px; padding: 0.5rem 1.2rem; border: 2px solid var(--line); border-radius: 16px; background: #fff; font-weight: 700; box-shadow: 0 3px 0 rgba(36, 59, 83, 0.15); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.primary { background: var(--brand); border-color: var(--brand-dark); color: #fff; }
:root[data-contrast='high'] .btn.primary { background: var(--brand); }
.btn.big { min-height: 64px; font-size: 1.2rem; padding: 0.6rem 1.8rem; }
.btn.small { min-height: 40px; padding: 0.2rem 0.8rem; font-size: 0.9rem; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1rem; }
.notice { background: var(--skip-bg); border: 2px solid var(--sun); border-radius: 14px; padding: 0.7rem 0.9rem; font-weight: 600; }

/* ----- Accueil ----- */
.home h1 { margin-top: 0.3rem; }
.modes { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin: 1rem 0; }
.mode { display: flex; align-items: center; gap: 0.9rem; padding: 1rem; border-radius: var(--radius); border: 2px solid var(--line); background: var(--card); box-shadow: var(--shadow); min-height: 96px; }
.mode:active { transform: translateY(2px); }
.mode-ico { font-size: 2.6rem; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 18px; background: var(--c, #eee); flex: none; }
.mode-body { display: flex; flex-direction: column; }
.mode-body strong { font-size: 1.15rem; }
.mode-body small { color: var(--muted); font-size: 0.88rem; line-height: 1.3; }
.m-voice { --c: #ffd9cf; } .m-flash { --c: #fff0b8; } .m-holes { --c: #d4f1ee; } .m-duel { --c: #e3dbff; } .m-ship { --c: #d3e6ff; }
.m-voice { grid-column: 1 / -1; border-color: var(--brand); }
.next-goal { display: block; }
.meter { display: block; height: 14px; border-radius: 999px; background: #eee3d0; overflow: hidden; margin-top: 0.5rem; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--sun)); border-radius: 999px; }

/* ----- Choix des tables ----- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 0.7rem; margin: 1rem 0; }
.tiles.small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; min-height: 88px; padding: 0.5rem; border-radius: 18px; border: 3px solid var(--line); background: #fff; box-shadow: var(--shadow); font-weight: 800; }
.tile-n { font-size: 1.6rem; }
.tile.s1 { background: #fff7dc; } .tile.s2 { background: #e6f7ea; border-color: #8fd3a5; } .tile.s3 { background: #ffeeb0; border-color: var(--sun); }
.tile.sel { border-color: var(--teal); background: #d9f3f0; outline: 3px solid var(--teal); }
.stars { display: inline-flex; gap: 0.05rem; font-size: 1.1rem; color: #d6cdbb; line-height: 1; }
.stars .on { color: #f5a300; }
.stars.big { font-size: 3rem; gap: 0.3rem; }
.stars.big .on { animation: pop 0.5s ease backwards; }
.stars.big span:nth-child(2).on { animation-delay: 0.2s; } .stars.big span:nth-child(3).on { animation-delay: 0.4s; }
.quick { display: flex; gap: 0.5rem; justify-content: center; }
.opts { display: grid; gap: 0.6rem; margin: 1rem auto; max-width: 560px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.opt-label { font-weight: 600; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.seg button { min-height: 44px; padding: 0.3rem 0.9rem; border: 0; background: transparent; font-weight: 600; border-right: 2px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--teal); color: #fff; }
.switch { width: 62px; height: 36px; border-radius: 999px; border: 2px solid var(--line); background: #ddd; position: relative; padding: 0; }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch.on { background: var(--teal); } .switch.on i { transform: translateX(26px); }

/* ----- Récitation ----- */
.intro, .record, .waiting, .revise { text-align: center; }
.demo { list-style: none; padding: 0; margin: 1rem auto; max-width: 340px; }
.demo-line { padding: 0.5rem 1rem; margin: 0.4rem 0; border-radius: 14px; background: #f6efe0; font-size: 1.6rem; font-weight: 800; opacity: 0.45; transition: all 0.3s; }
.demo-line.lit { opacity: 1; background: var(--good-bg); transform: scale(1.06); color: var(--good); }
.say { font-style: italic; color: var(--teal-dark); font-weight: 600; }
.rhythm-light { width: 46px; height: 46px; border-radius: 50%; margin: 0.5rem auto; background: #e5dcc9; }
.rhythm-light.pulse { animation: pulse-light 0.7s ease-out; }
.wave { width: 100%; max-width: 600px; height: 120px; display: block; margin: 0.5rem auto; background: #fff3ee; border-radius: 16px; }
.rec-time { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rec-status { color: var(--brand-dark); font-weight: 700; }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 8px solid #f1e3cd; border-top-color: var(--brand); margin: 1rem auto; animation: spin 0.9s linear infinite; }
.revise-list { list-style: none; padding: 0; margin: 1rem auto; max-width: 420px; display: grid; gap: 0.5rem; }
.revise-row { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 1rem; border-radius: 14px; background: #fff; border: 2px solid var(--line); font-size: 1.3rem; cursor: pointer; min-height: 52px; }
.revise-row.lit { background: var(--good-bg); border-color: var(--good); transform: scale(1.03); }

/* ----- Résultats ----- */
.result { text-align: center; }
.result-emoji { font-size: 4rem; line-height: 1; }
.score-big { font-size: 2.6rem; font-weight: 800; margin: 0.2rem 0 0.4rem; color: var(--teal-dark); }
.result-stars { margin: 0.5rem 0; }
.unlock { display: flex; align-items: center; gap: 0.9rem; text-align: left; margin: 0.7rem auto; max-width: 440px; padding: 0.8rem 1rem; border-radius: 16px; background: #fff3c4; border: 2px solid var(--sun); animation: pop 0.5s ease backwards; }
.unlock p { margin: 0; font-size: 0.9rem; }
.badge-ico { font-size: 2.2rem; line-height: 1; }
.mistakes { max-width: 460px; margin: 1rem auto 0; text-align: left; }
.mistakes ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.mistakes li { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.4rem 0.4rem 0.9rem; border-radius: 12px; background: var(--bad-bg); font-size: 1.15rem; }
.recap { text-align: left; max-width: 560px; margin: 1rem auto 0; }
.lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.line { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-radius: 14px; font-size: 1.1rem; }
.line.ok { background: var(--good-bg); color: var(--good); font-weight: 700; }
.line.bad { background: var(--bad-bg); }
.line.skip { background: var(--skip-bg); }
.line .mark { font-size: 1.3rem; flex: none; }
.line .fix { display: flex; flex-direction: column; flex: 1; gap: 0.1rem; }
.line.bad .said { color: var(--bad); font-weight: 700; }
.line.skip .said { color: var(--skip); font-weight: 700; }
.line .right { color: var(--good); font-weight: 700; }
.recap-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 0.8rem; }
.heard { margin-top: 0.8rem; color: var(--muted); font-size: 0.9rem; }
.listen { background: #fff; flex: none; }

/* ----- Éclair / À trous ----- */
.quiz { text-align: center; max-width: 620px; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; font-weight: 700; color: var(--muted); }
.streak { color: var(--brand-dark); }
.progress-line { height: 10px; border-radius: 999px; background: #eee3d0; margin: 0.4rem 0; overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--teal); transition: width 0.3s; }
.timerbar { height: 16px; border-radius: 999px; background: #eee3d0; overflow: hidden; margin: 0.4rem 0 0.8rem; }
.timerbar.none { background: transparent; }
.timerbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--sun)); transform-origin: left; animation: shrink linear forwards; }
.question { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.6rem; font-size: clamp(2.6rem, 11vw, 4.4rem); font-weight: 800; padding: 1rem 0 1.2rem; }
.question .hole { min-width: 1.6em; border-bottom: 5px dashed var(--brand); color: var(--brand-dark); }
.question.good .hole { color: var(--good); border-color: var(--good); border-bottom-style: solid; }
.question.bad .hole { color: var(--bad); border-color: var(--bad); border-bottom-style: solid; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.answer { position: relative; min-height: 84px; border-radius: 20px; border: 3px solid var(--line); background: #fff; font-size: 2.2rem; font-weight: 800; box-shadow: var(--shadow); }
.answer small { position: absolute; top: 6px; left: 12px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.answer:active:not(:disabled) { transform: translateY(2px); }
.answer.right { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.answer.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.answer:disabled { cursor: default; }
.feedback { min-height: 2rem; margin-top: 0.8rem; font-size: 1.25rem; font-weight: 800; }
.feedback.good { color: var(--good); } .feedback.bad { color: var(--bad); }
.keypad-wrap { max-width: 340px; margin: 0 auto; }
.typed { font-size: 2.6rem; font-weight: 800; min-height: 3.6rem; border-bottom: 4px solid var(--line); margin-bottom: 0.7rem; }
.typed.good { color: var(--good); } .typed.bad { color: var(--bad); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.keypad.done { opacity: 0.5; pointer-events: none; }
.key { min-height: 66px; border-radius: 16px; border: 3px solid var(--line); background: #fff; font-size: 1.8rem; font-weight: 800; box-shadow: var(--shadow); }
.key.ok { background: var(--teal); color: #fff; border-color: var(--teal-dark); }

/* ----- Duel ----- */
.duel { display: flex; flex-direction: column; height: calc(100dvh - 76px); min-height: 520px; margin: -0.4rem -0.4rem 0; gap: 0.4rem; }
.duel-half { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 0.3rem; padding: 0.6rem 0.8rem; border-radius: 22px; border: 4px solid; transition: background 0.2s; min-height: 0; }
.duel-half.p1 { background: #e3f0ff; border-color: #3a86ff; } .duel-half.p2 { background: #ffe9d6; border-color: #ff8c1a; }
.duel.flip .duel-half.p2 { transform: rotate(180deg); }
.duel-half.won { background: var(--good-bg); border-color: var(--good); } .duel-half.lost { opacity: 0.8; }
.duel-head { display: flex; align-items: center; justify-content: space-between; }
.pips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pips i { width: 14px; height: 14px; border-radius: 50%; background: rgba(0, 0, 0, 0.15); }
.pips i.on { background: var(--sun); box-shadow: 0 0 0 2px #b88400 inset; }
.duel-q { text-align: center; font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; line-height: 1.1; }
.duel-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.duel-answers .answer { min-height: 0; height: 100%; padding: 0.4rem 0; font-size: clamp(1.6rem, 5vw, 2.4rem); touch-action: none; }
.duel-msg { text-align: center; min-height: 1.4rem; font-weight: 700; }
.duel-end { grid-column: 1 / -1; text-align: center; font-size: 1.4rem; font-weight: 800; }
.duel-mid { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.duel-target { font-weight: 700; color: var(--muted); }

/* ----- Vaisseau ----- */
.runner { max-width: 820px; margin: 0 auto; }
.hud { display: flex; justify-content: space-between; font-size: 1.5rem; font-weight: 800; padding: 0 0.3rem 0.4rem; }
.game-canvas { width: 100%; height: auto; display: block; border-radius: 20px; border: 3px solid #2b1b5e; background: #10173a; }
.formulas { margin-top: 0.8rem; }
.formulas .answer { font-size: 1.9rem; min-height: 76px; }

/* ----- Progression ----- */
.belts { list-style: none; padding: 0; margin: 0 0 0.6rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0.6rem; }
.belts li { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.6rem 0.3rem; border-radius: 14px; background: #f3ece0; opacity: 0.5; text-align: center; font-weight: 700; }
.belts li small { color: var(--muted); font-weight: 500; font-size: 0.75rem; }
.belts li.got { opacity: 1; background: #fff3c4; border: 2px solid var(--sun); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.15rem; padding: 0.7rem 0.5rem; border-radius: 14px; background: #f3ece0; opacity: 0.55; }
.badge.got { opacity: 1; background: #fff3c4; border: 2px solid var(--sun); }
.badge small { color: var(--muted); font-size: 0.75rem; line-height: 1.25; }
.weak { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.weak li { background: var(--bad-bg); border-radius: 12px; padding: 0.3rem 0.8rem; font-weight: 700; }

/* ----- Profils / dialogues ----- */
.welcome { text-align: center; max-width: 520px; margin: 1rem auto; }
.pform { display: grid; gap: 0.8rem; }
.pform input { font: inherit; font-size: 1.3rem; padding: 0.7rem 1rem; border-radius: 16px; border: 3px solid var(--line); text-align: center; letter-spacing: inherit; }
.avatars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.4rem; }
.avatars button { aspect-ratio: 1; font-size: 1.7rem; border-radius: 14px; border: 3px solid var(--line); background: #fff; padding: 0; }
.avatars button.on { border-color: var(--teal); background: #d9f3f0; }
@media (max-width: 480px) { .avatars { grid-template-columns: repeat(4, 1fr); } }
dialog.dlg { border: 3px solid var(--line); border-radius: 24px; padding: 0; max-width: min(520px, 94vw); width: 100%; max-height: 90dvh; background: var(--bg); color: var(--ink); font-family: var(--font); }
dialog.dlg::backdrop { background: rgba(20, 30, 50, 0.55); }
.dlg-body { padding: 1.2rem; display: grid; gap: 0.7rem; }
.plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.pbtn { width: 100%; display: flex; align-items: center; gap: 0.8rem; min-height: 56px; padding: 0.3rem 0.9rem; border-radius: 16px; border: 3px solid var(--line); background: #fff; font-size: 1.15rem; font-weight: 700; text-align: left; }
.pbtn.on { border-color: var(--teal); background: #d9f3f0; }
.pav { font-size: 1.8rem; }
.settings h3 { margin-top: 0.5rem; color: var(--teal-dark); }

/* ----- Toasts, confettis, animations ----- */
#toasts { position: fixed; left: 0; right: 0; bottom: 1rem; display: grid; justify-items: center; gap: 0.4rem; z-index: 50; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 0.6rem 1.1rem; border-radius: 999px; font-weight: 600; animation: pop 0.25s ease; transition: opacity 0.4s; }
.toast.out { opacity: 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-light { 0% { background: var(--sun); box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.9); } 100% { background: #e5dcc9; box-shadow: 0 0 0 36px rgba(255, 201, 60, 0); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ----- Choix de l'opération (multiplication / addition) ----- */
.opswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.6rem 0 1rem; }
.opswitch button { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 60px; border-radius: 18px; border: 3px solid var(--line); background: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: var(--shadow); }
.opswitch button.on { background: var(--teal); border-color: var(--teal-dark); color: #fff; }
.opswitch .op-sym { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: rgba(255, 201, 60, 0.9); color: #243b53; font-size: 1.3rem; line-height: 1; }
.op-tag { display: inline-block; vertical-align: middle; margin-left: 0.3rem; padding: 0.1rem 0.7rem; border-radius: 999px; background: #d9f3f0; color: var(--teal-dark); font-size: 0.85rem; font-weight: 700; }

/* ----- Grimpe l'immeuble / Tir aux cibles ----- */
.m-climb { --c: #ffd9e8; } .m-shoot { --c: #ffe6c7; }
.climb { max-width: 520px; margin: 0 auto; }
.climb-canvas { touch-action: none; cursor: pointer; }
.shoot-canvas { touch-action: none; cursor: crosshair; }
.climb-q { text-align: center; font-size: clamp(2rem, 9vw, 3rem); font-weight: 800; margin: 0 0 0.3rem; color: var(--ink); }
.shoot .climb-q, .climb .climb-q { letter-spacing: 0.02em; }

/* ----- Compte et clé API ----- */
.gate { text-align: left; max-width: 520px; margin: 1rem auto 0; display: grid; gap: 0.7rem; }
.gate .btn.big { justify-self: center; }
.keysteps { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.3rem; }
.keysteps a { color: var(--teal-dark); font-weight: 700; text-decoration: underline; }
.keyform { display: grid; gap: 0.5rem; }
.keyform input { font: inherit; padding: 0.7rem 1rem; border-radius: 14px; border: 3px solid var(--line); letter-spacing: inherit; width: 100%; }
.key-msg { min-height: 1.3rem; margin: 0; font-weight: 600; color: var(--muted); }
.key-msg.bad { color: var(--bad); }
.account-block { display: grid; gap: 0.5rem; justify-items: start; }
.account-block .key-slot { width: 100%; display: grid; gap: 0.5rem; }
.notice.ok { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.toast.bad { background: var(--bad); }
