:root {
  --background: #070b14;
  --surface: #0f1524;
  --surface-border: #1e2740;
  --foreground: #e7ecf5;
  --muted: #7c8aa8;
  --accent: #2dd4bf;
  --accent-dim: #17493f;
  --danger: #f87171;
  --accent-ink: #04211c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

body.lightbox-locked { overflow: hidden; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header ---------- */

header.site {
  padding: 24px 0;
  border-bottom: 1px solid transparent;
}
header.site .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wordmark .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  flex: none;
}
.wordmark span {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
nav.site-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}
nav.site-links a { transition: color .15s ease; }
nav.site-links a:hover { color: var(--foreground); }

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 88px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 28px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--surface-border);
  background: rgba(15, 21, 36, .6);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.status-pill .ping {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  flex: none;
}
.status-pill .ping::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: var(--accent);
  opacity: .35;
  animation: ping 2.4s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: .35; }
  75%, 100% { transform: scale(2.4); opacity: 0; }
}
.status-pill strong { color: var(--foreground); font-weight: 500; }

/* ---------- Hero screenshot (perspective) ---------- */

.hero-shot-wrap {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  perspective: 1600px;
}
.hero-shot-glow {
  position: absolute;
  inset: -14% -6% -14% 8%;
  background: radial-gradient(circle at 62% 40%, rgba(45,212,191,.28), transparent 65%);
  filter: blur(34px);
  z-index: 0;
}
.hero-shot {
  position: relative;
  z-index: 1;
  transform: rotateY(-16deg) rotateX(6deg) rotateZ(1deg);
  transform-style: preserve-3d;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: 0 40px 90px -24px rgba(0,0,0,.65), 0 0 0 1px rgba(45,212,191,.04);
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.hero-shot-wrap:hover .hero-shot {
  transform: rotateY(-8deg) rotateX(3deg) rotateZ(.4deg);
}
.hero-shot .frame-chrome,
.hero-shot .frame-shot {
  border: none;
  border-radius: 0;
}
.hero-shot .frame-shot img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  .hero-shot { transition: none; }
}

/* ---------- Section shell ---------- */

section { padding: 64px 0; border-top: 1px solid var(--surface-border); }
section .kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
section h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  max-width: 32ch;
}
section p.section-lead {
  color: var(--muted);
  max-width: 60ch;
  font-size: 15px;
  margin: 0 0 40px;
}

/* ---------- Constat (+ radar) ---------- */

.constat-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.constat-box {
  border: 1px solid var(--surface-border);
  background: rgba(15, 21, 36, .6);
  border-radius: 16px;
  padding: 28px 32px;
  font-size: 16px;
  color: var(--foreground);
  max-width: 68ch;
}
.constat-box .muted-line { color: var(--muted); margin-top: 10px; }

/* ---------- Radar visual ---------- */

.radar-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  min-height: 220px;
  margin: 0 auto;
}
.radar-face {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: radial-gradient(circle at center, rgba(45,212,191,.05), transparent 70%);
}
.radar-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
}
.radar-ring.r1 { inset: 15%; }
.radar-ring.r2 { inset: 32%; }
.radar-ring.r3 { inset: 47%; border-style: dashed; }

.radar-cross { position: absolute; inset: 0; }
.radar-cross::before, .radar-cross::after {
  content: "";
  position: absolute;
  background: var(--surface-border);
}
.radar-cross::before { left: 0; right: 0; top: 50%; height: 1px; }
.radar-cross::after { top: 0; bottom: 0; left: 50%; width: 1px; }

.radar-sweep-el {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: conic-gradient(from 0deg, rgba(45,212,191,.55), transparent 26%, transparent 100%);
  animation: radar-sweep 5s linear infinite;
  mix-blend-mode: screen;
}
@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(45,212,191,.5);
}
.blip.dim {
  background: var(--muted);
  box-shadow: none;
  opacity: .7;
  width: 5px; height: 5px;
}

@media (prefers-reduced-motion: reduce) {
  .radar-sweep-el { animation: none; opacity: .3; }
  .status-pill .ping::after { animation: none; }
}

/* ---------- Pipeline steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.step {
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 18px 16px;
  background: rgba(15, 21, 36, .35);
  transition: border-color .15s ease;
}
.step:hover { border-color: var(--accent); }
.step .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 10px;
}
.step h3 { font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.step p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- Showcase filmstrip ---------- */

