:root {
  --bg: #f5f1e8;
  --bg-soft: #ede8db;
  --bg-block: #e8e2d2;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #8a8578;
  --rule: #c9c2af;
  --rule-soft: #ddd6c2;
  --accent: #2d5d3a;
  --accent-soft: #3d7a4d;
  --accent-bg: #d8e4dc;
  --warn: #8b5a1a;
  --warn-bg: #f0e4cd;
  --link: #1a4d6b;
  --texture-1: rgba(180,160,110,0.04);
  --texture-2: rgba(140,120,80,0.03);
  --topbar-bg: rgba(245, 241, 232, 0.92);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg-soft: #161616;
  --bg-block: #1c1c1c;
  --ink: #e8e6df;
  --ink-soft: #b8b5ac;
  --ink-muted: #7a766b;
  --rule: #2a2a2a;
  --rule-soft: #1f1f1f;
  --accent: #5dd47a;
  --accent-soft: #4ab362;
  --accent-bg: #1a2e1f;
  --warn: #d4a05a;
  --warn-bg: #2e2415;
  --link: #6db3d4;
  --texture-1: transparent;
  --texture-2: transparent;
  --topbar-bg: rgba(13, 13, 13, 0.92);
}

html { transition: background-color 0.2s ease; }
body, .topbar, .terminal, .step, .chantier, .tool, .member,
.outil, .projet, .lesson, .horizon, .phase, .metric, .diff-col,
.qa, footer, .toggle-btn, .nav-link, .stack-row, .problem-card {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 30%, var(--texture-1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--texture-2) 0%, transparent 50%);
}

