/* ==========================================================================
   Sciopia — feuille de styles du site vitrine
   Charte v3 « Bonbon » (DESIGN.md) : Fredoka + Nunito, ciel lilas, nuages et
   collines, cartes très arrondies à lèvre colorée, boutons chunky en relief,
   étincelles, bulles, halos dorés la nuit. Thème clair + sombre. Mobile-first 320 → 1440.
   Noms sémantiques : brand = marque (violet), cta = action principale (framboise).

   TOUTES les couleurs sont dans les deux blocs de tokens ci-dessous (clair puis
   sombre). Ailleurs : uniquement var(--…), blanc (#fff) et transparences.
   ========================================================================== */

/* ---------- Tokens : thème clair (palette « Bonbon », DESIGN.md) ---------- */
:root {
  color-scheme: light;
  /* Tokens DESIGN.md (identiques à app/src/theme.ts) */
  --bg: #f4f0ff;
  --bg-deep: #e4dbff;
  --surface: #ffffff;
  --surface-alt: #faf8ff;
  --sunken: #ebe4ff;
  --border: #ddd2ff;
  --lip: #c7b6ff;
  --ink: #24164d;
  --ink-2: #45387a;
  --muted: #6c6496;
  --brand: #7c4dff;
  --brand-ink: #5b30d9;
  --brand-relief: #5a2fd6;
  --brand-soft: #e6ddff;
  --cta: #e8336b;
  --cta-relief: #b81c4d;
  --sun: #ffd21f;
  --sun-relief: #f29a00;
  --sun-ink: #6b3600;
  --sun-soft: #fff3c2;
  --grass: #2fbf71;
  --grass-ink: #167443;
  --grass-relief: #1e8f51;
  --grass-soft: #d4f5e2;
  --sky: #2f8cff;
  --sky-relief: #1c64cc;
  --sky-soft: #d8eaff;
  --berry: #ff5fa8;
  --berry-relief: #d93d86;
  --berry-soft: #ffe0f0;
  --coral: #ff5a4e;
  --coral-relief: #d63a2f;
  --coral-soft: #ffe0dc;
  --star: #ffc61a;
  --glow: rgba(255, 210, 31, .45);
  --cloud: #e1d6ff;
  --hill: #cdbcff;
  --locked: #d8d2e8;
  --locked-relief: #b9b0d0;
  /* Dérivés web (calculés pour AA, à garder alignés si la palette change) */
  --link: var(--brand-ink);
  --sky-ink: #1c64cc;
  --berry-ink: #b0246a;
  --coral-ink: #b8281e;
  --on-brand: #fff;                 /* texte/icône sur brand */
  --band: var(--bg-deep);           /* bandeaux de section */
  --puff: var(--surface);           /* nuages décoratifs */
  --hill-back: color-mix(in srgb, var(--hill) 70%, var(--brand));
  --header-bg: color-mix(in srgb, var(--bg) 86%, transparent);
  --halo: transparent;              /* halo doré : la nuit seulement */
}

/* ---------- Tokens : thème sombre ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #140b38;
  --bg-deep: #1c1048;
  --surface: #221553;
  --surface-alt: #2a1b63;
  --sunken: #1a1045;
  --border: #3a2a7a;
  --lip: #0c0626;
  --ink: #f5f1ff;
  --ink-2: #d3c9f7;
  --muted: #a99fd6;
  --brand: #9b78ff;
  --brand-ink: #b9a0ff;
  --brand-relief: #6b45e0;
  --brand-soft: #33246e;
  --cta: #ff4f86;
  --cta-relief: #c72a5d;
  --sun: #ffd21f;
  --sun-relief: #e08700;
  --sun-ink: #6b3600;
  --sun-soft: #3d3566;
  --grass: #45d98a;
  --grass-ink: #6ef0a8;
  --grass-relief: #25a463;
  --grass-soft: #173f3a;
  --sky: #4fa0ff;
  --sky-relief: #2a6fd6;
  --sky-soft: #1a3570;
  --berry: #ff7ab8;
  --berry-relief: #d9508f;
  --berry-soft: #4a1f52;
  --coral: #ff6f63;
  --coral-relief: #d94a40;
  --coral-soft: #4a1f45;
  --star: #ffd23f;
  --glow: rgba(255, 210, 31, .55);
  --cloud: #2b1f66;
  --hill: #2f2370;
  --locked: #342a63;
  --locked-relief: #241b4c;
  --link: var(--brand-ink);
  --sky-ink: #79b6ff;
  --berry-ink: #ff7ab8;
  --coral-ink: #ff8a80;
  --on-brand: var(--bg);            /* #fff sur #9b78ff = 3.2:1, bg = 5.7:1 */
  --band: var(--bg-deep);
  --puff: var(--cloud);
  --hill-back: color-mix(in srgb, var(--hill) 75%, var(--bg));
  --header-bg: color-mix(in srgb, var(--bg) 86%, transparent);
  --halo: var(--glow);
}

/* Repli sans JavaScript : suit la préférence système (copie exacte du bloc sombre). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #140b38;
    --bg-deep: #1c1048;
    --surface: #221553;
    --surface-alt: #2a1b63;
    --sunken: #1a1045;
    --border: #3a2a7a;
    --lip: #0c0626;
    --ink: #f5f1ff;
    --ink-2: #d3c9f7;
    --muted: #a99fd6;
    --brand: #9b78ff;
    --brand-ink: #b9a0ff;
    --brand-relief: #6b45e0;
    --brand-soft: #33246e;
    --cta: #ff4f86;
    --cta-relief: #c72a5d;
    --sun: #ffd21f;
    --sun-relief: #e08700;
    --sun-ink: #6b3600;
    --sun-soft: #3d3566;
    --grass: #45d98a;
    --grass-ink: #6ef0a8;
    --grass-relief: #25a463;
    --grass-soft: #173f3a;
    --sky: #4fa0ff;
    --sky-relief: #2a6fd6;
    --sky-soft: #1a3570;
    --berry: #ff7ab8;
    --berry-relief: #d9508f;
    --berry-soft: #4a1f52;
    --coral: #ff6f63;
    --coral-relief: #d94a40;
    --coral-soft: #4a1f45;
    --star: #ffd23f;
    --glow: rgba(255, 210, 31, .55);
    --cloud: #2b1f66;
    --hill: #2f2370;
    --locked: #342a63;
    --locked-relief: #241b4c;
    --link: var(--brand-ink);
    --sky-ink: #79b6ff;
    --berry-ink: #ff7ab8;
    --coral-ink: #ff8a80;
    --on-brand: var(--bg);            /* #fff sur #9b78ff = 3.2:1, bg = 5.7:1 */
    --band: var(--bg-deep);
    --puff: var(--cloud);
    --hill-back: color-mix(in srgb, var(--hill) 75%, var(--bg));
    --header-bg: color-mix(in srgb, var(--bg) 86%, transparent);
    --halo: var(--glow);
  }
}


