/* getcaffeine.dev: papier clair + sections sombres, trait fin, accent cobalt.
   Toutes les couleurs passent par les variables : le mode sombre ne redéfinit
   que :root. */
:root {
  --paper: #f5f5f0;
  --card: #fbfbf8;
  --card-hover: #ffffff;
  --tint: #ededE6;
  --ink: #0e0f12;
  --ink-2: #4a4d55;
  --line: #e1e1da;
  --accent: #3d5afe;
  --accent-soft: #e6eaff;
  --ok: #12a66b;
  --ok-soft: #def5ea;
  --ko: #e5484d;
  --nav-bg: rgba(245, 245, 240, 0.85);
  --code-bg: #0e0f12;
  --code-ink: #f5f5f0;
  --code-dim: #6c6f78;
  --dark: #0c0d10;
  --dark-card: #131418;
  --dark-line: #24262c;
  --sans: ui-sans-serif, -apple-system, "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Sombre : data-theme posé par assets/js/theme.js (système ou choix mémorisé). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1013;
  --card: #16171b;
  --card-hover: #1c1d22;
  --tint: #121317;
  --ink: #ececE6;
  --ink-2: #a0a3ab;
  --line: #26282e;
  --accent: #7b8fff;
  --accent-soft: rgba(123, 143, 255, 0.14);
  --ok: #3ccf8e;
  --ok-soft: rgba(60, 207, 142, 0.14);
  --ko: #ff6b70;
  --nav-bg: rgba(15, 16, 19, 0.85);
  --code-bg: #08090b;
  --dark: #08090b;
  --dark-card: #111215;
  --dark-line: #22242a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.08; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 4px; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.hl { font-family: var(--mono); font-weight: 500; color: var(--accent); letter-spacing: -0.04em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: var(--ink); color: var(--paper); padding: 8px 12px; }

/* Fond quadrillé façon plan technique. */
.grid-bg {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 8px;
  font-weight: 500; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--accent); color: #fff; }
.btn--ghost { border-color: var(--ink); background: var(--card); }
.btn--sm { padding: 8px 14px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 600; text-decoration: none; letter-spacing: -0.02em; }
.logo-d, [data-theme="dark"] .logo-l { display: none; }
[data-theme="dark"] .logo-d { display: inline; }
/* Bouton de thème : visible seulement si le script a tourné. */
.theme-btn { display: none; width: 38px; height: 36px; place-items: center; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
[data-theme] .theme-btn { display: grid; }
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .moon, [data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }
.nav__links { display: flex; gap: 28px; font-size: 14px; }
.nav__links a { text-decoration: none; color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 8px; }
/* Menu mobile : <details> natif. */
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; cursor: pointer; width: 38px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.mnav summary::-webkit-details-marker { display: none; }
.mnav[open] summary { border-color: var(--ink); }
.mnav summary svg { width: 20px; height: 20px; }
.mnav__panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 230px;
  background: var(--card); border: 1px solid var(--ink); border-radius: 12px; padding: 6px;
  box-shadow: 4px 4px 0 var(--ink); display: grid; font-size: 14px;
}
.mnav__panel a { padding: 10px 12px; border-radius: 6px; text-decoration: none; }
.mnav__panel a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 56px; border-bottom: 1px solid var(--line); overflow: hidden; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.hero h1 { font-size: clamp(44px, 8vw, 96px); margin: 28px 0 24px; }
.hero__sub { max-width: 620px; font-size: 19px; color: var(--ink-2); }
.hero__sub em { font-style: normal; color: var(--ink); font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.cmd {
  background: var(--code-bg); color: var(--code-ink); padding: 12px 18px; border-radius: 8px;
  font-size: 14px; user-select: all; max-width: 100%; overflow-x: auto; white-space: nowrap;
  border: 1px solid var(--line);
}

/* Le rail : le pipeline lui-même. */
.rail {
  list-style: none; padding: 0; margin: 72px 0 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  position: relative; z-index: 1;
}
.rail::before {
  content: ""; position: absolute; left: 4%; right: 4%; top: 30px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px);
  z-index: -1;
}
/* L'impulsion qui parcourt le pipeline, étape par étape. */
.rail::after {
  content: ""; position: absolute; top: 26px; left: 4%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px var(--accent);
  z-index: -1; animation: pulse-run 6s linear infinite;
}
@keyframes pulse-run { from { left: 4%; } to { left: 96%; } }
.node {
  background: var(--card); border: 1px solid var(--ink); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 4px 4px 0 var(--ink);
  animation: node-lit 6s ease-in-out infinite;
}
.node:nth-child(2) { animation-delay: 1s; }
.node:nth-child(3) { animation-delay: 2s; }
.node:nth-child(4) { animation-delay: 3s; }
.node:nth-child(5) { animation-delay: 4s; }
.node:nth-child(6) { animation-delay: 5s; }
@keyframes node-lit {
  0%, 22%, 100% { transform: none; }
  8% { transform: translate(-2px, -3px); }
}
.node__n { font-size: 11px; color: var(--ink-2); }
.node b { font-size: 15px; }
.node small { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.node--agent { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
.node--check { border-color: var(--ok); box-shadow: 4px 4px 0 var(--ok); }
.tag {
  align-self: flex-start; font-family: var(--mono); font-size: 11px;
  padding: 2px 7px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line);
}
.tag--accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.tag--ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

/* Champ de pixels sous le rail. */
.pixels {
  height: 150px; margin-top: -40px;
  background: radial-gradient(circle, var(--accent) 1.6px, transparent 2px) 0 0 / 11px 11px;
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 100%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse 50% 100% at 50% 100%, #000 15%, transparent 70%);
  opacity: .9;
}
.logos {
  list-style: none; padding: 20px 0 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2);
}
.logos li::before { content: "▪ "; color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; border-bottom: 1px solid var(--line); }
.section--tint { background: var(--tint); }
.head { max-width: 700px; margin-bottom: 56px; }
.head h2 { font-size: clamp(32px, 5vw, 54px); margin: 12px 0 18px; }
.head p:last-child { color: var(--ink-2); font-size: 18px; }
.eyebrow { font-size: 13px; color: var(--accent); }

/* Cartes illustrées en trait fin (isométrique). */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); padding: 28px; display: flex; flex-direction: column; gap: 10px; transition: background .2s; }
.card:hover { background: var(--card-hover); }
.card h3 { font-size: 18px; letter-spacing: -0.02em; }
.card p { color: var(--ink-2); font-size: 15px; }
a.card { text-decoration: none; }
a.card h3::after { content: " →"; color: var(--accent); opacity: 0; transition: opacity .2s; }
a.card:hover h3::after { opacity: 1; }
.card--yours { background: repeating-linear-gradient(135deg, var(--card) 0 10px, var(--paper) 10px 20px); }
.iso {
  width: 100%; height: 150px; margin-bottom: 8px;
  fill: var(--card); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round;
}
.iso .a { stroke: var(--accent); }
.iso .f { fill: var(--accent); stroke: none; }
.iso .dash { stroke-dasharray: 4 4; fill: none; }
.chips { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.chips li { font-size: 11px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }

/* ---------- Section sombre ---------- */
.dark { background: var(--dark); color: #e9e9e4; border-color: var(--dark-line); }
.dark .head p:last-child { color: #9a9ca3; }
.dark .eyebrow, .dark .hl { color: #8fa2ff; }
.dark code { background: rgba(255, 255, 255, .08); }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; }
.code { margin: 0; background: var(--dark-card); border: 1px solid var(--dark-line); border-radius: 12px; overflow: hidden; min-width: 0; }
.code figcaption { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #8b8e96; padding: 12px 16px; border-bottom: 1px solid var(--dark-line); }
.code pre { color: #e9e9e4; margin: 0; padding: 20px; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.code .muted { color: #6c6f78; }
.code .k { color: #8fa2ff; }
.code .s { color: #b6e3c8; }
.code .n { color: #f0c6ff; }
.code .c { color: #5d6069; }
.code .ok { color: #43d39a; }
.code .ko { color: #ff7a7e; }
.code .t { color: #5d6069; }
.term pre { color: #e9e9e4; }
/* Le terminal se déroule ligne par ligne quand il entre à l'écran. Sans
   support d'animation-timeline, tout est simplement affiché. */
.term .ln { display: block; }
@supports (animation-timeline: view()) {
  .term .ln {
    animation: ln-in linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 40%;
  }
  .term .ln:nth-child(n+4) { animation-range: entry 30% cover 42%; }
  .term .ln:nth-child(n+7) { animation-range: entry 40% cover 44%; }
  .term .ln:nth-child(n+10) { animation-range: entry 50% cover 46%; }
  .term .ln:nth-child(n+13) { animation-range: entry 60% cover 48%; }
}
@keyframes ln-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #2c2e35; }
.note { font-size: 11px; color: #6c6f78; padding: 0 20px 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 20px; background: var(--dark-line); border: 1px solid var(--dark-line); border-radius: 12px; overflow: hidden; }
.stat { background: var(--dark-card); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.stat strong { font-size: 40px; font-weight: 500; color: #fff; letter-spacing: -0.04em; }
.stat span { color: #9a9ca3; font-size: 14px; }

/* ---------- Mots-clés ---------- */
.kw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kw div { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: var(--card); min-width: 0; }
.kw div > code { display: inline-block; font-size: 14px; color: var(--accent); background: var(--accent-soft); margin-bottom: 12px; max-width: 100%; overflow-wrap: anywhere; }
.kw p { color: var(--ink-2); font-size: 14px; }

/* ---------- Pourquoi ---------- */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.why__card { border-top: 2px solid var(--ink); padding-top: 20px; }
.why__card h3 { font-size: 22px; margin-bottom: 10px; }
.why__card p { color: var(--ink-2); }
.team { margin-top: 80px; display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 14px; }
.team__intro h3 { font-size: 26px; margin: 10px 0 12px; }
.team__intro p:last-child { color: var(--ink-2); }
.owner { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: var(--card); border: 1px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
.owner img { width: 72px; height: 72px; flex: none; border-radius: 12px; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.owner h4 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.owner h4 .muted { font-size: 12px; font-weight: 400; }
.owner__role { font-size: 11px; color: var(--accent); margin: 2px 0 10px; text-transform: uppercase; letter-spacing: .06em; }
.owner p:not(.owner__role) { color: var(--ink-2); font-size: 14px; }
.owner a { display: inline-block; margin-top: 12px; font-size: 12px; text-decoration: none; border-bottom: 1px solid var(--ink); }
.owner a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Blocs de commandes (install, pages) ---------- */
.code--light {
  margin: 20px 0; padding: 20px 22px; background: var(--code-bg); color: var(--code-ink);
  border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; line-height: 1.75; overflow-x: auto;
}
.code--light .c, .code--light .muted { color: var(--code-dim); }
.code--light .k { color: #8fa2ff; }
.code--light .s { color: #b6e3c8; }
.code--light .n { color: #f0c6ff; }

/* ---------- Install ---------- */
.install { text-align: center; }
.install h2 { font-size: clamp(32px, 5vw, 54px); margin-bottom: 14px; }
.install .code--light { text-align: left; max-width: 640px; margin: 32px auto; padding: 22px 24px; font-size: 14px; line-height: 1.8; }
.platforms { list-style: none; padding: 0; margin: 32px auto 0; max-width: 760px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: left; }
.platforms li { border: 1px solid var(--ink); border-radius: 10px; background: var(--card); padding: 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.platforms a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.platforms li:has(a):hover { transform: translateY(-2px); box-shadow: 5px 5px 0 var(--ink); }
.platforms b { font-size: 14px; }
.platforms span { font-size: 12px; color: var(--ink-2); }
.platforms em { font-style: normal; font-size: 11px; align-self: flex-start; margin-top: 6px; padding: 2px 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.platforms em.ok { background: var(--ok-soft); color: var(--ok); }
.platforms li.soon { border-style: dashed; box-shadow: none; opacity: .75; }
.distros { max-width: 760px; margin: 24px auto 0; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.distros details { min-width: 0; border: 1px solid var(--ink); border-radius: 10px; background: var(--card); }
.distros summary { cursor: pointer; padding: 12px 16px; font-size: 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.distros summary::-webkit-details-marker { display: none; }
.distros summary::after { content: "+"; color: var(--accent); }
.distros details[open] summary::after { content: "−"; }
.install .distros .code--light { margin: 0 12px 12px; max-width: none; font-size: 13px; }
.distros pre:focus { outline: none; }
.then { margin-top: 28px; }
.install .then + .code--light { margin-top: 10px; }
.install__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Pages de contenu ---------- */
.hero--page { padding: 72px 0 64px; }
.hero--page h1 { font-size: clamp(40px, 7vw, 84px); }
.rail--layers { margin-top: 56px; }
.page { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; padding-top: 72px; padding-bottom: 112px; }
.page--single { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.toc { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 13px; border-left: 1px solid var(--line); }
.toc__title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); padding: 0 0 8px 14px; }
.toc a { text-decoration: none; color: var(--ink-2); padding: 5px 14px; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }
.prose { max-width: 760px; min-width: 0; }
.prose > section { padding-bottom: 64px; margin-bottom: 64px; border-bottom: 1px solid var(--line); }
.prose h2 { font-size: clamp(26px, 3.6vw, 40px); margin: 10px 0 18px; }
.prose > section > p { color: var(--ink-2); font-size: 17px; margin-bottom: 16px; }
.prose strong { color: var(--ink); font-weight: 600; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--ok); font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: 4px 4px 0 var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 12px 16px; border-bottom: 1px solid var(--ink); }
td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
td.mono { font-size: 13px; white-space: nowrap; }
td.yes { color: var(--ok); }
td.no { color: var(--ko); }
td.meh { color: var(--ink-2); }
.kw--2 { grid-template-columns: repeat(2, 1fr); margin: 20px 0; }
.aside { border-left: 2px solid var(--accent); padding-left: 16px; font-style: italic; }
.limits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 20px; }
.limits article { background: var(--card); padding: 20px; }
.limits h3 { font-size: 16px; letter-spacing: -0.01em; margin-bottom: 8px; }
.limits p { color: var(--ink-2); font-size: 14px; }
.page__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.section__more { margin-top: 28px; }
.crumbs { font-size: 13px; color: var(--ink-2); }
.crumbs a { text-decoration: none; color: var(--accent); }

/* Étapes d'un pipeline, en liste détaillée. */
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; counter-reset: none; }
.steps li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.steps li b { font-family: var(--mono); font-size: 14px; }
.steps li .tag { margin-top: 6px; display: inline-block; }
.steps li p { color: var(--ink-2); font-size: 15px; }
.steps li.agent { border-color: var(--accent); }
.steps li.check { border-color: var(--ok); }

/* Changelog rendu depuis le markdown. */
.changelog h2 { font-family: var(--mono); font-size: 24px; letter-spacing: -0.03em; margin: 56px 0 8px; padding-top: 32px; border-top: 1px solid var(--line); }
.changelog h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.changelog h3 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 24px 0 10px; }
.changelog ul { padding-left: 20px; margin: 0; display: grid; gap: 8px; color: var(--ink-2); }
.changelog li::marker { color: var(--accent); }
.changelog strong { color: var(--ink); }
.changelog p { color: var(--ink-2); margin: 8px 0; }
.changelog { overflow-wrap: anywhere; }
.changelog li { min-width: 0; }

/* ---------- Footer ---------- */
.foot { padding: 36px 0; }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot__made { color: var(--ink-2); font-size: 14px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 80px 24px; }
.notfound h1 { font-size: clamp(36px, 6vw, 64px); }

/* ---------- Démo : un run qui publie un billet (CSS seul) ---------- */
.demo { --cycle: 20s; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: start; }
.stack { display: inline-grid; }
.stack > * { grid-area: 1 / 1; }
.trail { background: var(--card); border: 1px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); padding: 18px 20px 12px; min-width: 0; }
.trail__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.trail__title { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.trail__meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.trail__right { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; justify-items: center; }
.count { min-width: 28px; justify-items: end; }
.trail__steps { list-style: none; margin: 0; padding: 0; }
.st { position: relative; display: grid; grid-template-columns: 18px auto minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 10px 8px; }
.st > :not(.st__hl) { position: relative; }
.st::before { content: ""; position: absolute; left: 16.5px; top: 30px; bottom: -8px; width: 1px; background: var(--line); }
.st:last-child::before { display: none; }
.st__hl { position: absolute; inset: 2px -6px; border-radius: 8px; background: var(--accent-soft); }
.st b { font-size: 14px; font-weight: 500; }
.st .tag { justify-self: start; }
.st__info { grid-column: 3; grid-row: 1; justify-self: end; justify-items: end; font-size: 12px; color: var(--ink-2); }
.st > b { grid-column: 2; grid-row: 1; }
.st > .tag { grid-column: 3; grid-row: 1; }
.run { color: var(--accent); }
.ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.ic--todo { border: 1.5px solid var(--line); }
.ic--spin::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.ic--done { background: var(--ok); }
.ic--done::after { content: ""; width: 8px; height: 4px; border: solid var(--paper); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.sub { grid-column: 2 / -1; list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 2px; font-size: 12px; }
.sub li { display: flex; align-items: baseline; gap: 8px; padding: 3px 10px; border-left: 1px solid var(--line); color: var(--ink-2); min-width: 0; }
.sub b { font-size: 12px; color: var(--accent); }
.sub em { margin-left: auto; font-style: normal; }
.plus { color: var(--ok); }
.minus { color: var(--ko); }
.appr { background: var(--accent); color: var(--paper); border-radius: 999px; padding: 2px 10px; font-size: 11px; }
.site { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0; }
.site__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.site .lights i { background: var(--line); }
.site__body { padding: 20px 22px 84px; }
.site__nav { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 22px; }
.site__nav b { color: var(--ink); font-size: 15px; }
.site__h { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.slot { display: grid; margin-bottom: 6px; }
.post { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
.post b { font-size: 15px; font-weight: 600; }
.post small { font-size: 12px; color: var(--ink-2); }
.slot .post { border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; }
.post--draft b { font-size: 13px; font-weight: 400; color: var(--ink-2); }
.post--skel { align-content: center; gap: 8px; }
.post--skel i { display: block; height: 10px; width: 70%; border-radius: 4px; background: var(--line); }
.post--skel i + i { width: 40%; }
.slot .post--new { border: 1px solid var(--accent); background: var(--accent-soft); }
.post--new .tag { justify-self: start; margin-bottom: 4px; }
.toast { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 12px; }
.toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
/* Survol : on fige. Moins de mouvement : on montre l'état final. */
.demo:hover [class*="w-"], .demo:hover .ic--spin::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .demo [class*="w-"] { animation-delay: calc(var(--cycle) * -0.9); animation-play-state: paused; }
}
/* demo:begin (tools/demo.py) */
@keyframes w-0-2 { 0%, 1.4% { opacity: 1; } 2%, 97% { opacity: 0; } 97.6%, 100% { opacity: 1; } }
.w-0-2 { animation: w-0-2 var(--cycle) linear infinite; }
@keyframes w-0-8 { 0%, 7.4% { opacity: 1; } 8%, 97% { opacity: 0; } 97.6%, 100% { opacity: 1; } }
.w-0-8 { animation: w-0-8 var(--cycle) linear infinite; }
@keyframes w-0-16 { 0%, 15.4% { opacity: 1; } 16%, 97% { opacity: 0; } 97.6%, 100% { opacity: 1; } }
.w-0-16 { animation: w-0-16 var(--cycle) linear infinite; }
@keyframes w-0-36 { 0%, 35.4% { opacity: 1; } 36%, 97% { opacity: 0; } 97.6%, 100% { opacity: 1; } }
.w-0-36 { animation: w-0-36 var(--cycle) linear infinite; }
@keyframes w-0-46 { 0%, 45.4% { opacity: 1; } 46%, 97% { opacity: 0; } 97.6%, 100% { opacity: 1; } }
.w-0-46 { animation: w-0-46 var(--cycle) linear infinite; }
@keyframes w-0-58 { 0%, 57.4% { opacity: 1; } 58%, 97% { opacity: 0; } 97.6%, 100% { opacity: 1; } }
.w-0-58 { animation: w-0-58 var(--cycle) linear infinite; }
@keyframes w-0-70 { 0%, 69.4% { opacity: 1; } 70%, 97% { opacity: 0; } 97.6%, 100% { opacity: 1; } }
.w-0-70 { animation: w-0-70 var(--cycle) linear infinite; }
@keyframes w-2-8 { 0%, 2% { opacity: 0; } 2.6%, 7.4% { opacity: 1; } 8%, 100% { opacity: 0; } }
.w-2-8 { animation: w-2-8 var(--cycle) linear infinite; }
@keyframes w-8-16 { 0%, 8% { opacity: 0; } 8.6%, 15.4% { opacity: 1; } 16%, 100% { opacity: 0; } }
.w-8-16 { animation: w-8-16 var(--cycle) linear infinite; }
@keyframes w-8-97 { 0%, 8% { opacity: 0; } 8.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-8-97 { animation: w-8-97 var(--cycle) linear infinite; }
@keyframes w-16-46 { 0%, 16% { opacity: 0; } 16.6%, 45.4% { opacity: 1; } 46%, 100% { opacity: 0; } }
.w-16-46 { animation: w-16-46 var(--cycle) linear infinite; }
@keyframes w-16-97 { 0%, 16% { opacity: 0; } 16.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-16-97 { animation: w-16-97 var(--cycle) linear infinite; }
@keyframes w-20-97 { 0%, 20% { opacity: 0; } 20.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-20-97 { animation: w-20-97 var(--cycle) linear infinite; }
@keyframes w-28-97 { 0%, 28% { opacity: 0; } 28.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-28-97 { animation: w-28-97 var(--cycle) linear infinite; }
@keyframes w-36-52 { 0%, 36% { opacity: 0; } 36.6%, 51.4% { opacity: 1; } 52%, 100% { opacity: 0; } }
.w-36-52 { animation: w-36-52 var(--cycle) linear infinite; }
@keyframes w-36-97 { 0%, 36% { opacity: 0; } 36.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-36-97 { animation: w-36-97 var(--cycle) linear infinite; }
@keyframes w-46-58 { 0%, 46% { opacity: 0; } 46.6%, 57.4% { opacity: 1; } 58%, 100% { opacity: 0; } }
.w-46-58 { animation: w-46-58 var(--cycle) linear infinite; }
@keyframes w-46-97 { 0%, 46% { opacity: 0; } 46.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-46-97 { animation: w-46-97 var(--cycle) linear infinite; }
@keyframes w-52-97 { 0%, 52% { opacity: 0; } 52.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-52-97 { animation: w-52-97 var(--cycle) linear infinite; }
@keyframes w-58-70 { 0%, 58% { opacity: 0; } 58.6%, 69.4% { opacity: 1; } 70%, 100% { opacity: 0; } }
.w-58-70 { animation: w-58-70 var(--cycle) linear infinite; }
@keyframes w-58-97 { 0%, 58% { opacity: 0; } 58.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-58-97 { animation: w-58-97 var(--cycle) linear infinite; }
@keyframes w-70-76 { 0%, 70% { opacity: 0; } 70.6%, 75.4% { opacity: 1; } 76%, 100% { opacity: 0; } }
.w-70-76 { animation: w-70-76 var(--cycle) linear infinite; }
@keyframes w-70-97 { 0%, 70% { opacity: 0; } 70.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-70-97 { animation: w-70-97 var(--cycle) linear infinite; }
@keyframes w-76-97 { 0%, 76% { opacity: 0; } 76.6%, 96.4% { opacity: 1; } 97%, 100% { opacity: 0; } }
.w-76-97 { animation: w-76-97 var(--cycle) linear infinite; }
/* demo:end */

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .rail { grid-template-columns: repeat(3, 1fr); }
  .rail::before, .rail::after { display: none; }
  .cards, .cards--4, .kw { grid-template-columns: repeat(2, 1fr); }
  .split, .why, .team, .demo { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .page { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .mnav { display: block; }
  .platforms { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 56px 0 40px; }
  .hero h1 { margin: 22px 0 18px; }
  .hero__sub { font-size: 17px; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .rail { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .pixels { height: 100px; }
  .cards, .cards--4, .kw, .kw--2, .stats, .limits { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .head { margin-bottom: 36px; }
  .head p:last-child { font-size: 16px; }
  .team { margin-top: 56px; }
  .owner { flex-direction: column; }
  .steps li { grid-template-columns: 1fr; gap: 6px; }
  .trail { padding: 14px 12px 8px; }
  .trail__head { flex-direction: column; }
  .st .tag { display: none; }
  .foot__inner { flex-direction: column; align-items: flex-start; }
  .code pre, .code--light { font-size: 12px; }
  .btn--sm { padding: 7px 11px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret, .node, .rail::after { animation: none; }
  .rail::after { display: none; }
  .term .ln { animation: none !important; }
  .btn, .platforms li { transition: none; }
}
