/* ════════════════════════════════════════════════════════════════════
   OSFRIA — « Le réseau qui pense »  ·  Maquette Animiste-204
   Intégration CMS HETERACTIS — version mise en ligne.

   Deux registres :
     • body.is-home  → ACCUEIL nuit tech élégant (réseau de neurones,
       tokens streaming, terminal, waveform). Fond bleu nuit souverain.
     • body.is-page  → PAGES DE CONTENU sur fond CLAIR (lisibilité),
       même identité (header/footer/logo tricolore), effet fenêtre de
       code / terminal pour les blocs d'installation.

   Tricolore souverain OSFRIA :
     bleu encre #1B2A6B · ivoire chaud #F4EEDE · ROUGE FRANÇAIS #E1000F

   Perf : seuls transform / opacity / filter sont animés (GPU).
   Animations 100% CSS (scroll-driven natif), zéro JS d'animation.
   prefers-reduced-motion respecté.
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Nuit tech (accueil) */
  --night:   #070a16;
  --ink:     #0b1024;
  --ash:     #121a33;
  --ash-2:   #18213f;
  --line:    rgba(244, 238, 222, 0.10);
  --line-2:  rgba(244, 238, 222, 0.16);

  /* Tricolore officiel OSFRIA */
  --bleu:    #1B2A6B;   /* bleu encre */
  --bleu-lo: #5a78ff;   /* bleu signal (lumineux) */
  --bleu-hi: #8aa3ff;
  --ivoire:  #F4EEDE;   /* ivoire chaud */
  --rouge:   #E1000F;   /* ROUGE FRANÇAIS (officiel) */
  --rouge-lo:#ff3b48;   /* rouge clair lumineux (signal) */

  --txt:     #eef1fb;
  --txt-mut: rgba(238, 241, 251, 0.62);
  --txt-faint: rgba(238, 241, 251, 0.40);

  --maxw: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Pages claires (contenu) */
  --paper:    #faf8f2;   /* fond ivoire très clair */
  --paper-2:  #ffffff;   /* surfaces / cartes */
  --paper-3:  #f1eee4;   /* surfaces alternées */
  --c-line:   rgba(27, 42, 107, 0.14);
  --c-line-2: rgba(27, 42, 107, 0.22);
  --c-ink:    #141a30;   /* texte fort */
  --c-soft:   #2a3150;   /* texte appuyé (citations) */
  --c-text:   #39415c;   /* texte courant */
  --c-mute:   #6a7392;   /* texte secondaire */
}

/* ░░░ Reset ░░░ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--txt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ════════════════════════════════════════════════════════════════════
   FOND — accueil (nuit) vs page (clair)
   ════════════════════════════════════════════════════════════════════ */
body.is-home {
  background:
    radial-gradient(120% 80% at 50% -10%, #0d1430 0%, var(--night) 55%) fixed,
    var(--night);
  color: var(--txt);
}
body.is-home::selection { background: var(--bleu-lo); color: var(--night); }
body.is-home ::selection { background: var(--bleu-lo); color: var(--night); }

/* Trame technique très fine (accueil uniquement) */
body.is-home::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(138, 163, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(138, 163, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}

body.is-page {
  background:
    radial-gradient(1000px 560px at 82% -6%, rgba(27, 42, 107, 0.07), transparent 60%),
    radial-gradient(820px 480px at 6% 4%, rgba(225, 0, 15, 0.035), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  color: var(--c-text);
}
body.is-page ::selection { background: var(--bleu); color: var(--ivoire); }

/* ════════════════════════════════════════════════════════════════════
   LISERÉ TRICOLORE — haut (fixe) — sur toutes les pages
   ════════════════════════════════════════════════════════════════════ */
.topband {
  position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 90;
  background: linear-gradient(90deg,
    var(--bleu) 0 33.33%, var(--ivoire) 33.33% 66.66%, var(--rouge) 66.66% 100%);
  box-shadow: 0 0 18px rgba(90, 120, 255, 0.30);
}

/* Barre de progression de lecture (scroll-driven) */
.progress {
  position: fixed; inset-inline: 0; top: 3px; height: 2px; z-index: 89;
  background: transparent; pointer-events: none;
}
.progress__bar {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--bleu-lo), var(--ivoire), var(--rouge-lo));
  box-shadow: 0 0 10px rgba(90, 120, 255, 0.5);
  animation: progress-grow linear both;
  animation-timeline: scroll(root block);
}
@keyframes progress-grow { to { transform: scaleX(1); } }

/* ════════════════════════════════════════════════════════════════════
   CHAMP DE PARTICULES DE « PENSÉE » (ambiance — accueil)
   ════════════════════════════════════════════════════════════════════ */
.thoughtfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
body.is-page .thoughtfield { display: none; }
.mote {
  position: absolute; bottom: -6vh; width: 3px; height: 3px; border-radius: 50%;
  background: var(--bleu-lo);
  box-shadow: 0 0 8px 1px rgba(90, 120, 255, 0.7);
  opacity: 0;
  animation: mote-rise linear infinite;
  will-change: transform, opacity;
}
.mote:nth-child(3n)   { background: var(--ivoire); box-shadow: 0 0 7px 1px rgba(244,238,222,.5); }
.mote:nth-child(5n)   { background: var(--rouge-lo); box-shadow: 0 0 8px 1px rgba(255,59,72,.55); }
.mote:nth-child(1)  { left: 6%;  --dx: 20px;  animation-duration: 19s; animation-delay: 0s; }
.mote:nth-child(2)  { left: 14%; --dx: -28px; animation-duration: 23s; animation-delay: 3s; }
.mote:nth-child(3)  { left: 23%; --dx: 14px;  animation-duration: 17s; animation-delay: 6s; }
.mote:nth-child(4)  { left: 31%; --dx: -18px; animation-duration: 21s; animation-delay: 1.5s; }
.mote:nth-child(5)  { left: 40%; --dx: 26px;  animation-duration: 25s; animation-delay: 8s; }
.mote:nth-child(6)  { left: 48%; --dx: -12px; animation-duration: 18s; animation-delay: 4s; }
.mote:nth-child(7)  { left: 56%; --dx: 22px;  animation-duration: 22s; animation-delay: 11s; }
.mote:nth-child(8)  { left: 63%; --dx: -24px; animation-duration: 20s; animation-delay: 2s; }
.mote:nth-child(9)  { left: 71%; --dx: 16px;  animation-duration: 24s; animation-delay: 7s; }
.mote:nth-child(10) { left: 78%; --dx: -20px; animation-duration: 19s; animation-delay: 9.5s; }
.mote:nth-child(11) { left: 85%; --dx: 24px;  animation-duration: 23s; animation-delay: 5s; }
.mote:nth-child(12) { left: 91%; --dx: -16px; animation-duration: 21s; animation-delay: 12s; }
.mote:nth-child(13) { left: 35%; --dx: 18px;  animation-duration: 26s; animation-delay: 14s; }
.mote:nth-child(14) { left: 67%; --dx: -22px; animation-duration: 22s; animation-delay: 10s; }
@keyframes mote-rise {
  0%   { transform: translate3d(0, 0, 0) scale(.5); opacity: 0; }
  12%  { opacity: .9; }
  88%  { opacity: .55; }
  100% { transform: translate3d(var(--dx), -108vh, 0) scale(1); opacity: 0; }
}

/* ════════════════════════════════════════════════════════════════════
   HEADER (masthead) — sticky, passe en « bleu encre » au scroll
   ════════════════════════════════════════════════════════════════════ */
.masthead {
  position: fixed; inset-inline: 0; top: 3px; z-index: 80;
  animation: head-solidify linear both;
  animation-timeline: scroll(root block);
  animation-range: 0 220px;
}
@keyframes head-solidify {
  to {
    background: rgba(11, 16, 36, 0.82);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
            backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(0,0,0,.9);
  }
}
/* fond bleu encre injecté progressivement au scroll */
.masthead::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(180deg, rgba(27, 42, 107, 0.92), rgba(27, 42, 107, 0.62));
  animation: head-blue linear both;
  animation-timeline: scroll(root block);
  animation-range: 0 220px;
}
@keyframes head-blue { to { opacity: 1; } }