body.loading main,
body.loading footer { opacity: 0; }
body.loading main { transition: opacity 0.15s ease; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.topbar-left { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.topbar-right { display: flex; gap: 14px; align-items: center; }
.brand-mark { color: var(--accent); font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.brand-mark::before { content: "▚ "; }
a.brand-mark:hover { color: var(--accent-soft); }
.nav-link {
  color: var(--ink-soft); text-decoration: none;
  padding: 4px 8px; border-radius: 2px;
  transition: background 0.15s;
}
.nav-link:hover { background: var(--bg-block); color: var(--ink); }
.nav-link.active { background: var(--bg-block); color: var(--ink); }

/* Dropdown dans la topbar (<details> custom) */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; user-select: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-link-toggle::after {
  content: " ▾"; font-size: 9px; color: var(--ink-muted);
  margin-left: 2px;
}
.nav-dropdown[open] .nav-link-toggle::after { content: " ▴"; color: var(--ink); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .dropdown-menu { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.dropdown-link {
  display: block;
  padding: 6px 12px;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 2px;
  font-size: 13px;
}
.dropdown-link:hover { background: var(--bg-soft); color: var(--ink); }
.dropdown-link.active { background: var(--accent-bg); color: var(--ink); }
.toggle-btn {
  background: transparent; border: 1px solid var(--rule);
  color: var(--ink-soft); font-family: var(--font-mono);
  font-size: 12px; padding: 4px 10px; cursor: pointer; border-radius: 2px;
  text-decoration: none; display: inline-block;
}
.toggle-btn:hover { border-color: var(--ink); color: var(--ink); }

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px 8vw 80px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.hero-prefix {
  font-size: 13px; color: var(--ink-muted);
  margin-bottom: 24px; letter-spacing: 0.02em;
}
.hero-prefix .accent { color: var(--accent); }
.hero h1 {
  font-size: clamp(1.8rem, 3.8vw, 3.4rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 32px; max-width: 32ch;
}
[lang="en"] .hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 18ch;
}
.hero h1 .highlight {
  background: linear-gradient(transparent 60%, var(--accent-bg) 60%);
  padding: 0 4px;
}
.cursor {
  display: inline-block;
  width: 0.55em; height: 0.9em;
  background: var(--accent);
  margin-left: 6px; vertical-align: -0.05em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-tagline {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: -8px;
  margin-bottom: 32px;
  max-width: 60ch;
}
.hero-tagline::before { content: "// "; }

.hero-lede {
  font-size: 1.15rem; max-width: 60ch;
  color: var(--ink-soft); line-height: 1.65;
  margin-bottom: 32px;
}
.hero-lede strong { color: var(--ink); font-weight: 600; }
.hero-disclaimer {
  display: inline-block;
  padding: 10px 16px;
  background: var(--warn-bg);
  border-left: 3px solid var(--warn);
  font-size: 13px; color: var(--ink-soft);
  margin-bottom: 48px; max-width: 60ch; line-height: 1.5;
}
.hero-disclaimer strong { color: var(--warn); font-weight: 600; }
.hero-meta {
  display: flex; flex-wrap: wrap;
  gap: 32px 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}
.meta-block .label {
  color: var(--ink-muted);
  text-transform: lowercase;
  margin-bottom: 4px;
  font-size: 11px; letter-spacing: 0.06em;
}
.meta-block .value { color: var(--ink); font-weight: 500; }
.meta-block a { color: var(--link); text-decoration: none; border-bottom: 1px dotted var(--link); }
.meta-block a:hover { color: var(--ink); }
.hero-scroll {
  position: absolute; bottom: 32px; left: 8vw;
  font-size: 12px; color: var(--ink-muted); letter-spacing: 0.05em;
}
/* Quand un footer slim fixé occupe les 36px du bas du viewport,
   on remonte la cue de scroll pour qu'elle ne soit pas masquée. */
body:has(footer.footer-slim) .hero-scroll { bottom: 72px; }
.hero-scroll::before {
  content: "↓ "; display: inline-block;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.section {
  padding: 120px 8vw; max-width: 1400px; margin: 0 auto;
}
.section + .section { border-top: 1px solid var(--rule); }
.section-cmd {
  font-size: 13px; color: var(--ink-muted);
  margin-bottom: 8px; letter-spacing: 0.02em;
}
.section-cmd::before { content: "$ "; color: var(--accent); }
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.15; margin-bottom: 16px; max-width: 22ch;
}
.section-kicker {
  font-size: 1.05rem; color: var(--ink-soft);
  max-width: 65ch; margin-bottom: 64px; line-height: 1.65;
}
.section-kicker strong { color: var(--ink); }

.subsection-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 64px 0 8px;
  font-weight: 600;
}
.subsection-label::before { content: "// "; }
.subsection-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.subsection-kicker {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 65ch;
  margin-bottom: 32px;
  line-height: 1.6;
}
.subsection-kicker strong { color: var(--ink); }
.minor-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-muted); margin: 32px 0 8px; font-weight: 600;
}

/* ============ LIEN PARAGRAPHE SUIVANT (intra-chapitre) ============ */
.section-next {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  text-align: right;
}
.section-next-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.section-next-label::before { content: "// "; color: var(--accent); }
.section-next-link {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.section-next-link:hover { color: var(--accent); }
.section-next-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.15s;
  display: inline-block;
}
.section-next-link:hover .section-next-arrow { transform: translateX(6px); }

.section-prose {
  font-size: 14.5px; color: var(--ink-soft);
  max-width: 65ch; line-height: 1.7;
  margin-top: 24px;
}
.section-prose p + p { margin-top: 16px; }
.section-prose strong { color: var(--ink); font-weight: 600; }
.section-prose em { font-style: italic; }
.section-prose a {
  color: var(--link); text-decoration: none;
  border-bottom: 1px dotted var(--link);
}
.section-prose a:hover { color: var(--ink); }

.terminal {
  background: var(--bg-block);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 20px 24px;
  font-size: 13.5px; line-height: 1.75;
  margin: 24px 0; position: relative; overflow-x: auto;
}
.terminal::before {
  content: "● ● ●";
  position: absolute; top: 8px; left: 12px;
  font-size: 8px; color: var(--ink-muted); letter-spacing: 4px;
}
.terminal-body { padding-top: 16px; }
.terminal .prompt { color: var(--accent); }
.terminal .cmd { color: var(--ink); }
.terminal .out { color: var(--ink-soft); }
.terminal .out::before { content: "● "; color: var(--accent-soft); }
.terminal .ok { color: var(--accent); }
.terminal .warn { color: var(--warn); }
.terminal .comment { color: var(--ink-muted); font-style: italic; }

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden;
  margin-top: 24px;
}
.member { background: var(--bg); padding: 32px 28px; transition: background 0.2s; }
.member:hover { background: var(--bg-soft); }
.member-role {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent);
  margin-bottom: 12px; font-weight: 600;
}
.member-name {
  font-size: 1.4rem; font-weight: 600;
  margin-bottom: 8px; letter-spacing: -0.01em;
}
.member-handle { font-size: 12px; color: var(--ink-muted); margin-bottom: 16px; }
.member-handle::before { content: "// "; }
.member-handle a { color: var(--link); text-decoration: none; border-bottom: 1px dotted var(--link); }
.member-handle a:hover { color: var(--ink); }
.member p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.member p strong { color: var(--ink); }

/* ─── Entities viz : 2 lignes de nœuds + liens parent→enfant ─── */
.entities-viz-wrap {
  margin-top: 24px;
  padding: 32px 16px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.entities-viz {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  font-family: var(--font-mono);
}
.entities-viz .entities-link {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.5;
  transition: stroke 0.15s;
}
.entities-viz .entities-node rect {
  fill: var(--bg);
  stroke: var(--rule);
  stroke-width: 1;
  transition: stroke 0.15s, fill 0.15s;
}
.entities-viz .entities-node.parent rect {
  fill: var(--accent-bg);
  stroke: var(--accent);
}
.entities-viz .entities-node text {
  fill: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
}
.entities-viz .entities-node.parent text {
  font-weight: 600;
}
/* Placeholder ("…", "Autres", etc.) : bordure pointillée + nœud allégé
   pour signaler "et d'autres entités non listées". */
.entities-viz .entities-node.placeholder rect {
  fill: transparent;
  stroke: var(--ink-muted);
  stroke-width: 1.5;
  stroke-dasharray: 7 4;
}
.entities-viz .entities-node.placeholder text {
  fill: var(--ink-muted);
  font-style: italic;
  font-weight: 400;
}
.entities-viz .entities-node.placeholder { opacity: 0.7; }
.entities-viz .entities-node:hover rect {
  stroke: var(--accent);
  fill: var(--bg-block);
}
.entities-viz .entities-node:hover ~ .entities-link,
.entities-viz .entities-node:hover .entities-link { stroke: var(--accent); }
.entities-viz-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
}
.entities-viz-note code {
  font-family: var(--font-mono);
  background: var(--bg-block);
  padding: 1px 5px;
  border-radius: 2px;
  font-style: normal;
  font-size: 11.5px;
}

.problem-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 56px 48px;
  margin-top: 24px;
  text-align: center;
}
.problem-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 48px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px dashed var(--rule);
}
/* Pas de question → le séparateur sous les stats n'a plus de raison
   d'être : on enlève trait, marge et padding pour ne pas laisser un
   bas de carte vide. */
