/* Prime Pure · feuille de style commune
   Papier millimétré, encre sarcelle, surligneur jaune.
   Mobile d'abord : une colonne, puis les grilles s'ouvrent sur grand écran. */

:root {
  --paper: #f6f8f5;
  --surface: #ffffff;
  --ink: #12313a;
  --muted: #55686c;
  --grid: #dce7e3;
  --line: #cfdcd8;
  --soft: #e4f0ed;
  --teal: #0d5c63;
  --teal-strong: #0a474c;
  --on-teal: #ffffff;
  --mark: #ffe066;
  --mark-ink: #12313a;
  --sun: #ffd84d;
  --ok: #1d6f46;
  --ok-bg: #e2f3e9;
  --bad: #a8261d;
  --bad-bg: #fbe8e6;
  --shadow: 0 14px 34px -22px rgba(18, 49, 58, 0.55);
  --radius: 14px;
  --font-display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1a1d; --surface: #13242a; --ink: #e6efed; --muted: #9db1b3;
    --grid: #1b2f34; --line: #29424a; --soft: #183439;
    --teal: #63b5bc; --teal-strong: #8fd0d6; --on-teal: #0e1a1d;
    --mark: rgba(233, 195, 59, 0.38); --mark-ink: #f4f1e2; --sun: #e9c33b;
    --ok: #6fd3a2; --ok-bg: #12352a; --bad: #ff9a90; --bad-bg: #3b2020;
    --shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1a1d; --surface: #13242a; --ink: #e6efed; --muted: #9db1b3;
  --grid: #1b2f34; --line: #29424a; --soft: #183439;
  --teal: #63b5bc; --teal-strong: #8fd0d6; --on-teal: #0e1a1d;
  --mark: rgba(233, 195, 59, 0.38); --mark-ink: #f4f1e2; --sun: #e9c33b;
  --ok: #6fd3a2; --ok-bg: #12352a; --bad: #ff9a90; --bad-bg: #3b2020;
  --shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 24px; } }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -0.015em; }
