/* ========== GEIST — self-hosted fonts ========== */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ========== TRAKOUT — SHARED DESIGN SYSTEM v2 ========== */
/* Source de vérité : tokens brique + Geist. Chargé en premier sur toutes les pages refondues. */

:root {
  /* DARK (défaut) */
  --bg:        oklch(0.16 0.005 90);
  --bg-2:      oklch(0.20 0.006 90);
  --bg-3:      oklch(0.24 0.008 90);
  --line:      oklch(0.30 0.008 90);
  --line-soft: oklch(0.24 0.008 90 / 0.6);
  --text:      oklch(0.97 0.005 90);
  --text-2:    oklch(0.78 0.01 90);
  --text-3:    oklch(0.55 0.012 250);
  --accent:    oklch(0.66 0.17 38);
  --accent-ink: oklch(0.99 0.005 90);
  --accent-2:  oklch(0.78 0.12 200);
  --danger:    oklch(0.72 0.18 28);
  --ok:        oklch(0.78 0.14 155);
  --warn:      oklch(0.78 0.14 80);

  --font-sans: "Geist", "Inter", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --radius:    4px;
  --radius-lg: 10px;

  /* ===== COMPAT — anciens tokens app.js remappés vers le nouveau système ===== */
  --brand-dark:            var(--text);
  --brand-grey:            var(--text-3);
  --brand-red:             var(--accent);
  --brand-border:          var(--line);
  --surface-border-soft:   var(--line-soft);
  --surface-strong:        var(--bg-3);
  --accent-soft:           color-mix(in oklch, var(--accent) 15%, transparent);
  --status-success:        var(--ok);
  --status-success-soft:   color-mix(in oklch, var(--ok) 15%, transparent);
  --status-success-border: color-mix(in oklch, var(--ok) 40%, transparent);
  --status-danger-soft:    color-mix(in oklch, var(--danger) 15%, transparent);
  --status-danger-border:  color-mix(in oklch, var(--danger) 40%, transparent);
  --status-muted:          var(--text-3);

  /* ===== COMPAT — anciens tokens de surface (style.min.css) → système chaud ===== */
  --bg-0:      var(--bg);
  --bg-1:      var(--bg);
  --bg-4:      var(--bg-3);
  --bg-body:   var(--bg);
  --bg-card:   var(--bg-2);
  --bg-header: var(--bg);
  --bg-footer: var(--bg);
  --bg-input:  var(--bg-3);
  --glass:     var(--bg-2);
  --glass-soft:     color-mix(in oklch, var(--bg-2) 60%, transparent);
  --glass-bg:       var(--bg-2);
  --glass-border:   var(--line);
  --shadow-sm:  none;
  --shadow-md:  none;
  --shadow-lg:  none;
  --shadow-xl:  none;
  --shadow-inner: none;
  --shadow-glass: none;
  --shadow-elev:  none;
}

/* Mode clair */
.theme-light, [data-theme="light"] {
  --bg:        oklch(0.985 0.003 90);
  --bg-2:      oklch(0.965 0.005 90);
  --bg-3:      oklch(0.94 0.006 90);
  --line:      oklch(0.86 0.008 90);
  --line-soft: oklch(0.90 0.007 90 / 0.7);
  --text:      oklch(0.18 0.012 250);
  --text-2:    oklch(0.38 0.012 250);
  --text-3:    oklch(0.55 0.012 250);
  --accent:    oklch(0.58 0.17 35);
  --accent-ink: oklch(0.99 0.005 90);
  --accent-2:  oklch(0.55 0.15 220);
}

/* ===== RESET DE BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Neutralise les halos néon de l'ancienne feuille (body::before/after en position:fixed) */
body::before, body::after { display: none !important; }
/* Force Geist sur tous les titres (l'ancienne feuille imposait Instrument Serif via --font-display) */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); }
a { color: inherit; }
img { max-width: 100%; }

/* ===== UTILITAIRES ===== */
.mono      { font-family: var(--font-mono); letter-spacing: -0.01em; }
.caps-mono { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--text-3); }
.eyebrow   {
  font-family: var(--font-mono); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.accent { color: var(--accent); }
.dim    { color: var(--text-3); }

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, border-color .15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Aliases pour compatibilité avec le JS existant */
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.secondary { border-color: var(--line); color: var(--text-2); background: transparent; }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ===== BRAND / LOGO ===== */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; color: var(--text);
}
.brand-mark {
  width: 14px; height: 14px;
  background: var(--accent);
  position: relative; flex-shrink: 0;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 3px; background: var(--bg);
}