/* ---------- Autres tokens (formes, typo, mouvement) ---------- */
:root {
  --font-display: "Fredoka", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-card: 28px;
  --r-xl: 32px;
  --r-pill: 999px;

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --gutter: 16px;
  --maxw: 1200px;
  --header-h: 68px;

  /* Masque de vague (alpha seulement, la couleur vient de background) */
  --wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V20C90 4 180 4 270 20s180 16 270 0 135-12 180-4V40z'/%3E%3C/svg%3E");
}
@media (min-width: 768px) { :root { --gutter: 28px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; } }

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; color: var(--ink); text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.625rem, 3.4vw, 2.5rem); }
h3 { font-family: var(--font-body); font-weight: 800; font-size: 1.125rem; line-height: 1.33; }
p, ul, ol { margin: 0 0 1em; }
strong, b { font-weight: 800; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brand); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--sunken); padding: .1em .35em; border-radius: 6px; }
::selection { background: var(--sun); color: var(--sun-ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .theme-toggle:focus-visible, .nav-toggle:focus-visible, .round-btn:focus-visible { outline-offset: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r-md);
  font-weight: 800; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Mise en page ---------- */
.container { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding-block: 64px; position: relative; }
@media (min-width: 1024px) { .section { padding-block: 96px; } }
.section--band { background: var(--band); margin-top: 32px; margin-bottom: 32px; }
.section--band::before, .section--band::after {
  content: ""; position: absolute; left: 0; right: 0; height: 32px; background: var(--band);
  -webkit-mask: var(--wave-mask) left top / 720px 32px repeat-x;
          mask: var(--wave-mask) left top / 720px 32px repeat-x;
  pointer-events: none;
}
.section--band::before { top: -31px; }
.section--band::after { bottom: -31px; transform: scaleY(-1); }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 1.0625rem; }
.section-head > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 959px) { .grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1.1fr .9fr; gap: 64px; } }

.center { text-align: center; }
.muted { color: var(--ink-2); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: 40px; }
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); color: var(--ink-2); line-height: 1.55; }

/* ---------- Icônes (sprite inline, tracé 2px) ---------- */
.icon {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round;
}
.icon--solid { fill: currentColor; stroke-width: 2; }
.icon-arrow { transition: transform .2s var(--spring); }
a:hover > .icon-arrow, button:hover > .icon-arrow { transform: translateX(3px); }

/* ---------- Jeux de couleurs (clé de parcours + marque) ---------- */
.bg-brand, .c-brand   { --c: var(--brand);  --c-relief: var(--brand-relief);  --c-soft: var(--brand-soft);  --c-on: var(--on-brand);           --c-ink: var(--link); }
.bg-green, .c-green  { --c: var(--grass); --c-relief: var(--grass-relief); --c-soft: var(--grass-soft); --c-on: #fff;           --c-ink: var(--grass-ink); }
.bg-yellow, .c-yellow{ --c: var(--sun);   --c-relief: var(--sun-relief);   --c-soft: var(--sun-soft);   --c-on: var(--sun-ink); --c-ink: var(--sun-ink); }
.bg-blue, .c-blue    { --c: var(--sky);   --c-relief: var(--sky-relief);   --c-soft: var(--sky-soft);   --c-on: #fff;           --c-ink: var(--sky-ink); }
.bg-pink, .c-pink    { --c: var(--berry); --c-relief: var(--berry-relief); --c-soft: var(--berry-soft); --c-on: #fff;           --c-ink: var(--berry-ink); }
.bg-cta, .c-cta{ --c: var(--cta);--c-relief: var(--cta-relief);--c-soft: var(--sun-soft);   --c-on: #fff;           --c-ink: var(--coral-ink); }
.bg-coral, .c-coral  { --c: var(--coral); --c-relief: var(--coral-relief); --c-soft: var(--coral-soft); --c-on: #fff;           --c-ink: var(--coral-ink); }
.bg-white            { --c: var(--surface); --c-relief: var(--lip); --c-soft: var(--surface-alt); --c-on: var(--link); --c-ink: var(--link); }
:root[data-theme="dark"] .bg-yellow { --c-ink: var(--sun); }

/* Pastilles d'icône : carré arrondi 34 %, couleur pleine, relief */
.ico-dot, .icon-bubble, .tile {
  display: inline-grid; place-items: center; flex: none;
  background: var(--c, var(--brand)); color: var(--c-on, var(--on-brand));
  border-radius: 34%;
}
.ico-dot { width: 32px; height: 32px; box-shadow: 0 3px 0 var(--c-relief, var(--brand-relief)); }
.ico-dot .icon { width: 17px; height: 17px; }
.icon-bubble, .tile { width: 52px; height: 52px; box-shadow: 0 4px 0 var(--c-relief, var(--brand-relief)); }
.icon-bubble .icon, .tile .icon { width: 26px; height: 26px; }
.tile--lg { width: 72px; height: 72px; box-shadow: 0 6px 0 var(--c-relief, var(--brand-relief)); }
.tile--lg .icon { width: 36px; height: 36px; }
.bg-white.icon-bubble { border: 2px solid var(--border); }

/* ---------- Boutons chunky ---------- */
.btn {
  --b: var(--cta); --b-relief: var(--cta-relief); --b-text: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 24px; margin-bottom: 5px;
  border: 0; border-radius: var(--r-md);
  background: var(--b); color: var(--b-text);
  font-family: var(--font-body); font-weight: 800; font-size: 1.1875rem; line-height: 1.1;
  text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: 0 5px 0 var(--b-relief);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { color: var(--b-text); filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 0 var(--b-relief); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--b-relief); }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; filter: grayscale(.6) opacity(.6); transform: none; }
.btn--lg { min-height: 58px; padding: 0 30px; border-radius: var(--r-md); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 1rem; box-shadow: 0 4px 0 var(--b-relief); margin-bottom: 4px; }
.btn--block { display: flex; width: 100%; }
.btn--secondary { --b: var(--surface); --b-relief: var(--lip); --b-text: var(--link); border: 2px solid var(--border); }
.btn--sun { --b: var(--sun); --b-relief: var(--sun-relief); --b-text: var(--sun-ink); }
.btn--ghost { --b: transparent; --b-relief: transparent; --b-text: var(--ink-2); box-shadow: none; }
.btn--ghost:hover { background: var(--sunken); box-shadow: none; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }

/* Bouton rond d'icône (retour, fermer…) : soleil + icône orange */
.round-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--sun); color: var(--sun-ink);
  box-shadow: 0 4px 0 var(--sun-relief);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.round-btn .icon { width: 22px; height: 22px; stroke-width: 3; }
.round-btn:hover { transform: translateY(-1px); }
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sun-relief); }

.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--link); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- Puces, badges, eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 16px; padding: 6px 14px;
  border-radius: var(--r-pill); background: var(--brand-soft); color: var(--link);
  font-family: var(--font-body); font-weight: 800; font-size: .75rem; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .06em;
}
.eyebrow .icon { width: 15px; height: 15px; }
.section--band .eyebrow, .cta-card .eyebrow, .hero .eyebrow, .page-hero .eyebrow, .article-header .eyebrow { background: var(--surface); box-shadow: 0 3px 0 var(--lip); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: var(--r-pill);
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--lip);
  font-weight: 800; font-size: .9375rem; color: var(--ink); white-space: nowrap;
}
.chip .ico-dot { width: 28px; height: 28px; border-radius: 50%; box-shadow: none; }
.badge {
  --c-soft: var(--brand-soft); --c-ink: var(--link);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--c-soft); color: var(--c-ink);
  font-weight: 800; font-size: .8125rem; line-height: 1.35;
}
.badge .icon { width: 14px; height: 14px; }
.badge--neutral { background: var(--sunken); color: var(--ink-2); }
.badge--amber { background: var(--sun); color: var(--sun-ink); }