h2 { font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.01em; }
h3 { font-weight: 600; font-size: 1.2rem; }
p { margin: 0; }
ul, ol { margin: 0; }
code, pre, kbd { font-family: var(--font-mono); }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
mark { background: linear-gradient(transparent 55%, var(--mark) 55%, var(--mark) 92%, transparent 92%); color: inherit; padding: 0 0.08em; }
.lead { font-size: 1.15rem; max-width: 58ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
.en { font-style: italic; }

/* ---------- Illustrations (SVG en ligne, couleurs pilotées par le thème) */
.ill { display: block; overflow: visible; }
.ill .t { fill: var(--teal); }
.ill .y { fill: var(--sun); }
.ill .w { fill: var(--surface); }
.ill .s { fill: var(--soft); }
.ill .k { fill: var(--ink); }
.ill .kd { fill: #12313a; }
.ill .wt { fill: var(--on-teal); }
.ill .o { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ill .o2 { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ill .od { stroke: #12313a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.ill .ot { stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.ill .n { fill: none; }
.ill text { font-family: var(--font-display); font-weight: 800; }

/* ---------- En-tête */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand svg { width: 28px; height: 28px; color: var(--teal); flex: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.97rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { color: var(--teal); background: var(--soft); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.97rem; color: var(--on-teal); background: var(--teal); text-decoration: none; padding: 8px 14px; border-radius: 999px; }
.cart-link:hover { background: var(--teal-strong); }
.cart-link svg { width: 20px; height: 20px; flex: none; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: #12313a; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; display: inline-grid; place-items: center; }
.cart-count:empty { display: none; }
.menu-btn { display: none; align-items: center; gap: 6px; font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.menu-btn svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; row-gap: 0; }
  .cart-label { display: none; }
  .js .menu-btn { display: inline-flex; }
  .js .nav { display: none; }
  .js .site-header.open .nav { display: grid; width: 100%; order: 10; gap: 2px; padding: 4px 0 14px; }
  .js .site-header.open .nav a { padding: 12px; font-size: 1.05rem; }
  .no-js .nav { width: 100%; order: 10; flex-wrap: wrap; padding-bottom: 8px; }
}

/* ---------- Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; padding: 12px 20px; border-radius: 10px; text-decoration: none; border: 2px solid var(--teal); cursor: pointer; text-align: center; }
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-strong); border-color: var(--teal-strong); }
.btn-ghost { background: var(--surface); color: var(--teal); }
.btn-ghost:hover { background: var(--soft); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: #12313a; }
.btn-sun:hover { filter: brightness(1.05); }
.btn-sm { padding: 8px 14px; font-size: 0.93rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[data-state="in"] { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-more { font-weight: 700; text-decoration: none; }
.link-more:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .choice { transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease; }
  .btn:active { transform: translateY(1px); }
}

/* ---------- Héros (accueil) */
.hero {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--line);
  padding-block: 56px 64px;
  overflow: clip;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.hero-text { display: grid; gap: 20px; min-width: 0; }
.facts-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.facts-row li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.88rem; font-weight: 700; }
.hero-visual { position: relative; padding: 26px 18px 30px; min-width: 0; }
.sticker { position: absolute; width: 66px; height: 66px; z-index: 2; }
.sticker-q { top: 0; right: 0; }
.sticker-s { bottom: 0; right: 46px; }
@media (prefers-reduced-motion: no-preference) {
  .sticker { animation: bob 6s ease-in-out infinite; }
  .sticker-s { animation-delay: -3s; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
}

.triangle-card { position: relative; z-index: 1; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px; box-shadow: 8px 8px 0 var(--sun); min-width: 0; display: grid; gap: 12px; }
.triangle-card .cap { font-size: 0.92rem; color: var(--muted); }
.scroll { overflow-x: auto; }
table.tri { border-collapse: collapse; width: 100%; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.95rem; }
table.tri caption { text-align: left; font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; color: var(--ink); }
table.tri th, table.tri td { border: 1px solid var(--line); padding: 8px 10px; text-align: right; white-space: nowrap; }
table.tri thead th { font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); font-weight: 700; }
table.tri tbody th { text-align: left; font-weight: 600; }
table.tri td.q { background: var(--mark); color: var(--mark-ink); font-weight: 600; text-align: center; }

/* ---------- Sections */
.section { padding-block: 72px; }
.section:not(.tint) + .section:not(.tint) { padding-top: 0; }
.section.tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; max-width: 64ch; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-foot { margin-top: 24px; }
@media (max-width: 600px) { .section { padding-block: 52px; } }

/* Comment ça marche */
.steps3 { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 24px; display: grid; gap: 10px; align-content: start; }
.tint .step { background: var(--paper); }
.step .ill { width: 100%; max-width: 230px; height: auto; margin: 0 auto 2px; }
.step-num { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--sun); color: #12313a; border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 800; display: grid; place-items: center; z-index: 1; }
.step p { color: var(--muted); }
.step a { font-weight: 700; }

/* Objectifs (accueil) */
.goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.goal { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px 22px 22px; display: grid; gap: 10px; align-content: start; box-shadow: 6px 6px 0 var(--sun); }
.goal-eyebrow { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.goal h3 { font-size: 1.3rem; line-height: 1.2; }
.goal p { color: var(--muted); }
.goal-links { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; font-size: 0.95rem; }
@media (max-width: 900px) { .goals { grid-template-columns: minmax(0, 1fr); } }

/* Filières */
.tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.track-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; grid-template-rows: auto auto auto 1fr auto; }
.track-card > .ill { width: 64px; height: 64px; }
.track-card h3 { font-size: 1.4rem; }
.track-card h3 a { color: inherit; text-decoration: none; }
.track-card p { color: var(--muted); }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; align-content: start; }
.card-chips li { font-size: 0.84rem; background: var(--soft); border-radius: 6px; padding: 2px 8px; }
.card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; }
.from { font-family: var(--font-mono); font-weight: 600; word-spacing: -0.2em; }
.more { color: var(--teal); font-weight: 700; }

/* Carte entièrement cliquable : le lien du titre couvre la carte, les boutons passent au-dessus. */
.clickable { transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.clickable:hover { border-color: var(--teal); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) { .clickable:hover { transform: translateY(-3px); } }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.clickable:has(.stretched:focus-visible) { outline: 3px solid var(--teal); outline-offset: 3px; }
.above { position: relative; z-index: 2; }

/* Dans chaque cours */
.includes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.includes li { display: grid; gap: 8px; align-content: start; }
.includes .ill { width: 52px; height: 52px; }
.includes h3 { font-size: 1.1rem; }
.includes p { color: var(--muted); font-size: 0.97rem; }

/* Essayez */
.try-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
.quiz-card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; box-shadow: 8px 8px 0 var(--sun); min-width: 0; }
.quiz-q { font-weight: 700; font-size: 1.08rem; }
.choices { list-style: none; padding: 0; display: grid; gap: 10px; }
.choice { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; font-family: var(--font-mono); font-variant-numeric: tabular-nums; background: var(--paper); color: var(--ink); border: 2px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.choice .letter { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; flex: none; }
.choice:hover:not(:disabled) { border-color: var(--teal); }
.choice:disabled { cursor: default; }
.choice[data-result="right"] { border-color: var(--ok); background: var(--ok-bg); }
.choice[data-result="right"] .letter { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.choice[data-result="wrong"] { border-color: var(--bad); background: var(--bad-bg); }
.choice[data-result="wrong"] .letter { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.feedback { border-radius: 10px; padding: 12px 14px; border-left: 4px solid var(--line); background: var(--paper); }
.feedback:empty { display: none; }
.feedback[data-kind="ok"] { background: var(--ok-bg); border-left-color: var(--ok); }
.feedback[data-kind="ko"] { background: var(--bad-bg); border-left-color: var(--bad); }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.quiet { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

.res-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.res { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.res .ill { width: 44px; height: 44px; }
.res b { display: block; }
.res a { color: inherit; text-decoration: none; }
.res span { color: var(--muted); font-size: 0.93rem; display: block; }
.res .arrow { color: var(--teal); font-weight: 800; font-size: 1.2rem; }

/* À propos */
.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.monogram { width: 76px; height: 76px; border-radius: 50%; background: var(--teal); color: var(--on-teal); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--sun); }
.about-text { display: grid; gap: 10px; max-width: 66ch; }
.proofs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin-top: 6px; }
.proofs li { font-size: 0.86rem; font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--paper); }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 14px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.faq details p { margin-top: 8px; color: var(--muted); max-width: 68ch; }

/* Bandeau final */
.band { background: var(--teal); color: var(--on-teal); border-radius: 20px; padding: 40px 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.band h2 { color: var(--on-teal); }
.band-text { display: grid; gap: 12px; }
.band .input, .band .select { border-color: transparent; }
.band .check-row { color: var(--on-teal); }
.band .check-row a { color: var(--on-teal); }
.band label { color: var(--on-teal); }

/* ---------- Formulaires */
.form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field .hint { font-weight: 400; color: var(--muted); }
.band .field .hint { color: var(--on-teal); opacity: 0.85; }
.input, .select, .textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 46px; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--teal); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal); flex: none; }
.hp { display: none; }

/* ---------- Pied de page */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--surface); padding-block: 44px 28px; font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.foot-brand { display: grid; gap: 10px; align-content: start; }
.foot-brand p { color: var(--muted); max-width: 40ch; }
.site-footer h2 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.foot-note { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- En-tête des pages intérieures */
.page-head {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--line);
  padding-block: 28px 40px;
}
.page-head .wrap { display: grid; gap: 14px; }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.page-body { padding-top: 40px; }

/* ---------- Filtres */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; }
.chip { font: inherit; font-weight: 700; font-size: 0.93rem; border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { font-family: var(--font-mono); font-size: 0.8rem; opacity: 0.75; margin-left: 4px; }
.filter-status { font-size: 0.88rem; color: var(--muted); margin-left: 4px; }

/* ---------- Catalogue */
.group { display: grid; gap: 18px; margin-bottom: 52px; }
.group-head { display: grid; gap: 4px; }
.group-head p { color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.course-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-width: 0; }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-top .ill { width: 46px; height: 46px; }
.cc-level { font-size: 0.82rem; color: var(--muted); font-weight: 700; text-align: right; }
.course-card h3 a { color: inherit; text-decoration: none; }
.cc-pitch { color: var(--muted); font-size: 0.97rem; }
.cc-state { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.cc-state .status-pill { font-size: 0.8rem; }
.cc-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-note { margin: 0; font-size: 0.82rem; color: var(--muted); }
.pack-card .cc-state { margin: -4px 0 12px; }
.free-paid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.fp-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); display: grid; gap: 8px; align-content: start; }
.fp-free { border-color: var(--ok); }
.fp-col p { margin: 0; }
.fp-col p:not(.fp-title) { color: var(--muted); font-size: 0.95rem; }
.fp-title { font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-free .tag { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 700px) { .free-paid { grid-template-columns: minmax(0, 1fr); } }
.cc-foot { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 12px; }
.cc-more { display: block; margin-top: 6px; color: var(--teal); font-weight: 700; font-size: 0.93rem; }
.price { font-family: var(--font-mono); font-weight: 600; font-size: 1.3rem; font-variant-numeric: tabular-nums; word-spacing: -0.35em; }
.price .old { word-spacing: -0.1em; }
.old { text-decoration: line-through; color: var(--muted); font-family: var(--font-mono); font-size: 0.95rem; margin-left: 6px; font-weight: 400; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mark-ink); background: var(--mark); border-radius: 4px; padding: 2px 8px; }
.tag.soft { background: var(--soft); color: var(--ink); }
.tag-link { text-decoration: none; }
.reassure { list-style: none; padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; background: var(--soft); border-radius: 12px; font-weight: 700; font-size: 0.93rem; margin-bottom: 36px; }
.reassure li::before { content: "✓"; color: var(--ok); margin-right: 8px; }

.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 18px; }
.pack-card { position: relative; background: var(--surface); border: 2px solid var(--teal); border-radius: var(--radius); padding: 24px 22px 22px; display: grid; gap: 10px; grid-template-rows: auto auto 1fr auto auto; }
.pack-card.best { border-color: var(--ink); box-shadow: 8px 8px 0 var(--sun); }
.pack-card .ribbon { position: absolute; top: -13px; left: 18px; }
.pack-card ul { list-style: none; padding: 0; display: grid; gap: 4px; font-size: 0.95rem; align-content: start; }
.pack-card li::before { content: "✓"; color: var(--teal); font-weight: 700; margin-right: 8px; }
.pack-card li a { color: inherit; }
.save { color: var(--ok); font-weight: 700; font-size: 0.92rem; }
.soon-card { border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 8px; color: var(--muted); max-width: 640px; }
.soon-card h3 { color: var(--ink); }

