/* Ivrit Express — système visuel.
   Mise en page : barre d'app (logo, onglets, série, niveau) puis une colonne centrale de 720px max.
   Sur mobile, les onglets passent en barre fixe en bas. */
:root{
  --bg:#f4f6fb; --surface:#ffffff; --sunk:#eaeef6; --line:#dbe2ee; --line-2:#c8d2e3;
  --fg:#0f1a2e; --muted:#5d6b84; --soft:#8a96ab;
  --brand:#1f4fb8; --brand-2:#2f64dc; --brand-ink:#ffffff; --brand-soft:#e3ebfc;
  --accent:#e9722b; --accent-soft:#fdeadc;
  --gold:#e3a008; --gold-soft:#fdf3d6;
  --good:#16895a; --good-soft:#dcf4e8; --bad:#cf3d3d; --bad-soft:#fde4e4;
  --shadow:0 1px 2px rgba(15,26,46,.06),0 4px 16px rgba(15,26,46,.06);
  --shadow-lg:0 10px 40px rgba(15,26,46,.16);
  --f-display:"Secular One","Rubik",system-ui,sans-serif;
  --f-body:"Rubik",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-he:"Frank Ruhl Libre","Rubik","Arial Hebrew",serif;
  --r:16px; --r-sm:12px;
  --nav-h:0px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0b1222; --surface:#131d33; --sunk:#1a2742; --line:#26365a; --line-2:#33466f;
  --fg:#eaf0fc; --muted:#9dabc6; --soft:#71809c;
  --brand:#6f9bff; --brand-2:#8bb0ff; --brand-ink:#0b1222; --brand-soft:#1b2c54;
  --accent:#ff9a57; --accent-soft:#3a2415; --gold:#f5c84b; --gold-soft:#3a3013;
  --good:#4fd39a; --good-soft:#11342a; --bad:#ff7b7b; --bad-soft:#3d1919;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 4px 16px rgba(0,0,0,.25); --shadow-lg:0 10px 40px rgba(0,0,0,.5);
  color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0b1222; --surface:#131d33; --sunk:#1a2742; --line:#26365a; --line-2:#33466f;
  --fg:#eaf0fc; --muted:#9dabc6; --soft:#71809c;
  --brand:#6f9bff; --brand-2:#8bb0ff; --brand-ink:#0b1222; --brand-soft:#1b2c54;
  --accent:#ff9a57; --accent-soft:#3a2415; --gold:#f5c84b; --gold-soft:#3a3013;
  --good:#4fd39a; --good-soft:#11342a; --bad:#ff7b7b; --bad-soft:#3d1919;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 4px 16px rgba(0,0,0,.25); --shadow-lg:0 10px 40px rgba(0,0,0,.5);
  color-scheme:dark}

*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--f-body);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;cursor:pointer}
a{color:var(--brand)}
:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
h1,h2,h3{font-family:var(--f-display);font-weight:400;margin:0;line-height:1.15;text-wrap:balance}
h2{font-size:22px} h3{font-size:18px}
p{margin:0}
code{font-size:.9em;background:var(--sunk);padding:1px 5px;border-radius:5px}
.he{font-family:var(--f-he);direction:rtl;unicode-bidi:isolate}
.muted{color:var(--muted)} .note{font-size:13px;color:var(--muted)}
.label{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:500}
.ico{width:20px;height:20px;flex:none;display:inline-block;vertical-align:middle}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.boot{display:grid;place-items:center;min-height:70vh;color:var(--muted)}