.problem-card:not(:has(.problem-question)) .problem-stats {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.problem-stat { text-align: center; }
.problem-stat-value {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 200;
  color: var(--accent);
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 6px;
}
.problem-stat-label {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.problem-question {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 28ch;
  margin: 0 auto;
  line-height: 1.35;
}
.problem-question .highlight {
  background: linear-gradient(transparent 60%, var(--accent-bg) 60%);
  padding: 0 4px;
}

.stack-flow {
  margin-top: 24px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
}
.stack-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 80px minmax(220px, 1fr);
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
}
.stack-row:last-child { border-bottom: 0; }
.stack-row:hover .stack-arrow { color: var(--accent); }
.stack-row:hover { background: var(--bg-soft); }
.stack-tool {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--rule);
}
.stack-tool-name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.stack-tool-desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.stack-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ink-muted);
  border-right: 1px solid var(--rule);
  transition: color 0.2s;
}
.stack-uses {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}
.stack-use {
  font-size: 13.5px;
  color: var(--ink-soft);
  padding-left: 14px;
  position: relative;
  line-height: 1.55;
}
.stack-use::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 10px;
  top: 5px;
}
.stack-use strong { color: var(--ink); font-weight: 600; }

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 32px;
}
.tool {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 4px; padding: 24px;
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}
.tool:hover { transform: translateY(-2px); border-color: var(--accent); }
.tool-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px dashed var(--rule);
}
.tool-name { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.tool-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-muted); background: var(--bg-block);
  padding: 2px 8px; border-radius: 2px;
}
.tool-role { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.tool-role strong { color: var(--ink); }
.tool-example {
  font-size: 12.5px; color: var(--ink-muted);
  background: var(--bg);
  border-left: 2px solid var(--accent);
  padding: 8px 12px; border-radius: 0 2px 2px 0;
  font-style: italic;
}
.tool-example::before { content: "ex. "; font-style: normal; color: var(--accent); font-weight: 600; }

.chantiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden;
  margin-top: 16px;
}
.chantier { background: var(--bg); padding: 32px 28px; }
.chantier:hover { background: var(--bg-soft); }
.chantier-num {
  font-size: 4rem; font-weight: 200;
  color: var(--accent); line-height: 1;
  margin-bottom: 12px; letter-spacing: -0.04em;
}
.chantier-tag {
  display: inline-block; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-muted); margin-bottom: 8px;
}
.chantier h3 {
  font-size: 1.2rem; font-weight: 600;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.chantier .pain { color: var(--warn); font-size: 13px; margin-bottom: 8px; }
.chantier .pain::before { content: "− avant : "; color: var(--warn); font-weight: 600; }
[lang="en"] .chantier .pain::before { content: "− before: "; }
.chantier .gain { color: var(--accent); font-size: 13px; margin-bottom: 16px; }
.chantier .gain::before { content: "+ après : "; color: var(--accent); font-weight: 600; }
[lang="en"] .chantier .gain::before { content: "+ after: "; }
.chantier-snippet {
  background: var(--bg-block);
  border-left: 2px solid var(--accent);
  padding: 10px 14px;
  font-size: 12px; color: var(--ink-soft);
  white-space: pre-wrap;
  border-radius: 0 2px 2px 0;
}

.diff {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden;
}
.diff-col { padding: 32px 28px; background: var(--bg); }
.diff-col + .diff-col { border-left: 1px solid var(--rule); }
.diff-col.before { background: var(--warn-bg); }
.diff-col.after { background: var(--accent-bg); }
.diff-label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 12px; font-weight: 600;
}
.diff-col.before .diff-label { color: var(--warn); }
.diff-col.before .diff-label::before { content: "− "; }
.diff-col.after .diff-label { color: var(--accent); }
.diff-col.after .diff-label::before { content: "+ "; }
.diff-col h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 16px; letter-spacing: -0.01em; }
.diff-col ul { list-style: none; }
.diff-col li {
  padding: 6px 0; font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--rule-soft);
}
.diff-col li:last-child { border-bottom: 0; }
.diff-col li::before { display: inline-block; width: 16px; }
.diff-col.before li::before { content: "× "; color: var(--warn); }
.diff-col.after li::before { content: "✓ "; color: var(--accent); }

