:root {
  --bg: #faf9f5;
  --surface: #f0eee6;
  --surface-2: #e8e6dc;
  --ink: #141413;
  --muted: #5e5d59;
  --faint: #8a8880;
  --line: #e3e0d4;
  --accent: #d97757;
  --accent-soft: #f5e1d7;
  --ok: #5b8a5f;
  --code-bg: #1f1e1b;
  --code-fg: #ece9df;
  --pad: clamp(20px, 4vw, 48px);
  --nav-h: 72px;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
[data-lucide] { width: 20px; height: 20px; stroke-width: 1.75; flex-shrink: 0; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Navigation + wordmark ---------- */
header {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  transition: background-color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background: rgba(250, 249, 245, .88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700; font-size: 18px; letter-spacing: -.01em; line-height: 1;
  text-transform: uppercase; white-space: nowrap;
  transform-origin: left top; will-change: transform; display: inline-block;
}
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-link { font-size: 14px; color: var(--muted); transition: color .2s ease; }
.nav-link:hover { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 500; line-height: 1; padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); transition: opacity .2s ease;
}
.nav-cta:hover { opacity: .85; }
.nav-cta [data-lucide] { width: 16px; height: 16px; }
.wordmark-spacer { height: calc(var(--nav-h) + 24px); }

/* ---------- Hero ---------- */
.hero { padding: 24px 0 72px; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.8); opacity: 0; } }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; margin-top: 24px; }
.role { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
h1 {
  font-family: "Source Serif 4", Georgia, serif; font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 4.1rem); line-height: 1.08; letter-spacing: -.02em;
}
h1 em { font-style: italic; color: var(--accent); }
.hero-copy p { margin-top: 22px; color: var(--muted); font-size: 1.06rem; max-width: 48ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 500; line-height: 1; padding: 14px 22px; border-radius: 999px;
  transition: transform .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn [data-lucide] { width: 18px; height: 18px; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-line { border: 1px solid var(--ink); }
.btn-line:hover { background: var(--surface); }
.sphere-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 520px; justify-self: end; }
#sphere { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#sphere.dragging { cursor: grabbing; }
.sphere-hint {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  pointer-events: none; white-space: nowrap;
}
.sphere-hint [data-lucide] { width: 14px; height: 14px; }

/* ---------- Bandeau technologies ---------- */
.stack { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; background: var(--bg); }
.stack-label { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.marquee {
  overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: scroll-x 55s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.tech {
  display: inline-flex; align-items: center; gap: 10px; margin-right: 44px;
  color: var(--ink); opacity: .72; white-space: nowrap; font-weight: 500; font-size: 15px;
  transition: opacity .2s ease, color .2s ease;
}
.tech:hover { opacity: 1; color: var(--brand, var(--ink)); }
.tech svg { width: 26px; height: 26px; fill: currentColor; flex-shrink: 0; }
.tech .txt-logo {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 6px; border: 1.5px solid currentColor; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
}

/* ---------- Sections ---------- */
section.block { padding: 96px 0; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
h2 {
  font-family: "Source Serif 4", Georgia, serif; font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.15; letter-spacing: -.015em; max-width: 24ch;
}
.section-lead { color: var(--muted); max-width: 62ch; margin-top: 16px; font-size: 1.04rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 14px; transition: transform .25s ease;
}
.card:hover { transform: translateY(-3px); }
.icon-box {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg); color: var(--accent); flex-shrink: 0;
}
.card h3 { font-size: 1.05rem; font-weight: 600; }
.card p { color: var(--muted); font-size: .95rem; }
.progress { margin-top: 48px; max-width: 560px; }
.progress-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.progress-head strong { color: var(--ink); font-weight: 600; }
.track { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar { height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: inherit; }

/* ---------- Pipeline global ---------- */
.pipeline {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin-top: 48px;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg);
}
.pipe-step {
  position: relative; padding: 24px 20px; display: flex; flex-direction: column; gap: 10px;
  border-right: 1px solid var(--line); transition: background-color .2s ease;
}
.pipe-step:last-child { border-right: 0; }
.pipe-step:hover { background: var(--surface); }
.pipe-step .n { font-size: 12px; color: var(--faint); font-weight: 600; }
.pipe-step .icon-box { background: var(--surface); }
.pipe-step:hover .icon-box { background: var(--bg); }
.pipe-step h4 { font-size: .98rem; font-weight: 600; }
.pipe-step p { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.pipe-step .go { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--accent); font-weight: 500; }
.pipe-step .go [data-lucide] { width: 14px; height: 14px; }
.pipe-step:not(:last-child)::after {
  content: ""; position: absolute; right: -7px; top: 44px; width: 12px; height: 12px; z-index: 2;
  background: var(--bg); border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: rotate(45deg);
}

/* ---------- Concepts ---------- */
.concepts-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; margin-top: 56px; align-items: start; }
.concepts-layout > * { min-width: 0; }
.toc { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2px; }
.toc-title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.toc a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; color: var(--muted); transition: background-color .25s ease, color .25s ease;
}
.toc a .num { font-size: 11px; color: var(--faint); width: 18px; }
.toc a:hover { background: var(--surface); color: var(--ink); }
.toc a.active { background: var(--ink); color: var(--bg); }
.toc a.active .num { color: var(--accent); }
.toc-mobile { display: none; gap: 8px; overflow-x: auto; margin-top: 32px; scrollbar-width: none; }
.toc-mobile::-webkit-scrollbar { display: none; }
.toc-mobile a { flex-shrink: 0; font-size: 13px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--bg); transition: background-color .2s ease, color .2s ease; }
.toc-mobile a.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.toc-mobile { position: sticky; top: 72px; z-index: 5; background: var(--bg); padding: 10px 0; }

