/* Formation ChatGPT · plan détaillé, version en pages.
   Une couleur par partie (--part), reprise partout : repère visuel du parcours. */
:root {
  --bg: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f5f7fc;
  --text: #0f172a;
  --muted: #4a5873;
  --line: #d9e0ec;
  --accent: #1d4ed8;
  --accent-soft: #e3eaff;
  --ok: #047857;
  --ok-soft: #dcf5e8;
  --warn: #a15c07;
  --warn-soft: #fdf0d5;
  --alert: #b91c1c;
  --alert-soft: #fde7e7;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --on-part: #ffffff;
  --p1: #1d4ed8; --p1-soft: #e3eaff;
  --p2: #c2410c; --p2-soft: #ffeddc;
  --p3: #7c3aed; --p3-soft: #efe8ff;
  --p4: #0f766e; --p4-soft: #d5f5ef;
  --p5: #be185d; --p5-soft: #fde6f1;
  --part: var(--accent); --part-soft: var(--accent-soft);
  --i1: #1d4ed8; --i2: #0f766e; --i3: #c2410c; --i4: #7c3aed; --i5: #be185d;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 16px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #121a2c; --surface-2: #18223a; --text: #e6ebf5; --muted: #a3b0c7; --line: #26334f;
  --accent: #8fb0ff; --accent-soft: #18264a; --ok: #5ee0a6; --ok-soft: #113526; --warn: #f7c46c; --warn-soft: #382a10;
  --alert: #ff9b9b; --alert-soft: #3d1717; --code-bg: #070b14; --on-part: #0b1120;
  --p1: #8fb0ff; --p1-soft: #18264a; --p2: #fdae74; --p2-soft: #3a2210; --p3: #c4b5fd; --p3-soft: #281e4a;
  --p4: #5eead4; --p4-soft: #0f2e2b; --p5: #f9a8d4; --p5-soft: #3a1328;
  --i1: #8fb0ff; --i2: #5eead4; --i3: #fdae74; --i4: #c4b5fd; --i5: #f9a8d4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px rgba(0, 0, 0, .28);
  color-scheme: dark;
}
.p1 { --part: var(--p1); --part-soft: var(--p1-soft); }
.p2 { --part: var(--p2); --part-soft: var(--p2-soft); }
.p3 { --part: var(--p3); --part-soft: var(--p3-soft); }
.p4 { --part: var(--p4); --part-soft: var(--p4-soft); }
.p5 { --part: var(--p5); --part-soft: var(--p5-soft); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; }
strong { font-weight: 650; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: .5em 0; }
ul, ol { padding-left: 1.35em; margin: .45em 0; }
li { margin: .3em 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; }
svg.i { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--part); outline-offset: 2px; border-radius: 6px; }

/* ───────── Barre du haut ───────── */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__in { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand__logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
:root[data-theme="dark"] .brand__logo { color: #0b1120; }
.course { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 460px; margin-left: auto; }
.course__label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.course__label b { color: var(--text); }
.course__bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; min-width: 80px; }
.course__fill { height: 100%; width: 0; background: var(--ok); border-radius: 999px; transition: width .4s ease; }
.btn { font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 11px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--part); color: var(--part); }
.btn--part { background: var(--part); border-color: var(--part); color: var(--on-part); }
.btn--part:hover { color: var(--on-part); filter: brightness(1.08); }
.btn--big { font-size: 17px; padding: 13px 22px; border-radius: 14px; }

.theme-btn { padding: 8px 11px; }
.theme-btn .moon, :root[data-theme="dark"] .theme-btn .sun { display: inline; }
.theme-btn .sun, :root[data-theme="dark"] .theme-btn .moon { display: none; }
.flow--3 > li:nth-child(3n)::after { display: none; }
@media (max-width: 860px) { .flow--3 > li:nth-child(3n)::after { display: block; } .flow--3 > li:last-child::after { display: none; } }

