/* =====================================================================================================
   MOTIO : socle visuel unique (couleurs, polices, rayons, ombres, mouvements).
   Source de vérité pour l'application ET l'encyclopédie : l'encyclopédie l'intègre à chaque construction
   (tools/build.py), sans lien vers ce fichier. Une seule identité pour tous les espaces (D-043).
   Règles : ne jamais écrire une couleur en dur ailleurs ; utiliser les jetons ci-dessous.
   - fonds :  --bg (page), --bg-2 (fond d'application), --surface (cartes), --surface-2 (champs, encarts)
   - texte :  --ink, --ink-2, --muted ; liens et traits de marque : --brand-text
   - marque : --brand (aplat, avec --on-brand dessus), --accent (safran, avec --on-accent dessus)
   - états :  --danger*, --warn*, --ok* ; zones Z1 à Z5 : --z1 à --z5 ; filières : --fil-*
   - mouvement : --dur-1/2/3, --ease ; classes .draw, .pop, .grow et [data-motion] (cartes) (désactivées si l'appareil demande moins d'animations)
   Les états d'avant l'animation ne valent que sous <html class="js"> (posé dans l'en-tête) : sans script, tout est visible.
   Thème : suit l'appareil ; <html data-theme="light|dark"> force un thème.
   ===================================================================================================== */
@font-face{font-family:"Bricolage Grotesque";font-weight:800;font-style:normal;font-display:swap;src:url(/assets/fonts/bricolage-grotesque-800.woff2) format("woff2")}
@font-face{font-family:"Figtree";font-weight:400;font-style:normal;font-display:swap;src:url(/assets/fonts/figtree-400.woff2) format("woff2")}
@font-face{font-family:"Figtree";font-weight:600;font-style:normal;font-display:swap;src:url(/assets/fonts/figtree-600.woff2) format("woff2")}

:root {
  color-scheme: light;
  --bg: #FAF7F2; --bg-2: #F2EDE4; --surface: #FFFFFF; --surface-2: #FAF7F2;
  --ink: #14193A; --ink-2: #4A5070; --muted: #676C88; --line: #E4DFD6;
  --brand: #14193A; --on-brand: #FFFFFF; --brand-text: #14193A; --brand-soft: rgba(20, 25, 58, .07);
  --accent: #FFC224; --accent-hover: #FFD160; --on-accent: #14193A;
  --danger: #B3261E; --danger-bg: #FDECEA; --danger-ink: #8A1F17; --danger-line: #F1C2BD;
  --warn-bg: #FFF4D6; --warn-ink: #6B4B00; --warn-line: #F0DCA8;
  --ok: #1D6B39; --ok-bg: #E8F5EC;
  --z1: #9EC9E8; --z2: #7CC4A0; --z3: #F2C94C; --z4: #F2994A; --z5: #E0605A;
  --fil-libre: #B9BCC8; --fil-aerobie: #2F80C2; --fil-lactique: #D9822B; --fil-alactique: #C0392B;
  --grid: #ECE7DE; --band: rgba(20, 25, 58, .10);
  --shadow-1: 0 4px 12px rgba(20, 25, 58, .06); --shadow-2: 0 10px 30px rgba(20, 25, 58, .14);
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-title: "Bricolage Grotesque", "Figtree", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 16px; --radius-s: 10px; --tap: 48px;
  --dur-1: .18s; --dur-2: .35s; --dur-3: .9s; --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E1229; --bg-2: #0B0F24; --surface: #171C3A; --surface-2: #1E2448;
    --ink: #F1EEE8; --ink-2: #C3C6D8; --muted: #9DA2BE; --line: #2C3258;
    --brand: #262E66; --on-brand: #FFFFFF; --brand-text: #C9CEF5; --brand-soft: rgba(201, 206, 245, .10);
    --danger: #FF8A80; --danger-bg: #3A1714; --danger-ink: #FFB4AB; --danger-line: #6B2A24;
    --warn-bg: #3A3014; --warn-ink: #F5D88A; --warn-line: #5C4A1A;
    --ok: #7FD49B; --ok-bg: #13301F;
    --grid: #242A4D; --band: rgba(241, 238, 232, .12);
    --shadow-1: 0 4px 12px rgba(0, 0, 0, .3); --shadow-2: 0 10px 30px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1229; --bg-2: #0B0F24; --surface: #171C3A; --surface-2: #1E2448;
  --ink: #F1EEE8; --ink-2: #C3C6D8; --muted: #9DA2BE; --line: #2C3258;
  --brand: #262E66; --on-brand: #FFFFFF; --brand-text: #C9CEF5; --brand-soft: rgba(201, 206, 245, .10);
  --danger: #FF8A80; --danger-bg: #3A1714; --danger-ink: #FFB4AB; --danger-line: #6B2A24;
  --warn-bg: #3A3014; --warn-ink: #F5D88A; --warn-line: #5C4A1A;
  --ok: #7FD49B; --ok-bg: #13301F;
  --grid: #242A4D; --band: rgba(241, 238, 232, .12);
  --shadow-1: 0 4px 12px rgba(0, 0, 0, .3); --shadow-2: 0 10px 30px rgba(0, 0, 0, .45);
}