/* ---------- Cartes ---------- */
.card {
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--border); border-radius: var(--r-card);
  box-shadow: 0 6px 0 var(--lip);
  padding: 24px;
}
.card > :last-child { margin-bottom: 0; }
.card p { color: var(--ink-2); }
.card .icon-bubble { margin-bottom: 16px; }
.card--panel { background: var(--surface-alt); border-radius: var(--r-xl); }
.card-hover { transition: transform .22s var(--spring), box-shadow .22s var(--spring); }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 10px 0 var(--lip); }

/* ---------- Décor : étincelles, bulles, collines ---------- */
.decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sparkle {
  position: absolute; display: block; width: 22px; height: 22px; background: var(--sun);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 2.8s ease-in-out infinite;
}
.sparkle--white { background: #fff; }
.sparkle--sm { width: 14px; height: 14px; }
.sparkle--lg { width: 32px; height: 32px; }
.bubble {
  position: absolute; display: block; border-radius: 50%;
  width: 28px; height: 28px;
  background: color-mix(in srgb, var(--cloud) 55%, transparent);
  border: 2px solid color-mix(in srgb, var(--surface) 55%, transparent);
  animation: float 7s ease-in-out infinite;
}
.bubble--lg { width: 54px; height: 54px; }
.puff {
  position: absolute; display: block; width: 120px; height: 40px; border-radius: var(--r-pill);
  background: var(--puff); animation: drift 14s ease-in-out infinite;
}
.puff::before, .puff::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.puff::before { width: 56px; height: 56px; left: 18px; top: -28px; }
.puff::after { width: 40px; height: 40px; left: 60px; top: -18px; }
.puff--sm { transform: scale(.65); }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 18px 0; } }
.bubble--sm { width: 16px; height: 16px; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.55) rotate(20deg); opacity: .6; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 72px; z-index: 0; pointer-events: none; }
@media (min-width: 768px) { .hills { height: 104px; } }
.hills .hill-back { fill: var(--hill-back); }
.hills .hill-front { fill: var(--hill); }
.hills .shore { fill: var(--bg); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 2px solid var(--border);
}
.nav { position: relative; display: flex; align-items: center; gap: 10px; min-height: var(--header-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 40px; height: 40px; transition: transform .3s var(--spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav-toggle, .theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  border: 2px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 3px 0 var(--lip);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.nav-toggle:active, .theme-toggle:active { transform: translateY(3px); box-shadow: 0 0 0 var(--lip); }
.nav-toggle { order: 3; }
.theme-toggle { order: 2; display: none; }
:root[data-theme] .theme-toggle { display: inline-grid; }
.theme-toggle .icon { width: 22px; height: 22px; }
.theme-toggle .icon-sun { display: none; color: var(--sun); }
.theme-toggle .icon-moon { color: var(--brand-ink); }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 3px; border-radius: 3px; background: currentColor;
  transition: transform .2s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  position: absolute; top: calc(100% + 10px); left: var(--gutter); right: var(--gutter); z-index: 61;
  display: none; padding: 12px;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg);
  box-shadow: 0 6px 0 var(--lip);
}
.nav-menu.is-open { display: block; animation: pop-in .26s var(--spring); }
.nav-links { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.nav-links a {
  display: block; padding: 12px 16px; border-radius: 14px;
  font-weight: 800; font-size: 1.0625rem; color: var(--ink-2); text-decoration: none;
}
.nav-links a:hover { background: var(--sunken); color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--brand-soft); color: var(--link); }
.nav-menu .btn { width: 100%; }
@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .nav-menu { position: static; display: flex; align-items: center; gap: 12px; order: 1; padding: 0; background: none; border: 0; box-shadow: none; }
  .nav-menu.is-open { animation: none; }
  .nav-links { display: flex; gap: 2px; margin: 0; }
  .nav-links a { padding: 8px 12px; font-size: .96875rem; }
  .nav-menu .btn { width: auto; margin-bottom: 4px; }
}
@keyframes pop-in { from { opacity: 0; transform: scale(.94) translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Héro d'accueil ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 78%);
  padding: 28px 0 104px;
}
@media (min-width: 1024px) { .hero { padding: 56px 0 140px; } }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 72px; align-items: center; }
@media (min-width: 1024px) { .hero-inner { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 56px; } }
.display {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  line-height: 1.02; letter-spacing: -.01em; margin-bottom: 20px;
}
.accent { color: var(--brand-ink); position: relative; white-space: nowrap; }
.accent::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: -.08em; height: .16em;
  background: var(--sun); border-radius: var(--r-pill); z-index: -1;
  box-shadow: 0 3px 0 var(--sun-relief);
}
.hero-copy .lead { max-width: 33em; margin-bottom: 26px; }
.hero-proofs { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-proofs .chip { white-space: normal; }

/* ---------- Démo interactive ---------- */
.demo {
  position: relative; width: 100%; max-width: 500px; margin-inline: auto;
  background: var(--surface-alt); border: 2px solid var(--border); border-radius: var(--r-xl);
  box-shadow: 0 8px 0 var(--lip), 0 0 90px 10px var(--halo);
  padding: 14px;
}
.demo-owl { position: absolute; top: -58px; right: 26px; width: 92px; height: 92px; z-index: 2; pointer-events: none; animation: peek 4s ease-in-out infinite; }
@keyframes peek { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-3deg); } }
.demo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 2px 4px 12px; }
.demo-tag {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--sun); color: var(--sun-ink); box-shadow: 0 3px 0 var(--sun-relief);
  font-weight: 800; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em;
}
.demo-tag .icon { width: 15px; height: 15px; }
.demo-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.demo-steps li {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 4px; border-radius: var(--r-pill);
  font-weight: 800; font-size: .8125rem; color: var(--ink-2);
}
.demo-steps li span {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--sunken); color: var(--ink-2); font-size: .75rem;
}
.demo-steps li.is-active { background: var(--brand-soft); color: var(--link); }
.demo-steps li.is-active span { background: var(--brand); color: var(--on-brand); }
.demo-steps li.is-done span { background: var(--grass); color: #fff; }
@media (max-width: 380px) { .demo-steps li { font-size: 0; gap: 0; padding: 2px; } .demo-steps li span { font-size: .75rem; } }

.demo-screen {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: 540px;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg);
}
.demo-pane { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 20px; animation: pane-in .32s var(--spring); }
@media (max-width: 380px) { .demo-pane { padding: 16px 14px; } }
@keyframes pane-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.demo-pane [tabindex="-1"]:focus { outline: none; }
.demo-pane [tabindex="-1"]:focus-visible { outline: 3px solid var(--ink); }
.demo-title { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; line-height: 1.2; margin: 0; color: var(--ink); }
.demo-hint { margin: 0; font-size: .875rem; color: var(--muted); }
.demo-body { margin: 0; color: var(--ink-2); font-size: 1.0625rem; }
.demo-body strong { color: var(--ink); }

