/**
 * STATION CRÉATIVE - Design Tokens
 * Version 1.1
 *
 * Variables CSS pour assurer la cohérence visuelle
 * Compatible dark mode / light mode
 * Couleurs HEX optimisées pour le punch visuel
 */

:root {
  /* ========================================
     COULEURS DE MARQUE (HEX)
     ======================================== */

  --color-indigo-station: #001EAC;
  --color-indigo-light: #0099FF;
  --color-rose-neon: #FF0099;
  --color-jaune-yolk: #FFC300;

  /* Variantes Light Mode (pour texte sur fond clair) */
  --color-indigo-light-on-light: #1E5FAD;
  --color-rose-neon-on-light: #C4006E;
  --color-jaune-yolk-on-light: #946300;

  /* ========================================
     COULEURS SÉMANTIQUES
     ======================================== */

  /* Success - Tailwind Green */
  --color-success: #22C55E;
  --color-success-on-light: #15803D;

  --color-success-50: #F0FDF4;
  --color-success-100: #DCFCE7;
  --color-success-200: #BBF7D0;
  --color-success-500: #22C55E;
  --color-success-600: #16A34A;
  --color-success-700: #15803D;

  /* Warning - Tailwind Amber */
  --color-warning: #F59E0B;
  --color-warning-on-light: #B45309;

  --color-warning-50: #FFFBEB;
  --color-warning-100: #FEF3C7;
  --color-warning-500: #F59E0B;
  --color-warning-600: #D97706;
  --color-warning-700: #B45309;

  /* Error - Tailwind Red */
  --color-error: #EF4444;
  --color-error-on-light: #DC2626;

  --color-error-50: #FEF2F2;
  --color-error-100: #FEE2E2;
  --color-error-200: #FECACA;
  --color-error-500: #EF4444;
  --color-error-600: #DC2626;
  --color-error-700: #B91C1C;

  /* Info - Tailwind Blue */
  --color-info: #3B82F6;
  --color-info-on-light: #2563EB;

  /* Échelles sémantiques complètes */
  --color-info-50: #EFF6FF;
  --color-info-100: #DBEAFE;
  --color-info-500: #3B82F6;
  --color-info-600: #2563EB;
  --color-info-700: #1D4ED8;

  /* ========================================
     ÉTATS INTERACTIFS
     ======================================== */

  /* Indigo Station - états */
  --color-indigo-station-hover: #1A0DB5;
  --color-indigo-station-active: #120A70;

  /* Rose Néon - états */
  --color-rose-hover: #FF33AD;
  --color-rose-active: #CC007A;

  /* Indigo Light - états */
  --color-indigo-light-hover: #5BB0FD;
  --color-indigo-light-active: #2B8FE8;

  /* ========================================
     ÉCHELLE DE NEUTRES - SLATE (Tailwind)
     ======================================== */

  --color-neutral-50: #F8FAFC;
  --color-neutral-100: #F1F5F9;
  --color-neutral-200: #E2E8F0;
  --color-neutral-300: #CBD5E1;
  --color-neutral-400: #94A3B8;
  --color-neutral-500: #64748B;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1E293B;
  --color-neutral-900: #0F172A;
  --color-neutral-950: #020617;

  /* Alias Gray (compatibilité) */
  --color-gray-50: #F8FAFC;
  --color-gray-100: #F1F5F9;
  --color-gray-200: #E2E8F0;
  --color-gray-300: #CBD5E1;
  --color-gray-400: #94A3B8;
  --color-gray-500: #64748B;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1E293B;
  --color-gray-900: #0F172A;
  --color-gray-950: #020617;

  /* ========================================
     RÔLES SÉMANTIQUES - LIGHT MODE (défaut)
     ======================================== */

  /* Background & Surface */
  --color-bg-primary: #F8FAFC;
  --color-bg-secondary: #FFFFFF;
  --color-bg-tertiary: #F1F5F9;
  --color-bg-card: #FFFFFF;
  --color-bg-elevated: #E2E8F0;

  /* Text Colors */
  --color-text-primary: #0F172A;
  --color-text-secondary: #475569;
  --color-text-tertiary: #64748B;
  --color-text-inverse: #FFFFFF;

  /* Borders */
  --color-border-primary: #CBD5E1;
  --color-border-secondary: #E2E8F0;
  --color-border-focus: #180F93;

  /* ========================================
     TYPOGRAPHIE
     ======================================== */

  /* Font Families */
  --font-family-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-primary: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-heading: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-mono: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', monospace;

  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Font Sizes - Scale typographique harmonieuse */
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-lg: 1.125rem;
  /* 18px */
  --font-size-xl: 1.25rem;
  /* 20px */
  --font-size-2xl: 1.5rem;
  /* 24px */
  --font-size-3xl: 1.875rem;
  /* 30px */
  --font-size-4xl: 2.25rem;
  /* 36px */
  --font-size-5xl: 3rem;
  /* 48px */
  --font-size-6xl: 3.75rem;
  /* 60px */
  --font-size-7xl: 4.5rem;
  /* 72px */

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.2;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Letter Spacing */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;

  /* ========================================
     ESPACEMENTS
     ======================================== */

  --spacing-0: 0;
  --spacing-px: 1px;
  --spacing-0-5: 0.125rem;
  /* 2px */
  --spacing-1: 0.25rem;
  /* 4px */
  --spacing-1-5: 0.375rem;
  /* 6px */
  --spacing-2: 0.5rem;
  /* 8px */
  --spacing-2-5: 0.625rem;
  /* 10px */
  --spacing-3: 0.75rem;
  /* 12px */
  --spacing-3-5: 0.875rem;
  /* 14px */
  --spacing-4: 1rem;
  /* 16px */
  --spacing-5: 1.25rem;
  /* 20px */
  --spacing-6: 1.5rem;
  /* 24px */
  --spacing-7: 1.75rem;
  /* 28px */
  --spacing-8: 2rem;
  /* 32px */
  --spacing-9: 2.25rem;
  /* 36px */
  --spacing-10: 2.5rem;
  /* 40px */
  --spacing-11: 2.75rem;
  /* 44px */
  --spacing-12: 3rem;
  /* 48px */
  --spacing-14: 3.5rem;
  /* 56px */
  --spacing-16: 4rem;
  /* 64px */
  --spacing-20: 5rem;
  /* 80px */
  --spacing-24: 6rem;
  /* 96px */
  --spacing-28: 7rem;
  /* 112px */
  --spacing-32: 8rem;
  /* 128px */
  --spacing-36: 9rem;
  /* 144px */
  --spacing-40: 10rem;
  /* 160px */
  --spacing-44: 11rem;
  /* 176px */
  --spacing-48: 12rem;
  /* 192px */
  --spacing-52: 13rem;
  /* 208px */
  --spacing-56: 14rem;
  /* 224px */
  --spacing-60: 15rem;
  /* 240px */
  --spacing-64: 16rem;
  /* 256px */
  --spacing-72: 18rem;
  /* 288px */
  --spacing-80: 20rem;
  /* 320px */
  --spacing-96: 24rem;
  /* 384px */

  /* ========================================
     BORDER RADIUS
     ======================================== */

  --radius-none: 0;
  --radius-sm: 0.125rem;
  /* 2px */
  --radius-base: 0.25rem;
  /* 4px */
  --radius-md: 0.375rem;
  /* 6px */
  --radius-lg: 0.5rem;
  /* 8px */
  --radius-xl: 0.75rem;
  /* 12px */
  --radius-2xl: 1rem;
  /* 16px */
  --radius-3xl: 1.5rem;
  /* 24px */
  --radius-full: 9999px;

  /* ========================================
     OMBRES
     ======================================== */

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  --shadow-none: 0 0 #0000;

  /* Glows Brand */
  --shadow-glow-indigo: 0 0 40px rgba(24, 15, 147, 0.4);
  --shadow-glow-rose: 0 0 40px rgba(255, 0, 153, 0.4);
  --shadow-glow-jaune: 0 0 40px rgba(255, 195, 0, 0.4);
  --shadow-glow-indigo-light: 0 0 40px rgba(66, 163, 253, 0.4);

  /* ========================================
     TRANSITIONS & ANIMATIONS
     ======================================== */

  --transition-none: none;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ========================================
     Z-INDEX SCALE
     ======================================== */

  --z-auto: auto;
  --z-base: 0;
  --z-docked: 10;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-banner: 1200;
  --z-overlay: 1300;
  --z-modal-backdrop: 1350;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-toast: 1600;
  --z-tooltip: 1700;

  /* ========================================
     FONDS EN GRILLE
     ======================================== */

  --grid-size-sm: 16px;
  --grid-size-md: 24px;
  --grid-size-lg: 32px;

  --grid-line-width: 1px;

  /* Dark */
  --grid-color-dark: rgba(248, 250, 252, 0.03);
  /* Slate 50 à 3% */


  /* Light */
  --grid-color-light: rgba(15, 23, 42, 0.04);
  /* Slate 900 à 4% */

  /* ========================================
     BREAKPOINTS (pour référence JS)
     ======================================== */

  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ========================================
   DARK MODE OVERRIDES
   ======================================== */

.dark,
[data-theme="dark"] {
  /* Dark Mode Backgrounds */
  --color-bg-primary: #020617;
  --color-bg-secondary: #0F172A;
  --color-bg-tertiary: #1E293B;
  --color-bg-card: #1E293B;
  --color-bg-elevated: #334155;

  /* Dark Mode Text */
  --color-text-primary: #F8FAFC;
  --color-text-secondary: #CBD5E1;
  --color-text-tertiary: #94A3B8;
  --color-text-inverse: #0F172A;

  /* Dark Mode Borders */
  --color-border-primary: #1E293B;
  --color-border-secondary: #334155;
  --color-border-focus: #42A3FD;

  /* Dark Mode Shadows - plus prononcées */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* ========================================
   AUTO DARK MODE (prefers-color-scheme)
   ======================================== */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not(.light) {
    /* Auto dark mode si pas de préférence explicite light */
    --color-bg-primary: #0F172A;
    --color-bg-secondary: #1E293B;
    --color-bg-tertiary: #334155;
    --color-bg-card: #1E293B;
    --color-bg-elevated: #334155;

    --color-text-primary: #F8FAFC;
    --color-text-secondary: #94A3B8;
    --color-text-tertiary: #64748B;
    --color-text-inverse: #0F172A;

    --color-border-primary: #475569;
    --color-border-secondary: #334155;
    --color-border-focus: #42A3FD;
  }
}

/* ========================================
   RESET: Appliquer les fonts par défaut
   ======================================== */

html {
  font-family: var(--font-family-body);
  font-size: 16px;
  line-height: var(--line-height-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
}

code,
pre,
kbd,
samp {
  font-family: var(--font-family-mono);
}