/* Sur les pages claires, le header part d'un fond clair translucide
   (lisible d'emblée) puis bascule en bleu au scroll comme sur l'accueil. */
body.is-page .masthead {
  background: rgba(250, 248, 242, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
          backdrop-filter: blur(12px) saturate(130%);
  border-bottom: 1px solid var(--c-line);
}

.masthead__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1rem 1.5rem;
}

/* ░░░ NAV ░░░ */
.nav { display: flex; gap: .35rem; }
.nav a {
  position: relative; font-size: .9rem; font-weight: 500; color: var(--txt-mut);
  padding: .5rem .85rem; border-radius: 9px; transition: color .25s, background .25s;
}
.nav a::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .35rem; height: 1.5px;
  background: linear-gradient(90deg, var(--bleu-lo), var(--rouge-lo));
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--txt); background: rgba(244,238,222,.05); }
.nav a:hover::after { transform: scaleX(1); }
/* sur page claire : liens lisibles tant que le header est clair */
body.is-page .nav a { color: var(--c-mute); }
body.is-page .nav a:hover { color: var(--c-ink); background: rgba(27,42,107,.05); }
@media (max-width: 880px) { .nav { display: none; } }

.nav__cta {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .88rem; font-weight: 600; color: var(--txt);
  padding: .6rem 1.1rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--bleu), #2c3f8f);
  border: 1px solid rgba(138, 163, 255, 0.3);
  box-shadow: 0 10px 30px -14px rgba(27, 42, 107, 0.9);
  transition: transform .25s var(--ease), box-shadow .25s, filter .25s;
}
.nav__cta:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 16px 36px -14px rgba(90,120,255,.7); }
.nav__cta-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--rouge-lo);
  box-shadow: 0 0 0 0 rgba(255, 59, 72, .7);
  animation: cta-ping 2.4s ease-out infinite;
}
@keyframes cta-ping {
  0%   { box-shadow: 0 0 0 0 rgba(255,59,72,.6); }
  70%  { box-shadow: 0 0 0 7px rgba(255,59,72,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,59,72,0); }
}

/* ════════════════════════════════════════════════════════════════════
   LOGO — OSFRIA : wordmark FINAL validé (variante A), SVG inline.
   Mot OSFRIA en Cormorant Garamond, lettres tricolores
   OS bleu #000091 · FR ivoire #F4EEDE (cerclé) · IA rouge #E1000F,
   point du « i » à 3 ronds tricolores décalés, filet tricolore plein.
   (Couronne à venir : un peu d'air est réservé au-dessus du « O ».)

   Lisibilité — le header est CLAIR au départ puis passe en BLEU au scroll :
   les couleurs des lettres sont des variables animables (@property) que l'on
   fait basculer, EN MÊME TEMPS que le fond bleu du header, via le même
   timeline de scroll (animation-range: 0 220px, cf. head-blue).
     · état clair  → OS bleu foncé, FR ivoire cerclé doré, IA rouge
     · état bleu   → lettres ivoire lisibles sur fond bleu encre
   Sur l'accueil (is-home) le header démarre transparent sur fond nuit :
   le logo y est d'emblée en version « claire sur sombre » (lettres lumineuses).
   ════════════════════════════════════════════════════════════════════ */