/* ---------- Page d'un cours */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "head buy" "body buy"; column-gap: 56px; }
.course-head { grid-area: head; display: grid; gap: 14px; align-content: start; }
.buy-area { grid-area: buy; }
.course-body { grid-area: body; display: grid; gap: 52px; padding-top: 44px; min-width: 0; }
.course-head .ill { width: 64px; height: 64px; }
.head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.facts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-top: 6px; }
.facts li { display: grid; gap: 2px; align-content: start; border-left: 3px solid var(--sun); padding-left: 12px; }
.facts b { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.buybox { position: sticky; top: 88px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; box-shadow: 8px 8px 0 var(--sun); }
.buybox .price { font-size: 2.1rem; line-height: 1; }
.launch { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 0.93rem; }
.launch b { font-family: var(--font-mono); }
.ticks { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 0.93rem; }
.ticks li { display: flex; gap: 8px; }
.ticks li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 700; color: var(--muted); }
.status-pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); }
.block-head { display: grid; gap: 8px; margin-bottom: 18px; }
.block-head p { color: var(--muted); }
.course-body h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
.who { list-style: none; padding: 0; display: grid; gap: 10px; }
.who li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.who li::before { content: "→"; color: var(--teal); font-weight: 800; }
.outcomes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.outcomes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.outcomes li::before { content: "✓"; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); color: #12313a; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; }
.modules { list-style: none; padding: 0; counter-reset: mod; display: grid; gap: 12px; }
.module { counter-increment: mod; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.module::before { content: counter(mod, decimal-leading-zero); font-family: var(--font-mono); font-weight: 600; color: var(--teal); font-size: 1.15rem; line-height: 1.5; }
.module h3 { font-size: 1.08rem; }
.module p { color: var(--muted); font-size: 0.97rem; margin-top: 2px; }
.free-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.free-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.92rem; text-decoration: none; }
.free-link:hover { text-decoration: underline; }
.free-link::before { content: "Gratuit"; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; background: var(--ok-bg); color: var(--ok); border-radius: 4px; padding: 1px 6px; }
.exam-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.exam-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 2px; align-content: start; }
.exam-facts b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.exam-facts span { color: var(--muted); font-size: 0.9rem; }
.weights { display: grid; gap: 16px; }
.weight { display: grid; gap: 6px; }
.weight-top { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; font-weight: 700; }
.weight-top .en { font-weight: 400; color: var(--muted); }
.weight-top .pct { font-family: var(--font-mono); font-style: normal; color: var(--ink); font-weight: 600; }
.bar-track { position: relative; height: 14px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.bar-min, .bar-range { position: absolute; top: 0; bottom: 0; }
.bar-min { left: 0; width: var(--lo); background: var(--teal); opacity: 0.45; }
.bar-range { left: var(--lo); width: var(--span); background: var(--teal); }
.try-box { background: var(--soft); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; }
.try-box .res { background: var(--surface); }
.pack-up { display: grid; gap: 10px; border: 2px dashed var(--teal); border-radius: var(--radius); padding: 20px; }
.sibs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.sib { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.sib a { color: inherit; text-decoration: none; font-weight: 700; }
.sib .price { font-size: 1rem; }
.mobile-bar { display: none; }
@media (max-width: 960px) {
  .course-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "buy" "body"; }
  .buy-area { margin-top: 24px; }
  .buybox { position: static; }
  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    align-items: center; justify-content: space-between; gap: 12px;
    box-shadow: 0 -10px 26px -18px rgba(0, 0, 0, 0.45);
    transform: translateY(110%); visibility: hidden;
    transition: transform 200ms ease, visibility 200ms;
  }
  .mobile-bar.show { transform: none; visibility: visible; }
  .mobile-bar .mb-title { font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
  .mobile-bar .price { font-size: 1.1rem; }
  body.has-bar .site-footer { padding-bottom: 96px; }
}

/* ---------- Panier */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.cart-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cart-item .ill { width: 48px; height: 48px; }
.ci-title { font-weight: 700; }
.ci-title a { color: inherit; text-decoration: none; }
.ci-title a:hover { text-decoration: underline; }
.ci-sub { color: var(--muted); font-size: 0.9rem; }
.ci-right { display: grid; justify-items: end; gap: 2px; }
.ci-right .price { font-size: 1.1rem; }
.summary { position: sticky; top: 88px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; box-shadow: 8px 8px 0 var(--sun); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; }
.sum-row > span:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; word-spacing: -0.35em; }
.sum-row.minus > span:last-child { color: var(--ok); }
.sum-row.total { border-top: 1px dashed var(--line); padding-top: 10px; font-weight: 700; font-size: 1.1rem; }
.sum-row.today { background: var(--ok-bg); border-radius: 8px; padding: 8px 10px; font-weight: 700; }
.suggest { border: 2px dashed var(--teal); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; background: var(--soft); margin-top: 14px; }
.reserve { margin-top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 18px; max-width: 780px; }
.empty { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 24px 16px 8px; }
.empty .ill { width: 200px; height: auto; }
.empty .ctas { justify-content: center; }