/* Écran 1 : sujet */
.demo-ask { display: flex; align-items: flex-end; gap: 10px; }
.demo-ask img { width: 76px; height: 76px; flex: none; margin-bottom: -4px; }
.demo-speech {
  position: relative; flex: 1; padding: 12px 16px; border-radius: 20px 20px 20px 6px;
  background: var(--brand-soft); color: var(--ink);
}
.demo-input {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px;
  background: var(--sunken); border: 2px solid var(--border); border-radius: var(--r-md);
  font-weight: 700; font-size: 1.0625rem; color: var(--ink);
}
.demo-input .icon { color: var(--link); }
.demo-input.is-filled { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.demo-typed.is-placeholder { color: var(--muted); }
.demo-caret { width: 2px; height: 1.2em; background: var(--brand); margin-left: -6px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.demo-topics { display: grid; gap: 12px; }
.demo-topic {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; cursor: pointer;
  background: var(--surface); color: var(--ink); text-align: left;
  border: 2px solid var(--border); border-radius: var(--r-md); box-shadow: 0 4px 0 var(--lip);
  font-weight: 800; font-size: 1.0625rem;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s, background .15s;
}
.demo-topic .ico-dot { width: 40px; height: 40px; }
.demo-topic .ico-dot .icon { width: 21px; height: 21px; }
.demo-topic > .icon { margin-left: auto; color: var(--link); }
.demo-topic:hover { border-color: var(--brand); transform: translateY(-1px); }
.demo-topic:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lip); }
.demo-topic.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 4px 0 var(--brand-relief); }
.demo-topic[aria-disabled="true"]:not(.is-selected) { opacity: .5; }

/* Écran 2 : génération */
.demo-gen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.demo-gen-icon { width: 76px !important; height: 76px !important; border-radius: 50% !important; box-shadow: 0 6px 0 var(--c-relief) !important; animation: wobble 1.2s ease-in-out infinite; }
.demo-gen-icon .icon { width: 36px !important; height: 36px !important; }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.06); } }
.demo-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; width: 100%; max-width: 320px; }
.demo-tasks li { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); transition: color .2s; }
.demo-task-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sunken); color: transparent; flex: none; transition: background .2s, transform .25s var(--spring); }
.demo-task-dot .icon { width: 15px; height: 15px; stroke-width: 3.5; }
.demo-tasks li.is-running { color: var(--ink); }
.demo-tasks li.is-running .demo-task-dot { background: var(--sun); animation: pulse-dot .8s ease-in-out infinite; }
.demo-tasks li.is-done { color: var(--ink); }
.demo-tasks li.is-done .demo-task-dot { background: var(--grass); color: #fff; transform: scale(1.1); }
@keyframes pulse-dot { 50% { transform: scale(.8); } }

/* Barre de progression (piste sunken, remplissage grass + reflet) */
.progress { position: relative; height: 14px; border-radius: var(--r-pill); background: var(--sunken); overflow: hidden; }
.progress > span {
  display: block; height: 100%; min-width: 14px; border-radius: inherit; background: var(--grass);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35);
  transition: width .5s var(--spring);
}
.progress--zero > span { min-width: 0; }