@property --wm-os      { syntax: "<color>"; inherits: true; initial-value: #000091; }
@property --wm-fr      { syntax: "<color>"; inherits: true; initial-value: #F4EEDE; }
@property --wm-fr-edge { syntax: "<color>"; inherits: true; initial-value: #B89A55; }
@property --wm-ia      { syntax: "<color>"; inherits: true; initial-value: #E1000F; }

.brand { display: inline-flex; align-items: center; }

.brandmark {
  display: block; height: 38px; width: auto; overflow: visible;
  /* couleurs par défaut = « header clair » (fond ivoire des pages) */
  --wm-os: #000091; --wm-fr: #F4EEDE; --wm-fr-edge: #B89A55; --wm-ia: #E1000F;
}
.brandmark--foot { height: 34px; }

/* Application des couleurs aux éléments SVG */
.brandmark__os      { fill: var(--wm-os); }
.brandmark__fr      { fill: var(--wm-fr); stroke: var(--wm-fr-edge); stroke-width: 2.4; paint-order: stroke; }
.brandmark__ia      { fill: var(--wm-ia); }
.brandmark__dot--b  { fill: var(--wm-os); }
.brandmark__dot--f  { fill: var(--wm-fr); stroke: var(--wm-fr-edge); stroke-width: 1.6; }
.brandmark__dot--r  { fill: var(--wm-ia); }
.brandmark__rule-b  { fill: var(--wm-os); }
.brandmark__rule-f  { fill: var(--wm-fr); stroke: var(--wm-fr-edge); stroke-width: 1.1; }
.brandmark__rule-r  { fill: var(--wm-ia); }

/* ── ACCUEIL (is-home) : header transparent sur fond nuit au départ ──
   Lettres en version lumineuse, lisibles sur sombre dès le chargement. */
body.is-home .brandmark {
  --wm-os: #8aa3ff; --wm-fr: #F4EEDE; --wm-fr-edge: #C9A227; --wm-ia: #ff5965;
}

/* ── Bascule au SCROLL (header → bleu encre) : lettres ivoire lisibles ──
   Même timeline que le fond bleu du header (head-blue, range 0→220px). */
.masthead .brandmark {
  animation: wm-to-blue linear both;
  animation-timeline: scroll(root block);
  animation-range: 0 220px;
}
@keyframes wm-to-blue {
  to { --wm-os: #cdd8ff; --wm-fr: #F4EEDE; --wm-fr-edge: #C9A227; --wm-ia: #ff8088; }
}

/* ── Footer : pas de scroll-binding ── couleurs selon le registre de page */
.foot .brandmark--foot { animation: none; }                 /* page claire : valeurs par défaut */
body.is-home .foot .brandmark--foot {                       /* footer sur fond nuit */
  --wm-os: #8aa3ff; --wm-fr: #F4EEDE; --wm-fr-edge: #C9A227; --wm-ia: #ff5965;
}

/* ── Animation TRÈS subtile des 3 ronds du « i » (respire / scintille) ── */
.brandmark__dot { transform-box: fill-box; transform-origin: center; will-change: transform, opacity; }
.brandmark__dot--b { animation: wm-dot 4.2s ease-in-out infinite; }
.brandmark__dot--f { animation: wm-dot 4.2s ease-in-out infinite .5s; }
.brandmark__dot--r { animation: wm-dot 4.2s ease-in-out infinite 1s; }
@keyframes wm-dot {
  0%, 100% { transform: translateY(0)    scale(1);    opacity: 1; }
  50%      { transform: translateY(-.6px) scale(1.06); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .brandmark__dot { animation: none !important; }
}

/* ════════════════════════════════════════════════════════════════════
   HÉRO (accueil)
   ════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 9rem 1.5rem 5rem; overflow: hidden;
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center;
}
@media (max-width: 940px) {
  .hero { padding-top: 8rem; }
  .hero__inner { grid-template-columns: 1fr; gap: 3rem; }
}

.neuro { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.neuro__svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.neuro__glow {
  position: absolute; top: 30%; right: 8%; width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  border-radius: 50%; transform: translate(20%, -20%);
  background: radial-gradient(circle, rgba(27, 42, 107, .55), transparent 62%);
  filter: blur(20px);
}
.edge {
  stroke-dasharray: 6 360; stroke-dashoffset: 366;
  animation: edge-draw 5.5s linear infinite;
  will-change: stroke-dashoffset;
}
.neuro__edges path:nth-child(2n)  { animation-delay: -1.1s; }
.neuro__edges path:nth-child(3n)  { animation-delay: -2.3s; }
.neuro__edges path:nth-child(4n)  { animation-delay: -3.6s; }
.neuro__edges path:nth-child(5n)  { animation-delay: -4.4s; }
@keyframes edge-draw { to { stroke-dashoffset: 0; } }
.node {
  opacity: .35; transform-box: fill-box; transform-origin: center;
  animation: node-fire 3.2s ease-in-out infinite;
  animation-delay: var(--d);
  will-change: transform, opacity;
}
@keyframes node-fire {
  0%, 100% { opacity: .35; transform: scale(.85); }
  45%      { opacity: 1;   transform: scale(1.25); filter: drop-shadow(0 0 6px rgba(90,120,255,.9)); }
}

.hero__copy { animation: rise-in 1s var(--ease) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'JetBrains Mono', monospace; font-size: .7rem; font-weight: 500;
  letter-spacing: .22em; color: var(--bleu-hi);
  padding: .5rem .9rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(18, 26, 51, .5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero__eyebrow-pip {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bleu-lo);
  box-shadow: 0 0 10px 2px rgba(90,120,255,.7);
  animation: pip-breathe 2.6s ease-in-out infinite;
}
@keyframes pip-breathe { 0%,100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }

.hero__title {
  margin-top: 1.6rem;
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.04; letter-spacing: -.02em;
  color: var(--ivoire); text-wrap: balance;
}
.hero__title-em {
  background: linear-gradient(120deg, var(--bleu-hi), var(--bleu-lo) 55%, var(--rouge-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero__lede {
  margin-top: 1.6rem; max-width: 34rem; font-size: 1.12rem; color: var(--txt-mut);
  text-wrap: pretty;
}

.hero__stream {
  margin-top: 1.5rem; max-width: 36rem;
  font-family: 'JetBrains Mono', monospace; font-size: 1rem; line-height: 1.8;
  color: var(--ivoire);
  border-left: 2px solid var(--bleu-lo);
  padding: .25rem 0 .25rem 1rem;
}
.tok {
  display: inline-block; opacity: 0; transform: translateY(4px);
  animation: tok-pop .5s var(--ease) forwards;
}
.tok:nth-child(1)  { animation-delay: 1.0s; }
.tok:nth-child(2)  { animation-delay: 1.16s; }
.tok:nth-child(3)  { animation-delay: 1.32s; }
.tok:nth-child(4)  { animation-delay: 1.48s; }
.tok:nth-child(5)  { animation-delay: 1.64s; }
.tok:nth-child(6)  { animation-delay: 1.80s; }
.tok:nth-child(7)  { animation-delay: 1.96s; }
.tok:nth-child(8)  { animation-delay: 2.12s; }
.tok:nth-child(9)  { animation-delay: 2.28s; }
.tok:nth-child(10) { animation-delay: 2.44s; }
@keyframes tok-pop {
  0%   { opacity: 0; transform: translateY(5px); filter: blur(2px); color: var(--bleu-hi); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; color: var(--ivoire); }
}
.caret {
  display: inline-block; width: 9px; height: 1.15em; vertical-align: -.18em;
  margin-left: 2px; background: var(--rouge-lo); border-radius: 1px;
  animation: caret-blink 1s steps(2, start) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.hero__actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .9rem; }

/* ════════════════════════════════════════════════════════════════════
   BOUTONS
   ════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .92rem; font-weight: 600; padding: .85rem 1.6rem; border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s, filter .25s, border-color .25s;
}
.btn--solid {
  color: var(--txt);
  background: linear-gradient(135deg, var(--bleu-lo), var(--bleu) 70%);
  box-shadow: 0 14px 38px -16px rgba(90, 120, 255, .8), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn--solid:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 20px 46px -16px rgba(90,120,255,.95); }
.btn--ghost {
  color: var(--ivoire); border: 1px solid var(--line-2); background: rgba(244,238,222,.03);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--bleu-lo); background: rgba(90,120,255,.08); }
/* Variantes claires pour les pages de contenu */
body.is-page .btn--ghost { color: var(--bleu); border-color: var(--c-line-2); background: rgba(27,42,107,.03); }
body.is-page .btn--ghost:hover { border-color: var(--bleu); background: rgba(27,42,107,.06); }

/* ════════════════════════════════════════════════════════════════════
   TERMINAL VIVANT (accueil)
   ════════════════════════════════════════════════════════════════════ */
.hero__terminal { position: relative; animation: rise-in 1s var(--ease) .15s both; }
.terminal {
  position: relative; z-index: 2; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--ash) 0%, var(--ink) 100%);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
}
.terminal__glow {
  position: absolute; inset: -2px; z-index: 1; border-radius: 18px; pointer-events: none;
  background: linear-gradient(135deg, rgba(90,120,255,.35), transparent 40%, rgba(225,0,15,.25));
  filter: blur(22px); opacity: .7;
}
.terminal__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 22, .5);
}
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(244,238,222,.18); }
.terminal__dot:nth-child(1) { background: var(--rouge-lo); }
.terminal__dot:nth-child(2) { background: #e8c14d; }
.terminal__dot:nth-child(3) { background: #4dd08a; }
.terminal__name {
  margin-left: .6rem; font-family: 'JetBrains Mono', monospace; font-size: .72rem;
  color: var(--txt-faint); letter-spacing: .04em;
}
.terminal__body {
  padding: 1.3rem 1.3rem 1.5rem;
  font-family: 'JetBrains Mono', monospace; font-size: .86rem; line-height: 1.5;
}
.terminal__body .prompt { color: var(--bleu-hi); margin-right: .4rem; }
.terminal__body .muted  { color: var(--txt-faint); }
.terminal__body .accent { color: var(--rouge-lo); }

.line {
  white-space: nowrap; overflow: hidden; color: var(--ivoire);
  width: 0; opacity: 0;
}
.line--1 { animation: type 1.1s steps(22) .4s forwards,  ln-show .01s .4s forwards; }
.line--2 { animation: type 1.5s steps(34) 1.7s forwards, ln-show .01s 1.7s forwards; margin-top: .35rem; }
.line--3 { animation: type 1.2s steps(22) 3.5s forwards, ln-show .01s 3.5s forwards; margin-top: .7rem; }
.line--4 { animation: type 1.2s steps(24) 5.0s forwards, ln-show .01s 5.0s forwards; margin-top: .35rem; }
@keyframes type    { to { width: 100%; } }
@keyframes ln-show { to { opacity: 1; } }

.wave {
  display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 1rem;
  width: auto; opacity: 1;
}
.wave span {
  flex: 1; min-width: 0; border-radius: 2px;
  background: linear-gradient(180deg, var(--bleu-lo), var(--bleu));
  transform-origin: bottom; transform: scaleY(.18);
  animation: wave-beat 1.4s ease-in-out infinite;
}
.wave span:nth-child(3n)  { background: linear-gradient(180deg, var(--ivoire), #b9c4f0); }
.wave span:nth-child(5n)  { background: linear-gradient(180deg, var(--rouge-lo), var(--rouge)); }
.wave span:nth-child(1)  { animation-delay: -.1s; } .wave span:nth-child(2)  { animation-delay: -.25s; }
.wave span:nth-child(3)  { animation-delay: -.4s; }  .wave span:nth-child(4)  { animation-delay: -.55s; }
.wave span:nth-child(5)  { animation-delay: -.7s; }  .wave span:nth-child(6)  { animation-delay: -.85s; }
.wave span:nth-child(7)  { animation-delay: -1s; }   .wave span:nth-child(8)  { animation-delay: -1.15s; }
.wave span:nth-child(9)  { animation-delay: -1.3s; } .wave span:nth-child(10) { animation-delay: -.2s; }
.wave span:nth-child(11) { animation-delay: -.45s; } .wave span:nth-child(12) { animation-delay: -.6s; }
.wave span:nth-child(13) { animation-delay: -.9s; }  .wave span:nth-child(14) { animation-delay: -1.1s; }
.wave span:nth-child(15) { animation-delay: -.3s; }  .wave span:nth-child(16) { animation-delay: -.65s; }
.wave span:nth-child(17) { animation-delay: -.8s; }  .wave span:nth-child(18) { animation-delay: -1.2s; }
@keyframes wave-beat {
  0%, 100% { transform: scaleY(.18); }
  50%      { transform: scaleY(1); }
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); z-index: 3;
}
.scroll-cue__rail {
  display: block; width: 22px; height: 36px; border-radius: 12px;
  border: 1.5px solid var(--line-2); position: relative;
}
.scroll-cue__dot {
  position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; border-radius: 3px;
  background: var(--bleu-lo); transform: translateX(-50%);
  animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob { 0%,100% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 12px); } }

/* ════════════════════════════════════════════════════════════════════
   EN-TÊTES DE SECTION + reveals au scroll (accueil)
   ════════════════════════════════════════════════════════════════════ */
section { position: relative; z-index: 1; }

.shead { max-width: 42rem; margin: 0 auto 3.5rem; text-align: center; }
.shead--left { margin-inline: 0; text-align: left; }
.shead__kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: 'JetBrains Mono', monospace; font-size: .72rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--bleu-hi);
}
.shead__tri {
  width: 22px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--bleu) 0 33.33%, var(--ivoire) 33.33% 66.66%, var(--rouge) 66.66% 100%);
}
.shead__title {
  margin-top: .9rem; font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.1; letter-spacing: -.015em;
  color: var(--ivoire); text-wrap: balance;
}
.shead__sub { margin-top: 1rem; color: var(--txt-mut); font-size: 1.05rem; text-wrap: pretty; }