/* ---------- Mouvement commun : il explique (un tracé, une apparition), il ne décore pas ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.js .draw { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
.in-view .draw, .draw.in-view { animation: m-draw var(--dur-3) var(--ease) forwards; }
.in-view .draw.late { animation-delay: .45s; animation-duration: calc(var(--dur-3) * .8); }
.pop { transform-box: fill-box; transform-origin: center; }
.js .pop { transform: scale(0); }
.in-view .pop { animation: m-pop .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
/* Apparition des cartes : animation CSS jouée au chargement, sans attendre aucun script ni détecteur (un contenu ne reste
   jamais caché). Les tracés (.draw, .pop, .grow) attendent d'être à l'écran, avec un filet : motio.js les montre tous après 1,5 s. */
.js [data-motion] > .card, .js [data-motion] > section { animation: m-rise var(--dur-2) var(--ease) both; }
.js [data-motion] > :nth-child(2) { animation-delay: .05s; } .js [data-motion] > :nth-child(3) { animation-delay: .1s; }
.js [data-motion] > :nth-child(4) { animation-delay: .15s; } .js [data-motion] > :nth-child(n+5) { animation-delay: .2s; }
@keyframes m-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.js .grow > * { opacity: 0; transform: translateX(-6px); }
.in-view .grow > *, .grow.in-view > * { opacity: 1; transform: none; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.in-view .grow > :nth-child(2), .grow.in-view > :nth-child(2) { transition-delay: .06s; }
.in-view .grow > :nth-child(3), .grow.in-view > :nth-child(3) { transition-delay: .12s; }
.in-view .grow > :nth-child(4), .grow.in-view > :nth-child(4) { transition-delay: .18s; }
.in-view .grow > :nth-child(5), .grow.in-view > :nth-child(5) { transition-delay: .24s; }
.in-view .grow > :nth-child(n+6), .grow.in-view > :nth-child(n+6) { transition-delay: .3s; }
@media print { .js .draw { stroke-dasharray: none; stroke-dashoffset: 0; } .js .pop { transform: none; } .js .grow > * { opacity: 1; transform: none; } }
@keyframes m-draw { to { stroke-dashoffset: 0; } }
@keyframes m-pop { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .pop { transform: none; }
  .js .grow > * { opacity: 1; transform: none; }
}
/* Toucher : pas d'ombre ni de surlignage du navigateur au clic ; contour réservé au clavier ; léger enfoncement à la place. */
html { -webkit-tap-highlight-color: transparent; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible), summary:focus:not(:focus-visible), [role="button"]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
button, .btn, summary { -webkit-touch-callout: none; touch-action: manipulation; }
.btn:active, button:active { transform: scale(.97); transition: transform .08s ease-out; }
@media (prefers-reduced-motion: reduce) { .btn:active, button:active { transform: none; } }