.roadmap {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 32px;
}
.horizon {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px; padding: 28px 24px;
}
.horizon-when {
  display: inline-block; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--bg); background: var(--accent);
  padding: 4px 10px; border-radius: 2px;
  margin-bottom: 16px; font-weight: 600;
}
.horizon h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 16px; letter-spacing: -0.01em; }
.horizon ul { list-style: none; padding-left: 0; }
.horizon li {
  font-size: 13.5px; color: var(--ink-soft);
  padding: 6px 0 6px 22px;
  position: relative; line-height: 1.55;
}
.horizon li::before {
  content: "→"; position: absolute; left: 0;
  color: var(--accent); font-weight: 600;
}

.lessons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 32px;
}
.lesson {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px; padding: 24px;
}
.lesson-num {
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 8px; font-weight: 600;
}
.lesson h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.lesson p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }
.lesson p strong { color: var(--ink); }

.qa-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.qa {
  display: grid; grid-template-columns: 60px 1fr;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.qa-mark { font-size: 1.8rem; color: var(--accent); font-weight: 300; line-height: 1; }
.qa h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.qa p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; max-width: 70ch; }
.qa p strong { color: var(--ink); }
.qa em { font-style: italic; }

footer { padding: 80px 8vw 60px; border-top: 1px solid var(--rule); background: var(--bg-soft); }
.footer-inner { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.footer-call {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600; max-width: 32ch;
  letter-spacing: -0.02em; line-height: 1.2;
}
.footer-call em { color: var(--accent); font-style: normal; }
.footer-prose {
  max-width: 60ch; color: var(--ink-soft);
  font-size: 14.5px; line-height: 1.65;
}
.footer-prose strong { color: var(--ink); }
.footer-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 24px; padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-size: 12px; color: var(--ink-muted);
}
.footer-meta a { color: var(--link); text-decoration: none; }

/* ============ FOOTER SLIM (sticky status bar) ============ */
footer.footer-slim {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  padding: 0;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule);
}
footer.footer-slim .footer-inner {
  display: block;
  padding: 8px 28px;
  gap: 0;
}
footer.footer-slim .footer-meta {
  display: flex; justify-content: center;
  padding: 0; border: 0;
  font-size: 12px;
  color: var(--ink-muted);
}
footer.footer-slim .footer-meta a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
  transition: color 0.15s, border-color 0.15s;
}
footer.footer-slim .footer-meta a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
body:has(footer.footer-slim) { padding-bottom: 40px; }