.shead, .door, .tool, .step, .rcard, .conscience__panel, .vision__inner {
  animation: reveal-up both ease;
  animation-timeline: view();
  animation-range: entry 4% cover 26%;
}
@keyframes reveal-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* ════════════════════════════════════════════════════════════════════
   DEUX PORTES
   ════════════════════════════════════════════════════════════════════ */
.portes { max-width: var(--maxw); margin: 0 auto; padding: 6rem 1.5rem; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 800px) { .doors { grid-template-columns: 1fr; } }

.door {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 2.2rem; border-radius: 22px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(18,26,51,.7), var(--ink));
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.door:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -40px rgba(0,0,0,.85); }
.door--part:hover { border-color: rgba(90, 120, 255, .55); }
.door--pro:hover  { border-color: rgba(255, 59, 72, .5); }

.door__signal { position: absolute; top: 0; left: 0; right: 0; height: 2px; overflow: hidden; }
.door__signal::before {
  content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--bleu-lo), transparent);
  animation: signal-run 3.2s linear infinite;
}
.door--pro .door__signal::before { background: linear-gradient(90deg, transparent, var(--rouge-lo), transparent); animation-delay: -1.6s; }
@keyframes signal-run { from { left: -40%; } to { left: 100%; } }

.door__head { display: flex; align-items: center; gap: .9rem; }
.door__glyph {
  width: 52px; height: 52px; flex: none; display: grid; place-items: center;
  border-radius: 14px; border: 1px solid var(--line-2);
}
.door__glyph svg { width: 26px; height: 26px; }
.door--part .door__glyph { color: var(--bleu-hi); background: rgba(90,120,255,.1); border-color: rgba(90,120,255,.3); }
.door--pro  .door__glyph { color: var(--rouge-lo); background: rgba(255,59,72,.08); border-color: rgba(255,59,72,.3); }
.door__kicker {
  font-family: 'JetBrains Mono', monospace; font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--txt-faint);
}
.door__title { margin-top: 1.4rem; font-family: 'Fraunces', serif; font-size: 1.7rem; color: var(--ivoire); }
.door__text  { margin-top: .7rem; color: var(--txt-mut); font-size: .98rem; }
.door__list  { margin-top: 1.3rem; display: flex; flex-direction: column; gap: .55rem; }
.door__li { position: relative; padding-left: 1.4rem; font-size: .9rem; color: var(--txt-mut); }
.door__li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bleu-lo); box-shadow: 0 0 7px rgba(90,120,255,.7);
}
.door--pro .door__li::before { background: var(--rouge-lo); box-shadow: 0 0 7px rgba(255,59,72,.7); }
.door__enter {
  margin-top: 1.6rem; display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .92rem;
}
.door--part .door__enter { color: var(--bleu-hi); }
.door--pro  .door__enter { color: var(--rouge-lo); }
.door__arrow { transition: transform .3s var(--ease); }
.door:hover .door__arrow { transform: translateX(5px); }