/* ---------- Barre d'application ---------- */
.appbar{position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.appbar-in{max-width:1080px;margin:0 auto;padding:10px max(16px,env(safe-area-inset-left));display:flex;align-items:center;gap:16px}
.logo{display:flex;align-items:center;gap:10px;font-family:var(--f-display);font-size:20px;color:var(--fg);text-decoration:none;border:0;background:none;padding:0}
.logo-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--brand),#3b7bff);color:#fff;display:grid;place-items:center;font-family:var(--f-he);font-size:22px;font-weight:700;box-shadow:0 2px 8px rgba(31,79,184,.35)}
.logo small{font-family:var(--f-he);color:var(--brand);font-size:18px}
.tabs{display:flex;gap:2px;margin-left:8px}
.tabs button{border:0;background:transparent;padding:8px 12px;border-radius:10px;color:var(--muted);font-weight:500;font-size:15px;display:flex;align-items:center;gap:7px;position:relative}
.tabs button:hover{background:var(--sunk);color:var(--fg)}
.tabs button[aria-current="true"]{color:var(--brand);background:var(--brand-soft)}
.tabs .n{position:absolute;top:2px;right:2px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--accent);color:#fff;font-size:10.5px;line-height:17px;text-align:center;font-weight:700}
.bar-stats{margin-left:auto;display:flex;align-items:center;gap:8px}
.pill{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-weight:500;font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.pill.fire{color:var(--accent)} .pill.fire.off{color:var(--soft)}
.pill.lvl{gap:8px;padding-left:4px}
.lvl-dot{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:700;background:var(--tier,var(--brand))}
.avatar{width:34px;height:34px;border-radius:50%;border:0;background:var(--brand-soft);color:var(--brand);font-weight:700;display:grid;place-items:center}
.ring-mini{width:34px;height:34px;flex:none}

/* ---------- Page ---------- */
.page{max-width:760px;margin:0 auto;padding:20px max(16px,env(safe-area-inset-left)) calc(48px + var(--nav-h));display:flex;flex-direction:column;gap:18px}
.syncbar{max-width:760px;margin:12px auto 0;font-size:13px;padding:9px 14px;border-radius:10px;background:var(--accent-soft);width:calc(100% - 32px)}
.syncbar.err{background:var(--bad-soft)}
.section-h{display:flex;justify-content:space-between;align-items:flex-end;gap:12px}
.section-h p{font-size:14px;color:var(--muted)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:18px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:12px;min-width:0}
.card.flat{box-shadow:none}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.row>.btn{flex:1;min-width:140px}
.stack{display:flex;flex-direction:column;gap:12px}

/* ---------- Boutons ---------- */
.btn{border:0;border-radius:var(--r-sm);padding:13px 18px;font-weight:500;background:var(--brand);color:var(--brand-ink);font-size:16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;box-shadow:0 2px 0 color-mix(in srgb,var(--brand) 60%,#000);transition:transform .08s,filter .15s}
.btn:hover{filter:brightness(1.06)} .btn:active{transform:translateY(1px)}
.btn.ghost{background:var(--sunk);color:var(--fg);box-shadow:none}
.btn.line{background:transparent;color:var(--brand);border:1.5px solid var(--line-2);box-shadow:none}
.btn.accent{background:var(--accent);color:#fff;box-shadow:0 2px 0 color-mix(in srgb,var(--accent) 60%,#000)}
.btn.good{background:var(--good);color:#fff;box-shadow:0 2px 0 color-mix(in srgb,var(--good) 60%,#000)}
.btn.danger{background:var(--bad);color:#fff;box-shadow:none}
.btn.white{background:#fff;color:var(--brand);box-shadow:0 2px 0 rgba(0,0,0,.15)}
.btn.small{padding:8px 13px;font-size:14px;border-radius:10px}
.btn.block{width:100%}
.btn:disabled{opacity:.45;cursor:default;filter:none;transform:none}
.back{border:0;background:none;color:var(--brand);font-weight:500;padding:0;align-self:flex-start;display:inline-flex;align-items:center;gap:6px}
.linkbtn{border:0;background:none;color:var(--brand);font-weight:500;padding:0;text-decoration:underline;text-underline-offset:3px}

/* ---------- Barres, anneaux, étoiles ---------- */
.bar{flex:1 1 auto;height:10px;border-radius:99px;background:var(--sunk);overflow:hidden;min-width:40px}
.bar>i{display:block;height:100%;border-radius:99px;background:var(--accent);transition:width .6s cubic-bezier(.2,.8,.2,1);max-width:100%}
.level-card .bar,.card>.bar,.stat .bar,.prog-box .bar,.course-hero .bar{flex:none}
.bar.good>i{background:var(--good)} .bar.brand>i{background:var(--brand)} .bar.thin{height:6px}
.stars{display:inline-flex;gap:2px;color:var(--line-2)} .stars .on{color:var(--gold)} .stars svg{width:16px;height:16px}
.ring{transform:rotate(-90deg)} .ring circle{fill:none;stroke-linecap:round}
.ring .track{stroke:var(--sunk)} .ring .val{transition:stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1)}

/* ---------- Accueil ---------- */
.hello{display:flex;justify-content:space-between;align-items:flex-end;gap:12px}
.hello h1{font-size:30px}
.hello .he{font-size:22px;color:var(--brand)}
.level-card{position:relative;overflow:hidden;border-radius:20px;padding:22px;color:#fff;background:linear-gradient(135deg,#1a3f99 0%,#2f64dc 60%,#3f7dff 100%);box-shadow:0 8px 30px rgba(31,79,184,.3);display:flex;flex-direction:column;gap:14px}
.level-card::after{content:"א ב ג ד ה ו ז ח ט י";position:absolute;right:-20px;top:-14px;font-family:var(--f-he);font-size:88px;line-height:1;opacity:.07;white-space:nowrap;direction:rtl;pointer-events:none}
.level-top{display:flex;align-items:center;gap:16px}
.medal{width:66px;height:66px;border-radius:50%;flex:none;display:grid;place-items:center;font-family:var(--f-display);font-size:28px;background:var(--tier,#fff);color:#fff;border:4px solid rgba(255,255,255,.85);box-shadow:0 4px 14px rgba(0,0,0,.2)}
.level-name{display:flex;flex-direction:column;gap:2px;min-width:0}
.level-name small{opacity:.85;font-size:13px;letter-spacing:.06em;text-transform:uppercase}
.level-name b{font-family:var(--f-display);font-weight:400;font-size:26px;line-height:1.1}
.level-name .he{font-size:18px;opacity:.9;align-self:flex-start}
.level-card .bar{height:14px;background:rgba(255,255,255,.22)}
.level-card .bar>i{background:linear-gradient(90deg,#ffd36b,#ffb02e)}
.level-meta{display:flex;justify-content:space-between;gap:10px;font-size:14px;opacity:.95;font-variant-numeric:tabular-nums;flex-wrap:wrap}
.stat{display:flex;flex-direction:column;gap:6px}
.stat .big{font-family:var(--f-display);font-size:30px;line-height:1}
.stat .big small{font-family:var(--f-body);font-size:14px;color:var(--muted)}
.stat.fire .big{color:var(--accent)} .stat.goal .big{color:var(--brand)} .stat.learned .big{color:var(--good)}
.stat-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.week{display:flex;gap:4px;justify-content:space-between}
.week span{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;color:var(--soft)}
.week i{width:20px;height:20px;border-radius:50%;background:var(--sunk);display:grid;place-items:center}
.week i.on{background:var(--accent);color:#fff}
.week i.today{box-shadow:0 0 0 2px var(--accent)}
.week i svg{width:12px;height:12px}
.goal-wrap{display:flex;align-items:center;gap:12px}
.goal-wrap .ring{width:62px;height:62px;flex:none}
.next{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center}
.next .bubble{width:64px;height:64px;border-radius:18px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-family:var(--f-he);font-size:22px;font-weight:700;text-align:center;line-height:1.05;padding:4px}
.next h3{font-size:20px}
.quick{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.qbtn{border:1px solid var(--line);background:var(--surface);border-radius:var(--r);padding:14px;text-align:left;display:flex;flex-direction:column;gap:6px;box-shadow:var(--shadow)}
.qbtn:disabled{opacity:.55;cursor:default}
.qbtn .qi{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand)}
.qbtn.err .qi{background:var(--bad-soft);color:var(--bad)} .qbtn.due .qi{background:var(--accent-soft);color:var(--accent)}
.qbtn .qtxt{display:flex;flex-direction:column;gap:4px;min-width:0}
.qbtn b{font-weight:500} .qbtn small{color:var(--muted);font-size:13px}
.qbtn .count{font-family:var(--f-display);font-size:22px;line-height:1}

/* ---------- Parcours ---------- */
.unit{display:flex;flex-direction:column;gap:10px}
.unit-h{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line)}
.unit-h .num{width:38px;height:38px;border-radius:12px;background:var(--brand);color:#fff;display:grid;place-items:center;font-family:var(--f-display);font-size:18px;flex:none}
.unit-h .t{flex:1;min-width:0}
.unit-h .t b{font-family:var(--f-display);font-weight:400;font-size:19px;display:block}
.unit-h .t small{color:var(--muted);font-size:13px}
.unit-h .he{color:var(--brand);font-size:18px}
.courses{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;list-style:none;margin:0;padding:0}
.course{width:100%;height:100%;text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:var(--r);padding:14px;display:grid;grid-template-columns:auto 1fr;gap:4px 12px;align-items:center;box-shadow:var(--shadow);transition:border-color .15s,transform .15s}
.course:hover{border-color:var(--brand);transform:translateY(-1px)}
.course .cring{grid-row:span 3;position:relative;width:52px;height:52px}
.course .cring svg{width:52px;height:52px}
.course .cring span{position:absolute;inset:0;display:grid;place-items:center;font-family:var(--f-he);font-size:15px;font-weight:700;color:var(--brand);direction:rtl;line-height:1}
.course b{font-weight:500;line-height:1.25}
.course small{color:var(--muted);font-size:12.5px;font-variant-numeric:tabular-nums}
.course .meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.course.reco{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft),var(--shadow)}
.course.done .cring span{color:var(--good)}
.course.mine{border-style:dashed}
.tag{font-size:11px;padding:2px 8px;border-radius:99px;background:var(--accent-soft);color:var(--accent);font-weight:500;white-space:nowrap}
.tag.good{background:var(--good-soft);color:var(--good)} .tag.bad{background:var(--bad-soft);color:var(--bad)} .tag.brand{background:var(--brand-soft);color:var(--brand)} .tag.plain{background:var(--sunk);color:var(--muted)}
.search{display:flex;gap:8px}
.search input{flex:1}

/* ---------- Fiche cours ---------- */
.course-hero{border-radius:20px;padding:22px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:12px}
.course-hero .top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.course-hero h1{font-size:28px}
.course-hero .he{font-size:28px;color:var(--brand)}
.rule{background:var(--brand-soft);border-radius:var(--r);padding:18px;display:flex;flex-direction:column;gap:10px}
.rule .label{color:var(--brand)}
.rgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:6px}
.rgrid div{background:var(--surface);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column}
.rgrid .he{font-size:20px;text-align:right}
.rgrid i{font-style:normal;color:var(--brand);font-size:14px}
.rgrid small{color:var(--muted);font-size:12px}
.tip{font-size:14px;background:var(--accent-soft);border-radius:12px;padding:10px 14px}
.tip b{color:var(--accent)}
.list{display:flex;flex-direction:column}
.lexrow{display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:11px 0;border-bottom:1px solid var(--line);align-items:center}
.lexrow:last-child{border-bottom:0}
.lexrow .fr{min-width:0}
.lexrow .he{font-size:21px;text-align:right}
.lexrow .tr{grid-column:1/-1;font-size:14px;color:var(--brand);display:flex;justify-content:space-between;gap:10px;align-items:center}
.lexrow .note{grid-column:1/-1}
.acts{display:inline-flex;gap:6px;align-items:center;flex:none}
.mini{border:0;background:var(--brand-soft);color:var(--brand);border-radius:999px;min-width:32px;height:32px;display:grid;place-items:center;flex:none;padding:0 9px;font-size:12px;font-weight:500}
.mini svg{width:16px;height:16px}
.mini.del{background:var(--sunk);color:var(--muted)} .mini.del.armed{background:var(--bad);color:#fff}
.dots{display:inline-flex;gap:3px;vertical-align:middle}
.dots i{width:7px;height:7px;border-radius:50%;background:var(--sunk)} .dots i.on{background:var(--good)}

/* ---------- Exercices ---------- */
.stage{display:flex;flex-direction:column;gap:16px;padding-bottom:170px}
.progress{display:flex;align-items:center;gap:12px}
.progress .bar{height:14px}
.progress .bar>i{background:linear-gradient(90deg,var(--good),#3fd08c)}
.x{border:0;background:var(--sunk);width:38px;height:38px;border-radius:50%;font-size:20px;line-height:1;flex:none;color:var(--muted)}
.count{font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.combo{align-self:center;font-family:var(--f-display);color:var(--accent);font-size:18px;display:flex;align-items:center;gap:6px;animation:pop .35s}
@keyframes pop{0%{transform:scale(.6);opacity:0}100%{transform:scale(1);opacity:1}}
.qcard{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:26px 18px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;box-shadow:var(--shadow)}
.qcard .he{font-size:clamp(30px,8vw,46px);line-height:1.35;font-weight:700}
.qcard .he.letter{font-size:clamp(70px,20vw,110px);line-height:1.1}
.qcard .tr{font-size:18px;color:var(--brand);font-weight:500}
.qcard .fr{font-size:18px} .qcard .fr.q{font-size:24px;font-weight:500}
.qcard .src{font-size:12px;color:var(--soft)}
.speakrow{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.speak{border:0;background:var(--brand-soft);color:var(--brand);border-radius:999px;padding:9px 16px;font-weight:500;display:inline-flex;align-items:center;gap:8px}
.speak svg{width:18px;height:18px}
.speak.big{padding:16px 26px;font-size:18px}
.speak.big svg{width:26px;height:26px}
.opts{display:grid;gap:10px}
.opt{border:2px solid var(--line);border-bottom-width:4px;background:var(--surface);border-radius:14px;padding:13px 16px;text-align:left;font-size:16px;display:flex;align-items:center;gap:12px;transition:border-color .12s,background .12s}
.opt:hover:not(:disabled){border-color:var(--brand);background:var(--brand-soft)}
.opt .k{width:26px;height:26px;border-radius:8px;border:1.5px solid var(--line-2);display:grid;place-items:center;font-size:13px;color:var(--soft);flex:none}
.opt .body{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.opt .he{font-size:23px;text-align:right}
.opt small{color:var(--muted)}
.opt.ok{border-color:var(--good);background:var(--good-soft)} .opt.ko{border-color:var(--bad);background:var(--bad-soft)}
.opt:disabled{cursor:default}
.opts.words{grid-template-columns:repeat(2,1fr)}
.opts.words .opt{justify-content:center}
.gapline{font-size:clamp(26px,7vw,36px)}
.gapline u{text-decoration:none;color:var(--accent);border-bottom:3px solid var(--accent);padding:0 14px}
.build{min-height:66px;border-bottom:2px solid var(--line-2);padding:10px 4px;display:flex;flex-wrap:wrap;gap:8px;direction:rtl;align-content:flex-start}
.bank{display:flex;flex-wrap:wrap;gap:8px;direction:rtl;justify-content:center}
.word{border:2px solid var(--line);border-bottom-width:4px;background:var(--surface);border-radius:12px;padding:6px 14px;font-family:var(--f-he);font-size:23px}
.word:disabled{opacity:.2}
.pairs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pairs .col{display:flex;flex-direction:column;gap:10px}
.pairs .opt{justify-content:center;text-align:center;min-height:60px}
.pairs .opt.sel{border-color:var(--brand);background:var(--brand-soft)}
.pairs .opt.done{opacity:.35;border-color:var(--good)}
.pairs .opt.shake{animation:shake .3s}
@keyframes shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:40;padding:18px max(16px,env(safe-area-inset-left)) calc(18px + env(safe-area-inset-bottom));border-top:2px solid var(--line);background:var(--surface);animation:up .25s ease-out}
@keyframes up{from{transform:translateY(100%)}to{transform:none}}
.sheet-in{max-width:760px;margin:0 auto;display:grid;grid-template-columns:1fr auto;gap:8px 16px;align-items:center}
.sheet.ok{background:var(--good-soft);border-color:var(--good)} .sheet.ko{background:var(--bad-soft);border-color:var(--bad)}
.sheet h3{font-size:22px;display:flex;align-items:center;gap:8px}
.sheet.ok h3{color:var(--good)} .sheet.ko h3{color:var(--bad)}
.sheet .he{font-size:22px;align-self:flex-start}
.sheet .info{display:flex;flex-direction:column;gap:2px;min-width:0}
.sheet small{color:var(--muted)}
.sheet .btn{min-width:170px}
.timer{font-family:var(--f-display);font-size:22px;color:var(--accent);font-variant-numeric:tabular-nums;min-width:48px;text-align:right}

/* ---------- Fin de série ---------- */
.result{text-align:center;display:flex;flex-direction:column;gap:16px;align-items:center;padding-block:10px}
.result h1{font-size:34px}
.result .he{font-size:26px;color:var(--brand)}
.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%}
.rs{border-radius:14px;padding:12px;border:2px solid;display:flex;flex-direction:column;gap:2px}
.rs small{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.rs b{font-family:var(--f-display);font-weight:400;font-size:26px}
.rs.xp{border-color:var(--gold);color:var(--gold)} .rs.acc{border-color:var(--good);color:var(--good)} .rs.cb{border-color:var(--accent);color:var(--accent)}
.lvl-up{width:100%;border-radius:18px;padding:18px;background:linear-gradient(135deg,#ffb02e,#e9722b);color:#fff;display:flex;align-items:center;gap:14px;text-align:left;animation:pop .5s}
.lvl-up .medal{width:58px;height:58px;font-size:24px}
.lvl-up .he{color:#fff}
.lvl-up b{font-family:var(--f-display);font-weight:400;font-size:22px;display:block}
.prog-box{width:100%;text-align:left}
.badge-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}

/* ---------- Progrès / trophées ---------- */
.ladder{display:flex;flex-direction:column;gap:6px}
.step{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--surface)}
.step .medal{width:38px;height:38px;font-size:15px;border-width:2px}
.step.locked{opacity:.55} .step.locked .medal{background:var(--sunk)!important;color:var(--soft);border-color:var(--line)}
.step.current{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.step b{font-weight:500}
.step small{color:var(--muted)}
.chart{display:flex;align-items:flex-end;gap:5px;height:130px;padding-top:10px}
.chart div{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;height:100%;justify-content:flex-end}
.chart i{width:100%;max-width:28px;border-radius:6px 6px 2px 2px;background:var(--brand);min-height:3px;opacity:.9}
.chart i.today{background:var(--accent)}
.chart span{font-size:10px;color:var(--soft)}
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.badge{border:1px solid var(--line);border-radius:14px;padding:14px 10px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:6px;background:var(--surface)}
.badge .bi{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#ffd36b,#e3a008);color:#fff;box-shadow:0 3px 10px rgba(227,160,8,.35)}
.badge .bi svg{width:26px;height:26px}
.badge b{font-weight:500;font-size:14px;line-height:1.2}
.badge small{color:var(--muted);font-size:12px;line-height:1.3}
.badge.locked .bi{background:var(--sunk);color:var(--soft);box-shadow:none}
.badge.locked b{color:var(--muted)}
.chip-badge{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;border-radius:999px;background:var(--gold-soft);color:var(--fg);font-size:14px;font-weight:500}
.chip-badge .bi{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--gold);color:#fff}
.chip-badge .bi svg{width:14px;height:14px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}
.kpi{background:var(--sunk);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column}
.kpi b{font-family:var(--f-display);font-size:24px;font-weight:400;color:var(--brand)}
.kpi small{color:var(--muted)}
.rank{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.rank .pos{font-family:var(--f-display);color:var(--muted);text-align:center}
.rank.me{background:var(--brand-soft);border-radius:10px;padding-inline:10px;border-bottom-color:transparent}
.rank.top1 .pos{color:var(--gold)}

/* ---------- Formulaires ---------- */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:13px;color:var(--muted);font-weight:500}
textarea,input[type=text],input[type=search],input[type=password],input[type=email],select{width:100%;border:1.5px solid var(--line);background:var(--surface);color:var(--fg);border-radius:12px;padding:12px 14px;font:inherit}
textarea:focus,input:focus,select:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px var(--brand-soft)}
textarea{min-height:86px;resize:vertical}
input.he-in{font-family:var(--f-he);font-size:22px;direction:rtl}
.pw-row{position:relative} .pw-row input{padding-right:84px}
.pw-row button{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:var(--sunk);border-radius:8px;padding:6px 10px;font-size:13px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.pick{border:1.5px solid var(--line);background:var(--surface);border-radius:99px;padding:6px 12px;font-size:14px}
.pick[aria-pressed="true"]{background:var(--brand);color:var(--brand-ink);border-color:var(--brand)}
.seg{display:flex;gap:4px;background:var(--sunk);padding:4px;border-radius:12px}
.seg button{flex:1;border:0;background:transparent;padding:9px 4px;border-radius:9px;font-weight:500;color:var(--muted);font-size:14px}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--fg);box-shadow:0 1px 3px rgba(0,0,0,.1)}
.sw{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
.sw input{width:22px;height:22px;accent-color:var(--brand);flex:none}
.msg{font-size:14px;padding:10px 12px;border-radius:10px;background:var(--sunk)}
.msg.err{background:var(--bad-soft);color:var(--bad)} .msg.ok{background:var(--good-soft);color:var(--good)}
.status{font-size:14px;color:var(--muted)} .status.err{color:var(--bad)}
.table{width:100%;border-collapse:collapse;font-size:13px}
.table th,.table td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line);vertical-align:middle}
.table th{color:var(--muted);font-weight:500}

/* ---------- Connexion ---------- */
.auth{min-height:100vh;display:grid;grid-template-columns:1.05fr 1fr}
.auth-hero{position:relative;overflow:hidden;background:linear-gradient(150deg,#132f75 0%,#1f4fb8 55%,#3b7bff 100%);color:#fff;padding:48px;display:flex;flex-direction:column;justify-content:space-between;gap:30px}
.auth-hero::before{content:"ש ל ו ם  ע ב ר י ת  א ב ג ד ה ו ז ח ט י כ ל מ נ ס ע פ צ ק ר ש ת";position:absolute;inset:-40px;font-family:var(--f-he);font-size:64px;line-height:1.5;opacity:.07;word-spacing:18px;direction:rtl;pointer-events:none}
.auth-hero>*{position:relative}
.auth-hero .logo{color:#fff}
.auth-hero .logo small{color:#bcd0ff}
.auth-hero h1{font-size:clamp(32px,4vw,46px);line-height:1.08}
.auth-hero h1 em{font-style:normal;color:#ffc65c}
.auth-hero p.lead{font-size:18px;opacity:.9;max-width:460px}
.feats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px}
.feats li{display:flex;gap:12px;align-items:flex-start}
.feats .fi{width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.14);display:grid;place-items:center;flex:none}
.feats b{display:block;font-weight:500}
.feats small{opacity:.8;font-size:14px}
.auth-numbers{display:flex;gap:26px;flex-wrap:wrap}
.auth-numbers div{display:flex;flex-direction:column}
.auth-numbers b{font-family:var(--f-display);font-weight:400;font-size:30px;color:#ffc65c;line-height:1}
.auth-numbers small{opacity:.8;font-size:13px}
.auth-side{display:grid;place-items:center;padding:40px 20px}
.auth-box{width:100%;max-width:410px;display:flex;flex-direction:column;gap:16px}
.auth-box h2{font-size:28px}
.auth-box form{display:flex;flex-direction:column;gap:14px}
.auth-mobile-logo{display:none}

/* ---------- Onboarding ---------- */
.onb{max-width:620px;margin:0 auto;padding:36px 16px;display:flex;flex-direction:column;gap:20px}
.onb h1{font-size:32px}
.choices{display:grid;gap:10px}
.choice{border:2px solid var(--line);border-bottom-width:4px;background:var(--surface);border-radius:16px;padding:16px;text-align:left;display:grid;grid-template-columns:auto 1fr;gap:4px 14px;align-items:center}
.choice .ci{grid-row:span 2;width:48px;height:48px;border-radius:14px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-family:var(--f-he);font-size:22px;font-weight:700}
.choice b{font-weight:500;font-size:17px} .choice small{color:var(--muted)}
.choice[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-soft)}
.steps-dots{display:flex;gap:6px} .steps-dots i{width:28px;height:6px;border-radius:9px;background:var(--line)} .steps-dots i.on{background:var(--brand)}

body.onboarding .tabs,body.onboarding .bar-stats{display:none!important}
/* ---------- Toasts, modale, confettis ---------- */
#toasts{position:fixed;top:72px;left:0;right:0;z-index:60;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;padding:0 16px}
.toast{pointer-events:auto;display:flex;align-items:center;gap:12px;padding:10px 16px 10px 10px;border-radius:14px;background:var(--surface);box-shadow:var(--shadow-lg);border:1px solid var(--line);max-width:440px;animation:drop .35s cubic-bezier(.2,.9,.3,1.3)}
.toast .bi{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#ffd36b,#e3a008);color:#fff;flex:none}
.toast .bi svg{width:20px;height:20px}
.toast.goal .bi{background:linear-gradient(135deg,#ffa25c,#e9722b)}
.toast b{display:block;font-weight:500} .toast small{color:var(--muted)}
.toast.out{opacity:0;transform:translateY(-10px);transition:.3s}
@keyframes drop{from{transform:translateY(-30px);opacity:0}to{transform:none;opacity:1}}
.confetti{position:fixed;inset:0;pointer-events:none;z-index:70;overflow:hidden}
.confetti i{position:absolute;top:-12px;width:9px;height:14px;border-radius:2px;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
.voice-note{position:fixed;left:16px;right:16px;bottom:calc(16px + var(--nav-h));max-width:640px;margin:auto;z-index:50}

/* ---------- Mobile ---------- */
@media (max-width:820px){
  .auth{grid-template-columns:1fr}
  .auth-hero{display:none}
  .auth-mobile-logo{display:flex}
}
@media (max-width:760px){
  :root{--nav-h:64px}
  .tabs{position:fixed;left:0;right:0;bottom:0;margin:0;z-index:35;background:var(--surface);border-top:1px solid var(--line);padding:6px 6px calc(6px + env(safe-area-inset-bottom));justify-content:space-around}
  .tabs button{flex-direction:column;gap:2px;font-size:11px;padding:6px 4px;flex:1}
  .tabs button .ico{width:22px;height:22px}
  .tabs .n{right:calc(50% - 22px)}
  .logo-text{display:none}
  .pill.lvl .lvl-txt{display:none}
  .appbar{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--bg)}
  .grid-3{grid-template-columns:1fr 1fr}
  .grid-3>.stat.fire{grid-column:1/-1}
  .quick{grid-template-columns:1fr}
  .qbtn{flex-direction:row;align-items:center}
  .qbtn .qtxt{display:flex;flex-direction:column;flex:1}
  .stage{padding-bottom:200px}
  .sheet-in{grid-template-columns:1fr}
  .sheet .btn{width:100%}
  body.in-session .tabs{display:none}
}
@media (max-width:480px){
  .courses,.grid-2{grid-template-columns:1fr}
  .goal-wrap{flex-direction:column;align-items:flex-start;gap:8px}
  .goal-wrap .ring{width:50px;height:50px}
  .stat .big{font-size:26px}
  .hello h1{font-size:25px}
  .level-card{padding:18px}
  .medal{width:56px;height:56px;font-size:24px}
  .level-name b{font-size:22px}
  .result-stats{grid-template-columns:repeat(3,1fr);gap:6px}
  .rs b{font-size:21px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---------- Immersion : libellés hébreu en gros, « prononciation · français » en petit ---------- */
.bil{display:inline-flex;flex-direction:column;align-items:center;line-height:1.1;gap:3px;min-width:0}
.bil .he{font-family:var(--f-he);font-size:1.18em;font-weight:700}
.bil small{font-family:var(--f-body);font-size:11.5px;font-weight:400;opacity:.78;line-height:1.2;text-align:center}
.btn .bil small{opacity:.85}
.bil small i{font-style:normal}
.btn.danger .bil small,.btn.good .bil small,.btn.accent .bil small{opacity:.95}
.qbtn .bil,.unit-h .bil{align-items:flex-start}
.qbtn .bil .he{font-size:20px}
.bih{display:flex;flex-direction:column;gap:3px;align-items:flex-start}
.bih .he{font-family:var(--f-he);font-weight:700;line-height:1.1}
h1.bih .he{font-size:32px} h2.bih .he{font-size:26px} h3.bih .he{font-size:21px}
.bih small{font-family:var(--f-body);font-size:13px;font-weight:400;color:var(--muted);letter-spacing:0;text-transform:none}
.bih.big{align-items:center} .bih.big .he{font-size:42px} .bih.big small{font-size:15px}
.bl{display:inline-flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.bl .he{font-family:var(--f-he);font-size:16px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--fg)}
.rule .bl .he{color:var(--brand)}
.qcard .bl{justify-content:center}
.qcard .bl .he{font-size:20px}
.tabs .bil{gap:1px} .tabs .bil .he{font-size:16px} .tabs .bil small{font-size:10.5px;white-space:nowrap}
@media (max-width:1180px){.appbar .logo-text{display:none}}
@media (max-width:980px) and (min-width:761px){.tabs .bil small i.tl{display:none}.tabs button{padding:6px 9px}.tabs button>.ico{display:none}}
.tabs button{padding:6px 12px}
.sheet h3{flex-wrap:wrap} .sheet h3 .he{font-size:26px} .sheet-fr{font-family:var(--f-body);font-size:13px;color:var(--muted);font-weight:400}
.speak .bil{align-items:flex-start} .speak .bil .he{font-size:17px}
@media (max-width:760px){
  .tabs .bil small{font-size:9.5px} .tabs .bil small i.tl{display:none}
  .tabs .bil .he{font-size:14px}
  h1.bih .he{font-size:28px}
}

/* ---------- Méthode : illustrations, histoires, contrôle, catégories ---------- */
.scene{width:100%;height:auto;display:block;border-radius:16px;background:var(--sunk)}
.scene.thumb{border-radius:12px}
.story-card{display:grid;grid-template-columns:minmax(0,220px) 1fr;gap:16px;align-items:center}
.story-panel{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:14px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:12px;align-items:center;text-align:center}
.story-he{border:0;background:none;padding:4px 8px;font-size:clamp(26px,6.5vw,36px);line-height:1.45;font-weight:700;color:var(--fg);cursor:pointer;border-radius:10px}
.story-he:hover{background:var(--brand-soft)}
.story-tr{color:var(--brand);font-size:17px;font-weight:500}
.story-fr{font-size:17px;color:var(--muted)}
.story-toggles{justify-content:center}
.story-toggles .pick{padding:6px 14px}
.story-toggles .pick .bil small{font-size:10.5px}
.story-dots{display:flex;gap:5px;justify-content:center;flex-wrap:wrap}
.story-dots i{width:22px;height:6px;border-radius:9px;background:var(--line)}
.story-dots i.done{background:var(--good)} .story-dots i.on{background:var(--brand)} .story-dots i.q{width:10px;background:var(--line-2)} .story-dots i.q.done{background:var(--good)} .story-dots i.q.on{background:var(--accent)}
.pic{font-size:96px;line-height:1.1}
.pic.small{font-size:54px}
.cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.cat{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:10px 12px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;text-align:left}
.cat:hover{border-color:var(--bad)}
.cat .qi{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--bad-soft);color:var(--bad)}
.cat .count{font-family:var(--f-display);font-size:22px;color:var(--bad);font-weight:400}
.cat .bil small .bil{display:inline}
.ctrl-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:99px;background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:14px}
.ctrl-badge .he{font-size:16px}
.ctrl-badge.small{padding:3px 10px;font-size:13px;white-space:nowrap}
.progress.ctrl .bar>i{background:linear-gradient(90deg,var(--accent),#ffb02e)}
.ctrl-intro h2{font-size:26px}
.ctrl-score{font-family:var(--f-display);font-size:34px;padding:4px 14px;border-radius:14px}
.ctrl-score.good{background:var(--good-soft);color:var(--good)} .ctrl-score.mid{background:var(--accent-soft);color:var(--accent)} .ctrl-score.low{background:var(--bad-soft);color:var(--bad)}
.ctrl-res{width:100%;text-align:left}
.opt.sel{border-color:var(--brand);background:var(--brand-soft)}
.method{flex-direction:row;align-items:flex-start;gap:14px}
.method .qi,.method-link .qi{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);flex:none}
.method-link{flex-direction:row;align-items:center;gap:14px;text-align:left;cursor:pointer;border:1px solid var(--line)}
.method-link>.bil{flex:1}
.method-link:hover{border-color:var(--brand)}
@media (max-width:560px){.story-card{grid-template-columns:1fr}.pic{font-size:80px}}

/* ---------- Signalement ---------- */
.mini.flag{background:transparent;color:var(--soft)} .mini.flag:hover{color:var(--bad);background:var(--bad-soft)}
.sheet-acts{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.sheet-acts .linkbtn{font-size:13px;color:var(--muted);display:inline-flex;align-items:center;gap:4px}
.sheet-acts .linkbtn .ico{width:14px;height:14px}
.story-panel .linkbtn{font-size:13px;color:var(--muted);display:inline-flex;gap:4px;align-items:center} .story-panel .linkbtn .ico{width:14px;height:14px}
.modal{position:fixed;inset:0;z-index:80;background:rgba(8,14,30,.55);display:grid;place-items:center;padding:16px;animation:fade .15s}
@keyframes fade{from{opacity:0}}
.modal-card{width:100%;max-width:480px;background:var(--surface);border-radius:20px;padding:20px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow-lg);max-height:90vh;overflow:auto}
.modal-card h3{display:flex;align-items:center;gap:8px}
.modal-card .he{font-size:24px}
@media (max-width:760px){.sheet-acts{align-items:stretch}}
.btn .bil .he,.btn .bil small{color:inherit!important}
.course-hero .btn .bil .he{font-size:1.18em}

/* ---------- Illustrations coloriage ---------- */
.wart{display:inline-block;line-height:0;flex:none}
.wart svg{width:100%;height:100%;display:block}
.wart.pic{width:132px;height:132px}
.wart.pic.small{width:78px;height:78px}
.wart.inline{width:28px;height:28px;vertical-align:-8px;margin-right:8px}
.scene{border:3px solid #1e2230}

/* ---------- Famille ---------- */
.favatar{display:inline-grid;place-items:center;border-radius:50%;background:var(--av);color:#fff;font-family:var(--f-display);border:3px solid #1e2230;flex:none;box-shadow:0 2px 0 rgba(0,0,0,.15)}
.fam-hero{gap:14px}.fam-hero-art .scene{max-height:220px}
.fam-feats{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.fam-feats li{display:flex;gap:10px;align-items:flex-start}.fam-feats .ico{color:var(--brand);margin-top:2px}
.yourturn{border:2px solid var(--accent);background:var(--accent-soft)}
.duel-row{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}
.podium{display:flex;justify-content:center;align-items:flex-end;gap:14px;padding-top:26px}
.pod{display:flex;flex-direction:column;align-items:center;gap:4px;position:relative;min-width:92px;text-align:center}
.pod b{font-weight:500;font-size:14px}.pod-xp{font-family:var(--f-display);color:var(--brand);font-size:18px}
.pod-bar{width:100%;border:3px solid #1e2230;border-bottom:0;border-radius:12px 12px 0 0;display:grid;place-items:center;font-family:var(--f-display);font-size:24px;color:#fff}
.pod-1 .pod-bar{height:84px;background:#f5b82e}.pod-2 .pod-bar{height:62px;background:#b0bec5}.pod-3 .pod-bar{height:46px;background:#d39461}
.pod.me b{color:var(--brand)}
.crown{position:absolute;top:-26px;color:#f5b82e}.crown .ico{width:30px;height:30px;fill:#ffd36b}
.contrib{display:flex;height:10px;border-radius:99px;overflow:hidden;gap:2px}
.member{gap:10px}.member.me{border-color:var(--brand)}
.member-h{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}
.member-h>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.member-stats{display:flex;align-items:center;gap:8px}.goal-mini .ring{width:34px;height:34px}
.member-diff{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.member-acts .btn{flex:1;min-width:150px}
.cheers{display:flex;flex-wrap:wrap;gap:6px}.cheers .pick .he{font-size:15px;font-weight:700}
.medal.tiny{width:20px;height:20px;font-size:10px;border-width:2px;display:inline-grid;vertical-align:-5px;box-shadow:none}
.feed{display:flex;flex-direction:column;gap:2px}
.feed-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid var(--line);font-size:14px}
.feed-row:last-child{border-bottom:0}.feed-row small{color:var(--soft);white-space:nowrap}.feed-row.tome{background:var(--brand-soft);border-radius:10px;padding-inline:8px}
.feed-row .he{font-weight:700}
.invite{display:flex;align-items:center;gap:12px}
.invite .code{font-family:var(--f-display);font-size:30px;letter-spacing:.18em;padding:6px 16px;border:3px dashed var(--line-2);border-radius:14px}
.duel-vs{display:flex;align-items:center;justify-content:center;gap:16px}
.duel-vs .vs{font-family:var(--f-display);font-size:28px;color:var(--accent)}
.duel-res.win{border:2px solid var(--good);background:var(--good-soft)}.duel-res.lose{border:2px solid var(--line-2)}
.coach .fr.q{font-size:26px}
.coach-ans{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px;border-radius:14px;background:var(--brand-soft);width:100%}
.coach-ans .he{font-size:34px;font-weight:700}
@media (max-width:560px){.member-h{grid-template-columns:auto 1fr}.member-stats{grid-column:1/-1}.pod{min-width:76px}.invite .code{font-size:24px}}

/* ---------- Clarté : français d'abord, hébreu en appui ---------- */
.bil.fr1 .frl{font-weight:600;line-height:1.15}
.bil.fr1 small{font-size:11.5px;opacity:.85;display:flex;gap:4px;align-items:baseline;justify-content:center;flex-wrap:wrap}
.bil.fr1 small .he{font-size:13px;font-weight:700}
.qbtn .bil.fr1 small,.unit-h .bil.fr1 small,.cat .bil.fr1 small,.method-link .bil.fr1 small,.choice .bil small{justify-content:flex-start}
.qbtn .bil.fr1 .frl{font-size:16px}
.tabs .bil.fr1 .frl{font-size:14px}.tabs .bil.fr1 small .he{font-size:12px}
.bih.fr1 .frl{font-family:var(--f-display);line-height:1.15}
h1.bih.fr1 .frl{font-size:30px} h2.bih.fr1 .frl{font-size:23px} h3.bih.fr1 .frl{font-size:19px}
.bih.fr1 small{font-family:var(--f-body);font-size:13px;color:var(--muted)} .bih.fr1 small .he{font-size:15px;font-weight:700;color:var(--brand)}
.bih.big{align-items:center;text-align:center} .bih.fr1.big .frl{font-size:36px}
.bl.fr1>span:first-child{color:var(--muted)} .bl.fr1 .he{font-family:var(--f-he);font-size:14px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--brand)}
.sheet h3>span:not(.he){font-family:var(--f-display);font-size:24px}
.hint{font-size:13px;color:var(--muted);max-width:460px}
.hello-he{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.hello-he .he{font-size:22px;color:var(--brand)}.hello-he small{font-size:12px;color:var(--muted)}
.welcome-tip{background:var(--brand-soft);border-color:var(--brand)}
/* programme du jour */
.plan{border:2px solid var(--brand);gap:14px}
.plan-ring{position:relative;width:52px;height:52px;flex:none}.plan-ring .ring{width:52px;height:52px}
.plan-n{position:absolute;inset:0;display:grid;place-items:center;font-family:var(--f-display);font-size:15px}
.plan-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.plan-steps li{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:var(--surface)}
.plan-steps li.current{border:2px solid var(--brand);background:var(--brand-soft)}
.plan-steps li.done{opacity:.75}.plan-steps li.done b{text-decoration:line-through;text-decoration-color:var(--soft)}
.plan-steps li.none{opacity:.6}
.plan-ic{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-family:var(--f-display);background:var(--sunk);color:var(--muted)}
.plan-steps li.current .plan-ic{background:var(--brand);color:#fff}.plan-steps li.done .plan-ic{background:var(--good);color:#fff}.plan-ic .ico{width:18px;height:18px}
.plan-t{display:flex;flex-direction:column;gap:2px;min-width:0}.plan-t b{font-weight:500}.plan-t small{color:var(--muted);font-size:13px}
.big-cta{padding:16px 18px;font-size:18px}
.mini-stats .card{text-align:left;font:inherit;color:inherit;cursor:pointer}
.mini-stats .card:hover{border-color:var(--brand)}
/* démo du premier lancement */
.onb-demo{gap:6px}.onb-demo .he{font-size:46px}
.onb-arrow{font-size:12px;color:var(--accent);font-weight:500}
@media (max-width:560px){.plan-steps li{grid-template-columns:auto 1fr}.plan-steps li>.btn,.plan-steps li>.tag{grid-column:2;justify-self:start}}

.he-mini{font-size:13px;color:var(--brand);font-weight:700;margin-inline-start:4px}
@media (max-width:760px){
  .tabs{gap:0;padding-inline:2px}
  .tabs button{min-width:0;padding:6px 1px;overflow:hidden}
  .tabs .bil.fr1 .frl{font-size:12px;white-space:nowrap}
  .tabs .bil.fr1 small{font-size:10px}.tabs .bil.fr1 small .he{font-size:11px}
  .hello h1{font-size:24px}.hello-he .he{font-size:18px}
}

/* ---------- Mobile : tactile, plein écran, sessions sans distraction ---------- */
html,body{overscroll-behavior-y:none}
button,a,.opt,.word,.pick,label.sw{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.install{flex-direction:row;align-items:center;gap:14px;flex-wrap:wrap;border:2px dashed var(--brand)}
.install .qi{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);flex:none}
.install .stack{flex:1;min-width:180px}
@media (max-width:760px){
  :root{--nav-h:calc(62px + env(safe-area-inset-bottom))}
  .btn{min-height:48px}.btn.small{min-height:40px}
  .opt{min-height:56px;padding:12px 14px}
  .word{min-height:46px;padding:6px 16px}
  .page{padding-top:14px;gap:14px}
  .card{padding:16px}
  /* pendant un exercice : on retire la barre du haut, l'exercice prend tout l'écran */
  body.in-session .appbar{display:none}
  body.in-session .page{padding-top:max(12px,env(safe-area-inset-top))}
  body.in-session .progress{position:sticky;top:0;z-index:20;background:var(--bg);padding-block:8px}
  .qcard{padding:18px 14px;gap:10px}
  .qcard .fr.q{font-size:21px}
  .stage{padding-bottom:calc(210px + env(safe-area-inset-bottom))}
  .story-panel .scene{width:auto;max-width:100%;max-height:34vh;margin:0 auto}
  .story-he{font-size:28px}
  .result h1{font-size:28px}
  .result-stats{gap:6px}.rs{padding:10px 8px}.rs small{font-size:10px}
  .level-card{padding:16px}
  .section-h{flex-wrap:wrap}
  .modal{align-items:end;padding:0}.modal-card{border-radius:20px 20px 0 0;max-height:88vh;padding-bottom:calc(20px + env(safe-area-inset-bottom))}
  .auth-side{padding:28px 16px calc(28px + env(safe-area-inset-bottom))}
  .invite{flex-wrap:wrap}
}
@media (max-width:380px){.tabs .bil.fr1 .frl{font-size:11px}.opts.words{grid-template-columns:1fr 1fr}.pod{min-width:64px}}