.showcase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.drag-hint {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.drag-hint svg { flex: none; }

.filmstrip-wrap { position: relative; }

.filmstrip {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 4px 12px;
  margin: 0 -4px;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filmstrip.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.filmstrip::-webkit-scrollbar { display: none; }

.frame {
  flex: 0 0 min(600px, 84vw);
  scroll-snap-align: start;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  margin: 0;
}
.frame.visible { opacity: 1; transform: none; }

.frame-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}
.frame-chrome .tdot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.frame-chrome .tdot.r { background: #f87171; }
.frame-chrome .tdot.y { background: #fbbf24; }
.frame-chrome .tdot.g { background: #34d399; }
.frame-chrome .url { margin-left: 8px; font-size: 11px; color: var(--muted); }

.frame-shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  cursor: zoom-in;
}
.frame-shot-scroll {
  max-height: 600px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-border) transparent;
}
.frame-shot-scroll::-webkit-scrollbar { width: 6px; }
.frame-shot-scroll::-webkit-scrollbar-track { background: transparent; }
.frame-shot-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-border);
  border-radius: 999px;
}
.frame-shot-scroll img { display: block; width: 100%; height: auto; pointer-events: none; }
.frame-shot .scanline {
  position: absolute;
  left: 0; right: 0;
  top: -25%;
  height: 25%;
  background: linear-gradient(180deg, transparent, rgba(45,212,191,.4), transparent);
  opacity: 0;
  pointer-events: none;
}
.frame.visible .frame-shot .scanline { animation: scan-sweep 1.15s ease-out .1s 1; }
@keyframes scan-sweep {
  0% { top: -25%; opacity: 1; }
  85% { opacity: 1; }
  100% { top: 105%; opacity: 0; }
}

.frame-shot .zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(7,11,20,.7);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.frame-shot:hover .zoom-hint,
.frame-shot:focus-visible .zoom-hint { opacity: 1; transform: none; }

figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 46ch; }
figcaption .cap-label {
  display: block;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.filmstrip-dots { display: flex; gap: 6px; margin-top: 8px; }
.filmstrip-dots button {
  width: 20px; height: 3px;
  border-radius: 2px;
  background: var(--surface-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .15s ease;
}
.filmstrip-dots button.active { background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .frame { transition: none; opacity: 1; transform: none; }
  .frame.visible .frame-shot .scanline { animation: none; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(3, 6, 14, .92);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-figure {
  position: relative;
  max-width: min(1100px, 90vw);
  max-height: 86vh;
}
.lightbox-img {
  display: block;
  max-width: min(1100px, 90vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  box-shadow: 0 50px 120px rgba(0,0,0,.65);
}
.lightbox-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.lightbox-caption .mono { color: var(--accent); margin-right: 8px; }

.lightbox-close,
.lightbox-nav {
  position: fixed;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: rgba(15, 21, 36, .85);
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, color .15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { border-color: var(--accent); color: var(--accent); }

.lightbox-close { top: 24px; right: 28px; width: 40px; height: 40px; font-size: 16px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 20px; }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

@media (max-width: 640px) {
  .lightbox { padding: 20px; }
  .lightbox-close { top: 14px; right: 14px; width: 36px; height: 36px; }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}

/* ---------- Sous le capot ---------- */

.capot {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
.capot-copy p { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; max-width: 52ch; }
.capot-copy strong { color: var(--foreground); font-weight: 500; }

.stack-card {
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 24px;
  background: rgba(15, 21, 36, .6);
}
.stack-card .kicker { margin-bottom: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 5px 10px;
  transition: color .15s ease, border-color .15s ease;
}
.badge:hover { color: var(--foreground); border-color: var(--accent); }

/* ---------- Etat actuel ---------- */

.status-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 28px 32px;
  background: rgba(15, 21, 36, .6);
}
.status-box .dotcol { padding-top: 6px; }
.status-box .dotcol .dotring {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.status-box p { margin: 0 0 12px; font-size: 15px; color: var(--foreground); max-width: 62ch; }
.status-box p.muted { color: var(--muted); font-size: 14px; }
.status-box p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
footer a { transition: color .15s ease; }
footer a:hover { color: var(--foreground); }

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .wrap { padding: 0 24px; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0 56px; }
  .hero-shot-wrap { max-width: 340px; }
  .constat-grid { grid-template-columns: 1fr; gap: 32px; }
  .constat-grid .radar-wrap { max-width: 240px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .capot { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .status-box { flex-direction: column; }
  nav.site-links { display: none; }
  .hero-shot { transform: none; }
  .hero-shot-wrap:hover .hero-shot { transform: none; }
  .hero-shot-glow { display: none; }
  .showcase-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}