.portes__note { margin-top: 1.6rem; text-align: center; font-size: .82rem; color: var(--txt-faint); }

/* ════════════════════════════════════════════════════════════════════
   OSIALAB — bibliothèque d'outils (accueil)
   ════════════════════════════════════════════════════════════════════ */
.osialab { max-width: var(--maxw); margin: 0 auto; padding: 5rem 1.5rem; }
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 980px) { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tools { grid-template-columns: 1fr; } }

.tool {
  position: relative; display: flex; flex-direction: column; padding: 1.6rem;
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18,26,51,.55), var(--ink));
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.tool:hover { transform: translateY(-5px); border-color: rgba(90,120,255,.4); box-shadow: 0 30px 60px -36px rgba(0,0,0,.8); }
.tool__top { display: flex; align-items: center; justify-content: space-between; }
.tool__badge {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: .95rem; color: var(--ivoire);
  background: linear-gradient(140deg, var(--bleu), #2c3f8f);
  border: 1px solid rgba(138,163,255,.3);
}
.tool__badge--all { background: linear-gradient(140deg, var(--ash-2), var(--ash)); color: var(--bleu-hi); }
.tool__badge--all svg { width: 22px; height: 22px; }
.tool__circ {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid transparent; border-top-color: var(--bleu-lo); border-right-color: rgba(90,120,255,.3);
  animation: circ-spin 2.6s linear infinite; opacity: .65;
}
@keyframes circ-spin { to { transform: rotate(360deg); } }
.tool__name { margin-top: 1.2rem; font-family: 'Fraunces', serif; font-size: 1.25rem; color: var(--ivoire); }
.tool__role { margin-top: .5rem; flex: 1; font-size: .9rem; color: var(--txt-mut); }
.tool__more {
  margin-top: 1.2rem; display: inline-flex; gap: .4rem; align-items: center;
  font-size: .85rem; font-weight: 600; color: var(--bleu-hi);
  transition: gap .25s var(--ease);
}
.tool:hover .tool__more { gap: .7rem; }
.tool--all { background: linear-gradient(180deg, rgba(27,42,107,.35), var(--ink)); border-color: rgba(90,120,255,.25); }

/* ════════════════════════════════════════════════════════════════════
   PAR OÙ COMMENCER — la première marche (accueil)
   ════════════════════════════════════════════════════════════════════ */
.start { padding: 5rem 1.5rem; border-top: 1px solid var(--line); }
.start__inner { max-width: var(--maxw); margin: 0 auto; }
.steps {
  margin-top: 3rem; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 2rem 1.8rem; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18,26,51,.5), var(--ink));
}
.step__rail {
  position: absolute; top: 50%; right: -1.25rem; width: 1.25rem; height: 2px; overflow: hidden;
  background: var(--line); z-index: 2;
}
@media (max-width: 820px) { .step__rail { display: none; } }
.step__pulse {
  position: absolute; top: 0; left: -50%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--bleu-lo), transparent);
  animation: signal-run 2.4s linear infinite; animation-delay: var(--pd, 0s);
}
.step__num {
  font-family: 'JetBrains Mono', monospace; font-size: .95rem; font-weight: 600;
  color: var(--bleu-hi);
}
.step__title { margin-top: .9rem; font-family: 'Fraunces', serif; font-size: 1.3rem; color: var(--ivoire); }
.step__text  { margin-top: .5rem; font-size: .92rem; color: var(--txt-mut); }

