/* Oulpan — feuille de style principale (design 2026) */
:root {
  --bg: #f6f7fb;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #e9e6ff 0%, transparent 60%), radial-gradient(900px 500px at -10% 0%, #e3f1ff 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --surface-3: #e8ebf4;
  --ink: #0f172a;
  --ink-soft: #5b6478;
  --ink-faint: #8a93a6;
  --line: #e4e7ef;
  --accent: #5b4cf0;
  --accent-ink: #4338ca;
  --accent-soft: #eeecff;
  --grad: linear-gradient(135deg, #5b4cf0 0%, #8b5cf6 55%, #c056e0 100%);
  --good: #12a150;
  --good-soft: #e3f7ec;
  --bad: #e5484d;
  --bad-soft: #fdecec;
  --warn: #c27c0e;
  --warn-soft: #fff5e1;
  --masc: #3b6ff5;
  --masc-soft: #e8efff;
  --fem: #d6409f;
  --fem-soft: #fde9f5;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -8px rgba(15, 23, 42, .10);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 20px 40px -12px rgba(76, 60, 220, .25);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-he: "Noto Sans Hebrew", "Arial Hebrew", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d14;
    --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(91, 76, 240, .22) 0%, transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(59, 111, 245, .14) 0%, transparent 55%);
    --surface: #141824;
    --surface-2: #1b2030;
    --surface-3: #242a3d;
    --ink: #eef0f6;
    --ink-soft: #a3abbe;
    --ink-faint: #737c91;
    --line: #262c3e;
    --accent: #8b7dff;
    --accent-ink: #b9b0ff;
    --accent-soft: #221f45;
    --good: #3ddc84;
    --good-soft: #10291c;
    --bad: #ff6b70;
    --bad-soft: #351719;
    --warn: #f5b544;
    --warn-soft: #33270f;
    --masc: #7aa2ff;
    --masc-soft: #18233f;
    --fem: #f47ac4;
    --fem-soft: #3a1630;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }
::selection { background: var(--accent-soft); }

.he, [lang="he"] { font-family: var(--font-he); direction: rtl; unicode-bidi: isolate; }
.he-big { font-size: 1.55em; line-height: 1.35; font-weight: 500; }
.tr { color: var(--ink-soft); font-style: italic; }
.m { color: var(--masc); }
.f { color: var(--fem); }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 12px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand::before {
  content: "א"; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff; font-family: var(--font-he); font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 6px 14px -6px rgba(91, 76, 240, .6);
}
.brand .he { font-size: .95em; color: var(--accent); font-weight: 600; }
nav.main { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--surface-2); border-radius: 999px; margin-inline-start: auto; }
nav.main::-webkit-scrollbar { display: none; }
nav.main a { padding: 7px 14px; border-radius: 999px; color: var(--ink-soft); white-space: nowrap; font-size: .9rem; font-weight: 600; transition: color .15s, background .15s; }
nav.main a:hover { color: var(--ink); text-decoration: none; }
nav.main a.active { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow-sm); }

main { max-width: 1160px; margin: 0 auto; padding: 32px 20px 96px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; margin: 0 0 .35em; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; font-weight: 750; margin: 2.2em 0 .8em; }
h3 { font-size: 1.02rem; letter-spacing: -.01em; font-weight: 700; margin: 1.2em 0 .4em; }
.lead { color: var(--ink-soft); margin-top: 0; font-size: 1.05rem; max-width: 72ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
a.card { display: block; color: inherit; transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, border-color .18s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); text-decoration: none; }
.card h3 { margin: 0 0 4px; }
.card .meta { color: var(--ink-soft); font-size: .86rem; }

