@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f1f3f6; --surface-3: #e8ebf0;
  --text: #0b1324; --text-2: #344054; --muted: #667085; --line: #e4e7ec; --line-2: #d0d5dd;
  --brand: #c8102e; --brand-ink: #ffffff; --brand-soft: #fdecee; --brand-dark: #a00d25;
  --navy: #0f1b3d; --navy-2: #1b2a57; --on-navy: #ffffff; --on-navy-2: #c7cfe4;
  --ok: #067647; --ok-soft: #dcfae6; --bad: #c01e2e; --bad-soft: #fee4e2; --warn: #b54708; --warn-soft: #fef0c7;
  --c-red: #c8102e; --c-blue: #2e5bba; --c-green: #067647; --c-amber: #b54708; --c-teal: #0e7090; --c-violet: #5b3fd1;
  --i-sky: #e8f0fb; --i-sky2: #c9dbf3; --i-red: #d52b1e; --i-navy: #1b2a57; --i-sand: #f3e3c3; --i-green: #4f9a6a; --i-green2: #a7d3b1;
  --i-white: #ffffff; --i-gold: #f2b134; --i-line: #d9dfe8; --i-blue: #5b8fd8;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 12px 32px -8px rgba(16,24,40,.18), 0 4px 8px -4px rgba(16,24,40,.06);
  --r: 16px; --r-sm: 12px; --fs: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f19; --surface: #131a29; --surface-2: #1a2234; --surface-3: #232c41;
    --text: #f2f4f7; --text-2: #d0d5dd; --muted: #98a2b3; --line: #232c41; --line-2: #344054;
    --brand: #f04461; --brand-ink: #1a0509; --brand-soft: #3b1219; --brand-dark: #ff6b82;
    --navy: #16213f; --navy-2: #1f2d55; --on-navy-2: #b4bed8;
    --ok: #47cd89; --ok-soft: #0f2e20; --bad: #f97066; --bad-soft: #3a1513; --warn: #fdb022; --warn-soft: #36270a;
    --c-red: #f04461; --c-blue: #7aa2f7; --c-green: #47cd89; --c-amber: #fdb022; --c-teal: #5ec9e8; --c-violet: #a48afb;
    --i-sky: #18233b; --i-sky2: #263759; --i-navy: #0f1730; --i-sand: #3d3527; --i-green: #2f6b47; --i-green2: #24493a;
    --i-white: #e9edf5; --i-line: #44506a; --i-blue: #3b67a8;
    --shadow-sm: none; --shadow: none; --shadow-lg: 0 12px 32px -8px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f19; --surface: #131a29; --surface-2: #1a2234; --surface-3: #232c41;
  --text: #f2f4f7; --text-2: #d0d5dd; --muted: #98a2b3; --line: #232c41; --line-2: #344054;
  --brand: #f04461; --brand-ink: #1a0509; --brand-soft: #3b1219; --brand-dark: #ff6b82;
  --navy: #16213f; --navy-2: #1f2d55; --on-navy-2: #b4bed8;
  --ok: #47cd89; --ok-soft: #0f2e20; --bad: #f97066; --bad-soft: #3a1513; --warn: #fdb022; --warn-soft: #36270a;
  --c-red: #f04461; --c-blue: #7aa2f7; --c-green: #47cd89; --c-amber: #fdb022; --c-teal: #5ec9e8; --c-violet: #a48afb;
  --i-sky: #18233b; --i-sky2: #263759; --i-navy: #0f1730; --i-sand: #3d3527; --i-green: #2f6b47; --i-green2: #24493a;
  --i-white: #e9edf5; --i-line: #44506a; --i-blue: #3b67a8;
  --shadow-sm: none; --shadow: none; --shadow-lg: 0 12px 32px -8px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-size="l"] { --fs: 18px; }