/* ════════════════════════════════════════════════════════════════════
   EN CONSCIENCE — waveform pleine largeur (accueil)
   ════════════════════════════════════════════════════════════════════ */
.conscience { padding: 5rem 1.5rem; }
.conscience__panel {
  position: relative; overflow: hidden;
  max-width: var(--maxw); margin: 0 auto; padding: 3.5rem;
  border-radius: 26px; border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(27,42,107,.5), transparent 55%),
    linear-gradient(180deg, var(--ash), var(--ink));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.conscience__panel .shead { margin: 0; max-width: 38rem; }
.conscience__wave {
  position: absolute; right: 2.5rem; bottom: 0; top: 0; width: 40%;
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  opacity: .5; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
          mask-image: linear-gradient(90deg, transparent, #000 40%);
}
@media (max-width: 760px) { .conscience__wave { display: none; } }
.conscience__wave span {
  width: 4px; border-radius: 3px; height: 30%; transform-origin: center;
  background: linear-gradient(180deg, var(--bleu-lo), var(--bleu));
  animation: cwave 2.2s ease-in-out infinite;
}
.conscience__wave span:nth-child(4n) { background: linear-gradient(180deg, var(--ivoire), #b9c4f0); }
.conscience__wave span:nth-child(7n) { background: linear-gradient(180deg, var(--rouge-lo), var(--rouge)); }
.conscience__wave span:nth-child(odd)  { animation-delay: -.4s; }
.conscience__wave span:nth-child(3n)   { animation-delay: -.8s; }
.conscience__wave span:nth-child(5n)   { animation-delay: -1.2s; }
.conscience__wave span:nth-child(2n)   { animation-delay: -1.6s; }
@keyframes cwave { 0%,100% { height: 18%; opacity: .5; } 50% { height: 85%; opacity: 1; } }

/* ════════════════════════════════════════════════════════════════════
   REPÈRES (accueil)
   ════════════════════════════════════════════════════════════════════ */
.repere { padding: 5rem 1.5rem; }
.repere__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
@media (max-width: 860px) { .repere__grid { grid-template-columns: 1fr; } }
.rcard {
  position: relative; padding: 2rem; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18,26,51,.5), var(--ink));
  transition: transform .35s var(--ease), border-color .35s;
}
.rcard:hover { transform: translateY(-4px); border-color: var(--line-2); }
.rcard__mark {
  display: block; width: 34px; height: 34px; border-radius: 9px;
  background: conic-gradient(from 200deg, var(--bleu) 0 33%, var(--ivoire) 33% 66%, var(--rouge) 66% 100%);
  opacity: .9;
  animation: mark-rotate 9s linear infinite;
}
@keyframes mark-rotate { to { transform: rotate(360deg); } }
.rcard__title { margin-top: 1.2rem; font-family: 'Fraunces', serif; font-size: 1.25rem; color: var(--ivoire); line-height: 1.25; }
.rcard__text  { margin-top: .7rem; font-size: .94rem; color: var(--txt-mut); }

/* ════════════════════════════════════════════════════════════════════
   LA VISION (accueil)
   ════════════════════════════════════════════════════════════════════ */
.vision { padding: 6rem 1.5rem 7rem; }
.vision__inner {
  position: relative; overflow: hidden; max-width: 920px; margin: 0 auto;
  padding: 4.5rem 2.5rem; text-align: center; border-radius: 30px;
  border: 1px solid rgba(90,120,255,.28);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(27,42,107,.6), transparent 60%),
    linear-gradient(180deg, var(--ash), var(--night));
  box-shadow: 0 50px 100px -50px rgba(0,0,0,.9);
}
.vision__halo {
  position: absolute; left: 50%; top: -30%; width: 60%; height: 80%;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(90,120,255,.3), transparent 65%);
  filter: blur(30px); animation: halo-breathe 6s ease-in-out infinite;
}
@keyframes halo-breathe { 0%,100% { opacity: .5; transform: translateX(-50%) scale(1); } 50% { opacity: .9; transform: translateX(-50%) scale(1.1); } }
.vision__kicker {
  position: relative; font-family: 'JetBrains Mono', monospace; font-size: .72rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--bleu-hi);
}
.vision__title {
  position: relative; margin-top: 1.1rem; font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.02em; color: var(--ivoire);
}
.vision__title em {
  background: linear-gradient(120deg, var(--bleu-hi), var(--rouge-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.vision__text {
  position: relative; margin: 1.3rem auto 2.2rem; max-width: 40rem;
  font-size: 1.1rem; color: var(--txt-mut); text-wrap: pretty;
}

/* ════════════════════════════════════════════════════════════════════
   FOOTER — liseré tricolore + logo (toutes pages)
   ════════════════════════════════════════════════════════════════════ */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); }
body.is-page .foot { border-top-color: var(--c-line); }
.foot__band {
  height: 3px;
  background: linear-gradient(90deg, var(--bleu) 0 33.33%, var(--ivoire) 33.33% 66.66%, var(--rouge) 66.66% 100%);
  box-shadow: 0 0 16px rgba(90,120,255,.3);
}
.foot__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.5rem 2rem;
  display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start;
}
.foot__tag { margin-top: 1rem; max-width: 22rem; color: var(--txt-mut); font-size: .95rem; }
.foot__nav { display: grid; grid-template-columns: repeat(2, auto); gap: .7rem 2.5rem; }
.foot__nav a { color: var(--txt-mut); font-size: .92rem; transition: color .25s; }
.foot__nav a:hover { color: var(--ivoire); }
.foot__base {
  max-width: var(--maxw); margin: 0 auto; padding: 1.3rem 1.5rem 2.4rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
}
.foot__fine { font-size: .8rem; color: var(--txt-faint); }
.foot__fr { display: inline-flex; align-items: center; gap: .55rem; font-size: .8rem; color: var(--txt-faint); }
.foot__tri {
  width: 20px; height: 12px; border-radius: 3px;
  background: linear-gradient(90deg, var(--bleu) 0 33.33%, var(--ivoire) 33.33% 66.66%, var(--rouge) 66.66% 100%);
}
/* Footer sur page claire : couleurs lisibles
   (le logo footer = wordmark SVG, géré plus haut via .brandmark--foot) */