/* ───────── Sommaire (fenêtre) ───────── */
dialog.sommaire { border: 0; padding: 0; margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(440px, 100vw); background: var(--surface); color: var(--text); box-shadow: -10px 0 40px rgba(0, 0, 0, .25); }
dialog.sommaire::backdrop { background: rgba(15, 23, 42, .45); }
.som__head { position: sticky; top: 0; background: var(--surface); padding: 18px 20px 12px; border-bottom: 1px solid var(--line); z-index: 1; }
.som__title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.som__title h2 { font-size: 20px; }
.som__close { font: inherit; font-size: 15px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 6px 12px; }
.som__search { margin-top: 12px; position: relative; }
.som__search input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px 9px 38px; }
.som__search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.som__body { padding: 8px 14px 30px; }
.som__links { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 6px 4px; }
.som__links a { font-size: 14px; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: var(--surface-2); }
.som__part { margin-top: 14px; }
.som__parthead { display: flex; align-items: center; gap: 10px; padding: 8px; text-decoration: none; color: var(--text); border-radius: 10px; }
.som__parthead:hover { background: var(--surface-2); }
.som__parthead .tile { width: 32px; height: 32px; }
.som__parthead b { font-size: 16px; }
.som__parthead small { margin-left: auto; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.som__list { list-style: none; padding: 0; margin: 2px 0 0; }
.som__list li { margin: 0; }
.som__list a { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 15.5px; line-height: 1.3; }
.som__list a:hover { background: var(--surface-2); }
.som__list a[aria-current="page"] { background: var(--part-soft); font-weight: 650; }
.som__list .empty { display: none; padding: 8px 12px; color: var(--muted); }

/* Numéros ronds (modules) et pastille « vu » */
.num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 700; border: 2px solid var(--part); color: var(--part); background: var(--surface); font-variant-numeric: tabular-nums; }
.is-seen .num, .num.is-seen { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.seen-mark { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--ok); white-space: nowrap; display: none; }
.is-seen .seen-mark { display: inline; }
.tile { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--part); color: var(--on-part); }
.tile svg.i { width: 22px; height: 22px; }
.tile--soft { background: var(--part-soft); color: var(--part); }

/* ───────── Fil d'Ariane ───────── */
.crumbs { max-width: 1240px; margin: 0 auto; padding: 16px 24px 0; font-size: 14.5px; color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "›"; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--part); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }

/* ───────── Mises en page ───────── */
.wrap { max-width: 1240px; margin: 0 auto; padding: 20px 24px 90px; }
.with-side { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; }
.content { min-width: 0; max-width: 820px; }

/* Colonne latérale d'un module */
.side { position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow: auto; padding: 4px 4px 20px 0; }
.side__part { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 8px; border-radius: 12px; background: var(--part-soft); }
.side__part .tile { width: 36px; height: 36px; border-radius: 10px; }
.side__part small { display: block; font-size: 12.5px; color: var(--part); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.side__part b { display: block; font-size: 15.5px; line-height: 1.25; }
.side__mods { list-style: none; padding: 0; margin: 10px 0 0; position: relative; }
.side__mods > li { margin: 0; position: relative; }
.side__mods > li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 36px; bottom: -6px; width: 2px; background: var(--line); }
.side__mods > li > a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 15px; line-height: 1.3; position: relative; z-index: 1; }
.side__mods > li > a:hover { background: var(--surface); }
.side__mods > li > a[aria-current="page"] { font-weight: 700; }
.side__mods > li > a[aria-current="page"] .num { background: var(--part); color: var(--on-part); }
.side__toc { list-style: none; margin: 4px 0 8px 46px; padding: 0 0 0 12px; border-left: 2px solid var(--part); }
.side__toc li { margin: 0; }
.side__toc a { display: block; font-size: 14px; color: var(--muted); text-decoration: none; padding: 3px 6px; border-radius: 6px; }
.side__toc a:hover { color: var(--text); }
.side__toc a.is-active { color: var(--part); font-weight: 650; }
.side__other { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.side__other a { display: flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; padding: 4px 8px; }
.side__other a:hover { color: var(--text); }

/* ───────── En-tête d'un module ───────── */
.mhero { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.mhero__band { height: 8px; background: var(--part); }
.mhero__in { padding: 26px 30px 26px; }
.mhero__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.part-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--part-soft); color: var(--part); font-weight: 700; border-radius: 999px; padding: 4px 12px 4px 6px; text-decoration: none; font-size: 14px; }
.part-chip .tile { width: 24px; height: 24px; border-radius: 50%; }
.part-chip .tile svg.i { width: 14px; height: 14px; }
.mhero__count { margin-left: auto; font-weight: 600; }
.mhero__title { display: flex; gap: 18px; align-items: flex-start; margin-top: 18px; }
.bignum { flex: none; width: 64px; height: 64px; border-radius: 18px; background: var(--part); color: var(--on-part); display: grid; place-items: center; font-size: 28px; font-weight: 800; }
.mhero h1 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.02em; padding-top: 4px; }
.mhero .lead { font-size: 18px; line-height: 1.6; margin: 16px 0 0; }
.mhero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; border-radius: 999px; padding: 4px 11px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); text-decoration: none; white-space: nowrap; }
.chip svg.i { width: 15px; height: 15px; }
.chip--native svg { color: var(--ok); }
.chip--paid { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip--ext { border-style: dashed; }
.chip--new svg { color: var(--p3); }
.chip--video { color: var(--part); }
.chip--video:hover { border-color: var(--part); }
.seen-btn { margin-left: auto; font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 9px 14px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); }
.seen-btn .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid currentColor; display: grid; place-items: center; }
.seen-btn .box svg { width: 14px; height: 14px; opacity: 0; }
.seen-btn[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.seen-btn[aria-pressed="true"] .box svg { opacity: 1; }

/* ───────── Blocs de contenu ───────── */
.blk { margin-top: 44px; }
.blk__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.blk__head .tile { width: 38px; height: 38px; border-radius: 11px; }
.blk__head .tile svg.i { width: 19px; height: 19px; }
.blk__head h2 { font-size: 23px; }
.blk__head p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 18px; margin-bottom: 8px; }

.duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.goals { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.goals li { margin: 0; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; font-size: 16.5px; box-shadow: var(--shadow); }
.goals li svg.i { color: var(--part); margin-top: 3px; }
.keep { background: var(--part-soft); border-radius: 16px; padding: 18px 20px; }
.keep h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--part); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.keep ul { list-style: none; padding: 0; margin: 0; }
.keep li { padding: 9px 0 9px 26px; position: relative; font-size: 16.5px; border-top: 1px dashed color-mix(in srgb, var(--part) 30%, transparent); margin: 0; }
.keep li:first-child { border-top: 0; }
.keep li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--part); }

.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 14px 18px; margin-top: 18px; font-size: 16px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.alert svg.i { color: var(--warn); margin-top: 3px; width: 20px; height: 20px; }
.alert--info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.alert--info svg.i { color: var(--accent); }
.alert--alert { background: var(--alert-soft); border-color: color-mix(in srgb, var(--alert) 30%, transparent); }
.alert--alert svg.i { color: var(--alert); }

/* ───────── Schémas ───────── */
.schema { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.schema > h3 { font-size: 16px; color: var(--muted); font-weight: 650; margin: 0 0 14px; }
.schema > h3:not(:first-child) { margin-top: 26px; }
.legend { font-size: 14.5px; color: var(--muted); margin-top: 12px; }

.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 26px; counter-reset: f; }
.flow > li { margin: 0; position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 14px; counter-increment: f; display: flex; flex-direction: column; gap: 4px; }
.flow > li::before { content: counter(f); width: 26px; height: 26px; border-radius: 50%; background: var(--part); color: var(--on-part); font-weight: 700; font-size: 13.5px; display: grid; place-items: center; margin-bottom: 4px; }
.flow > li:not(:last-child)::after { content: ""; position: absolute; right: -20px; top: 50%; width: 14px; height: 14px; border-top: 3px solid var(--part); border-right: 3px solid var(--part); transform: translateY(-50%) rotate(45deg); opacity: .8; }
.flow b { font-size: 15.5px; line-height: 1.3; }
.flow span { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.who { align-self: flex-start; margin-top: auto; padding-top: 6px; }
.who i { font-style: normal; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; display: inline-block; }
.who--gpt i { background: var(--ok-soft); color: var(--ok); }
.who--ext i { background: var(--surface); color: var(--text); border: 1px dashed var(--muted); }
.who--vous i { background: var(--accent-soft); color: var(--accent); }

.cmp { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 14px; }
.cmp__col { border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 12px; background: var(--surface-2); }
.cmp__col h4 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.cmp__col .sub { font-size: 14px; color: var(--muted); margin: 2px 0 8px; }
.cmp__col ul { margin: 0; padding-left: 1.1em; font-size: 15px; }
.cmp__col--hi { border: 2px solid var(--part); background: var(--part-soft); }
.cmp__col--no { opacity: .9; }
.cmp__col .price { font-size: 26px; font-weight: 800; line-height: 1.1; display: block; margin: 4px 0 2px; }
.badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--part); color: var(--on-part); }

.gcards { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 14px; }
.gcard { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface-2); }
.gcard .tile { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 10px; }
.gcard .tile svg.i { width: 19px; height: 19px; }
.gcard b { display: block; font-size: 16px; margin-bottom: 2px; }
.gcard span { font-size: 14.5px; color: var(--muted); }
.gcard .ex { display: block; margin-top: 8px; font-size: 14px; color: var(--text); background: var(--surface); border-radius: 8px; padding: 6px 9px; border: 1px solid var(--line); }