/* ---------- Exercices */
.progress { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; }
.progress-top { display: flex; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; font-weight: 700; }
.progress-bar { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 999px; transition: width 300ms ease; }
.cheer { color: var(--ok); font-weight: 700; }
.ex-list { display: grid; gap: 24px; }
.ex-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; min-width: 0; }
.ex-card:target { border-color: var(--teal); box-shadow: 0 0 0 4px var(--soft); }
.ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.done-badge { display: none; margin-left: auto; font-size: 0.82rem; font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 2px 10px; }
.is-done .done-badge { display: inline-block; }
.ex-card h2 { font-size: clamp(1.3rem, 2.6vw, 1.55rem); }
.ex-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ex-statement { display: grid; gap: 12px; min-width: 0; }
.ex-side { display: grid; gap: 14px; min-width: 0; }
.answer { display: grid; gap: 10px; background: var(--paper); border: 2px dashed var(--line); border-radius: 12px; padding: 14px; }
.answer label { font-weight: 700; }
.answer-row { display: flex; gap: 8px; flex-wrap: wrap; }
.answer-row .input { flex: 1 1 150px; width: auto; font-family: var(--font-mono); }
pre.code { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 0.92rem; margin: 0; line-height: 1.5; }
code.inline { background: var(--soft); border-radius: 4px; padding: 1px 5px; font-size: 0.92em; }
details.solution { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; }
details.solution summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--teal); }
details.solution[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.steps { padding-left: 1.3em; display: grid; gap: 10px; margin-bottom: 16px; }
.steps li::marker { color: var(--teal); font-weight: 700; }
.calc { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.92rem; background: var(--paper); border-radius: 6px; padding: 6px 10px; display: block; margin-top: 4px; overflow-x: auto; white-space: nowrap; }
.ex-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 14px; }
.ex-foot p { color: var(--muted); }
.ex-foot a { font-weight: 700; }
ol.mcq-en { list-style: none; padding: 0; }

/* ---------- Leçons */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.lesson-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.lesson-card h2, .lesson-card h3 { font-size: 1.25rem; }
.lesson-card h2 a, .lesson-card h3 a { color: inherit; text-decoration: none; }
.lesson-card p { color: var(--muted); font-size: 0.97rem; }
.lesson-card.soon { border-style: dashed; background: transparent; }
.lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lesson-top .ill { width: 44px; height: 44px; }
.read-time { font-size: 0.85rem; color: var(--muted); font-weight: 700; }

.article { max-width: 760px; margin: 0 auto; padding-block: 8px 24px; display: grid; gap: 16px; }
.article h2 { font-size: 1.5rem; margin-top: 22px; }
.article p, .article li { max-width: 68ch; }
.article ul, .article ol { padding-left: 1.3em; display: grid; gap: 6px; }
.article li::marker { color: var(--teal); }
.formula { font-family: var(--font-mono); font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; white-space: nowrap; }
.note { border-left: 3px solid var(--teal); padding-left: 14px; color: var(--muted); }
.article .scroll { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px; }
.quiz { display: grid; gap: 10px; }
.quiz details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; }
.quiz summary { cursor: pointer; font-weight: 700; }
.quiz details p { margin-top: 8px; color: var(--muted); }
.further { display: grid; gap: 8px; }
.cta-box { background: var(--teal); color: var(--on-teal); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; margin-top: 28px; }
.cta-box h2 { color: var(--on-teal); margin-top: 0; font-size: 1.4rem; }
.cta-box p { max-width: 60ch; }
.cta-box .btn { border-color: var(--on-teal); }
.cta-box .btn-primary { background: var(--on-teal); color: var(--teal); }
.cta-box .btn-ghost { background: transparent; color: var(--on-teal); }
.cta-box .btn[data-state="in"] { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-bg); }