body.is-page .foot__tag { color: var(--c-text); }
body.is-page .foot__nav a { color: var(--c-mute); }
body.is-page .foot__nav a:hover { color: var(--bleu); }
body.is-page .foot__base { border-top-color: var(--c-line); }
body.is-page .foot__fine,
body.is-page .foot__fr { color: var(--c-mute); }

/* Liens légaux (mentions légales · confidentialité) */
.foot__legal {
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
}
.foot__legal a { color: var(--txt-faint); font-size: .8rem; transition: color .25s; }
.foot__legal a:hover { color: var(--ivoire); }
body.is-page .foot__legal a { color: var(--c-mute); }
body.is-page .foot__legal a:hover { color: var(--bleu); }

/* ════════════════════════════════════════════════════════════════════
   PAGES DE CONTENU — fond CLAIR, lisible (ia-locale, ollama, osialab…)
   Réutilise les classes existantes : .page-hero .eyebrow .page-title
   .page-lead .article .prose .tool-grid .tool-card .page-next .projet-card
   .next-links — restylées sur papier clair, identité tricolore conservée.
   ════════════════════════════════════════════════════════════════════ */

/* En-tête d'article */
.page-hero {
  position: relative; z-index: 1;
  max-width: 820px; margin-inline: auto;
  padding: clamp(120px, 16vw, 170px) 1.5rem clamp(24px, 5vw, 44px);
}
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'JetBrains Mono', monospace; font-size: .72rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--bleu);
  margin-bottom: 1.1rem;
}
.page-hero .eyebrow::before {
  content: ""; width: 22px; height: 4px; border-radius: 2px; flex: none;
  background: linear-gradient(90deg, var(--bleu) 0 33.33%, var(--ivoire) 33.33% 66.66%, var(--rouge) 66.66% 100%);
}
.page-title {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.02em;
  color: var(--c-ink); margin-bottom: 1rem; text-wrap: balance;
}
.page-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--c-text); max-width: 64ch;
}
.page-lead a { color: var(--bleu); border-bottom: 1px solid rgba(27,42,107,.32); }

/* Corps de l'article : largeur de lecture confortable */
.article {
  position: relative; z-index: 1;
  max-width: 820px; margin-inline: auto;
  padding: clamp(8px, 2vw, 16px) 1.5rem clamp(64px, 10vw, 120px);
}

.prose { color: var(--c-text); font-size: 1.04rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.45rem, 3vw, 2rem); color: var(--c-ink);
  margin-top: 2.3em; padding-top: .1em; letter-spacing: -.02em; line-height: 1.18;
}
.prose h2::before {
  content: ""; display: block; width: 46px; height: 3px; margin-bottom: 1.1rem; border-radius: 2px;
  background: linear-gradient(90deg, var(--bleu) 0 50%, var(--rouge) 50% 100%);
}
.prose h3 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.12rem, 2vw, 1.35rem); color: var(--bleu);
  margin-top: 1.8em;
}
.prose p { color: var(--c-text); }
.prose strong { color: var(--c-ink); font-weight: 600; }
.prose em { color: var(--bleu); font-style: italic; }

