/* ===============================================
   THEMES.CSS - Variables CSS globales

   Auteur: Thomas Kireche
   Version: 2.0.0
   Dernière mise à jour: 2026-01-26

   Description:
   Variables CSS pour les couleurs, thèmes, spacing,
   typography et autres tokens de design.

   Table des matières:
   1. Spacing Scale
   2. Typography Scale
   3. Breakpoints (référence)
   4. Colors - Light Mode
   5. Colors - Dark Mode
   6. Transitions
   =============================================== */

:root {
  /* ========== 1. SPACING SCALE ========== */
  /**
   * Échelle de spacing cohérente (base 0.5rem = 8px)
   * Utilisée par les classes utilitaires .mb-X, .p-X, etc.
   */
  --space-0: 0;
  --space-1: 0.5rem;    /* 8px */
  --space-2: 1rem;      /* 16px */
  --space-3: 1.5rem;    /* 24px */
  --space-4: 2rem;      /* 32px */
  --space-5: 2.5rem;    /* 40px */
  --space-6: 3rem;      /* 48px */
  --space-7: 4rem;      /* 64px */
  --space-8: 5rem;      /* 80px */
  --space-nav: 120px;   /* Offset pour navigation fixe */

  /* ========== 2. TYPOGRAPHY SCALE ========== */
  /**
   * Échelle typographique modulaire
   * Ratio: ~1.25 (Major Third)
   */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md: 1.125rem;    /* 18px */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 2rem;       /* 32px */
  --text-3xl: 2.5rem;     /* 40px */
  --text-4xl: 3rem;       /* 48px */
  --text-5xl: 4rem;       /* 64px */

  /* Font weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* ========== 3. BREAKPOINTS (Référence) ========== */
  /**
   * Note: Les variables CSS ne fonctionnent pas dans les media queries
   * Ces valeurs sont documentées ici pour référence uniquement
   * Voir responsive.css pour les media queries
   *
   * --bp-sm: 480px   (Mobile)
   * --bp-md: 768px   (Tablette)
   * --bp-lg: 1024px  (Laptop)
   * --bp-xl: 1400px  (Desktop)
   * --bp-2xl: 2560px (Grand écran)
   */

  /* ========== 4. COLORS - LIGHT MODE ========== */
  /**
   * Palette de couleurs mode clair
   * Inspirée de Meetrix avec teintes turquoise/or
   */
  --primary: #00B4A0;
  --secondary: #FCD34D;
  --accent: #00D9C0;
  --background: #F0F9F7;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-hover: rgba(255, 255, 255, 0.85);
  --text-primary: #1A1A2E;
  --text-secondary: #4A4A6A;
  --border: rgba(0, 180, 160, 0.2);

  /* Gradients Mode Clair */
  --gradient-primary: linear-gradient(135deg, #00B4A0 0%, #00D9C0 50%, #FCD34D 100%);
  --gradient-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 249, 247, 0.8) 100%);
  --gradient-mesh: radial-gradient(at 0% 0%, rgba(0, 180, 160, 0.2) 0%, transparent 50%),
                   radial-gradient(at 100% 0%, rgba(252, 211, 77, 0.15) 0%, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(0, 217, 192, 0.2) 0%, transparent 50%),
                   radial-gradient(at 0% 100%, rgba(0, 180, 160, 0.15) 0%, transparent 50%);

  /* Shadow & Effects */
  --shadow-sm: 0 2px 8px rgba(0, 180, 160, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 180, 160, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 180, 160, 0.2);
  --shadow-glow: 0 0 20px rgba(0, 217, 192, 0.3);

  /* ========== TRANSITIONS ========== */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* ========== RGB VALUES (pour rgba()) ========== */
  /**
   * Versions RGB des couleurs principales
   * Usage: rgba(var(--primary-rgb), 0.5)
   */
  --primary-rgb: 0, 180, 160;
  --secondary-rgb: 252, 211, 77;
  --text-primary-rgb: 26, 26, 46;

  /* ========== MISC ========== */
  /* Border radius scale */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 50%;

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;

  /* Theme flag */
  --theme: 'light';
}

/* ========== 5. COLORS - DARK MODE ========== */
/**
 * Palette de couleurs mode sombre
 * Palette vibrante violet/orange/rouge
 */
[data-theme="dark"] {
  --primary: #9D4EDD;
  --secondary: #FF6B35;
  --tertiary: #DC2626;
  --accent: #C084FC;
  --background: #0F0F1A;
  --surface: rgba(30, 30, 50, 0.8);
  --surface-hover: rgba(40, 40, 60, 0.9);
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0C0;
  --border: rgba(157, 78, 221, 0.3);

  /* Gradients Mode Sombre */
  --gradient-primary: linear-gradient(135deg, #9D4EDD 0%, #FF6B35 50%, #DC2626 100%);
  --gradient-surface: linear-gradient(135deg, rgba(30, 30, 50, 0.95) 0%, rgba(20, 20, 35, 0.9) 100%);
  --gradient-mesh: radial-gradient(at 0% 0%, rgba(157, 78, 221, 0.15) 0%, transparent 50%),
                   radial-gradient(at 100% 0%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
                   radial-gradient(at 0% 100%, rgba(157, 78, 221, 0.1) 0%, transparent 50%);

  /* Shadow & Effects Dark */
  --shadow-sm: 0 2px 8px rgba(157, 78, 221, 0.2);
  --shadow-md: 0 4px 16px rgba(157, 78, 221, 0.3);
  --shadow-lg: 0 8px 32px rgba(157, 78, 221, 0.4);
  --shadow-glow: 0 0 30px rgba(157, 78, 221, 0.5);

  /* RGB Values Dark */
  --primary-rgb: 157, 78, 221;
  --secondary-rgb: 255, 107, 53;
  --text-primary-rgb: 255, 255, 255;

  --theme: 'dark';
}

/* Smooth theme transition */
* {
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              border-color var(--transition-normal),
              box-shadow var(--transition-normal);
}

/* Disable transition on page load */
.preload * {
  transition: none !important;
}