.theme-card { --hue: 250; position: relative; overflow: hidden; display: flex !important; flex-direction: column; gap: 4px; min-height: 182px; }
.theme-card::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 140px; height: 140px; border-radius: 50%; background: hsl(var(--hue) 90% 65% / .10); transition: transform .3s; }
.theme-card:hover::after { transform: scale(1.3); }
.theme-icon, .ex-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem; line-height: 1;
  background: hsl(var(--hue) 90% 60% / .15); margin-bottom: 8px;
}
.theme-card .he-big { color: hsl(var(--hue) 60% 42%); margin-top: auto; text-align: right; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-card .he-big { color: hsl(var(--hue) 90% 78%); } }
.ex-card { --hue: 250; display: flex !important; gap: 14px; align-items: flex-start; }
.ex-card .ex-icon { flex: none; margin: 0; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); font-size: .76rem; font-weight: 600; vertical-align: middle; }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.m { background: var(--masc-soft); color: var(--masc); }
.pill.f { background: var(--fem-soft); color: var(--fem); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-weight: 600; font-size: .86rem; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .n { opacity: .7; margin-inline-start: 4px; }

.callout { border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); background: var(--accent-soft); padding: 14px 18px 14px 46px; border-radius: var(--radius-sm); margin: 1em 0; position: relative; }
.callout::before { content: "💡"; position: absolute; left: 16px; top: 14px; }
.callout.warn { border-color: color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-soft); }
.callout.warn::before { content: "⚠️"; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; margin: .6em 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
th { background: var(--surface-2); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
td.he { font-size: 1.3em; }

/* ---------- Accueil ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 36px; margin-bottom: 8px; color: #fff;
  background: var(--grad); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.hero::before { content: "אבגדהוזחטי"; position: absolute; right: -20px; bottom: -50px; font-family: var(--font-he); font-size: 9rem; font-weight: 800; opacity: .08; white-space: nowrap; pointer-events: none; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero .lead { color: rgba(255,255,255,.88); }
.hero .he { color: #fff; }
.hero .eyebrow { color: rgba(255,255,255,.8); }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 22px; }
.stat { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 10px 16px; }
.stat .num { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.stat .lbl { color: rgba(255,255,255,.82); font-size: .78rem; }
.countdown { width: 170px; height: 170px; border-radius: 50%; display: grid; place-content: center; text-align: center; position: relative; }
.countdown svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.countdown .num { font-size: 3rem; font-weight: 800; line-height: 1; position: relative; }
.countdown .muted { color: rgba(255,255,255,.88); font-size: .8rem; line-height: 1.3; position: relative; }
.hero .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #fff; box-shadow: none; }
.hero .btn:hover { background: rgba(255,255,255,.26); }
.hero .btn.primary { background: #fff; color: #4338ca; border-color: #fff; }
.steps { counter-reset: s; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); font-size: .93rem; color: var(--ink-soft); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; margin-bottom: 10px; }

/* ---------- Leçon ---------- */
.lesson-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); margin-bottom: 8px; }
.lesson-head h1 { margin-bottom: .2em; }
.lesson-head .lead { margin-bottom: 0; }
.lesson-head .he-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--ink-soft); margin-bottom: 14px; }
.dialogue { padding: 6px 20px; }
.dialogue .line { display: grid; gap: 3px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dialogue .line:last-child { border-bottom: 0; }
.dialogue .who { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.dialogue .he { font-size: 1.3em; text-align: right; }
.reveal { cursor: pointer; filter: blur(5px); transition: filter .2s; user-select: none; }
.reveal.shown { filter: none; user-select: auto; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs img { width: 92px; height: 122px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; box-shadow: var(--shadow-sm); transition: transform .15s; }
.thumbs img:hover { transform: scale(1.04); }

/* ---------- Barre d'outils ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 18px; }
input[type="search"], input[type="text"], select, .answer-input {
  font: inherit; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; outline: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type="search"] { flex: 1 1 260px; }
input.he { text-align: right; font-size: 1.2em; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 650; font-size: .92rem;
  box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .15s, border-color .15s, background .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(91, 76, 240, .7); }
.btn.small { padding: 6px 12px; font-size: .84rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--ink-soft); padding: 2px 6px; font-size: 1em; }
.icon-btn:hover { color: var(--accent); }

/* ---------- Exercices ---------- */
.ex-box { max-width: 660px; margin: 0 auto; }
.ex-progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.ex-progress > div { height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s ease; }
.question { text-align: center; padding: 30px 20px; margin-bottom: 14px; }
.question .prompt { font-size: 2.1rem; margin: 8px 0; font-weight: 600; }
.question .hint { color: var(--ink-soft); font-size: .88rem; font-weight: 600; }
.choices { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .choices { grid-template-columns: 1fr; } }
.choice {
  padding: 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.05rem; font-weight: 600;
  box-shadow: var(--shadow-sm); transition: border-color .12s, transform .12s, background .12s;
}
.choice.he { font-size: 1.35em; font-weight: 500; }
.choice:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.choice:disabled { cursor: default; }
.choice.correct { border-color: var(--good); background: var(--good-soft); animation: pop .3s; }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); animation: shake .3s; }
@keyframes pop { 50% { transform: scale(1.03); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.feedback { margin-top: 16px; padding: 14px 18px; border-radius: 14px; font-weight: 700; }
.feedback > div { font-weight: 400; margin-top: 4px; color: var(--ink); }
.feedback.ok { background: var(--good-soft); color: var(--good); }
.feedback.ko { background: var(--bad-soft); color: var(--bad); }
.answer-input { width: 100%; font-size: 1.45em; text-align: center; margin-bottom: 4px; }
.flashcard { min-height: 260px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; user-select: none; text-align: center; }
.flashcard .front { font-size: 2.6rem; font-weight: 600; }
.flashcard .back { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); width: 100%; }
.score-big { font-size: 3.4rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kbd-he { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; direction: rtl; }
.kbd-he button { width: 40px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-family: var(--font-he); font-size: 1.15em; box-shadow: 0 2px 0 var(--line); }
.kbd-he button:active { transform: translateY(2px); box-shadow: none; }

/* ---------- Irréguliers ---------- */
.irr-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.irr { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); display: grid; gap: 4px; }
.irr .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.irr .he { font-size: 1.3em; }
.irr .arrow { color: var(--ink-faint); }
.irr .why { font-size: .84rem; color: var(--ink-soft); }
.irr-section { margin-bottom: 8px; }
.irr-section > p { color: var(--ink-soft); margin: -6px 0 14px; max-width: 75ch; }

/* ---------- Visionneuse ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(8, 10, 18, .88); backdrop-filter: blur(6px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.lightbox .close { position: absolute; top: 12px; right: 18px; color: #fff; font-size: 2.2rem; background: none; border: 0; cursor: pointer; }

/* ---------- Illustrations et audio ---------- */
.pic { font-size: 1.6em; line-height: 1; }
.pic.big { display: block; font-size: 3.6rem; margin: 4px 0 8px; }
td.pic-cell, th.pic-cell { width: 52px; text-align: center; }
.speak { font-size: .78em; vertical-align: middle; opacity: .55; border-radius: 8px; transition: opacity .15s, background .15s; }
.speak:hover { opacity: 1; background: var(--accent-soft); }
figure.illus { margin: 1em 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); }
figure.illus svg { max-width: 100%; height: auto; }
figure.illus figcaption { color: var(--ink-soft); font-size: .88rem; margin-top: 10px; }
.illus svg text { fill: var(--ink); font-family: var(--font); }
.illus svg .he-t { font-family: var(--font-he); }
.illus svg .box { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.illus svg .box-m { fill: var(--masc-soft); stroke: var(--masc); stroke-width: 1.5; }
.illus svg .box-f { fill: var(--fem-soft); stroke: var(--fem); stroke-width: 1.5; }
.illus svg .ln { stroke: var(--ink-faint); stroke-width: 2; fill: none; }
.illus svg .accent { fill: var(--accent); }

.muted { color: var(--ink-soft); }
.small { font-size: .86em; }
.hidden { display: none !important; }
footer { text-align: center; color: var(--ink-faint); font-size: .82rem; padding: 28px 16px 40px; }

@media (max-width: 760px) {
  .topbar-inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 16px; }
  nav.main { margin-inline-start: 0; }
  main { padding: 22px 16px 80px; }
  .hero { grid-template-columns: 1fr; padding: 26px 22px; border-radius: 22px; }
  .countdown { width: 132px; height: 132px; justify-self: start; }
  .countdown .num { font-size: 2.3rem; }
  .lesson-head { padding: 20px; }
  .question .prompt { font-size: 1.65rem; }
}
@media (max-width: 520px) {
  .pic-cell { display: none; }
  th, td { padding: 9px 10px; }
  td.he { font-size: 1.15em; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Scènes et schéma du corps ---------- */
.illus svg .furn { fill: #c9a27a; stroke: #9c7652; stroke-width: 1.5; }
.illus svg .screen { fill: #2b3350; }
.illus svg .floor { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.illus svg .look { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 5; fill: none; }
.illus svg .box-front { fill: #d8b48c; stroke: #9c7652; stroke-width: 1.5; }
.body-svg .skin path, .body-svg .skin circle, .body-svg .skin ellipse, .body-svg .skin rect { fill: #f2c9a5; stroke: #d29d73; stroke-width: 1.5; }
.body-svg .hair { fill: #5b3a29; }
.body-svg .face circle { fill: #2b2b2b; }
.body-svg .face path { stroke: #8a4b3a; stroke-width: 2.5; stroke-linecap: round; }
.body-svg .clothes { fill: #7c6cf2; opacity: .9; }
.body-svg .clothes2 { fill: #3b4a7a; }
.body-svg .leader { stroke: var(--ink-faint); stroke-width: 1.2; fill: none; }
.body-svg .dot { fill: var(--accent); }
.body-svg .dot-big { fill: #ff3b6b; stroke: #fff; stroke-width: 3; }
.body-svg .pulse { fill: #ff3b6b; opacity: .35; transform-box: fill-box; transform-origin: center; animation: pulse 1.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.8); opacity: 0; } }
.scene-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.scene-grid figure.illus { margin: 0; padding: 12px 12px 14px; }
.scene-grid figcaption .he { font-size: 1.1em; color: var(--ink); }
.body-figure svg { max-width: 460px; width: 100%; }
.groups-table tbody tr { cursor: pointer; }
.groups-table td.he { font-size: 1.15em; white-space: nowrap; }
.groups-table td:first-child { min-width: 190px; }
.groups-table td.he:nth-child(3) { white-space: normal; }

/* ---------- Profils ---------- */
.profile { position: relative; flex: none; }
.profile-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: .9rem; cursor: pointer; box-shadow: var(--shadow-sm); }
.profile-btn:hover { border-color: var(--accent); }
.profile-btn .caret { color: var(--ink-faint); font-size: .75rem; }
.avatar { --hue: 252; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; line-height: 1; background: hsl(var(--hue) 90% 60% / .18); box-shadow: inset 0 0 0 2px hsl(var(--hue) 80% 60% / .45); flex: none; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: none; z-index: 30; }
.profile.open .profile-menu { display: grid; gap: 2px; }
.profile-menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-weight: 600; cursor: pointer; text-align: left; }
.profile-menu button:hover, .profile-menu button.active { background: var(--surface-2); }
.profile-menu .check { margin-left: auto; color: var(--accent); }
.choose { max-width: 720px; margin: 6vh auto 0; text-align: center; }
.choose .lead { margin-left: auto; margin-right: auto; }
.choose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 28px; }
.choose-card { --hue: 252; display: grid; justify-items: center; gap: 10px; padding: 30px 20px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); font-size: 1.2rem; transition: transform .18s, box-shadow .18s, border-color .18s; }
.choose-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: hsl(var(--hue) 80% 60%); }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.duo-card { --hue: 252; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.duo-card.me { border-color: hsl(var(--hue) 80% 60% / .6); box-shadow: 0 0 0 3px hsl(var(--hue) 80% 60% / .12), var(--shadow); }
.duo-head { display: flex; align-items: center; gap: 12px; }
.duo-head > div { flex: 1; }
.duo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 12px; text-align: center; }
.duo-stats .num { font-size: 1.3rem; font-weight: 800; }
.duo-stats .lbl { font-size: .72rem; color: var(--ink-soft); }
.duo-card .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.duo-card .bar > div { height: 100%; border-radius: 99px; background: hsl(var(--hue) 80% 60%); }
@media (max-width: 760px) { .profile { position: absolute; top: 10px; right: 16px; } .topbar-inner { position: relative; } }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- Examen blanc ---------- */
.exam-choice { display: flex !important; gap: 18px; align-items: center; }
.exam-n { flex: none; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font-size: 1.9rem; font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 10px 20px -10px rgba(91, 76, 240, .7); }
.exam-note { font-size: 1.1rem; margin: 4px 0 18px; color: var(--ink-soft); }
.exam-note strong { color: var(--ink); }
.domain-list { display: grid; gap: 12px; text-align: left; margin: 0 auto 18px; max-width: 420px; }
.domain .row { display: flex; justify-content: space-between; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.domain .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.domain .bar > div { height: 100%; border-radius: 99px; }
.errors { text-align: left; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.errors summary { cursor: pointer; font-weight: 700; }
.errors .err { padding: 10px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.illus svg .road { stroke: var(--surface-3); stroke-width: 34; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.illus svg .dir { stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* ---------- Badges et impression ---------- */
.warn-pill { background: var(--warn-soft); color: var(--warn); margin-bottom: 8px; }
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  :root { --surface: #fff; --surface-2: #f3f3f3; --line: #ccc; --ink: #000; --ink-soft: #444; --accent: #333; --accent-soft: #f2f2f2; }
  body { background: #fff !important; color: #000; font-size: 12pt; }
  .topbar, footer, .back, .btn-row, .btn, .speak, .no-print, .profile, .thumbs, .lightbox { display: none !important; }
  main { padding: 0; max-width: none; animation: none; }
  .print-only { display: block; font-size: 9pt; color: #666; margin-bottom: 6px; }
  .lesson-head, .card, .table-wrap, figure.illus, .callout { box-shadow: none !important; border-color: #bbb; break-inside: avoid; }
  .lesson-head .he-title { color: #000; background: none; -webkit-text-fill-color: #000; }
  tr, .dialogue .line, .scene-grid figure { break-inside: avoid; }
  h2 { break-after: avoid; margin-top: 1.2em; }
  .reveal { filter: none !important; }
  .print-blank .vocab-table .fr-cell, .print-blank .dialogue .reveal { color: transparent !important; border-bottom: 1px solid #999; }
  .print-blank .vocab-table .fr-cell .pill { display: none; }
  .scene-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Jeu « Dessiné c'est gagné » ---------- */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 800; margin-left: 4px; }
.game-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 30px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #8b5cf6 100%); box-shadow: var(--shadow-lg); }
.game-hero h1 { color: #fff; }
.game-hero .lead, .game-hero .eyebrow { color: rgba(255,255,255,.9); }
.game-hero .btn.primary { background: #fff; color: #be185d; }
.versus { display: flex; align-items: center; gap: 12px; }
.vs-player { --hue: 252; text-align: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 18px; padding: 14px 18px; min-width: 110px; }
.vs-player.lead { background: rgba(255,255,255,.28); box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.vs-points { font-size: 2.2rem; font-weight: 800; line-height: 1.1; margin-top: 6px; }
.vs-sep { font-weight: 800; opacity: .8; }
.game-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.game-card { display: flex !important; gap: 14px; align-items: center; }
.game-card .mystery { width: 84px; height: 84px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f97316, #ec4899); }
.game-thumb { width: 96px; height: 96px; flex: none; border-radius: 14px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.game-thumb.big { width: min(320px, 100%); height: auto; margin: 10px auto; display: block; }
.game-card .pill { margin: 4px 0; }
.ok-pill { background: var(--good-soft); color: var(--good); }
.ko-pill { background: var(--bad-soft); color: var(--bad); }
.reaction { font-size: 1.3rem; }
.empty { text-align: center; color: var(--ink-soft); }
.game-alert { display: flex !important; align-items: center; gap: 14px; margin: 16px 0 0; border-color: #f97316; }
.game-alert > div { flex: 1; }
.word-pick .pick { text-align: center; cursor: pointer; font: inherit; color: var(--ink); display: grid; gap: 4px; justify-items: center; }
.word-pick .pick:hover { border-color: var(--accent); transform: translateY(-3px); }
.draw-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.timer { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); }
.timer.hurry { background: var(--bad-soft); color: var(--bad); animation: pop .5s infinite; }
.draw-wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(220px, 1fr); gap: 18px; align-items: start; }
.pad { width: 100%; aspect-ratio: 1; border-radius: 18px; border: 2px solid var(--line); background: #fff; touch-action: none; cursor: crosshair; box-shadow: var(--shadow); display: block; }
.tools { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.eraser { background: var(--surface-2); font-size: 1rem; }
.swatch.active { box-shadow: 0 0 0 3px var(--accent); }
.sizes { display: flex; gap: 8px; }
.size { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.size span { display: block; border-radius: 50%; background: var(--ink); }
.size.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pulse-btn { animation: pop .8s infinite; }
.choices.one-col { grid-template-columns: 1fr 1fr; }
.guess-tools .hint { font-weight: 600; color: var(--ink-soft); }
.word-reveal { margin: 10px 0; }
.reactions { margin: 12px 0; display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.react { font-size: 1.6rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px; cursor: pointer; }
.react:hover { transform: scale(1.15); }
@media (max-width: 760px) {
  .game-hero { grid-template-columns: 1fr; padding: 22px; }
  .draw-wrap { grid-template-columns: 1fr; }
  .versus { justify-content: center; }
}
.pill.lv { font-weight: 700; }
.pill.lv1 { background: var(--good-soft); color: var(--good); }
.pill.lv2 { background: var(--warn-soft); color: var(--warn); }
.pill.lv3 { background: var(--bad-soft); color: var(--bad); }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.18); font-weight: 600; }
.streak.big { background: var(--warn-soft); color: var(--warn); margin: 6px 0; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.slot { width: 46px; height: 54px; border-radius: 12px; border: 2px dashed var(--line); background: var(--surface-2); font-family: var(--font-he); font-size: 1.6rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.slot.filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.slot.fixed { border-style: solid; border-color: var(--good); background: var(--good-soft); cursor: default; }
.slots.shake { animation: shake .35s; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tile { width: 48px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--line); font-family: var(--font-he); font-size: 1.55rem; font-weight: 600; color: var(--ink); cursor: pointer; transition: transform .1s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile:active { transform: translateY(2px); box-shadow: none; }
.points-now { text-align: center; }
.hints { display: flex; flex-wrap: wrap; gap: 8px; }
.hints .cost { color: var(--bad); font-weight: 800; }
.btn.ghost { background: none; box-shadow: none; color: var(--ink-soft); }

/* ---------- Bouton nikoud ---------- */
.nikoud-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: .82rem; cursor: pointer; box-shadow: var(--shadow-sm); flex: none; }
.nikoud-toggle .he { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 1.05rem; }
.nikoud-toggle.off .he { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 760px) { .nikoud-toggle { position: absolute; top: 10px; right: 130px; } .nikoud-toggle .nk-label { display: none; } }
.daily-card { display: flex !important; align-items: center; gap: 14px; margin: 16px 0 0; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.daily-card > div { flex: 1; }
.daily-card.done { opacity: .85; }
.daily-flame { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--warn-soft); font-size: 1.3rem; line-height: 1; }
.daily-flame b { font-size: .95rem; color: var(--warn); }

/* ---------- Progrès ---------- */
.stats-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat-card .num { font-size: 1.8rem; font-weight: 800; }
.stat-card .lbl { color: var(--ink-soft); font-size: .85rem; }
.goal { display: grid; gap: 8px; }
.goal-home { margin: 16px 0 0; }
.boxes { display: flex; gap: 14px; align-items: flex-end; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.box-col { flex: 1; text-align: center; }
.box-bar { margin: 0 auto 6px; width: 36px; border-radius: 8px 8px 0 0; background: var(--grad); }
.box-col .num { font-weight: 800; }
.box-col .lbl { font-size: .78rem; color: var(--ink-soft); }
.mastery td { vertical-align: middle; }
.mbar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 90px; margin-bottom: 3px; }
.mbar > div { height: 100%; border-radius: 99px; }
.plan { display: grid; gap: 8px; }
.plan-week { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.plan-week.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-week .pill { margin: 2px; }
@media (max-width: 600px) { .plan-week { grid-template-columns: 1fr; } }
.dictee-ear { font-size: 3rem; margin: 6px 0; }
.build-line { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; padding: 12px; margin: 10px 0; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2); }
.build-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.chip-w { font-family: var(--font-he); font-size: 1.3rem; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.chip-w.on { background: var(--accent-soft); border-color: var(--accent); }
.chip-w:disabled { cursor: default; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li.ok { color: var(--good); font-weight: 600; }
.small-timer { width: auto; height: auto; padding: 6px 12px; border-radius: 99px; }
.mic { font-size: 1.1rem; padding: 14px 24px; }
.reading p.he { font-size: 1.3em; margin: .7em 0 0; text-align: right; }
.reading p.small { margin: 2px 0 0; }
.rq { margin-bottom: 12px; }
.write-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.write-area { width: 100%; min-height: 260px; font-size: 1.3rem; line-height: 1.7; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
@media (max-width: 760px) { .write-wrap { grid-template-columns: 1fr; } }

/* ---------- Connexion et comptes ---------- */
body.logged-out nav.main, body.logged-out #profile, body.logged-out #nikoud-toggle, body.logged-out footer { display: none !important; }
.login-wrap { min-height: 70vh; display: grid; place-items: center; }
.login-card { width: min(420px, 100%); display: grid; gap: 14px; padding: 32px; text-align: left; }
.login-card h1 { margin: 0; text-align: center; }
.login-card > p { text-align: center; margin: 0; }
.login-logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--font-he); font-size: 2rem; font-weight: 700; box-shadow: 0 10px 24px -10px rgba(91, 76, 240, .7); }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.field input, .field select { font: inherit; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); outline: none; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.form-error { color: var(--bad); font-weight: 600; min-height: 1.2em; font-size: .9rem; }
.menu-head { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.profile-menu .menu-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: left; }
.profile-menu .menu-item:hover { background: var(--surface-2); text-decoration: none; }
.admin-form { display: grid; gap: 14px; max-width: 560px; }
.admin-users .actions { white-space: nowrap; }
.admin-users .actions .btn { margin: 2px; }
.row-panel td { background: var(--surface-2); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { font: inherit; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 220px; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-pick span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); font-size: 1.4rem; cursor: pointer; background: var(--surface); }
.emoji-pick input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; }
.cred-card { margin-top: 16px; border-color: var(--good); }
.cred { background: var(--surface-2); border-radius: 10px; padding: 12px; white-space: pre-wrap; font-size: .95rem; user-select: all; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--bad); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; font-weight: 600; }

/* ---------- Coupe-nombres ---------- */
.ninja-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 28px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #16a34a 0%, #0ea5e9 55%, #6366f1 100%); box-shadow: var(--shadow-lg); }
.ninja-hero h1, .ninja-hero .lead, .ninja-hero .eyebrow { color: #fff; }
.ninja-demo { position: relative; font-size: 6rem; line-height: 1; animation: bob 2s ease-in-out infinite; }
.ninja-demo span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
@keyframes bob { 50% { transform: translateY(-10px) rotate(6deg); } }
.ninja-level h3 { margin-bottom: 4px; }
.ninja-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.ninja-lives { font-size: 1.4rem; letter-spacing: 2px; }
.ninja-prompt { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-height: 58px; }
.ninja-prompt .he { font-size: 1.8rem; font-weight: 600; }
.ninja-prompt .he.listen { font-family: var(--font); font-size: 1.1rem; color: var(--ink-soft); direction: ltr; }
.ninja-score { font-size: 1.8rem; font-weight: 800; min-width: 90px; text-align: right; }
.ninja-score small { font-size: 1rem; color: var(--warn); margin-left: 4px; }
.ninja-stage { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(ellipse at 50% 120%, #3b2a1a 0%, #1f160d 60%, #120c07 100%); box-shadow: var(--shadow-lg); }
.ninja-stage canvas { display: block; touch-action: none; cursor: crosshair; }
.ninja-stage.shake { animation: shake .35s; }
.ninja-flash { position: absolute; left: 50%; top: 14px; transform: translateX(-50%) translateY(-20px); opacity: 0; padding: 8px 16px; border-radius: 12px; font-weight: 600; pointer-events: none; transition: all .2s; white-space: nowrap; }
.ninja-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ninja-flash.ok { background: var(--good); color: #fff; }
.ninja-flash.ko { background: var(--bad); color: #fff; }
.ninja-flash .he { color: #fff; }
.ninja-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); padding: 16px; }
.ninja-mistakes { text-align: left; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin: 10px 0; max-height: 180px; overflow: auto; display: grid; gap: 4px; }
@media (max-width: 760px) { .ninja-hero { grid-template-columns: 1fr; } .ninja-demo { display: none; } .ninja-prompt .he { font-size: 1.4rem; } .ninja-score { font-size: 1.4rem; min-width: 60px; } }

/* ---------- Classement ---------- */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 18px 0 22px; }
.podium-col { --hue: 252; display: grid; justify-items: center; gap: 4px; width: 150px; text-align: center; }
.podium-col.me strong { color: var(--accent); }
.podium-xp { font-weight: 800; font-size: 1.05rem; }
.podium-block { width: 100%; display: grid; place-items: center; border-radius: 14px 14px 0 0; background: hsl(var(--hue) 80% 60% / .22); border: 1px solid hsl(var(--hue) 80% 60% / .45); font-size: 1.8rem; }
.rank1 .podium-block { height: 120px; }
.rank2 .podium-block { height: 86px; }
.rank3 .podium-block { height: 64px; }
.leader tr.me td { background: var(--accent-soft); }
.leader td { vertical-align: middle; }
.last-winner { margin: 10px 0; border-color: var(--warn); }
.rank-home { display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 16px 0 0; }
.rank-item { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: .9rem; }
.rank-item.me { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Pari de confiance ---------- */
.bet { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; font-size: .9rem; color: var(--ink-soft); }
.bet-chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; }
.bet-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.bet-result { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--surface); font-size: .85rem; }
.calib { display: grid; gap: 4px; font-size: .9rem; margin-top: 6px; }
.feedback.surprise { border: 2px solid var(--bad); animation: shake .4s; }

/* ---------- Mnémos ---------- */
.mnemo-box { margin-top: 10px; font-weight: 400; color: var(--ink); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mnemo-box:empty { display: none; }
.mnemo-form { display: grid; gap: 8px; width: 100%; }
.mnemo-form textarea { width: 100%; font: inherit; padding: 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.mnemo-tips { display: grid; gap: 6px; }
.mnemo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mnemo-card { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.mnemo-card .slot-mnemo { grid-column: 1 / -1; }

/* ---------- Match chrono ---------- */
.match-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.match-timer { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.match-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match-col { display: grid; gap: 10px; }
.match-tile { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); padding: 14px 10px; font: inherit; cursor: pointer; min-height: 56px; transition: transform .12s, opacity .3s; }
.match-tile.he { font-family: var(--font-he); font-size: 1.35rem; }
.match-tile.sel { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.03); }
.match-tile.bad { border-color: var(--bad); background: var(--bad-soft); animation: shake .3s; }
.match-tile.gone { opacity: 0; pointer-events: none; transform: scale(.9); }
.match-recap { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin: 10px 0; }

/* ---------- Trouve l'intrus ---------- */
.intrus-recap { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.intrus-recap .odd { color: var(--bad); font-weight: 700; }

/* ---------- Quête du duo ---------- */
.quest { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.quest.done { border-color: var(--good); background: var(--good-soft); }
.quest-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.quest-bar { display: flex; height: 14px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.quest-seg { background: hsl(var(--hue) 70% 58%); transition: width .5s; }
.quest-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; align-items: center; }
.quest-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--hue) 70% 58%); margin-right: 5px; }
.quest-total { margin-left: auto; }
@media (max-width: 520px) { .match-tile.he { font-size: 1.15rem; } }
.toast.warn { background: var(--surface); color: var(--ink); border: 2px solid var(--warn); max-width: min(520px, calc(100vw - 32px)); width: max-content; font-weight: 400; display: grid; gap: 8px; }
.toast.warn .btn { justify-self: end; }
.snd-log { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; font-size: .82rem; white-space: pre-wrap; min-height: 80px; }
