/**
 * @file theme.css
 * Les Sondiers — Surcharge des variables Mercury.
 *
 * Orange Les Sondiers : #e15500
 * Convertions oklch via https://oklch.com
 *   #e15500 → oklch(0.578 0.199 42.7)
 *   #ff6b1a → oklch(0.656 0.199 46.0)   (orange light)
 *   #b84400 → oklch(0.478 0.163 43.5)   (orange dark)
 *
 * Background dark : #161921 → oklch(0.153 0.017 265)
 * Surface :         #1e2230 → oklch(0.193 0.020 265)
 * Surface alt :     #252a3a → oklch(0.223 0.023 260)
 * Border :          rgba(255,255,255,0.08) → oklch(1 0 0 / 0.08)
 */

/* ========================================
   DARK MODE (default pour Les Sondiers)
   ======================================== */
:root {
  /* On force le dark mode par défaut */
  color-scheme: dark;

  /* Couleurs de fond */
  --background: oklch(0.153 0.017 265);
  --foreground: oklch(0.85 0.01 260);

  /* Cartes */
  --card: oklch(0.193 0.020 265);
  --card-foreground: oklch(0.92 0.005 260);

  /* Accent = Orange Les Sondiers */
  --primary: #E15500;
  --primary-foreground: oklch(1 0 0);

  /* Secondaire */
  --secondary: oklch(0.223 0.023 260);
  --secondary-foreground: oklch(0.85 0.01 260);

  /* Muted */
  --muted: oklch(0.223 0.023 260);
  --muted-foreground: oklch(0.55 0.02 260);

  /* Accent (composants Mercury) */
  --accent: #E15500;
  --accent-foreground: oklch(1 0 0);

  /* Destructive (erreurs) */
  --destructive: oklch(0.637 0.208 25.3);
  --destructive-foreground: oklch(1 0 0);

  /* Bordures et inputs */
  --border: oklch(1 0 0 / 0.08);
  --input: oklch(1 0 0 / 0.08);

  /* Police : Inter (remplace Outfit) */
  --font-sans: "Inter", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-mono: "Fira Mono", "Menlo", "Consolas", monospace;

  /* Radius */
  --radius: 0.75rem;
}

/* Dark class (si Mercury bascule via JS) */
.dark {
  --background: oklch(0.153 0.017 265);
  --foreground: oklch(0.85 0.01 260);
  --card: oklch(0.193 0.020 265);
  --card-foreground: oklch(0.92 0.005 260);
  --primary: #E15500;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.223 0.023 260);
  --secondary-foreground: oklch(0.85 0.01 260);
  --muted: oklch(0.223 0.023 260);
  --muted-foreground: oklch(0.55 0.02 260);
  --accent: #E15500;
  --accent-foreground: oklch(1 0 0);
  --border: oklch(1 0 0 / 0.08);
  --input: oklch(1 0 0 / 0.08);
}

/* ========================================
   CUSTOM PROPERTIES ADDITIONNELLES
   ======================================== */
:root {
  /* Orange déclinaisons pour usage direct */
  --sondiers-orange: #e15500;
  --sondiers-orange-light: #ff6b1a;
  --sondiers-orange-dark: #b84400;
  --sondiers-bg: #161921;
  --sondiers-surface: #1e2230;
  --sondiers-surface-alt: #252a3a;
}

/* ========================================
   BODY
   ======================================== */
body {
  background-color: var(--sondiers-bg);
  color: oklch(0.85 0.01 260);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LIENS
   ======================================== */
a {
  color: var(--sondiers-orange);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--sondiers-orange-light);
}

/* ========================================
   NAVBAR OVERRIDES
   ======================================== */
.mercury-navbar,
[data-component-id*="navbar"] {
  background: rgba(22, 25, 33, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ========================================
   CARD HOVER GLOW
   ======================================== */
[data-component-id*="card"]:hover {
  box-shadow: 0 0 30px rgba(225, 85, 0, 0.06);
  border-color: rgba(225, 85, 0, 0.15);
}

/* ========================================
   BUTTONS
   ======================================== */
.button--primary,
[data-component-id*="button"][data-variant="primary"] {
  background-color: var(--sondiers-orange);
  color: white;
  border: none;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.button--primary:hover,
[data-component-id*="button"][data-variant="primary"]:hover {
  background-color: var(--sondiers-orange-light);
  box-shadow: 0 4px 20px rgba(225, 85, 0, 0.2);
}

/* ========================================
   TAG CHIPS (filtres émissions)
   ======================================== */
.tag-chip {
  transition: all 0.2s;
}
.tag-chip:hover,
.tag-chip.active {
  background: var(--sondiers-orange);
  color: white;
  border-color: var(--sondiers-orange);
}

/* ========================================
   SELECTION / FOCUS
   ======================================== */
::selection {
  background: rgba(225, 85, 0, 0.3);
  color: white;
}
:focus-visible {
  outline: 2px solid var(--sondiers-orange);
  outline-offset: 2px;
}

/* ========================================
   SCROLLBAR (Webkit)
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--sondiers-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--sondiers-surface-alt);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sondiers-orange-dark);
}