/* Écran 3 : parcours */
.course-top { display: flex; align-items: center; gap: 12px; }
.course-top .icon-bubble { width: 46px; height: 46px; margin: 0; }
.course-top .icon-bubble .icon { width: 23px; height: 23px; }
.course-top > div { min-width: 0; flex: 1; }
.course-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; line-height: 1.2; }
.course-sub { margin: 2px 0 0; font-size: .8125rem; color: var(--muted); font-weight: 700; }
.stats { display: flex; gap: 6px; flex: none; }
@media (max-width: 440px) {
  .course-top { flex-wrap: wrap; row-gap: 8px; }
  .course-top > div:not(.stats) { flex-basis: calc(100% - 58px); }
  .stats { padding-left: 58px; }
}
.stat-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill);
  font-weight: 800; font-size: .875rem; white-space: nowrap;
}
.stat-chip .icon { width: 16px; height: 16px; }
.stat-chip--streak { background: var(--sun-soft); color: var(--sun-ink); }
.stat-chip--streak .icon { color: var(--cta); }
.stat-chip--xp { background: var(--brand-soft); color: var(--link); }
.stat-chip--xp .icon { color: var(--star); }
:root[data-theme="dark"] .stat-chip--streak { color: var(--sun); }
.stat-chip.is-bump { animation: pop .4s var(--spring); }

.unit-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--brand); color: var(--on-brand); box-shadow: 0 4px 0 var(--brand-relief);
}
.unit-banner small { display: block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.unit-banner strong { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.2; }
.unit-banner .icon { width: 26px; height: 26px; flex: none; }

.path { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.path > li { display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateX(var(--x, 0)); }
.path > li:nth-child(5n+2) { --x: 46px; }
.path > li:nth-child(5n+3) { --x: 62px; }
.path > li:nth-child(5n+4) { --x: 20px; }
.path > li:nth-child(5n+5) { --x: -34px; }
@media (max-width: 380px) { .path > li:nth-child(5n+2) { --x: 30px; } .path > li:nth-child(5n+3) { --x: 40px; } .path > li:nth-child(5n+5) { --x: -24px; } }
.node {
  position: relative; display: grid; place-items: center;
  width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--c, var(--brand)); color: var(--c-on, var(--on-brand)); box-shadow: 0 6px 0 var(--c-relief, var(--brand-relief));
  text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.node .icon { width: 28px; height: 28px; stroke-width: 2.75; }
.node:hover { transform: translateY(-2px); }
.node:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--c-relief, var(--brand-relief)); }
.node.is-locked { --c: var(--locked); --c-relief: var(--locked-relief); --c-on: var(--muted); cursor: not-allowed; }
.node.is-boss { width: 76px; height: 76px; }
.node.is-current { animation: bounce 1.6s var(--spring) infinite; }
.node.is-current::before {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 5px solid var(--brand-soft); animation: ring 1.6s ease-out infinite;
}
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } 60% { transform: translateY(0); } }
@keyframes ring { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.node.is-shake { animation: shake .3s linear; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.node-stars { display: flex; gap: 2px; }
.node-stars .icon { width: 17px; height: 17px; color: var(--locked); }
.node-stars .icon.is-on { color: var(--star); filter: drop-shadow(0 2px 0 var(--sun-relief)); }
.node-bubble {
  position: relative; display: block; max-width: 190px; padding: 8px 14px; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border); border-radius: 16px; box-shadow: 0 4px 0 var(--lip);
  text-align: center; font-size: .8125rem; line-height: 1.3; color: var(--ink-2); font-weight: 700;
}
.node-bubble::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
  background: var(--surface); border-left: 2px solid var(--border); border-top: 2px solid var(--border);
  transform: rotate(45deg);
}
.node-bubble b { display: block; color: var(--cta-relief); font-weight: 800; font-size: .9375rem; text-transform: uppercase; letter-spacing: .04em; }
:root[data-theme="dark"] .node-bubble b { color: var(--sun); }
.demo-msg { margin: 0; text-align: center; font-size: .875rem; color: var(--muted); font-weight: 700; min-height: 1.4em; }
.demo-msg.is-warn { color: var(--coral-ink); }
.demo-foot { display: flex; justify-content: center; margin-top: auto; }

/* Écran 4 : leçon */
.lesson-top { display: flex; align-items: center; gap: 12px; }
.lesson-top .progress { flex: 1; }
.combo {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--sun); color: var(--sun-ink); box-shadow: 0 3px 0 var(--sun-relief);
  font-weight: 800; font-size: .8125rem; white-space: nowrap; animation: pop .4s var(--spring);
}
.combo .icon { width: 15px; height: 15px; color: var(--cta-relief); }
.demo-kicker {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 4px 0 0;
  padding: 4px 12px; border-radius: var(--r-pill); background: var(--sky-soft); color: var(--sky-ink);
  font-weight: 800; font-size: .8125rem;
}
.demo-kicker .icon { width: 15px; height: 15px; }
.demo-question { font-size: 1.3125rem; }
.demo-lesson-art { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-alt); border: 2px solid var(--border); }
.demo-lesson-art img { width: 56px; height: 56px; flex: none; }
.demo-lesson-art p { margin: 0; font-size: .9375rem; color: var(--ink-2); }
.demo-actions { margin-top: auto; padding-top: 8px; }
.choices { display: grid; gap: 12px; }
.choices--tf { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; cursor: pointer;
  background: var(--surface); color: var(--ink); text-align: left;
  border: 2px solid var(--border); border-radius: var(--r-md); box-shadow: 0 4px 0 var(--lip);
  font-weight: 800; font-size: 1.0625rem; line-height: 1.25;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s, background .15s;
}
.choice-key {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px;
  background: var(--sunken); color: var(--ink-2); font-size: .875rem; border: 2px solid var(--border);
}
.choices--tf .choice { flex-direction: column; justify-content: center; text-align: center; min-height: 104px; gap: 8px; font-size: 1.125rem; }
.choices--tf .choice-key { width: 40px; height: 40px; border-radius: 50%; }
.choices--tf .choice-key .icon { width: 22px; height: 22px; stroke-width: 3; }
.choice:hover:not([disabled]) { border-color: var(--sky); transform: translateY(-1px); }
.choice:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 1px 0 var(--lip); }
.choice[disabled] { cursor: default; }
.choice.is-dim { opacity: .55; }
.choice.is-right { background: var(--grass-soft); border-color: var(--grass); box-shadow: 0 4px 0 var(--grass-relief); color: var(--grass-ink); animation: pop .36s var(--spring); }
.choice.is-right .choice-key { background: var(--grass); border-color: var(--grass); color: #fff; }
.choice.is-wrong { background: var(--coral-soft); border-color: var(--coral); box-shadow: 0 4px 0 var(--coral-relief); color: var(--coral-ink); animation: shake .3s linear; }
.choice.is-wrong .choice-key { background: var(--coral); border-color: var(--coral); color: #fff; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }

.feedback {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start;
  padding: 16px 18px 18px; border-top: 3px solid var(--fb); background: var(--fb-soft);
  animation: slide-up .3s var(--spring);
}
.feedback.is-ok { --fb: var(--grass); --fb-soft: var(--grass-soft); --fb-ink: var(--grass-ink); cursor: pointer; }
.feedback.is-ko { --fb: var(--coral); --fb-soft: var(--coral-soft); --fb-ink: var(--coral-ink); }
.feedback img { width: 58px; height: 58px; grid-row: span 2; }
.feedback-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; line-height: 1.2; color: var(--fb-ink); }
.feedback-text { margin: 0; color: var(--ink); font-size: .9375rem; }
.feedback .btn { grid-column: 1 / -1; margin-top: 10px; }
.feedback-timer { grid-column: 1 / -1; height: 6px; margin-top: 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--fb) 25%, transparent); overflow: hidden; }
.feedback-timer span { display: block; height: 100%; width: 100%; background: var(--fb); transform-origin: left; animation: timer var(--t, 1.2s) linear forwards; }
@keyframes timer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }

/* Écran 5 : victoire */
.demo-pane--win {
  position: relative; align-items: center; justify-content: center; text-align: center; gap: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, var(--halo), transparent 60%), linear-gradient(180deg, var(--bg-deep), var(--surface) 75%);
}
.win-stars { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin-top: 4px; }
.win-star { width: 52px; height: 52px; color: var(--locked); filter: drop-shadow(0 4px 0 var(--locked-relief)); }
.win-star:nth-child(2) { width: 68px; height: 68px; margin-bottom: 14px; }
.win-star.is-on { color: var(--star); filter: drop-shadow(0 4px 0 var(--sun-relief)); animation: star-pop .5s var(--spring); }
@keyframes star-pop { 0% { transform: scale(.2) rotate(-30deg); } 70% { transform: scale(1.18) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
.win-owl { width: 112px; height: 112px; animation: hop 1.4s var(--spring) infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } 55% { transform: translateY(0); } }
.win-title { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; margin: 0; color: var(--brand-ink); line-height: 1.1; }
.win-rewards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.reward {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--lip);
  font-weight: 800; font-size: 1.0625rem; color: var(--ink);
}
.reward .icon { width: 20px; height: 20px; }
.reward--xp .icon { color: var(--star); }
.reward--streak .icon { color: var(--cta); }
.reward-num { font-variant-numeric: tabular-nums; min-width: 2ch; display: inline-block; }
.win-actions { display: grid; gap: 4px; width: 100%; margin-top: 6px; }
.win-actions .btn { width: 100%; }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst .sparkle { animation: burst 1.1s var(--spring) both; }
@keyframes burst { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 50% { opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

/* ---------- Comment ça marche ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; display: flex; flex-direction: column; padding: 18px 18px 26px; }
.step-art {
  position: relative; display: grid; place-items: center; height: 170px; margin-bottom: 22px; overflow: hidden;
  border-radius: 20px; background: linear-gradient(180deg, var(--bg-deep), var(--bg));
}
.step-art .hills { height: 44px; }
@media (max-width: 639px) { .step-art { height: 132px; } }
.step-num {
  position: relative; z-index: 2; align-self: flex-start; margin: -44px 0 0 6px;
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--sun); color: var(--sun-ink); box-shadow: 0 4px 0 var(--sun-relief);
  font-family: var(--font-display); font-weight: 700; font-size: 1.375rem;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; margin-top: 8px; }
.step p { margin: 0; }
.step-example { margin-top: 14px !important; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .9375rem; color: var(--ink-2); }
.art-input {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; width: 84%;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--lip);
  font-weight: 800; font-size: .9375rem; color: var(--ink);
}
.art-input .icon { color: var(--link); }
.art-input::after { content: ""; width: 2px; height: 1.1em; background: var(--brand); animation: caret 1s steps(1) infinite; }
.art-path { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.art-path .node { width: 44px; height: 44px; box-shadow: 0 4px 0 var(--c-relief, var(--brand-relief)); cursor: default; }
.art-path .node .icon { width: 20px; height: 20px; }
.art-path .node:nth-child(odd) { transform: translateY(-14px); }
.art-path .node.is-current { animation: none; }
.art-rewards { position: relative; z-index: 1; display: grid; gap: 10px; justify-items: center; }

/* ---------- Ce qui rend accro : cartes jeu ---------- */
.game-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
.game-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; overflow: hidden; }
.game-card::after {
  content: ""; position: absolute; right: -36px; top: -36px; width: 120px; height: 120px; border-radius: 50%;
  background: var(--c-soft); z-index: 0;
}
.game-card > * { position: relative; z-index: 1; }
.game-value {
  margin: 18px 0 6px !important; font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1;
  color: var(--c-ink) !important;
}
.game-value small { font-size: .55em; }
.game-card h3 { margin-bottom: 6px; }
.game-stars { display: flex; gap: 2px; }
@media (max-width: 639px) {
  .game-card { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; padding: 20px; }
  .game-card .tile { grid-row: span 3; }
  .game-value { margin-top: 2px !important; font-size: 1.625rem; }
}
.game-stars .icon { width: 28px; height: 28px; color: var(--star); filter: drop-shadow(0 3px 0 var(--sun-relief)); }

/* ---------- Exemples de parcours (rail horizontal sur mobile) ---------- */
.rail {
  list-style: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 18px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 72%); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin; scrollbar-color: var(--lip) transparent;
}
.rail > li { scroll-snap-align: start; display: flex; }
.rail:focus-visible { outline-offset: -3px; }
@media (min-width: 700px) { .rail { grid-auto-columns: minmax(260px, 40%); } }
@media (min-width: 1100px) {
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; gap: 20px; }
}
.course-card { display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden; }
.course-cover, .post-cover {
  position: relative; display: grid; place-items: center; height: 118px; overflow: hidden;
  background: var(--c-soft);
}
.course-cover::before, .post-cover::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -60%; height: 100%; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 30%, transparent);
}
.cover-yellow { --c: var(--sun); --c-relief: var(--sun-relief); --c-soft: var(--sun-soft); --c-on: var(--sun-ink); }
.cover-green  { --c: var(--grass); --c-relief: var(--grass-relief); --c-soft: var(--grass-soft); --c-on: #fff; }
.cover-blue   { --c: var(--sky); --c-relief: var(--sky-relief); --c-soft: var(--sky-soft); --c-on: #fff; }
.cover-pink   { --c: var(--berry); --c-relief: var(--berry-relief); --c-soft: var(--berry-soft); --c-on: #fff; }
.course-tile {
  position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 34%;
  background: var(--c); color: var(--c-on); box-shadow: 0 5px 0 var(--c-relief);
}
.course-tile .icon { width: 32px; height: 32px; }
.course-body, .post-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 22px; }
.course-body h3, .post-body h3 { margin-bottom: 6px; }
.course-body p { font-size: .9375rem; }
.course-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }

/* ---------- Tarifs ---------- */
.beta-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center;
  max-width: 720px; margin: 0 auto 28px; padding: 12px 20px; border-radius: var(--r-lg);
  background: var(--sun); color: var(--sun-ink); box-shadow: 0 4px 0 var(--sun-relief);
  font-weight: 800;
}
.beta-banner .icon { width: 22px; height: 22px; }
.pricing { display: grid; gap: 24px; max-width: 880px; margin-inline: auto; }
@media (min-width: 760px) { .pricing { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.price-card { display: flex; flex-direction: column; padding: 28px; }
.price-card--plus { border-color: var(--brand); box-shadow: 0 6px 0 var(--brand-relief); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 55%); }
.price-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.price-name { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; }
.price { margin: 0 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 2.75rem; line-height: 1.1; color: var(--ink) !important; }
.price small { font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--ink-2); margin-left: 4px; }
.price-alt { font-size: .9375rem; font-weight: 700; color: var(--link) !important; }
.price-desc { margin-bottom: 14px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.price-card li { position: relative; padding-left: 32px; font-weight: 700; color: var(--ink); }
.price-card li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grass); box-shadow: 0 2px 0 var(--grass-relief);
}
.price-card li::after {
  content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 5px;
  border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg);
}
.price-card .btn { margin-top: auto; }
.price-note { margin: 28px auto 0; text-align: center; font-size: .9375rem; color: var(--ink-2); }