@media (max-width: 768px) {
  footer.footer-slim .footer-inner { padding: 8px 16px; }
  footer.footer-slim .footer-meta { font-size: 11px; }
}

@media (max-width: 768px) {
  .topbar { padding: 12px 16px; }
  .nav-link { font-size: 12px; padding: 4px 6px; }
  .hero { padding: 100px 6vw 60px; }
  .section { padding: 80px 6vw; }
  .diff { grid-template-columns: 1fr; }
  .diff-col + .diff-col { border-left: 0; border-top: 1px solid var(--rule); }
  .roadmap { grid-template-columns: 1fr; }
  footer { padding: 60px 6vw 40px; }
  .qa { grid-template-columns: 40px 1fr; }
  .stack-row { grid-template-columns: 1fr; }
  .stack-tool, .stack-arrow { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stack-arrow { padding: 8px 0; transform: rotate(90deg); }
  .problem-card { padding: 32px 24px; }
}

.atelier {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.outil {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, border-color 0.15s;
}
.outil:hover { transform: translateY(-2px); border-color: var(--accent); }
.outil-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 12px;
}
.outil-name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.outil-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.outil-status.live { color: var(--accent); }
.outil-status.live::before { content: "● "; }
.outil-status.wip { color: var(--warn); }
.outil-status.wip::before { content: "◐ "; }
.outil-status.archive { color: var(--ink-muted); }
.outil-status.archive::before { content: "◌ "; }

.outil-pitch {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.outil-pitch strong { color: var(--ink); }

.outil-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tech {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--bg-block);
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid var(--rule-soft);
}

.outil-learn {
  font-size: 12.5px;
  color: var(--ink-muted);
  background: var(--bg-soft);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 2px 2px 0;
  font-style: italic;
  margin-top: auto;
}
.outil-learn::before {
  content: "ce qu'on en a tiré : ";
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
}
[lang="en"] .outil-learn::before { content: "what we got out of it: "; }

.outil-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
  align-self: flex-start;
}
.outil-link:hover { color: var(--ink); }
.outil-link::after { content: " ↗"; }

.projets {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 16px;
}
.projet {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  transition: border-color 0.2s;
}
.projet:hover { border-color: var(--accent); }
.projet.reverse { grid-template-areas: "media content"; }
.projet.reverse .projet-content { grid-area: content; }
.projet.reverse .projet-media { grid-area: media; }

.projet-content {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
}
.projet-num {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.projet-num::before { content: "// "; }
.projet h3 {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.projet-pitch {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.projet-pitch strong { font-weight: 600; }
.projet-block {
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
}
.projet-block-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.projet-block p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}
.projet-block p strong { color: var(--ink); }

.projet-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.projet-status-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px dashed var(--rule);
  font-size: 12px;
}
.projet-status {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 11px;
}
.projet-status.live { color: var(--accent); }
.projet-status.live::before { content: "● "; }
.projet-status.beta { color: var(--warn); }
.projet-status.beta::before { content: "◐ "; }
.projet-status.private { color: var(--ink-muted); }
.projet-status.private::before { content: "◌ "; }
.projet-status-note { color: var(--ink-muted); font-size: 12px; }

.projet-media {
  background: var(--bg-block);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.projet-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.projet-media.multi {
  flex-direction: column;
  align-self: center;         /* cadre vertical-centré dans la colonne, pas collé en haut */
  align-items: stretch;
  min-height: 0;
  width: 100%;
  gap: 8px;
  padding: 12px;
  background: var(--bg-block);
}
.projet-media.multi img {
  flex: 0 1 auto;
  width: 100%;
  height: auto;
  display: block;
}
.projet-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  text-align: center;
  padding: 40px;
  font-style: italic;
}
.projet-media-placeholder::before {
  content: "[ screenshot ]";
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  padding: 8px 16px;
  border: 1px dashed var(--accent);
  border-radius: 2px;
}

@media (max-width: 900px) {
  .projet,
  .projet.reverse { grid-template-columns: 1fr; grid-template-areas: none; }
  .projet.reverse .projet-content,
  .projet.reverse .projet-media { grid-area: auto; }
  .projet-content { padding: 32px 28px; }
  .projet-media { min-height: 240px; order: -1; }
  .projet.reverse .projet-media { order: -1; }
}

.alternatives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.alt-card {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 18px;
}
.alt-name { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.01em; }
.alt-status {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
  font-weight: 600; margin-bottom: 8px;
}
.alt-status.kept { color: var(--accent); }
.alt-status.kept::before { content: "● retenu · "; }
[lang="en"] .alt-status.kept::before { content: "● kept · "; }
.alt-status.evaluated::before { content: "◌ évalué · "; color: var(--ink-muted); }
[lang="en"] .alt-status.evaluated::before { content: "◌ evaluated · "; color: var(--ink-muted); }
.alt-status.evaluated { color: var(--ink-muted); }
.alt-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

.center-callout {
  font-size: 1.1rem; color: var(--ink); max-width: 60ch;
  margin: 64px auto 0; text-align: center;
  line-height: 1.5; font-weight: 500;
}
.center-callout .highlight {
  background: var(--accent-bg); padding: 0 6px;
}

.viz {
  margin-top: 24px;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  padding: 16px;
  background: var(--bg-soft);
  min-height: 240px;
}

figure.fig {
  margin-top: 24px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
}
figure.fig img { width: 100%; display: block; }
figure.fig figcaption {
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-style: italic;
  border-top: 1px solid var(--rule-soft);
}

/* ============ CONTACT PAGE ============ */
.contact-page {
  min-height: calc(100vh - 200px);
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 8vw 80px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.contact-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 22ch;
}
.contact-hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.contact-hero p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 60ch;
}
.contact-hero p strong { color: var(--ink); }