.concept { padding: 8px 0 72px; }
.concept + .concept { border-top: 1px solid var(--line); padding-top: 64px; }
.concept-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.concept-head .idx { font-size: 13px; font-weight: 600; color: var(--accent); }
.concept-head .tag { font-size: 12px; color: var(--muted); padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.concept h3 {
  font-family: "Source Serif 4", Georgia, serif; font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.15rem); line-height: 1.2; letter-spacing: -.01em;
}
.concept .def { margin-top: 14px; color: var(--muted); font-size: 1.02rem; max-width: 68ch; }
.concept .def strong { color: var(--ink); font-weight: 600; }

.diagram {
  margin-top: 28px; padding: 28px; border-radius: 18px; background: var(--surface);
  position: relative; overflow: hidden;
}
.diagram-cap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); margin-bottom: 18px; font-weight: 500; letter-spacing: .02em; }
.diagram-cap [data-lucide] { width: 14px; height: 14px; }

.node {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; min-width: 0;
}
.node [data-lucide] { width: 18px; height: 18px; color: var(--accent); }
.node small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.node.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.node.dark small { color: #b9b6ab; }
.node.dark [data-lucide] { color: var(--accent); }

/* Connecteur animé */
.flow { position: relative; flex: 1; min-width: 28px; height: 2px; background: var(--surface-2); align-self: center; overflow: hidden; border-radius: 2px; }
.flow::after {
  content: ""; position: absolute; top: -2px; left: -12px; width: 12px; height: 6px; border-radius: 6px;
  background: var(--accent); animation: travel 2.2s linear infinite;
}
.flow.slow::after { animation-duration: 3.4s; }
.flow.fast::after { animation-duration: 1.1s; }
@keyframes travel { to { left: 100%; } }
.vflow { width: 2px; height: 28px; background: var(--surface-2); position: relative; overflow: hidden; margin: 0 auto; }
.vflow::after { content: ""; position: absolute; left: -2px; top: -12px; width: 6px; height: 12px; border-radius: 6px; background: var(--accent); animation: travel-y 1.8s linear infinite; }
@keyframes travel-y { to { top: 100%; } }

/* Sources */
.src-diagram { display: grid; grid-template-columns: 1fr auto 220px; gap: 20px; align-items: center; }
.src-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.src-arrows { display: flex; flex-direction: column; gap: 22px; width: 64px; }
.src-arrows .flow { flex: none; width: 100%; }
.kind { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; margin-top: 4px; }
.k-s { background: #e3ecdf; color: #3f6b43; }
.k-ss { background: #f3e6c9; color: #8a6418; }
.k-u { background: var(--accent-soft); color: #a3502f; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Ingestion */
.lanes { display: flex; flex-direction: column; gap: 14px; }
.lane { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.lane-label { font-size: 13px; font-weight: 600; }
.lane-label small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.lane-row { display: flex; align-items: center; gap: 0; min-width: 0; }
.lane-row .node { flex-shrink: 0; }
.orchestrator {
  margin-top: 18px; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px dashed var(--faint); border-radius: 12px; font-size: 13.5px; color: var(--muted);
}
.orchestrator [data-lucide] { color: var(--accent); }

/* Data lake */
.medallion { display: flex; align-items: stretch; gap: 0; }
.zone { flex: 1; border-radius: 12px; padding: 16px; background: var(--bg); border: 1px solid var(--line); }
.zone h5 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.zone .dot { width: 10px; height: 10px; border-radius: 50%; }
.zone p { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.zone .fmt { margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.medallion .flow { flex: 0 0 28px; }
.storage {
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px;
  border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13.5px;
}
.storage [data-lucide] { color: var(--accent); width: 18px; height: 18px; }

/* Data warehouse — schéma en étoile */
.star { display: grid; grid-template-columns: 1fr 1.1fr 1fr; grid-template-rows: auto auto auto; gap: 14px; align-items: center; justify-items: center; position: relative; }
.star .table { width: 100%; max-width: 210px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 12.5px; position: relative; z-index: 1; }
.star .table .th { padding: 8px 12px; font-weight: 600; background: var(--surface-2); display: flex; align-items: center; gap: 6px; }
.star .table .th [data-lucide] { width: 14px; height: 14px; color: var(--accent); }
.star .table .td { padding: 5px 12px; color: var(--muted); border-top: 1px solid var(--line); font-family: "JetBrains Mono", monospace; font-size: 11.5px; }
.star .fact { grid-column: 2; grid-row: 2; max-width: 240px; border-color: var(--ink); }
.star .fact .th { background: var(--ink); color: var(--bg); }
.star .d1 { grid-column: 1; grid-row: 1; } .star .d2 { grid-column: 3; grid-row: 1; }
.star .d3 { grid-column: 1; grid-row: 3; } .star .d4 { grid-column: 3; grid-row: 3; }
.star svg.links { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.star svg.links line { stroke: var(--faint); stroke-width: 1.2; stroke-dasharray: 4 4; }

.compare { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 14px; background: var(--bg); border-radius: 12px; overflow: hidden; }
.compare th, .compare td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font-weight: 600; background: var(--surface-2); font-size: 13px; }
.compare td:first-child { color: var(--muted); width: 26%; }
.compare tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* ETL / ELT */
.etl-rows { display: flex; flex-direction: column; gap: 22px; }
.etl-row .lbl { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.etl-row .lbl .pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.etl-flow { display: flex; align-items: center; }
.step { flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: 20px; background: var(--bg); border: 1px solid var(--line); }
.step.t { background: var(--accent); color: #fff; border-color: var(--accent); }
.etl-flow .where { flex-shrink: 0; margin-left: 14px; font-size: 13px; color: var(--muted); max-width: 260px; line-height: 1.45; }
.step-desc { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* RAG */
.phase { margin-bottom: 22px; }
.phase:last-child { margin-bottom: 0; }
.phase-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.phase-title .badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.chain { display: flex; align-items: center; flex-wrap: nowrap; }
.chain .node { flex-shrink: 0; padding: 10px 12px; gap: 8px; font-size: 13.5px; }
.chain .flow { min-width: 16px; }
.scroll-x { overflow-x: auto; scrollbar-width: thin; }
.vector-db { display: flex; justify-content: center; }

/* RAGAS */
.ragas-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ragas-in .node { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 4px; }
.metric { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.metric-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.metric h5 { font-size: 14px; font-weight: 600; }
.metric .score { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--accent); font-weight: 500; }
.metric p { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.metric .uses { font-size: 11.5px; color: var(--faint); margin-top: 8px; }
.metric .gauge { height: 4px; border-radius: 999px; background: var(--surface-2); margin-top: 12px; overflow: hidden; }
.metric .gauge i { display: block; height: 100%; background: var(--accent); border-radius: inherit; width: var(--v); }

/* Python / SQL */
.mod-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mod-group { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.mod-group h5 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mod-group h5 [data-lucide] { width: 16px; height: 16px; color: var(--accent); }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mod { padding: 8px 10px; border-radius: 8px; background: var(--surface); font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.mod code { display: block; color: var(--ink); font-size: 12.5px; font-weight: 500; margin-bottom: 2px; }
.codeblock {
  margin-top: 16px; background: var(--code-bg); color: var(--code-fg); border-radius: 14px; overflow: hidden;
  font-family: "JetBrains Mono", monospace; font-size: 13px; line-height: 1.7;
}
.codeblock .bar-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #34322d; font-size: 12px; color: #9c998f; }
.codeblock pre { padding: 16px 18px; overflow-x: auto; margin: 0; }
.tok-k { color: #e5a07f; } .tok-s { color: #b5c99a; } .tok-c { color: #85827a; font-style: italic; } .tok-f { color: #9cc4e4; } .tok-n { color: #d7b8f3; }
.sql-order { display: flex; flex-wrap: wrap; align-items: center; gap: 0; row-gap: 10px; }
.sql-order .kw { flex-shrink: 0; font-family: "JetBrains Mono", monospace; font-size: 12.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.sql-order .kw b { color: var(--accent); font-weight: 600; margin-right: 6px; }
.sql-order .flow { flex: 0 0 22px; min-width: 22px; }
.sql-concepts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }

/* Points clés + outils */
.keypoints { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; margin-top: 24px; list-style: none; }
.keypoints li { display: flex; gap: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.keypoints li [data-lucide] { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.keypoints li strong { color: var(--ink); font-weight: 600; }
.tools { margin-top: 24px; }
.tools-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tools-title [data-lucide] { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
}
.chip .os { font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--ok); background: #e3ecdf; padding: 1px 6px; border-radius: 999px; }
.chip .role-t { color: var(--faint); font-size: 12px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.contact {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  transition: border-color .2s ease; min-width: 0;
}
.contact:hover { border-color: var(--ink); }
.contact .icon-box { background: var(--surface); }
.contact-body { display: block; width: 100%; min-width: 0; }
.contact-label { font-size: 13px; color: var(--muted); }
.contact-value { font-weight: 500; font-size: 1rem; white-space: nowrap; letter-spacing: -.005em; }
.copy {
  position: absolute; top: 16px; right: 16px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  transition: background-color .2s ease, color .2s ease;
}
.copy:hover { background: var(--surface); color: var(--ink); }
.copy.done { color: var(--ok); }
.copy [data-lucide] { width: 18px; height: 18px; }

footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
footer .loc { display: inline-flex; align-items: center; gap: 8px; }
footer .loc [data-lucide] { width: 16px; height: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); font-size: 14px; padding: 10px 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast [data-lucide] { width: 16px; height: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .pipe-step:nth-child(3) { border-right: 0; }
  .pipe-step:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .pipe-step:nth-child(3)::after { display: none; }
  .concepts-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .toc-mobile { display: flex; }
  .concepts-layout > div:last-child { margin-top: 40px; }
}
@media (max-width: 1120px) {
  .contact-grid { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 860px) {
  .nav-link { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .sphere-wrap { max-width: 400px; justify-self: center; order: -1; }
  .cards, .contact-grid { grid-template-columns: 1fr; }
  section.block { padding: 72px 0; }
  .diagram { padding: 18px; }
  .src-diagram { grid-template-columns: 1fr; }
  .src-arrows { flex-direction: row; width: auto; justify-content: center; }
  .src-arrows .flow { display: none; }
  .src-arrows::before { content: ""; }
  .lane { grid-template-columns: 1fr; gap: 8px; }
  .medallion { flex-direction: column; gap: 10px; }
  .medallion .flow { display: none; }
  .ragas-in, .metrics, .mod-groups, .keypoints, .sql-concepts { grid-template-columns: 1fr; }
  .star { grid-template-columns: 1fr 1fr; }
  .star .fact { grid-column: 1 / -1; grid-row: 2; }
  .star .d1 { grid-column: 1; grid-row: 1; } .star .d2 { grid-column: 2; grid-row: 1; }
  .star .d3 { grid-column: 1; grid-row: 3; } .star .d4 { grid-column: 2; grid-row: 3; }
  .star svg.links { display: none; }
  .scroll-x { overflow-x: auto; padding-bottom: 6px; }
  .chain, .lane-row { width: max-content; }
  .etl-flow .where { display: none; }
}
@media (max-width: 620px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipe-step { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .pipe-step:nth-child(2n) { border-right: 0 !important; }
  .pipe-step::after { display: none; }
  .pipe-step p { display: none; }
}
@media (max-width: 480px) {
  .contact-value { font-size: .95rem; }
  .nav-cta span { display: none; }
  .nav-cta { padding: 10px; }
  .src-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse::after, .flow::after, .vflow::after { animation: none; display: none; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
  .btn, .card { transition: none; }
}

/* ---------- Preloader ---------- */
/* Affiché uniquement si JS est actif (classe .js posée dans le <head>) */
.preloader { display: none; }
html.js .preloader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--ink); color: var(--bg);
  clip-path: inset(0 0 0 0);
  transition: clip-path .9s cubic-bezier(.76, 0, .24, 1);
}
html.js .preloader.done { clip-path: inset(0 0 100% 0); }
html.is-loading { overflow: hidden; }
.preloader-name {
  font-family: "Inter Tight", "Inter", sans-serif; font-weight: 700;
  font-size: clamp(22px, 4vw, 34px); letter-spacing: -.01em; text-transform: uppercase;
  text-align: center; padding: 0 16px;
}
.preloader-words {
  height: 24px; overflow: hidden;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; color: var(--accent);
}
.preloader-track { transition: transform .2s cubic-bezier(.76, 0, .24, 1); }
.preloader-track span { display: block; height: 24px; line-height: 24px; text-align: center; }
.preloader-count {
  position: absolute; right: 24px; bottom: 12px; line-height: 1;
  font-family: "Inter Tight", "Inter", sans-serif; font-weight: 700;
  font-size: clamp(96px, 18vw, 220px); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  color: rgba(250, 249, 245, .06);
}
.preloader-bar { position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  html.js .preloader { transition: opacity .2s ease; }
  html.js .preloader.done { clip-path: inset(0 0 0 0); opacity: 0; }
  .preloader-track { transition: none; }
}