/* ---------- Avis ---------- */
.quote { margin: 0; display: flex; flex-direction: column; }
.quote-stars { display: flex; gap: 2px; margin-bottom: 12px; }
.quote-stars .icon { width: 22px; height: 22px; color: var(--star); fill: currentColor; filter: drop-shadow(0 2px 0 var(--sun-relief)); }
.quote blockquote { margin: 0 0 20px; font-size: 1.0625rem; color: var(--ink); line-height: 1.55; }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.quote figcaption strong { display: block; }
.quote figcaption span span { display: block; font-size: .875rem; color: var(--muted); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: var(--c-on); box-shadow: 0 3px 0 var(--c-relief); }
.avatar .icon { width: 22px; height: 22px; }

/* ---------- CTA final (scène + mascotte) ---------- */
.cta-final { padding-block: 64px 80px; }
.cta-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 8px; justify-items: center; text-align: center;
  padding: 40px 20px 92px; border-radius: var(--r-xl);
  background: radial-gradient(circle at 50% 70%, var(--halo), transparent 55%), linear-gradient(180deg, var(--bg-deep), var(--surface-alt));
  border: 2px solid var(--border); box-shadow: 0 8px 0 var(--lip);
}
@media (min-width: 900px) {
  .cta-card { grid-template-columns: auto minmax(0, 560px); justify-content: center; justify-items: start; text-align: left; gap: 48px; padding: 56px 56px 104px; }
}
.cta-card h2 { margin-bottom: 12px; }
.cta-card p { color: var(--ink-2); font-size: 1.0625rem; }
.cta-card .btn { margin-top: 6px; }
.cta-owl { position: relative; z-index: 1; width: 150px; height: 150px; animation: hop 2.4s var(--spring) infinite; }
@media (min-width: 900px) { .cta-owl { width: 200px; height: 200px; } }
.cta-card .cta-copy { position: relative; z-index: 1; }
.cta-more { margin: 14px 0 0; font-size: .9375rem; }

/* ---------- Héros des pages internes ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg) 85%);
  padding: 48px 0 108px;
}
@media (min-width: 1024px) { .page-hero { padding: 72px 0 132px; } }
.page-hero .container { position: relative; z-index: 1; max-width: calc(820px + 2 * var(--gutter)); }
.page-hero .lead { max-width: 640px; margin-inline: auto; }
.page-hero h1 { margin-bottom: 14px; }
.page-hero--legal { padding: 40px 0 88px; }
.page-hero--legal h1 { font-size: clamp(1.875rem, 4vw, 2.625rem); }

/* ---------- Prose (pages de contenu, légales, articles) ---------- */
.prose { font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.prose p, .prose li { color: var(--ink); }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin: 2em 0 .6em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h3 { font-size: 1.1875rem; margin: 1.6em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--brand-ink); font-weight: 800; }
.prose blockquote { margin: 1.5em 0; padding: 16px 20px; border-radius: var(--r-md); background: var(--brand-soft); border-left: 6px solid var(--brand); }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.5em 0; font-size: .9375rem; display: block; overflow-x: auto; border: 2px solid var(--border); border-radius: var(--r-md); }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--border); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--sunken); font-weight: 800; }
.prose td { background: var(--surface); }
.legal-meta { display: inline-flex; padding: 6px 14px; border-radius: var(--r-pill); background: var(--sunken); color: var(--ink-2); font-size: .9375rem; font-weight: 700; }
.toc { margin: 1.5em 0 2em; padding: 20px 24px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 4px 0 var(--lip); }
.toc strong { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; }
.toc ol { margin: 10px 0 0; columns: 1; }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 32px; } }
.toc li { break-inside: avoid; }
.notice { padding: 16px 20px; border-radius: var(--r-md); background: var(--sun-soft); border: 2px solid var(--sun); color: var(--ink); }
.todo { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--coral-soft); color: var(--coral-ink); font-weight: 800; font-size: .875em; }