:root[data-size="xl"] { --fs: 20px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 var(--fs)/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
body.has-player { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* ---------- Barre du haut ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.top .title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.top .title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .wordmark b { color: var(--brand); }
.hbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: .82rem; font-weight: 700; letter-spacing: .02em; box-shadow: var(--shadow-sm); }
.hbtn.round { padding: 0; width: 38px; }
.hbtn.danger { color: var(--bad); }
.back { width: 38px; height: 38px; border-radius: 999px; border: 0; background: transparent; display: grid; place-items: center; margin-left: -8px; }
.back .icon { width: 24px; height: 24px; }

main { max-width: 760px; margin: 0 auto; padding: 18px 16px 24px; }
h1 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; }
h2 { font-size: 1.05rem; letter-spacing: -.01em; margin: 28px 0 12px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
h2 a { font-size: .85rem; font-weight: 600; }
h3 { font-size: 1rem; margin: 0 0 4px; font-weight: 700; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.tiny { font-size: .78rem; }
.sub { display: block; color: var(--muted); font-size: .88em; margin-top: 3px; font-weight: 400; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.ill { display: block; width: 100%; height: 100%; object-fit: cover; }
:root[data-theme="dark"] img.ill { filter: brightness(.9) saturate(.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.ill { filter: brightness(.9) saturate(.95); } }
.art { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 10; background: #f6f1e7; }

.hero { position: relative; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--on-navy); box-shadow: var(--shadow-lg); }
.hero .art { border-radius: 0; aspect-ratio: 16 / 7; }
.hero .body { padding: 18px 20px 20px; display: flex; gap: 18px; align-items: center; }
.hero h1 { font-size: 1.3rem; margin: 0 0 4px; color: #fff; }
.hero p { color: var(--on-navy-2); margin: 0; font-size: .92rem; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hero .chip { background: rgba(255,255,255,.12); color: #fff; }
.hero .actions { padding: 0 20px 20px; }
.ring { --p: 0; --ring: var(--brand); --track: rgba(255,255,255,.14); width: 86px; height: 86px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--track) 0); display: grid; place-items: center; }
.ring::before { content: ""; grid-area: 1 / 1; width: 70px; height: 70px; border-radius: 50%; background: var(--navy); }
.ring div { grid-area: 1 / 1; z-index: 1; text-align: center; line-height: 1.05; }
.ring b { font-size: 1.3rem; font-weight: 800; }
.ring small { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--on-navy-2); }
.card .ring { --track: var(--surface-3); }
.card .ring::before { background: var(--surface); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.chip .icon { width: 14px; height: 14px; }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 18px; min-height: 50px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 650; font-size: .98rem;
  box-shadow: var(--shadow-sm); transition: transform .08s ease, background .15s ease; text-align: center; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.light { background: #fff; border-color: #fff; color: var(--navy); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--text-2); }
.btn.outline-light { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn .icon { width: 20px; height: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Listes ---------- */
.menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: none; border: 0; text-align: left; border-top: 1px solid var(--line); color: var(--text); }
.item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.item b { display: block; font-weight: 650; }
.item .chev { color: var(--muted); width: 18px; height: 18px; }
.badge-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 13%, transparent); }
.badge-ic .icon { width: 22px; height: 22px; }
.lock-ic { color: var(--muted); width: 18px; height: 18px; }

.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.bar.brand i { background: var(--brand); }

.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 46%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.ccard { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-align: left; padding: 0; box-shadow: var(--shadow); color: var(--text); }
.ccard .art { border-radius: 0; aspect-ratio: 16 / 9; }
.ccard .meta { padding: 12px 14px 14px; }
.ccard b { display: block; font-size: .93rem; line-height: 1.3; min-height: 2.6em; }

.grid-ch { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.grid-ch .ccard { width: 100%; }

/* ---------- Questions ---------- */
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.qtools { display: flex; gap: 8px; align-items: center; }
.question { font-size: 1.2rem; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; margin: 8px 0 18px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--surface); min-height: 58px; box-shadow: var(--shadow-sm); color: var(--text); transition: border-color .12s, background .12s; }
.opt:hover:not(:disabled) { border-color: var(--muted); }
.opt .k { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .82rem; color: var(--text-2); }
.opt .t { flex: 1; }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt.sel .k { background: var(--brand); color: var(--brand-ink); }
.opt.ok { border-color: var(--ok); background: var(--ok-soft); }
.opt.ok .k { background: var(--ok); color: #fff; }
.opt.bad { border-color: var(--bad); background: var(--bad-soft); }
.opt.bad .k { background: var(--bad); color: #fff; }
.opt:disabled { cursor: default; }
.feedback { margin-top: 16px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.feedback .h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.feedback.ok .h { color: var(--ok); }
.feedback.bad .h { color: var(--bad); }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1; }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); transition: width .25s; border-radius: 99px; }
.speak { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--text-2); flex: none; }
.speak.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.speak .icon { width: 20px; height: 20px; }

.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-top: 18px; }
.dot { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-size: .78rem; font-weight: 650; color: var(--text-2); padding: 0; position: relative; }
.dot.done { background: var(--surface-3); border-color: var(--surface-3); }
.dot.cur { border: 2px solid var(--brand); color: var(--brand); }
.dot.flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.examtimer { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-weight: 700; padding: 0 12px; height: 38px; border-radius: 999px; background: var(--surface-2); }
.examtimer.warn { background: var(--bad-soft); color: var(--bad); }
body.exam-mode .tabbar { display: none; }
body.exam-mode { padding-bottom: 24px; }

.score { text-align: center; padding: 0; overflow: hidden; }
.score .art { border-radius: 0; aspect-ratio: 16 / 7; }
.score .inner { padding: 18px; }
.score .big { font-size: 3.2rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.score.pass .big { color: var(--ok); }
.score.fail .big { color: var(--bad); }
.review .q { font-weight: 650; margin: 6px 0 10px; }
.review .opt { min-height: 0; padding: 10px 12px; margin-bottom: 8px; box-shadow: none; }

/* ---------- Guide ---------- */
.reader h2 { margin-top: 26px; font-size: 1.15rem; }
.para { position: relative; padding: 10px 12px; margin: 0 -12px 6px; border-radius: 12px; transition: background .2s; cursor: pointer; }
.para p { margin: 0; line-height: 1.7; }
.para.on { background: var(--brand-soft); }
.para.on p { color: var(--text); }
.player { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; padding: 0 12px 10px; pointer-events: none; }
.player .in { pointer-events: auto; max-width: 736px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 18px;
  background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); }
.player .t { flex: 1; min-width: 0; font-size: .85rem; line-height: 1.3; }
.player .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .t span { color: var(--on-navy-2); font-size: .78rem; }
.player .t > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbtn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .78rem; }
.pbtn.main { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; }
.pbtn .icon { width: 20px; height: 20px; }

/* ---------- Cartes éclair ---------- */
.flash { perspective: 1200px; height: 340px; cursor: pointer; }
.flash .in { position: relative; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.flash.flip .in { transform: rotateY(180deg); }
.flash .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: auto; }
.flash .back-face { transform: rotateY(180deg); background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; border: 0; }
.flash .back-face .sub, .flash .back-face .muted { color: var(--on-navy-2); }
.flash .face b { font-size: 1.2rem; line-height: 1.4; }

/* ---------- Formulaires ---------- */
.field { display: block; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > span { display: block; font-weight: 650; margin-bottom: 6px; font-size: .92rem; }
.field select, .field input[type=text], .field input[type=date], .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); min-height: 48px; }
.field textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font-weight: 650; font-size: .88rem; color: var(--text-2); }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(20px); }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 26px 4px 8px; }