.eq { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.eq__item { flex: 1 1 140px; border-radius: 14px; padding: 13px 14px; background: var(--part-soft); }
.eq__item b { display: block; color: var(--part); font-size: 15.5px; }
.eq__item span { font-size: 14.5px; color: var(--text); }
.eq__op { align-self: center; font-size: 24px; font-weight: 800; color: var(--part); }

.anat { border: 2px dashed var(--part); border-radius: 18px; padding: 16px; background: color-mix(in srgb, var(--part-soft) 55%, transparent); }
.anat__label { font-weight: 800; color: var(--part); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 16px; }
.anat__grid { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; }
.anat__item { background: var(--surface); border-radius: 12px; padding: 13px 14px; border: 1px solid var(--line); }
.anat__item b { display: block; font-size: 15.5px; }
.anat__item span { font-size: 14.5px; color: var(--muted); }
.anat__item--star { border: 2px solid var(--part); }

.ing { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ing > div { border-radius: 12px; padding: 12px; border-top: 5px solid var(--c); background: var(--surface-2); }
.ing b { display: block; color: var(--c); font-size: 15.5px; }
.ing span { font-size: 14px; color: var(--muted); }
.c1 { --c: var(--i1); } .c2 { --c: var(--i2); } .c3 { --c: var(--i3); } .c4 { --c: var(--i4); } .c5 { --c: var(--i5); }
.assembled { margin-top: 14px; font-size: 17px; line-height: 2; background: var(--surface-2); border-radius: 12px; padding: 12px 16px; }
.assembled mark { background: transparent; color: inherit; border-bottom: 3px solid var(--c); padding: 1px 0; }

.alerts { display: flex; flex-wrap: wrap; gap: 8px; }
.alerts span { display: inline-flex; gap: 8px; align-items: center; background: var(--warn-soft); color: var(--text); border-radius: 999px; padding: 6px 13px; font-size: 14.5px; }
.alerts svg.i { color: var(--warn); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; background: var(--surface-2); border-radius: 10px; padding: 9px 12px; }
.checks li::before { content: ""; flex: none; width: 18px; height: 18px; border: 2px solid var(--part); border-radius: 5px; margin-top: 3px; }
.stack { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 6px; }
.stack li { margin: 0; counter-increment: s; display: grid; grid-template-columns: 34px 170px minmax(0, 1fr); align-items: center; gap: 12px; background: var(--surface-2); border-radius: 10px; padding: 9px 12px; border-left: 5px solid var(--part); }
.stack li::before { content: counter(s); font-weight: 800; color: var(--part); text-align: center; }
.stack b { font-size: 15.5px; }
.stack span { font-size: 14.5px; color: var(--muted); }

/* Maquette de l'écran ChatGPT */
.mock { display: grid; grid-template-columns: 210px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); font-size: 14px; }
.mock__side { background: var(--surface); border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.mock__side span { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; color: var(--text); }
.mock__side .sub { padding-left: 24px; color: var(--muted); font-size: 13px; }
.mock__side .sep { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mock__side .acct { margin-top: auto; border-top: 1px solid var(--line); border-radius: 0; padding-top: 10px; }
.mock__main { display: flex; flex-direction: column; padding: 12px 16px 16px; min-height: 330px; }
.mock__top { display: flex; justify-content: space-between; align-items: center; }
.mock__toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.mock__toggle span { padding: 4px 14px; }
.mock__toggle span:first-child { background: var(--part); color: var(--on-part); font-weight: 650; }
.mock__hello { margin: auto; font-size: 20px; font-weight: 650; color: var(--muted); text-align: center; padding: 20px 0; }
.mock__input { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 10px 12px; }
.mock__input .ph { flex: 1; color: var(--muted); }
.mock__input .btnr { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.mock__input .send { background: var(--text); color: var(--surface); border: 0; }
.mock__input .sel { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; white-space: nowrap; }
.co { flex: none; width: 21px; height: 21px; border-radius: 50%; background: var(--part); color: var(--on-part); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.mock-legend { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.mock-legend li { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.mock-legend .co { margin-top: 2px; }

/* ───────── Pas à pas ───────── */
.stepnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.stepnav a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 14px; max-width: 100%; }
.stepnav a:hover { border-color: var(--part); }
.stepnav a .num { width: 24px; height: 24px; font-size: 12.5px; }
.stepnav a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.step { margin: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); }
.step__num { width: 46px; height: 46px; border-radius: 14px; background: var(--part-soft); color: var(--part); font-size: 21px; font-weight: 800; display: grid; place-items: center; }
.step h3 { font-size: 19px; margin: 6px 0 6px; }
.step__body { font-size: 16.5px; }
.step__body ul { margin-top: 8px; }
.step__body li::marker { color: var(--part); }

/* ───────── À vous de jouer ───────── */
.practice { background: var(--warn-soft); border-radius: 18px; padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; }
.practice .tile { background: var(--warn); color: var(--surface); }
.practice h3 { font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.practice h3 small { font-size: 13.5px; font-weight: 650; background: var(--surface); color: var(--warn); border-radius: 999px; padding: 2px 10px; }
.practice p { font-size: 16.5px; margin: 6px 0 0; }
.prompts { display: grid; gap: 14px; margin-top: 16px; }
.prompt { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--code-bg); }
.prompt__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.prompt__head b { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.prompt pre { margin: 0; padding: 16px 18px; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 14.5px; line-height: 1.6; color: var(--code-text); }
.copy { font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 9px; padding: 5px 12px; display: inline-flex; gap: 6px; align-items: center; }
.copy:hover { border-color: var(--part); color: var(--part); }
.copy.is-done { color: var(--ok); border-color: var(--ok); }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }
.price { font-size: 22px; font-weight: 700; display: block; line-height: 1.1; }
.yes { color: var(--ok); font-weight: 650; }
.no { color: var(--alert); font-weight: 650; }
.partial { color: var(--warn); font-weight: 650; }

/* ───────── Précédent / suivant ───────── */
.pager { margin-top: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; }
.pager__link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); }
.pager__link:hover { border-color: var(--part); }
.pager__link small { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pager__link b { font-size: 16px; line-height: 1.3; }
.pager__link--next { text-align: right; align-items: flex-end; }
.pager__mid { display: flex; align-items: center; }
.pager__empty { visibility: hidden; }
.next-hint { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }

/* Barre du bas (mobile) */
.bottombar { display: none; }

/* ───────── Pages de partie ───────── */
.phero { border-radius: 24px; background: var(--part-soft); padding: 32px 34px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; border: 1px solid color-mix(in srgb, var(--part) 25%, transparent); }
.phero .tile { width: 72px; height: 72px; border-radius: 20px; }
.phero .tile svg.i { width: 34px; height: 34px; }
.phero small { font-size: 14px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--part); }
.phero h1 { font-size: clamp(28px, 3.8vw, 40px); letter-spacing: -.02em; margin-top: 4px; }
.phero .lead { font-size: 18px; margin: 12px 0 0; max-width: 64ch; }
.pstats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.pstats li { margin: 0; background: var(--surface); border-radius: 12px; padding: 8px 14px; font-size: 14.5px; color: var(--muted); }
.pstats b { color: var(--text); font-size: 17px; margin-right: 4px; }
.phero .btn { margin-top: 20px; }
.mcards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.mcards li { margin: 0; }
.mcard { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: center; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); }
.mcard:hover { border-color: var(--part); }
.mcard .bignum { width: 52px; height: 52px; font-size: 22px; border-radius: 15px; }
.is-seen .mcard .bignum, .mcard.is-seen .bignum { background: var(--ok); }
.mcard h3 { font-size: 19px; }
.mcard p { margin: 4px 0 8px; color: var(--muted); font-size: 15.5px; }
.mcard .go { color: var(--part); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 650; }
.mcard .go svg.i { width: 24px; height: 24px; }
.mcard .go .done { display: none; color: var(--ok); }
.mcard.is-seen .go .done { display: block; }
.mcard.is-seen .go .todo { display: none; }
.pnav { margin-top: 40px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ───────── Accueil ───────── */
.hhero { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); padding: 38px 40px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.eyebrow { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); margin: 0 0 10px; }
.hhero h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.025em; }
.hhero .lead { font-size: 18.5px; color: var(--muted); margin: 14px 0 0; }
.hstats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 22px 0 0; padding: 0; list-style: none; }
.hstats li { margin: 0; }
.hstats b { display: block; font-size: 28px; line-height: 1.1; }
.hstats span { font-size: 14px; color: var(--muted); }
.resume { background: var(--surface-2); border-radius: 20px; padding: 22px; border: 1px solid var(--line); }
.resume small { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.resume h2 { font-size: 21px; margin: 6px 0 4px; }
.resume p { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.resume .bar { height: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0 16px; }
.resume .bar div { height: 100%; width: 0; background: var(--ok); transition: width .4s ease; }
.roadmap { list-style: none; padding: 0; margin: 0; position: relative; display: grid; gap: 18px; }
.roadmap::before { content: ""; position: absolute; left: 31px; top: 30px; bottom: 30px; width: 4px; border-radius: 4px; background: linear-gradient(var(--p1), var(--p2), var(--p3), var(--p4), var(--p5)); opacity: .5; }
.rm { margin: 0; position: relative; display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 16px; }
.rm .tile { width: 66px; height: 66px; border-radius: 20px; box-shadow: 0 0 0 6px var(--bg); }
.rm .tile svg.i { width: 30px; height: 30px; }
.rm__card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--part); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); }
.rm__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.rm__head a { font-size: 21px; font-weight: 750; color: var(--text); text-decoration: none; }
.rm__head a:hover { color: var(--part); }
.rm__head small { color: var(--muted); font-size: 14.5px; }
.rm__count { margin-left: auto; font-size: 13.5px; font-weight: 650; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.rm__card > p { margin: 4px 0 12px; color: var(--muted); font-size: 15.5px; }
.rm__mods { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.rm__mods li { margin: 0; }
.rm__mods a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 5px 6px; border-radius: 10px; font-size: 15.5px; line-height: 1.3; }
.rm__mods a:hover { background: var(--surface-2); }
.links4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.lcard:hover { border-color: var(--accent); }
.lcard .tile { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.lcard b { font-size: 16.5px; margin-top: 6px; }
.lcard span { color: var(--muted); font-size: 14.5px; }

/* ───────── Pages annexes (reprises de la v1) ───────── */
.page-head { margin: 8px 0 26px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 17.5px; margin: 8px 0 0; max-width: 70ch; }
.section { margin-top: 40px; }
.section > h2 { font-size: 24px; }
.section > .intro { color: var(--muted); font-size: 16.5px; margin: 8px 0 16px; max-width: 72ch; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 12px; padding: 14px 16px; margin: 16px 0 0; font-size: 15.5px; }
.tag { font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.sessions { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sessions li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.sessions h3 { font-size: 17px; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.sessions h3 small { color: var(--muted); font-weight: 500; font-size: 14px; }
.sessions p { margin: 4px 0; color: var(--muted); font-size: 15px; }
.sessions .mods { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sessions .mods a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-size: 14px; background: var(--surface-2); border-radius: 999px; padding: 3px 10px 3px 3px; }
.sessions .mods .num { width: 22px; height: 22px; font-size: 11.5px; }
dl.glossary { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
dl.glossary dt, dl.glossary dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
dl.glossary dt { font-weight: 650; background: var(--surface-2); }
dl.glossary dt:last-of-type, dl.glossary dd:last-of-type { border-bottom: 0; }
.sources li { margin: .5em 0; }
.footer { max-width: 1240px; margin: 0 auto; padding: 22px 24px 40px; color: var(--muted); font-size: 14.5px; border-top: 1px solid var(--line); }

/* Version complète imprimable */
.full-module { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin: 18px 0; box-shadow: var(--shadow); }
.full-module h2 { font-size: 22px; display: flex; gap: 12px; align-items: center; }
.full-module h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
.full-module ol.full-steps > li { margin: .6em 0; }
.full-part { margin-top: 40px; }
.full-part > h2 { font-size: 26px; display: flex; align-items: center; gap: 12px; }

/* ───────── Responsive ───────── */
@media (max-width: 1080px) {
  .with-side { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .content { max-width: none; }
  .links4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hhero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .flow > li:not(:last-child)::after { right: auto; left: 24px; top: auto; bottom: -19px; transform: rotate(135deg); }
  .flow > li { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  .flow > li::before { margin-bottom: 0; }
  .flow > li > b { flex: 1 1 60%; }
  .flow > li > span { flex-basis: 100%; }
  .who { margin-top: 0; padding-top: 2px; }
  .cmp, .gcards, .anat__grid { grid-template-columns: minmax(0, 1fr); }
  .ing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ing > div:last-child { grid-column: 1 / -1; }
  .mock { grid-template-columns: minmax(0, 1fr); }
  .mock__side { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; }
  .mock__side .sep, .mock__side .sub { display: none; }
  .mock__side .acct { margin-top: 0; border-top: 0; padding-top: 5px; }
  .mock-legend { grid-template-columns: minmax(0, 1fr); }
  .mock__input { flex-wrap: wrap; row-gap: 10px; }
  .mock__input .ph { flex: 1 1 100%; order: -1; padding: 0 4px; }
  .mock__main { min-height: 0; }
  .mock__hello { padding: 28px 0; font-size: 18px; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .stack li { grid-template-columns: 26px minmax(0, 1fr); }
  .stack li span { grid-column: 2; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .rm__mods { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 70px; }
  .topbar__in { padding: 8px 16px; gap: 10px; }
  .brand span.txt { display: none; }
  .course { max-width: none; }
  .course__label .long { display: none; }
  .btn-som .txt { display: none; }
  .crumbs { padding: 12px 16px 0; font-size: 13.5px; }
  .crumbs li.hide-sm { display: none; }
  .wrap { padding: 14px 16px 110px; }
  .mhero__in { padding: 20px 18px; }
  .mhero__title { gap: 14px; }
  .bignum { width: 50px; height: 50px; font-size: 22px; border-radius: 14px; }
  .mhero .lead { font-size: 17px; }
  .mhero__count { margin-left: 0; width: 100%; }
  .seen-btn { margin-left: 0; width: 100%; justify-content: center; }
  .schema { padding: 16px; border-radius: 16px; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px; }
  .step__num { width: 38px; height: 38px; font-size: 18px; border-radius: 11px; }
  .practice { flex-direction: column; padding: 18px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager__link--next { text-align: left; align-items: flex-start; }
  .pager__empty { display: none; }
  .pager__mid { justify-content: stretch; }
  .pager__mid .btn { width: 100%; justify-content: center; }
  .bottombar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(15, 23, 42, .08); }
  .bottombar a, .bottombar button { font: inherit; font-size: 15px; font-weight: 650; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); justify-content: center; cursor: pointer; }
  .bottombar .next { background: var(--part); color: var(--on-part); border-color: var(--part); }
  .bottombar .mid { background: transparent; border: 0; color: var(--muted); font-size: 14px; padding: 9px 4px; }
  .bottombar .off { visibility: hidden; }
  .phero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .phero .tile { width: 56px; height: 56px; }
  .mcard { grid-template-columns: 46px minmax(0, 1fr); padding: 16px; gap: 14px; }
  .mcard .bignum { width: 44px; height: 44px; font-size: 19px; }
  .mcard .go { display: none; }
  .hhero { padding: 24px 20px; border-radius: 20px; }
  .rm { grid-template-columns: minmax(0, 1fr); }
  .rm .tile { display: none; }
  .roadmap::before { display: none; }
  .links4 { grid-template-columns: minmax(0, 1fr); }
  dl.glossary { grid-template-columns: minmax(0, 1fr); }
  dl.glossary dt { border-bottom: 0; padding-bottom: 2px; }
  .table-wrap { overflow: visible; }
  table.stackable thead { display: none; }
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable td { display: block; width: 100%; }
  table.stackable tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.stackable tr:last-child { border-bottom: 0; }
  table.stackable td { border: 0; padding: 3px 0; }
  table.stackable td:first-child { font-size: 17px; padding-bottom: 6px; }
  table.stackable td + td::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
  table.stackable .price { display: inline; margin-left: 8px; font-size: 18px; }
}

/* ───────── Impression ───────── */
@media print {
  :root { --bg: #fff; --surface: #fff; --shadow: none; }
  body { font-size: 11pt; }
  .topbar, .crumbs, .side, .bottombar, .pager, .seen-btn, .copy, .stepnav, .next-hint, dialog, .resume, .btn { display: none !important; }
  .with-side { display: block; }
  .wrap { padding: 0; max-width: none; }
  .mhero, .schema, .step, .card, .mcard, .rm__card, .full-module { box-shadow: none; break-inside: avoid; }
  .flow > li, .cmp__col, .gcard, .step { break-inside: avoid; }
  .full-part { break-before: page; }
  .prompt pre { color: #0f172a; background: #f1f4f9; }
  .prompt { background: #f1f4f9; }
  a { color: inherit; text-decoration: none; }
}

/* ───────── Exercices ───────── */
.gear-btn { padding: 8px 11px; }
.exs { display: grid; gap: 16px; }
.ex { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px 16px; box-shadow: var(--shadow); border-left: 6px solid var(--lvl, var(--part)); }
.ex--1 { --lvl: var(--ok); --lvl-soft: var(--ok-soft); }
.ex--2 { --lvl: var(--warn); --lvl-soft: var(--warn-soft); }
.ex--3 { --lvl: var(--part); --lvl-soft: var(--part-soft); }
.ex.is-done { background: color-mix(in srgb, var(--ok-soft) 45%, var(--surface)); }
.ex__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.lvl { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--lvl); background: var(--lvl-soft); border-radius: 999px; padding: 4px 12px 4px 10px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; display: block; }
.dots i.on { background: currentColor; }
.ex-done { margin-left: auto; font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-radius: 11px; padding: 6px 12px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); }
.ex-done .box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid currentColor; display: grid; place-items: center; }
.ex-done .box svg { width: 13px; height: 13px; opacity: 0; }
.ex-done[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.ex-done[aria-pressed="true"] .box svg { opacity: 1; }
.ex h3 { font-size: 19px; margin: 12px 0 6px; }
.ex__steps { margin: 6px 0 0; padding-left: 0; list-style: none; counter-reset: es; display: grid; gap: 6px; }
.ex__steps li { counter-increment: es; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; margin: 0; font-size: 16.5px; }
.ex__steps li::before { content: counter(es); width: 24px; height: 24px; border-radius: 7px; background: var(--lvl-soft); color: var(--lvl); font-weight: 800; font-size: 13px; display: grid; place-items: center; margin-top: 2px; }
.ex__text { font-size: 16.5px; margin: 6px 0 0; }
.ex__ok { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: 15.5px; }
.ex__ok svg.i { color: var(--lvl); margin-top: 3px; }
.ex .prompts { margin-top: 14px; }
.filrouge { display: flex; gap: 14px; align-items: flex-start; border: 2px dashed color-mix(in srgb, var(--part) 50%, transparent); border-radius: 16px; padding: 14px 18px; background: color-mix(in srgb, var(--part-soft) 50%, transparent); }
.filrouge .tile { width: 36px; height: 36px; border-radius: 10px; }
.filrouge .tile svg.i { width: 18px; height: 18px; }
.filrouge b { color: var(--part); font-size: 15px; }
.filrouge p { margin: 2px 0 4px; font-size: 16px; }
.filrouge a { font-size: 14.5px; }

/* ───────── Quiz ───────── */
.quiz { display: grid; gap: 14px; }
.q { margin: 0; border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px 16px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.q legend { float: left; width: 100%; padding: 0; display: flex; gap: 12px; align-items: flex-start; font-size: 17.5px; font-weight: 650; line-height: 1.4; margin-bottom: 12px; }
.q legend + * { clear: both; }
.q__n { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--part); color: var(--on-part); display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.q__opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 16px; background: var(--surface-2); }
.opt:hover { border-color: var(--part); }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--part); flex: none; }
.opt.is-good { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-bad { border-color: var(--alert); background: var(--alert-soft); }
.opt.is-good span::after { content: "  ✓"; color: var(--ok); font-weight: 800; }
.opt.is-bad span::after { content: "  ✗"; color: var(--alert); font-weight: 800; }
.q.is-answered .opt { cursor: default; }
.q.is-answered .opt:hover { border-color: var(--line); }
.q.is-answered .opt.is-good:hover { border-color: var(--ok); }
.q.is-answered .opt.is-bad:hover { border-color: var(--alert); }
.q__fb { margin: 12px 0 0; padding: 11px 14px; border-radius: 12px; font-size: 15.5px; background: var(--surface-2); }
.q__fb.is-good { background: var(--ok-soft); }
.q__fb.is-bad { background: var(--alert-soft); }
.q__fb strong { display: block; }
.quiz__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 4px 0; }
.quiz__score { font-weight: 650; color: var(--muted); }
.quiz__score.is-done { color: var(--text); font-size: 17px; }

/* ───────── Page Réglages ───────── */
.opts2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.optcard { font: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.optcard:hover { border-color: var(--accent); }
.optcard[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.optcard__prev { height: 76px; border-radius: 12px; padding: 10px; display: grid; gap: 6px; align-content: start; border: 1px solid #d9e0ec; }
.optcard__prev i { display: block; height: 9px; border-radius: 5px; }
.optcard__prev i:first-child { width: 60%; }
.optcard__prev i:nth-child(2) { width: 90%; }
.optcard__prev i:nth-child(3) { width: 75%; }
.optcard__prev--light { background: #eef1f7; }
.optcard__prev--light i { background: #c9d3e6; }
.optcard__prev--light i:first-child { background: #1d4ed8; }
.optcard__prev--dark { background: #0b1120; border-color: #26334f; }
.optcard__prev--dark i { background: #26334f; }
.optcard__prev--dark i:first-child { background: #8fb0ff; }
.optcard__txt { display: grid; gap: 2px; }
.optcard__txt b { font-size: 17px; display: inline; }
.optcard__txt > span { color: var(--muted); font-size: 14.5px; }
.optcard__txt svg.i { color: var(--accent); }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.stat__lbl { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.stat b { font-size: 24px; line-height: 1.2; }
.stat__bar { height: 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.stat__bar span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; transition: width .4s ease; }
.stat__link { font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.btn--danger { background: var(--alert); border-color: var(--alert); color: #fff; }
.btn--danger:hover { color: #fff; border-color: var(--alert); filter: brightness(1.08); }
:root[data-theme="dark"] .btn--danger, :root[data-theme="dark"] .btn--danger:hover { color: #0b1120; }
.reset-card { display: grid; gap: 14px; }
.reset-card__txt p { margin: 0 0 4px; }
.reset-card .btn--big { justify-self: start; }
.confirm { border: 2px solid var(--alert); background: var(--alert-soft); border-radius: 14px; padding: 14px 18px; }
.confirm p { margin: 0 0 4px; }
.confirm__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.okmsg { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--ok-soft); font-size: 16px; }
.okmsg svg.i { color: var(--ok); margin-top: 3px; }
.ex-print { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); }

@media (max-width: 860px) {
  .opts2, .stats3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .ex { padding: 16px 16px 14px; }
  .ex-done { margin-left: 0; }
  .q { padding: 14px 14px; }
  .optcard { grid-template-columns: 84px minmax(0, 1fr); }
  .optcard__prev { height: 62px; }
  .reset-card .btn--big { justify-self: stretch; justify-content: center; }
}
@media print {
  .ex-done, .quiz__foot, .q__fb { display: none !important; }
  .ex, .q, .filrouge { box-shadow: none; break-inside: avoid; }
}