.contact-block {
  border-top: 1px solid var(--rule);
  padding-top: 40px;
}
.contact-block-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.contact-block-label::before { content: "// "; }
.contact-block h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.contact-block p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 60ch;
  margin-bottom: 12px;
}
.contact-block p:last-child { margin-bottom: 0; }
.contact-block p strong { color: var(--ink); }
.contact-block a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
}
.contact-block a:hover { color: var(--ink); }

/* ─── Context-sheet : encart collapsible qui montre un .md externe ─── */
.context-sheet {
  margin-top: 24px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-soft);
  overflow: hidden;
}
.context-sheet-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  user-select: none;
  transition: background 0.15s;
}
.context-sheet-summary::-webkit-details-marker { display: none; }
.context-sheet-summary:hover { background: var(--bg-block); }
.context-sheet-cta {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
}
.context-sheet-cta::before { content: "▸ "; color: var(--accent); }
.context-sheet[open] .context-sheet-cta::before { content: "▾ "; color: var(--ink); }
.context-sheet-subtitle {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-style: italic;
}
.context-sheet-content {
  margin: 0;
  padding: 16px 20px;
  background: var(--bg-block);
  border-top: 1px solid var(--rule);
  overflow-x: auto;
  overflow-y: auto;
  max-height: 520px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
  white-space: pre;
  tab-size: 2;
}
.context-sheet-content code {
  font-family: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
}

/* ─── Compare-grid (tests comparatifs N providers × M questions) ─── */
.compare-grid {
  margin-top: 24px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: var(--compare-cols, 1fr 1fr 1fr);
  gap: 0;
}
.compare-row + .compare-row { border-top: 1px solid var(--rule); }
.compare-row > * { padding: 16px 20px; }
.compare-row > * + * { border-left: 1px solid var(--rule); }
.compare-header { background: var(--bg-soft); }
.compare-h {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.compare-h-note {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  font-weight: 400;
  font-style: italic;
}
.compare-q {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}
.compare-q::before { content: "? "; color: var(--accent); font-weight: 700; }
.compare-cell {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.compare-cell strong { color: var(--ink); font-weight: 600; }
.compare-cell code {
  font-family: var(--font-mono);
  background: var(--bg-block);
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 12px;
  color: var(--ink);
}
.compare-cell::before {
  display: inline-block;
  width: 16px;
  margin-right: 2px;
  font-weight: 700;
}
.compare-cell.ok::before      { content: "✓"; color: var(--accent); }
.compare-cell.fail::before    { content: "✗"; color: var(--warn); }
.compare-cell.partial::before { content: "~"; color: var(--warn); }
.compare-cell.wrong::before   { content: "≠"; color: var(--warn); }
.compare-verdict {
  margin: 0;
  padding: 20px 24px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  background: var(--bg-soft);
  border-top: 1px solid var(--rule);
}
.compare-verdict strong { color: var(--ink); font-weight: 600; }
@media (max-width: 768px) {
  .compare-row { grid-template-columns: 1fr; }
  .compare-row > * + * { border-left: 0; border-top: 1px solid var(--rule-soft); }
}