/* ---------- Valeurs / listes à pastilles ---------- */
.value-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.value-list li { display: flex; align-items: center; gap: 14px; color: var(--ink-2); }
.value-list .icon-bubble { margin: 0; width: 46px; height: 46px; }
.value-list .icon-bubble .icon { width: 22px; height: 22px; }
.mission-card { background: var(--brand); border-color: var(--brand); box-shadow: 0 6px 0 var(--brand-relief); text-align: center; padding: 32px 28px; position: relative; overflow: hidden; }
.mission-card .eyebrow { background: var(--surface); color: var(--link); }
.mission-card .lead { color: var(--on-brand); font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.3; margin: 0; }
.mission-card img { width: 120px; height: 120px; margin: 0 auto 8px; }

/* Téléphone (page Fonctionnement) */
.phone {
  width: 100%; max-width: 360px; margin-inline: auto; padding: 18px 16px 24px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 36px; box-shadow: 0 8px 0 var(--lip), 0 0 90px 10px var(--halo);
  display: grid; gap: 14px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 14px; }
.faq-item { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 4px 0 var(--lip); overflow: hidden; }
.faq-item h3 { margin: 0; font-size: inherit; }
.faq-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 18px 20px; border: 0; background: none; cursor: pointer; text-align: left;
  font-weight: 800; font-size: 1.0625rem; line-height: 1.35; color: var(--ink);
}
.faq-trigger:hover { background: var(--surface-alt); }
.faq-trigger:focus-visible { outline-offset: -4px; border-radius: var(--r-lg); }
.faq-icon {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sun); color: var(--sun-ink); box-shadow: 0 3px 0 var(--sun-relief);
  font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; line-height: 1;
  transition: transform .25s var(--spring), background .2s;
}
.faq-trigger[aria-expanded="true"] .faq-icon { transform: rotate(45deg); background: var(--brand); color: var(--on-brand); box-shadow: 0 3px 0 var(--brand-relief); }
.faq-panel { padding: 0 20px 20px; color: var(--ink-2); }
.faq-panel p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.4fr 1fr; } }
.contact-side { display: grid; gap: 20px; }
.contact-side .card h2, .contact-form-card h2 { font-size: 1.375rem; }
.card--surface { background: var(--surface-alt); }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 56px; padding: 12px 16px;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--border); border-radius: var(--r-md);
  font-weight: 700; font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; color: var(--ink-2); }
.checkbox input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.form-hint { margin: 0; font-size: .875rem; color: var(--muted); }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.post-body .text-link { margin-top: auto; padding-top: 10px; }
.article-header {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg) 85%);
  padding: 32px 0 96px;
}
.article-header .container { position: relative; z-index: 1; }
.article-header .post-meta { color: var(--ink-2); margin: 0; }
.breadcrumb { font-size: .875rem; font-weight: 700; color: var(--ink-2); margin-bottom: 20px; }
.breadcrumb a { color: var(--link); }

/* ---------- 404 ---------- */
.notfound { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 48px 0 120px; background: linear-gradient(180deg, var(--bg-deep), var(--bg) 85%); }
.notfound .container { position: relative; z-index: 1; }
.big {
  display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0 0 16px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 22vw, 11rem); line-height: 1; color: var(--brand);
  text-shadow: 0 8px 0 var(--brand-relief);
}
.big-owl { width: clamp(110px, 26vw, 190px); height: auto; animation: peek 3s ease-in-out infinite; }
.notfound .lead { max-width: 560px; margin-inline: auto; margin-bottom: 28px; }
.notfound .btn-row { justify-content: center; }

/* ---------- Pied de page ---------- */
.site-footer { position: relative; background: var(--surface-alt); border-top: 2px solid var(--border); padding: 56px 0 28px; margin-top: 32px; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -32px; height: 32px; background: var(--border);
  -webkit-mask: var(--wave-mask) left top / 720px 32px repeat-x; mask: var(--wave-mask) left top / 720px 32px repeat-x;
}
.site-footer::after {
  content: ""; position: absolute; left: 0; right: 0; top: -30px; height: 32px; background: var(--surface-alt);
  -webkit-mask: var(--wave-mask) left top / 720px 32px repeat-x; mask: var(--wave-mask) left top / 720px 32px repeat-x;
}
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--ink-2); max-width: 34ch; margin-top: 14px; }
.site-footer h2 { font-family: var(--font-body); font-weight: 800; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding: 4px 0; color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--link); text-decoration: underline; }
.socials { display: flex; gap: 10px; margin: 18px 0; }
.socials a {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--lip); color: var(--ink);
  transition: transform .15s var(--ease);
}
.socials a:hover { transform: translateY(-2px); color: var(--link); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px;
  background: var(--ink); color: var(--bg);
}
.store-badge svg { width: 22px; height: 22px; fill: currentColor; }
.store-badge small { display: block; font-size: .6875rem; font-weight: 700; opacity: .85; }
.store-badge strong { display: block; font-size: .9375rem; line-height: 1.1; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 2px solid var(--border); font-size: .875rem; color: var(--ink-2); }

/* ---------- Transition de thème ---------- */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, box-shadow .35s ease !important;
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .sparkle, .bubble, .puff, .demo-owl, .cta-owl, .win-owl, .big-owl, .node.is-current, .demo-gen-icon { animation: none !important; }
  .node.is-current::before { animation: none !important; opacity: 1; transform: none; }
  .feedback-timer span { animation: none !important; transform: scaleX(1); }
}

/* ---------- Impression ---------- */
@media print {
  .site-header, .site-footer, .decor, .hills, .cta-final, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Rythme : moins de vide sous les héros (les collines font déjà la transition) */
.hero + .section, .page-hero + .section, .article-header + .section { padding-top: 24px; }
@media (min-width: 1024px) { .hero + .section, .page-hero + .section, .article-header + .section { padding-top: 40px; } }
.demo-pane--win .demo-hint { color: var(--ink-2); }