.prose a {
  color: var(--bleu); text-decoration: none;
  border-bottom: 1px solid rgba(27, 42, 107, 0.30);
  transition: color .2s, border-color .2s;
}
.prose a:hover { color: var(--rouge); border-bottom-color: var(--rouge); }

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: .5em; }
.prose li::marker { color: var(--bleu); }

/* Citation / encadré « note informative » — filet tricolore */
.prose blockquote {
  margin-top: 1.6em; padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--bleu); border-radius: 4px;
  background: var(--paper-3); color: var(--c-soft); font-size: .97em;
}
.prose blockquote p { color: var(--c-soft); }
.prose blockquote strong { color: var(--c-ink); }

/* Code inline */
.prose code {
  font-family: 'JetBrains Mono', ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: .86em; color: var(--bleu);
  background: rgba(27, 42, 107, 0.07);
  padding: .15em .45em; border-radius: 5px;
  border: 1px solid rgba(27, 42, 107, 0.12);
}

/* ════════════════════════════════════════════════════════════════════
   BLOC DE CODE = FENÊTRE DE TERMINAL (l'effet que le client adore)
   Sur page claire : encart sombre élégant, barre type macOS, lisière bleue.
   ════════════════════════════════════════════════════════════════════ */
.prose pre {
  position: relative; margin-top: 1.6em; margin-bottom: 1.6em;
  padding: 2.6rem 1.4rem 1.3rem;
  background: linear-gradient(180deg, #121a33 0%, #0b1024 100%);
  border: 1px solid rgba(27, 42, 107, 0.55);
  border-radius: 14px; overflow-x: auto;
  box-shadow: 0 24px 48px -28px rgba(11, 16, 36, .55), inset 0 1px 0 rgba(255,255,255,.05);
}
/* barre de fenêtre : 3 pastilles + liseré tricolore fin */
.prose pre::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 38px;
  background: rgba(7, 10, 22, .55);
  border-bottom: 1px solid rgba(244, 238, 222, .08);
  border-radius: 14px 14px 0 0;
}
.prose pre::after {
  content: ""; position: absolute; top: 14px; left: 16px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--rouge-lo);
  box-shadow: 19px 0 0 #e8c14d, 38px 0 0 #4dd08a;
}
.prose pre code {
  display: block; position: relative;
  color: #dfe5fb; background: none; border: none; padding: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .85em; line-height: 1.75; white-space: pre;
}

/* Tableaux (matrice de risque, etc.) */
.prose table { width: 100%; border-collapse: collapse; margin-top: 1.6em; font-size: .94em; }
.prose th, .prose td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--c-line); }
.prose th {
  color: var(--c-ink); font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: .82em; letter-spacing: .04em; text-transform: uppercase;
  background: var(--paper-3);
}
.prose tbody tr:hover { background: rgba(27, 42, 107, 0.04); }

.prose hr { border: none; height: 1px; margin: 2.4em 0; background: var(--c-line); }

/* Grille de cartes « outils » (page OSIALab) */
.tool-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin-top: 2em;
}
.tool-card {
  display: block; position: relative; overflow: hidden;
  padding: 1.6rem 1.5rem; border: 1px solid var(--c-line);
  border-radius: 16px; background: var(--paper-2);
  box-shadow: 0 1px 2px rgba(11,16,36,.04);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
/* signal qui circule au bord supérieur au survol */
.tool-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--bleu) 0 33.33%, var(--ivoire) 33.33% 66.66%, var(--rouge) 66.66% 100%);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease);
}
.tool-card:hover {
  transform: translateY(-4px); border-color: var(--c-line-2);
  box-shadow: 0 20px 40px -24px rgba(27,42,107,.30);
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card .tool-tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bleu); margin-bottom: .8rem;
}
.tool-card h3 {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: 1.3rem; color: var(--c-ink); margin: 0 0 .5rem;
}
.tool-card p { color: var(--c-text); font-size: .95em; margin: 0; }
.tool-card .tool-state {
  display: inline-block; margin-top: .9rem;
  font-size: .85rem; font-weight: 600; color: var(--rouge);
}
.tool-card.is-soon { opacity: .72; }

/* Bloc « explorer » en bas d'article */
.page-next {
  max-width: 820px; margin: 0 auto clamp(72px, 10vw, 120px);
  padding: 0 1.5rem;
}
.page-next .projet-card {
  position: relative; overflow: hidden; text-align: left;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 40px);
  border: 1px solid var(--c-line); border-radius: 22px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper-3));
}
.page-next .projet-glow {
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(27,42,107,.08), transparent 65%);
  pointer-events: none;
}
.page-next h2 {
  position: relative; z-index: 1;
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 1rem; color: var(--c-ink);
}
.next-links {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; padding: 0;
}
.next-links a {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; border: 1px solid var(--c-line);
  border-radius: 999px; color: var(--c-soft); font-size: .92rem;
  background: var(--paper-2);
  transition: border-color .2s, color .2s, transform .2s;
}
.next-links a:hover { border-color: var(--bleu); color: var(--bleu); transform: translateY(-2px); }
.next-links a::after { content: "→"; color: var(--rouge); }

/* La carte « projet » générique (au cas où réutilisée sur page claire) */
body.is-page .projet-card { color: var(--c-text); }

@media (max-width: 620px) {
  .tool-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION — accessibilité obligatoire
   ════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .progress__bar { transform: scaleX(0); }
  .tok   { opacity: 1; transform: none; color: var(--ivoire); }
  .line  { width: 100%; opacity: 1; }
  .node  { opacity: .8; transform: none; }
  .edge  { stroke-dashoffset: 0; stroke-dasharray: none; }
  .shead, .door, .tool, .step, .rcard, .conscience__panel, .vision__inner,
  .hero__copy, .hero__terminal { opacity: 1 !important; transform: none !important; }
  .caret { display: none; }
  .thoughtfield, .scroll-cue__dot { display: none; }
  .wave span, .conscience__wave span { transform: none; height: 50%; }
}
