/* =============================================================
   BASE — Design system : variables, reset, composants partagés
   ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:            #0a0a0a;
  --bg-el:         #111111;
  --bg-2:          #1a1a1a;
  --fg:            #f5f5f5;
  --fg-muted:      #888888;
  --fg-dim:        rgba(136,136,136,0.5);
  --accent:        #e61919;
  --accent-fg:     #ffffff;
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --nav-h:         49px;
  --font-sans:     'Archivo Black', 'Arial Black', sans-serif;
  --font-mono:     'Space Mono', 'Courier New', monospace;
  --container:     1200px;
  --px:            40px;
}
[data-theme="light"] {
  --bg:            #fafafa;
  --bg-el:         #ffffff;
  --bg-2:          #f0f0f0;
  --fg:            #0a0a0a;
  --fg-muted:      #666666;
  --fg-dim:        rgba(102,102,102,0.5);
  --border:        rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.14);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
strong { font-weight: 700; }
em { font-style: italic; }
::selection { background: var(--accent); color: #fff; }
.icon { display: inline-block; flex-shrink: 0; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--px);
  padding-right: var(--px);
}
@media (max-width: 768px) { :root { --px: 24px; } }

/* ── Overlays (appliqués via pseudo-éléments — toutes pages) ── */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9996; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9997;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
}

/* ── Scroll progress bar ────────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 0%; height: 2px;
  background: var(--accent);
  z-index: 101;
  pointer-events: none;
}

/* ── Text split chars (hero H1) ─────────────────────────────── */
.char { display: inline-block; white-space: pre; }

/* ── Loader ─────────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.loader-content { display: flex; align-items: flex-end; gap: 6px; }
.loader-count {
  font-family: var(--font-sans);
  font-size: clamp(80px, 15vw, 160px);
  line-height: 1; color: var(--fg);
}
.loader-pct {
  font-family: var(--font-mono);
  font-size: clamp(24px, 4vw, 48px);
  color: var(--fg-muted); margin-bottom: 10px;
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: fixed; top: -100%; left: 0; z-index: 10000;
  padding: 10px 20px;
  background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Utilities ──────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.mono { font-family: var(--font-mono); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

/* ── Status dot ─────────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot-pulse { animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Gap-px grid ────────────────────────────────────────────── */
.gap-grid { display: grid; gap: 1px; background: var(--border); }
.gap-grid > * { background: var(--bg); }
.gap-grid--3 { grid-template-columns: 1fr; }
.gap-grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px)  { .gap-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gap-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-outline {
  background: transparent; color: var(--fg);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--fg); }
.btn-secondary {
  background: transparent; color: var(--fg);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--fg); }
.btn-ghost {
  background: transparent; color: var(--fg-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--fg); }
.btn-sm { padding: 6px 12px; font-size: 10px; }

/* ── Tags ───────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--fg-muted);
}
.tag-accent { border-color: var(--accent); color: var(--accent); }

/* ── Sections (partagé) ─────────────────────────────────────── */
.section { padding: 80px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .section { padding: 120px 0; } }
.section-eyebrow {
  display: block;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.section-label {
  display: block;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head { margin-bottom: 64px; }
.section-title {
  font-family: var(--font-sans);
  font-size: clamp(32px, 6vw, 72px);
  text-transform: uppercase;
  letter-spacing: -0.04em; line-height: 0.9;
  margin-bottom: 24px;
}
.section-title-lg {
  font-family: var(--font-sans);
  font-size: clamp(36px, 7vw, 80px);
  text-transform: uppercase;
  letter-spacing: -0.04em; line-height: 0.9;
}
.section-subtitle {
  font-family: var(--font-mono); font-size: 11px;
  line-height: 1.7; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--fg-muted); max-width: 480px;
}
.section-head-flex {
  display: flex; flex-direction: column; gap: 24px;
  margin-bottom: 64px;
}
@media (min-width: 768px) {
  .section-head-flex { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.section-desc-right {
  font-family: var(--font-mono); font-size: 11px;
  line-height: 1.7; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--fg-muted); max-width: 360px;
}
.section-badge {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted);
  white-space: nowrap;
}
.heading-sm {
  font-family: var(--font-sans);
  font-size: clamp(28px, 4vw, 48px);
  text-transform: uppercase; letter-spacing: -0.04em; line-height: 0.9;
}

/* ── Reveal on scroll ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