/* ---------- Bibliothèque */
.library { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.shelf { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.shelf h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.refs { list-style: none; padding: 0; display: grid; gap: 14px; }
.refs li { display: grid; gap: 3px; border-left: 3px solid var(--grid); padding-left: 12px; }
.refs a { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.refs a:hover { color: var(--teal); text-decoration: underline; }
.refs .meta { font-size: 0.88rem; color: var(--muted); }
.refs .kind { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.shelf-links { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 0.95rem; }
.shelf-links b { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ---------- Pages simples (merci, 404, mentions) */
.simple { max-width: 720px; margin: 0 auto; padding-block: 56px 24px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.simple .ill { width: 220px; height: auto; }
.simple .ctas { justify-content: center; }
.legal-body { max-width: 760px; display: grid; gap: 14px; }
.legal-body h2 { font-size: 1.25rem; margin-top: 12px; }
.legal-body p { color: var(--ink); max-width: 72ch; }

/* ---------- Notification panier */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: 20px; z-index: 60;
  margin-inline: auto; width: fit-content; max-width: 560px;
  background: var(--ink); color: var(--paper);
  border-radius: 12px; padding: 12px 16px;
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
  box-shadow: var(--shadow); font-size: 0.95rem;
  transform: translateY(160%); visibility: hidden;
  transition: transform 250ms ease, visibility 250ms;
}
.toast.show { transform: none; visibility: visible; }
.toast a { color: var(--sun); font-weight: 700; white-space: nowrap; }
body.has-bar .toast { bottom: 92px; }

/* ---------- Grilles qui se replient */
@media (max-width: 960px) {
  .hero-grid, .try-grid, .band, .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .tracks { grid-template-columns: minmax(0, 1fr); }
  .steps3 { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 170px minmax(0, 1fr); column-gap: 20px; align-items: center; }
  .step .ill { grid-row: span 3; max-width: 170px; margin: 0; }
  .includes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-body { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .hero-visual { max-width: 520px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-block: 36px 44px; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step .ill { grid-row: auto; max-width: 190px; margin: 0 auto; }
  .includes, .outcomes, .facts, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .about { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .band { padding: 28px 20px; border-radius: 16px; }
  .cart-item { grid-template-columns: 40px minmax(0, 1fr); }
  .cart-item .ill { width: 40px; height: 40px; }
  .ci-right { grid-column: 2; justify-items: start; display: flex; gap: 16px; align-items: baseline; }
  .reserve { padding: 22px 18px; }
  .ex-card { padding: 20px 16px; }
  .res { grid-template-columns: auto minmax(0, 1fr); }
  .res .arrow { display: none; }
  .sticker { width: 52px; height: 52px; }
}

/* ---------- Zones tactiles confortables sur téléphone et tablette (au moins 44 px) */
@media (max-width: 600px), (pointer: coarse) {
  .brand, .cart-link, .menu-btn { min-height: 44px; }
  .btn, .btn-sm, .chip { min-height: 44px; }
  .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .crumbs a, .site-footer a, .free-link, .lex-see a, .shelf-links a, .further a, .ex-foot a { display: inline-block; padding-block: 11px; }
  .crumbs ol { row-gap: 0; }
  .tag-link { min-height: 44px; display: inline-flex; align-items: center; padding: 6px 14px; }
  .faq summary, .quiz summary, details.solution summary, .mc-table-wrap summary { padding-block: 12px; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .range { height: 44px; }
  .check-row { min-height: 44px; }
  .check-row input { width: 24px; height: 24px; flex: none; }
  .choice { min-height: 48px; }
}

/* ---------- Rappels mathématiques : bouton sur l'exercice, panneau, fiches */
.ex-prereq { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ex-prereq-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 700; color: var(--muted); }
.prereq-btn { font: inherit; font-size: 0.86rem; font-weight: 700; background: var(--soft); color: var(--teal-strong); border: 1px solid transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 40px; }
.prereq-btn:hover, .prereq-btn:focus-visible { border-color: var(--teal); }
.prereq-dialog { border: 2px solid var(--ink); border-radius: var(--radius); padding: 0; width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 900px); background: var(--surface); color: var(--ink); box-shadow: 8px 8px 0 var(--sun); }
.prereq-dialog::backdrop { background: rgba(18, 49, 58, 0.55); }
.prereq-inner { padding: 18px 22px 22px; display: grid; gap: 12px; }
.prereq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.prereq-head h2 { font-size: 1.35rem; margin: 2px 0 4px; line-height: 1.2; }
.prereq-use { color: var(--muted); margin: 0; }
.prereq-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); }
.prereq-tabs [role="tab"] { font: inherit; font-weight: 700; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 8px 12px; cursor: pointer; color: var(--muted); }
.prereq-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--teal); }
.prereq-body { display: grid; gap: 8px; }
.prereq-body h3 { font-size: 1.02rem; margin-top: 10px; }
.prereq-body p, .prereq-body li { margin: 0; }
.prereq-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.prereq-body .formula { margin: 2px 0; }
.prereq-foot { margin: 0; color: var(--muted); }
.express-box { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; box-shadow: 6px 6px 0 var(--sun); display: grid; gap: 10px; }
.express-box h2 { margin-top: 0; font-size: 1.2rem; }
.express-box p { margin: 0; }
.notion { display: grid; gap: 10px; }
.notion h3 { font-size: 1.15rem; margin-top: 14px; }
.notion p, .notion li { margin: 0; }
.notion ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.prereq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.prereq-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.prereq-card h3 { font-size: 1.15rem; line-height: 1.2; }
.prereq-card h3 a { color: inherit; text-decoration: none; }
.prereq-card p { color: var(--muted); margin: 0; }
.res-links { padding-left: 1.2em; display: grid; gap: 6px; }
@media (max-width: 800px) { .prereq-grid { grid-template-columns: minmax(0, 1fr); } .prereq-inner { padding: 14px 16px 18px; } }

/* ---------- Modes d'entraînement : bibliothèque, apprentissage, examen */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.modes a { display: grid; gap: 2px; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.modes a span { font-size: 0.84rem; color: var(--muted); }
.modes a:hover { border-color: var(--teal); }
.modes a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.modes a[aria-current="page"] span { color: var(--paper); opacity: 0.8; }
@media (max-width: 700px) { .modes { grid-template-columns: minmax(0, 1fr); gap: 8px; } .modes a { padding: 8px 12px; } }
.hint { border: 1px dashed var(--line); border-radius: 10px; padding: 6px 12px; }
.hint summary { cursor: pointer; font-weight: 700; color: var(--teal); padding: 8px 0; min-height: 40px; display: flex; align-items: center; gap: 6px; }
.hint p { margin: 6px 0 4px; color: var(--muted); }
/* Mode Apprentissage */
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.path-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 10px; align-content: start; }
.path-card h3 { font-size: 1.25rem; line-height: 1.2; }
.path-card h3 a { color: inherit; text-decoration: none; }
.path-card p { color: var(--muted); margin: 0; }
.path-steps-list { margin: 0; padding-left: 1.3em; display: grid; gap: 2px; font-size: 0.92rem; }
.path-progress { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.path-progress .progress-bar { height: 8px; }
.path-progress-text { font-size: 0.86rem; color: var(--muted); font-weight: 700; }
.path-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.path-side { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 10px; }
.path-side-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.path-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.path-step { display: grid; gap: 4px; }
.path-step-label { font-weight: 700; font-size: 0.95rem; }
.path-dots { list-style: none; margin: 0 0 0 -8px; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.path-dot { width: 40px; height: 40px; margin: -6px 0; border: 0; background: none; cursor: pointer; padding: 0; display: grid; place-items: center; }
.path-dot::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); box-sizing: border-box; }
.path-dot[data-status="ok"]::before { background: var(--ok); border-color: var(--ok); }
.path-dot[data-status="aide"]::before { background: #7cc8a4; border-color: #7cc8a4; }
.path-dot[data-status="revoir"]::before { background: var(--sun); border-color: var(--sun); }
.path-dot[aria-current="step"]::before { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.path-dot:focus-visible { outline: 3px solid var(--sun); outline-offset: -6px; border-radius: 50%; }
.path-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; margin-bottom: 12px; }
.path-notion { color: var(--muted); }
.path-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.path-end { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px 24px; box-shadow: 6px 6px 0 var(--sun); display: grid; gap: 12px; }
.path-end h2 { margin: 0; }
.path-end p { margin: 0; }
.path-redo { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.path-redo:empty { display: none; }
@media (max-width: 900px) {
  .path-grid { grid-template-columns: minmax(0, 1fr); }
  .path-layout { grid-template-columns: minmax(0, 1fr); }
  .path-side { position: static; }
}

/* ---------- Mode Examen */
.exam-setup { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.exam-setup fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.exam-setup legend { font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 6px; }
.exam-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.exam-opts-row { display: flex; flex-wrap: wrap; }
.exam-opt { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.exam-opt:has(input:checked) { border-color: var(--ink); background: var(--soft); }
.exam-opt input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.exam-opt-inline { align-items: center; }
.exam-opt.is-off { opacity: 0.45; cursor: not-allowed; }
.exam-opts-row .link-btn { align-self: center; }
.exam-opt-inline input { margin-top: 0; }
.exam-n { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.exam-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; margin-bottom: 10px; }
.exam-timer { font-family: var(--font-mono); font-size: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; }
.exam-timer.is-low { color: var(--bad); border-color: var(--bad); }
.exam-strip { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.exam-strip button { width: 34px; height: 34px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.exam-strip button[data-answered="true"] { background: var(--soft); border-color: var(--teal); }
.exam-strip button[aria-current="step"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.exam-cards .ex-card { scroll-margin-top: 90px; }
.exam-cards .choice[aria-pressed="true"] { border-color: var(--ink); background: var(--soft); }
.exam-score { font-size: 1.3rem; }
.exam-table { width: 100%; border-collapse: collapse; }
.exam-table caption { text-align: left; font-weight: 700; margin-bottom: 6px; }
.exam-table th, .exam-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.exam-table thead th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.exam-review { display: grid; gap: 18px; margin-top: 12px; }
@media (max-width: 700px) { .exam-opts { grid-template-columns: minmax(0, 1fr); } }

/* Page d'un cours d'examen : ce qui est disponible maintenant, ce qui viendra au lancement */
.now-later { display: grid; gap: 8px; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.now-later p { margin: 0; font-size: 0.95rem; }
.now-later .tag { margin-right: 6px; }

/* ---------- Catalogue en trois domaines : packs mis en avant, certification, prérequis des parcours */
.packs-band { margin: 6px 0 26px; }
.packs-band .group-head p a { font-weight: 700; }
.pack-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pack-mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 6px; align-content: start; grid-template-rows: auto 1fr auto auto auto; }
.pack-mini h3 { font-size: 1.1rem; }
.pack-mini p { margin: 0; }
.pack-mini .muted { font-size: 0.86rem; }
.pack-mini .price { font-size: 1.15rem; }
.pack-mini .save { color: var(--ok); font-weight: 700; font-size: 0.9rem; }
.pack-mini .btn { justify-self: start; margin-top: 4px; }
@media (max-width: 1000px) { .pack-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .pack-mini-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 2px 16px 8px; scroll-padding-inline: 16px; }
  .pack-mini { scroll-snap-align: start; }
}
.cc-cert { margin: -4px 0 0; }
.domain-cert { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--teal); min-height: 1.2em; }
.track-card.domain-card { grid-template-rows: auto auto auto auto 1fr auto; }
.pack-rows { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 10px; }
.pack-row { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; }
.pack-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.pack-row .muted { font-size: 0.88rem; }
.pack-row-buy { display: flex; align-items: center; gap: 12px; }
.pack-row-buy .price { font-size: 1.1rem; }
.path-before { border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px; background: var(--surface); padding: 10px 14px; margin-bottom: 14px; }
.path-before p { margin: 0 0 4px; }
.path-before ul { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; }
.path-before-line { margin: 0; color: var(--muted); }

/* ---------- Packs : bandeau de l'accueil et page dédiée */
.home-packs { margin: 40px 0 0; }
.home-packs .group-head { margin-bottom: 14px; }
.home-packs h3 { font-size: 1.35rem; }
.pack-mini h3 a, .pack-mini h4 a { color: inherit; text-decoration: none; }
.pack-mini h3 a:hover, .pack-mini h4 a:hover { text-decoration: underline; }
.pack-mini h4 { font-size: 1.1rem; }
.page-packs .group { margin-top: 30px; }
.page-packs .group-head { margin-bottom: 16px; }
.pack-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .pack-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pack-grid-four { grid-template-columns: minmax(0, 1fr); } }
.pack-card { scroll-margin-top: 84px; }
@media (min-width: 1101px) { .page-packs #autres-packs .pack-grid:not(.pack-grid-best) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* ---------- Domaines de l'accueil : trois colonnes sur grand écran, deux sur tablette */
.tracks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tracks > .track-card { grid-column: span 2; }
.tracks > .track-card:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 960px) {
  .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracks > .track-card, .tracks > .track-card:nth-child(n+4) { grid-column: auto; }
  .tracks > .track-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 600px) { .tracks { grid-template-columns: minmax(0, 1fr); } }
/* ---------- Packs : sous-groupes, puis le pack Intégral en bandeau */
.pack-sub { margin: 26px 0 12px; display: grid; gap: 2px; }
.pack-sub:first-of-type { margin-top: 4px; }
.pack-sub h3 { font-size: 1.2rem; }
.pack-grid-best { margin-top: 30px; }
@media (min-width: 700px) {
  .pack-grid > .pack-card.best { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; column-gap: 40px; }
  .pack-card.best > h3 { grid-column: 1; grid-row: 1; }
  .pack-card.best > .muted { grid-column: 1; grid-row: 2; }
  .pack-card.best > ul { grid-column: 1; grid-row: 3; display: block; columns: 2; column-gap: 28px; }
  .pack-card.best > ul li { break-inside: avoid; margin-bottom: 6px; }
  .pack-card.best > .price { grid-column: 2; grid-row: 1; justify-self: end; }
  .pack-card.best > .save { grid-column: 2; grid-row: 2; justify-self: end; }
  .pack-card.best > .btn { grid-column: 2; grid-row: 3; align-self: end; }
}
@media (min-width: 700px) and (max-width: 1100px) { .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---------- Notation mathématique */
:root { --font-math: "STIX Two Text", "Cambria Math", Cambria, "Latin Modern Roman", "Times New Roman", Georgia, serif; }
.sym, .m-it { font-family: var(--font-math); font-style: italic; font-weight: 400; letter-spacing: 0; }
.sym.up { font-style: normal; font-family: var(--font-display); font-weight: 800; }
.ill .m { font-family: var(--font-math); font-style: italic; font-weight: 400; }
.ang { display: inline-block; border-top: 0.07em solid currentColor; border-right: 0.07em solid currentColor; padding: 0.08em 0.12em 0 0.06em; margin-left: 0.04em; line-height: 1; font-style: italic; }
.ss { display: inline-flex; flex-direction: column; vertical-align: 0.34em; line-height: 1; font-size: 0.62em; margin-left: 0.03em; text-align: left; }
.ss > sup, .ss > sub { font-size: 1em; vertical-align: baseline; position: static; line-height: 1.1; }
sub, sup { line-height: 0; }
.ill .od2 { stroke: #12313a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.ill .o15 { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ill .o7 { stroke: var(--ink); stroke-width: 7; stroke-linecap: round; fill: none; }

/* ---------- Bandeau défilant façon cotations (couleurs fixes : un écran de marché) */
.ticker { background: #0b2a30; color: #e6efed; border-block: 2px solid #12313a; }
.ticker-inner { display: flex; align-items: stretch; }
.ticker-label { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: #ffd84d; color: #12313a; font-family: var(--font-display); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.ticker-label:hover { background: #ffe680; }
.ticker-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; display: flex;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.ticker-track { flex: none; display: flex; align-items: center; gap: 30px; margin: 0; padding: 11px 30px 11px 0; list-style: none; animation: tick 90s linear infinite; }
.ticker-track li { display: inline-flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.ticker-track li::before { content: ""; width: 8px; height: 8px; background: #63b5bc; align-self: center; flex: none; }
.ticker-track li:nth-child(3n)::before { background: #ffd84d; }
.tk-sym { font-family: var(--font-math); font-style: italic; font-size: 1.12rem; color: #ffd84d; }
.tk-sym.up { font-family: var(--font-mono); font-style: normal; font-weight: 600; font-size: 0.95rem; }
.tk-lab { font-family: var(--font-mono); font-size: 0.8rem; color: #b9cccb; text-transform: uppercase; letter-spacing: 0.04em; }
.ticker-pause { flex: none; width: 46px; border: 0; border-left: 1px solid #1f4950; background: #0e343b; color: #e6efed; cursor: pointer; display: grid; place-items: center; }
.ticker-pause svg { width: 16px; height: 16px; }
.ticker-pause .i-play { display: none; }
.ticker.paused .ticker-pause .i-play { display: block; }
.ticker.paused .ticker-pause .i-pause { display: none; }
.ticker:hover .ticker-track, .ticker.paused .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-track[aria-hidden="true"] { display: none; }
  .ticker-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .ticker-pause { display: none; }
}

/* ---------- Héros : carte triangle */
.tc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-right: 40px; }
.course-body .includes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.launch b { word-spacing: -0.35em; }
.triangle-card.flat { box-shadow: none; border-width: 1px; border-color: var(--line); padding: 14px; }
.band .eyebrow { color: var(--on-teal); opacity: 0.85; }

/* ---------- Nomenclature (accueil) */
.sym-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sym-card { position: relative; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 16px 18px 18px; display: grid; gap: 4px; align-content: start; min-height: 150px; }
.sym-card.hl { background: var(--mark); }
.sym-card.hl, .sym-card.hl a, .sym-card.hl .sym-f { color: var(--mark-ink); }
.sym-card a { color: var(--ink); text-decoration: none; display: grid; gap: 6px; }
.sym-big { font-family: var(--font-math); font-style: italic; font-size: 2.5rem; line-height: 1.05; color: var(--teal); }
.sym-card.hl .sym-big { color: var(--mark-ink); }
.sym-big.up { font-family: var(--font-display); font-style: normal; font-weight: 800; }
.sym-name { font-weight: 700; }
.sym-f { font-family: var(--font-math); font-size: 1.02rem; color: var(--muted); }

/* ---------- Notations d'un cours */
.nota { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nota a { display: inline-flex; align-items: baseline; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; text-decoration: none; color: var(--ink); font-size: 0.92rem; }
.nota a:hover { border-color: var(--teal); }
.nota .sym { color: var(--teal); font-size: 1.2rem; }

/* ---------- Lexique */
.lex-group { display: grid; gap: 18px; margin-bottom: 52px; }
.lex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 16px; }
.lex-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.lex-card:target { border-color: var(--teal); box-shadow: 0 0 0 4px var(--soft); }
.lex-sym { display: flex; align-items: center; min-height: 66px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 2px; }
.lex-sym .sym { font-size: 2.3rem; line-height: 1.1; color: var(--teal); }
.lex-sym .sym.up { font-size: 1.9rem; }
.lex-card h3 { font-size: 1.12rem; }
.lex-desc { color: var(--muted); font-size: 0.97rem; }
.lex-f { font-family: var(--font-math); font-size: 1.08rem; background: var(--paper); border-radius: 8px; padding: 8px 12px; overflow-x: auto; }
.lex-ex { font-size: 0.93rem; }
.lex-ex b { color: var(--muted); }
.lex-see { font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lex-see a { font-weight: 700; }

/* ---------- Les éléments de grille ne doivent pas déborder à cause d'une ligne de calcul */
.steps > li, .article > *, .article li, .ex-statement > *, .ex-side > *, .course-body > *, .who > li, .outcomes > li, .module > div, .lex-card > *, .try-grid > *, .res > div { min-width: 0; }

/* ---------- Divers */
.sub { font-size: 1.1rem; margin: 6px 0 12px; }
.mt-s { margin-top: 14px; }
.h-sum { font-size: 1.3rem; }
.legal-body ul { padding-left: 1.2em; display: grid; gap: 4px; }
/* menu replié jusqu'à 1120 px : au-delà, logo, 7 liens et Réservations tiennent sur une ligne */
.nav a, .brand { white-space: nowrap; }
@media (max-width: 1120px) {
  .bar { flex-wrap: wrap; row-gap: 0; }
  .cart-label { display: none; }
  .js .menu-btn { display: inline-flex; }
  .js .nav { display: none; }
  .js .site-header.open .nav { display: grid; width: 100%; order: 10; gap: 2px; padding: 4px 0 14px; }
  .js .site-header.open .nav a { padding: 12px; font-size: 1.05rem; }
  .no-js .nav { width: 100%; order: 10; flex-wrap: wrap; padding-bottom: 8px; }
}
@media (max-width: 960px) { .sym-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .sym-big { font-size: 2.1rem; }
  .sym-card { min-height: 0; padding: 14px; }
  .tk-lab { font-size: 0.78rem; }
}

/* ---------- Filtres : thème et niveau combinés, défilement horizontal sur mobile, pagination */
.filters { display: grid; gap: 10px; margin-bottom: 28px; align-items: start; }
.filter-group { display: grid; grid-template-columns: 5.8rem minmax(0, 1fr); align-items: start; gap: 4px 12px; }
.filter-label { font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.filter-status { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.filter-search { max-width: 420px; min-height: 42px; padding: 8px 12px; }
.filter-search::-webkit-search-cancel-button { cursor: pointer; }
.progress-detail { font-weight: 400; color: var(--muted); }
.progress-bar { display: flex; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--sun); transition: width 300ms ease; }
.is-ko .done-badge { color: var(--bad); background: var(--bad-bg); }
.filter-empty { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--muted); }
.ex-more { display: flex; justify-content: center; margin-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 700px) {
  .filter-group { grid-template-columns: minmax(0, 1fr); }
  .filter-label { padding-top: 0; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; scroll-padding-inline: 16px; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row .chip { flex: none; }
}

/* ---------- Leçons : sommaire, touches de calculatrice, tableaux de texte */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 2px 16px; }
.toc summary { cursor: pointer; font-weight: 700; padding-block: 10px; }
.toc summary .n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.toc ol { margin: 0 0 12px; padding-left: 1.5em; display: grid; gap: 2px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
kbd { font-size: 0.82em; font-weight: 600; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; background: var(--surface); color: var(--ink); white-space: nowrap; }
table.tri.text th, table.tri.text td { white-space: normal; text-align: left; font-family: var(--font-body); }
table.tri.text td { min-width: 8.5rem; }
table.tri tr.total th, table.tri tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
table.tri.sheet tbody th, table.tri.sheet thead th:first-child { text-align: center; font-family: var(--font-mono); background: var(--paper); color: var(--muted); }

/* ---------- Programme détaillé : chapitres dépliables */
.chapters { list-style: none; padding: 0; display: grid; gap: 10px; }
.chapter details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.chapter details[open] { border-color: var(--teal); }
.chapter summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 14px 18px; }
.chapter summary::-webkit-details-marker { display: none; }
.ch-num { font-family: var(--font-mono); font-weight: 600; color: var(--teal); font-size: 1.15rem; line-height: 1.5; }
.ch-head { display: grid; gap: 2px; min-width: 0; }
.ch-title { font-weight: 700; font-size: 1.05rem; }
.ch-sum { color: var(--muted); font-size: 0.95rem; }
.ch-free { align-self: center; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--ok-bg); color: var(--ok); border-radius: 4px; padding: 2px 7px; }
.chapter summary::after { content: "+"; grid-column: 3; grid-row: 1; justify-self: end; font-family: var(--font-mono); font-weight: 600; color: var(--teal); font-size: 1.2rem; line-height: 1.3; }
.chapter summary:has(.ch-free)::after { grid-row: 2; }
.chapter details[open] summary::after { content: "−"; }
.ch-body { padding: 0 18px 16px 76px; display: grid; gap: 6px; }
.ch-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ch-sections { padding-left: 1.2em; display: grid; gap: 4px; }
.ch-sections li::marker { color: var(--teal); }
@media (max-width: 600px) {
  .chapter summary { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 14px; }
  .ch-body { padding: 0 14px 14px 14px; }
}

/* ---------- Espace élève : exercices de chapitre, navigation entre chapitres */
.exo { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; min-width: 0; }
.exo h3 { font-size: 1.08rem; }
.exo > * { min-width: 0; }
.ch-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 12px; }
.eleve-tag { font-size: 0.85rem; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 4px 12px; margin-right: auto; }
.private-note { border: 2px dashed var(--line); border-radius: 12px; padding: 12px 16px; color: var(--muted); font-size: 0.95rem; }
.ch-cards { list-style: none; padding: 0; display: grid; gap: 12px; counter-reset: chc; }
.ch-cards li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px 70px; display: grid; gap: 4px; counter-increment: chc; }
.ch-cards li::before { content: counter(chc, decimal-leading-zero); position: absolute; left: 20px; top: 15px; font-family: var(--font-mono); font-weight: 600; color: var(--teal); font-size: 1.15rem; }
.ch-cards a { font-weight: 700; font-size: 1.08rem; text-decoration: none; color: var(--ink); }
.ch-cards a::after { content: ""; position: absolute; inset: 0; }
.ch-cards li:hover { border-color: var(--teal); }
.ch-cards p { color: var(--muted); font-size: 0.95rem; }

.formula { white-space: pre-wrap; }
@media (max-width: 600px) { .eleve-tag { display: none; } }

.region-field { margin-block: 4px; }
.proof { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--soft); padding: 14px 18px 16px; margin: 4px 0 0; display: grid; gap: 10px; min-width: 0; }
.proof legend { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; padding: 0 6px; }
.proof p, .proof ul { margin: 0; }
.proof ul { padding-left: 1.2em; }
.proof input[type="file"] { padding: 10px; min-height: 48px; }
.region-field label { font-size: 0.9rem; }

/* ---------- Catalogue : cours bientôt disponibles */
.soon-section { display: grid; gap: 18px; margin-top: 8px; }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.soon-grid .soon-card { max-width: none; align-content: start; }
.soon-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.soon-links a { font-weight: 700; }
@media (max-width: 600px), (pointer: coarse) {
  .soon-links a, .toc a { display: inline-block; padding-block: 11px; }
  .toc summary { padding-block: 12px; }
}

/* ---------- Lisibilité sur téléphone : calculs, tableaux, liens alignés */
.crumbs ol, .lex-see { align-items: baseline; }
.article > .calc { background: var(--surface); border: 1px solid var(--line); }
table.tri.lab tbody th { font-family: var(--font-body); white-space: normal; min-width: 7rem; }
pre.code.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .calc { white-space: pre-wrap; }
  table.tri { font-size: 0.86rem; }
  table.tri th, table.tri td { padding: 7px 8px; }
  table.tri thead th { white-space: normal; }
  .article .scroll { padding: 10px; }
}
/* ---------- Exercices : thème principal, puis le second thème éventuel */
.ex-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Leçon Monte Carlo : simulateur */
:root { --chart-base: #8fb3ad; --chart-tail: #0d5c63; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart-base: #4f7378; --chart-tail: #63b5bc; } }
:root[data-theme="dark"] { --chart-base: #4f7378; --chart-tail: #63b5bc; }
.mc { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; display: grid; gap: 18px; box-shadow: 8px 8px 0 var(--sun); margin-block: 6px 10px; min-width: 0; }
.mc-head { display: grid; gap: 4px; }
.mc-head h2 { margin-top: 0; font-size: 1.35rem; }
.mc-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; }
.mc-controls .field { align-content: start; }
.mc-controls label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: 0.92rem; }
.mc-controls output { font-family: var(--font-mono); font-weight: 600; color: var(--teal); white-space: nowrap; }
.mc-controls .hint { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.range { width: 100%; accent-color: var(--teal); margin: 6px 0 0; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.mc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mc-stat { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.mc-stat.tail { border: 2px solid var(--chart-tail); }
.mc-lab { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.mc-stat b { font-size: 1.28rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.mc-sub { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.mc-figure { margin: 0; display: grid; gap: 6px; min-width: 0; }
.mc-chart-wrap { position: relative; min-width: 0; }
.mc-chart { min-height: 230px; transition: opacity 200ms ease; }
.mc.busy .mc-chart { opacity: 0.45; }
.mc-chart svg { display: block; max-width: 100%; }
.mc-bar { fill: var(--chart-base); }
.mc-bar.tail { fill: var(--chart-tail); }
.mc-bar.hover { opacity: 0.7; }
.mc-tailzone { fill: var(--chart-tail); opacity: 0.1; }
.mc-tdot { fill: var(--chart-tail); stroke: var(--surface); stroke-width: 2; }
.mc-grid { stroke: var(--line); stroke-width: 1; }
.mc-baseline { stroke: var(--muted); stroke-width: 1; }
.mc-axis { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.mc-mean { stroke: var(--muted); stroke-width: 1.5; }
.mc-varline { stroke: var(--ink); stroke-width: 2; }
.mc-label { fill: var(--ink); font-family: var(--font-body); font-size: 12px; font-weight: 700; }
.mc-label.muted { fill: var(--muted); }
.mc-tip { position: absolute; top: 6px; z-index: 3; pointer-events: none; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 6px 10px; font-size: 0.84rem; line-height: 1.35; display: grid; gap: 1px; box-shadow: var(--shadow); white-space: nowrap; }
.mc-tip[hidden] { display: none !important; }
.mc-table-wrap summary { cursor: pointer; font-weight: 700; color: var(--teal); }
.mc-table-wrap[open] summary { margin-bottom: 10px; }
.mc-table { font-size: 0.9rem; }
.mc-table th { font-family: var(--font-body); }
@media (max-width: 760px) { .mc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mc { padding: 16px; box-shadow: 6px 6px 0 var(--sun); } }
