/* ═══════════════════════════════════════════════════════════════════════
   DASHBOARD ADMIN V2 - Design Tokens 2025
   Variables CSS - Palette, Espacements, Typographie, Effets
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Primary Palette */
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: rgba(99, 102, 241, 0.4);

  /* Status Colors */
  --success: #10B981;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --info: #3B82F6;

  /* Surfaces - Dark Theme */
  --bg-primary: #0A0A0F;
  --bg-secondary: #12121A;
  --bg-card: #1A1A25;
  --bg-card-hover: #22222F;
  --bg-hover: #22222F;
  --bg-input: #0F0F16;
  --bg-elevated: #252532;

  /* Glass Effect */
  --glass-bg: rgba(26, 26, 37, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);

  /* Text */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-disabled: #475569;

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-focus: var(--primary);

  /* Rarity Colors */
  --legendary: #FFD700;
  --legendary-glow: rgba(255, 215, 0, 0.3);
  --epic: #A855F7;
  --epic-glow: rgba(168, 85, 247, 0.3);
  --rare: #3B82F6;
  --rare-glow: rgba(59, 130, 246, 0.3);
  --common: #6B7280;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--primary-glow);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* Animations Keyframes */
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ═══════════════════════════════════════════════════════════════════════
   LIGHT MODE - Theme Clair
   ═══════════════════════════════════════════════════════════════════════ */

[data-theme="light"] {
  /* Primary Palette - Same but slightly adjusted */
  --primary: #5558E3;
  --primary-hover: #4145D1;
  --primary-light: rgba(85, 88, 227, 0.12);
  --primary-glow: rgba(85, 88, 227, 0.25);

  /* Status Colors */
  --success: #059669;
  --success-light: rgba(5, 150, 105, 0.12);
  --success-bg: rgba(5, 150, 105, 0.12);
  --warning: #D97706;
  --warning-light: rgba(217, 119, 6, 0.12);
  --danger: #DC2626;
  --danger-light: rgba(220, 38, 38, 0.12);
  --info: #2563EB;

  /* Surfaces - Light Theme */
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-hover: #F1F5F9;
  --bg-input: #FFFFFF;
  --bg-elevated: #FFFFFF;

  /* Glass Effect - Light */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-blur: blur(20px);

  /* Text - Dark on Light */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-disabled: #94A3B8;

  /* Borders */
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --border-focus: var(--primary);

  /* Rarity Colors - Slightly adjusted for light bg */
  --legendary: #CA8A04;
  --legendary-glow: rgba(202, 138, 4, 0.2);
  --epic: #9333EA;
  --epic-glow: rgba(147, 51, 234, 0.2);
  --rare: #2563EB;
  --rare-glow: rgba(37, 99, 235, 0.2);
  --common: #6B7280;

  /* Shadows - Softer for light theme */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px var(--primary-glow);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