/* ---------- Statistiques ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.kpi b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 8px; border-bottom: 1px solid var(--line); position: relative; }
.chart .b { flex: 1; max-width: 26px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--bad) 75%, transparent); min-height: 4px; }
.chart .b.p { background: var(--ok); }
.chart .line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); opacity: .45; }

/* ---------- Forfaits ---------- */
.plans { display: grid; gap: 10px; }
.plan { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); text-align: left; color: var(--text); }
.plan.sel { border-color: var(--brand); background: var(--brand-soft); }
.plan .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; }
.plan.sel .radio { border-color: var(--brand); }
.plan.sel .radio::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--brand); }
.plan .grow { flex: 1; }
.plan .price { text-align: right; }
.plan .price b { font-size: 1.2rem; font-weight: 800; }
.plan .tag { position: absolute; top: -10px; right: 14px; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--brand); color: var(--brand-ink); }
.plan .tag.best { background: var(--ok); color: #fff; }
.feat { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.feat li { display: flex; gap: 10px; align-items: flex-start; }
.feat .icon { color: var(--ok); margin-top: 2px; }
.compare { width: 100%; border-collapse: collapse; font-size: .86rem; }
.compare th, .compare td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font-size: .78rem; color: var(--muted); }
.compare .us { color: var(--brand); font-weight: 800; }
.yes { color: var(--ok); } .no { color: var(--muted); }

.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.banner.brand { background: var(--brand-soft); border-color: transparent; }
.banner .grow { flex: 1; min-width: 0; }
.banner .hbtn { flex: none; }

/* ---------- Barre d'onglets ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-around; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: .7rem; font-weight: 650; padding: 5px 0; border-radius: 12px; }
.tabbar a .icon { width: 24px; height: 24px; }
.tabbar a.on { color: var(--brand); }

/* ---------- Fenêtres ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(9, 14, 26, .55); display: flex; align-items: flex-end; justify-content: center; padding: 16px; animation: fade .15s ease; }
.sheet { width: 100%; max-width: 440px; background: var(--surface); border-radius: 20px; padding: 22px 20px 18px; box-shadow: var(--shadow-lg); animation: up .2s cubic-bezier(.2,.7,.2,1); margin-bottom: env(safe-area-inset-bottom); }
.sheet h3 { font-size: 1.15rem; margin-bottom: 6px; }
.sheet p { color: var(--text-2); }
.sheet .btn + .btn { margin-top: 8px; }
@media (min-width: 640px) { .overlay { align-items: center; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 11px 16px; border-radius: 12px; font-size: .9rem; z-index: 70; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); font-weight: 550; }

/* ---------- Accueil (premier lancement) ---------- */
.onb { max-width: 520px; margin: 0 auto; }
.onb .art { aspect-ratio: 16 / 10; margin-bottom: 18px; box-shadow: var(--shadow); }
.onb h1 { font-size: 1.8rem; }
.steps { display: flex; gap: 6px; justify-content: center; margin: 18px 0 0; }
.steps i { width: 8px; height: 8px; border-radius: 99px; background: var(--line-2); }
.steps i.on { width: 22px; background: var(--brand); }

@media (min-width: 720px) {
  .hero { display: grid; grid-template-columns: 1.1fr 1fr; }
  .hero .art { aspect-ratio: auto; grid-column: 2; grid-row: 1 / span 2; min-height: 100%; }
  .hero .body { grid-column: 1; padding: 26px 26px 12px; }
  .hero .actions { grid-column: 1; padding: 0 26px 26px; align-self: end; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .hscroll { grid-auto-columns: minmax(200px, 31%); }
}
@media (max-width: 360px) { .row2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- v3 : lecteur de l'enregistrement officiel ---------- */
.player .t .pbar { display: block; width: 100%; margin: 6px 0 0; height: 4px; -webkit-appearance: none; appearance: none; border-radius: 99px; cursor: pointer;
  background: linear-gradient(to right, #fff var(--p, 0%), rgba(255,255,255,.22) var(--p, 0%)); }
.pbar::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pbar::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.pbar:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.reader.official .para { cursor: default; }
.reader.official .para:hover { background: transparent; }
.btn.clip { margin-top: 12px; width: auto; min-height: 40px; padding: 8px 14px; font-size: .88rem; background: var(--surface); }
.btn.clip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.clip .icon { width: 18px; height: 18px; }

/* ---------- Outils d'étude (v6) ---------- */
.field input[type=time] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.stack > select, .card > .field > select, .field > select[data-act] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); }
.search .icon { width: 20px; height: 20px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 0; color: var(--text); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search.as-btn { width: 100%; text-align: left; cursor: pointer; }
.search.as-btn span { flex: 1; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .88rem; min-height: 38px; }
.fchip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.speak.star.on-fav { color: var(--c-amber); border-color: var(--c-amber); background: var(--warn-soft); }
.speak.star.on-fav svg path { fill: currentColor; }
.qcard .q { font-weight: 650; margin: 2px 0 10px; }
.qcard .opt { min-height: 0; padding: 10px 12px; box-shadow: none; }
.qcard .chip { max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.qcard a.tiny { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }
.qcard a.tiny .icon { width: 14px; height: 14px; }
.tline { list-style: none; margin: 0; padding: 0 0 0 8px; border-left: 3px solid var(--line-2); }
.tline li { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 10px 0 10px 16px; }
.tline li::before { content: ''; position: absolute; left: -10px; top: 17px; width: 13px; height: 13px; border-radius: 50%; background: var(--c, var(--brand)); border: 3px solid var(--bg); }
.tline .yr { flex: none; min-width: 3.2em; font-variant-numeric: tabular-nums; color: var(--c, var(--brand)); }
.tline .grow { flex: 1; min-width: 0; }
.mapbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow); }
.cmap { display: block; width: 100%; height: auto; touch-action: manipulation; }
.cmap path { fill: var(--surface-3); stroke: var(--surface); stroke-width: 1.6; cursor: pointer; transition: fill .15s; outline: none; }
.cmap path:hover, .cmap path:focus-visible { fill: var(--line-2); }
.cmap path.sel { fill: var(--brand); }
.cmap path.ok { fill: var(--ok); }
.cmap path.bad { fill: var(--bad); }
.cmap .hit { fill: transparent; cursor: pointer; }
.cmap .ott { fill: var(--text); stroke: var(--surface); stroke-width: 3; }
.cmap .capdot { fill: var(--surface); stroke: var(--text); stroke-width: 3; pointer-events: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.kv span { color: var(--muted); }
.acc details { display: block; cursor: pointer; }
.acc summary { display: flex; align-items: center; gap: 12px; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary b { flex: 1; font-weight: 650; }
.acc details[open] summary .chev { transform: rotate(90deg); }
.acc .chev { transition: transform .2s; }
.anthem p { line-height: 1.8; margin: 10px 0 0; }
.trip { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; padding: 12px; }
.trip .field { margin: 0; }
.trip .hbtn { height: 48px; }
.big2 { font-size: 1.25rem; }
.okc { color: var(--ok); }
.bad { color: var(--bad); }
.bar.okb i { background: var(--ok); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bdg { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); opacity: .55; }
.bdg .bi { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.bdg .bi .icon { width: 24px; height: 24px; }
.bdg b { font-size: .86rem; line-height: 1.25; }
.bdg small { font-size: .74rem; color: var(--muted); line-height: 1.3; }
.bdg.ok { opacity: 1; }
.bdg.ok .bi { background: var(--warn-soft); color: var(--c-amber); }
.task.done .grow { color: var(--muted); text-decoration: line-through; }
.lm-now:empty { display: none; }
.lm-ctrl { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 16px; }
.lm-ctrl .pbtn { background: var(--surface-2); color: var(--text); width: 48px; height: 48px; }
.lm-ctrl .pbtn.main { width: 60px; height: 60px; background: var(--brand); color: var(--brand-ink); }
.para.hit { background: var(--warn-soft); }
@media (max-width: 380px) { .trip { grid-template-columns: 1fr 1fr; } .trip .hbtn { grid-column: span 2; } }

/* Pages légales intégrées */
.legal h1 { font-size: 1.35rem; margin: 0 0 4px; }
.legal h2 { font-size: 1.02rem; margin: 22px 0 6px; }
.legal p, .legal li { font-size: .95rem; line-height: 1.6; }
.legal ul { padding-left: 1.2em; margin: 6px 0; }
.legal li { margin: 4px 0; }
.legal a { color: var(--brand); word-break: break-word; }

/* Raccourcis clavier : seulement avec un clavier et une souris */
@media (hover: none), (pointer: coarse) { .kbd-only { display: none; } }
