/**
 * DESIGN SYSTEM OPTIMUS GAMING - TOKENS CSS
 * Import centralisé des fondations
 */

/* ==========================================
   COLORS - Variables CSS
   ========================================== */
:root {
  /* Brand */
  --optimus-primary: #f6c000;
  --optimus-primary-hover: #ffed4a;
  --optimus-secondary: #6366f1;
  --optimus-accent: #ffd700;
  
  /* Semantic */
  --optimus-success: #10b981;
  --optimus-warning: #f59e0b;
  --optimus-danger: #ef4444;
  --optimus-info: #3b82f6;
  
  /* Backgrounds */
  --optimus-bg-primary: #0a0a0a;
  --optimus-bg-secondary: #151515;
  --optimus-bg-card: #1a1a1a;
  --optimus-bg-hover: #242424;
  --optimus-bg-modal: #1f1f1f;
  
  /* Text */
  --optimus-text-primary: #ffffff;
  --optimus-text-secondary: #cccccc;
  --optimus-text-muted: #999999;
  --optimus-text-disabled: #666666;
  
  /* Platforms */
  --platform-pc: #4a90e2;
  --platform-playstation: #003087;
  --platform-xbox: #107c10;
  --platform-nintendo: #e60012;
  
  /* System */
  --optimus-border-color: rgba(255, 255, 255, 0.1);
  --optimus-shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --optimus-shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

/* Light mode overrides */
[data-theme="light"] {
  --optimus-bg-primary: #ffffff;
  --optimus-bg-secondary: #f8f9fa;
  --optimus-bg-card: #ffffff;
  --optimus-bg-hover: #f1f3f4;
  
  --optimus-text-primary: #1a1a1a;
  --optimus-text-secondary: #4a4a4a;
  --optimus-text-muted: #6a6a6a;
  
  --optimus-border-color: rgba(0, 0, 0, 0.1);
  --optimus-shadow-md: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================
   TYPOGRAPHY - Variables CSS
   ========================================== */
:root {
  /* Font families */
  --font-family-primary: 'Spline Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-family-gaming: 'Orbitron', 'Spline Sans', sans-serif;
  
  /* Font sizes */
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 40px;
  --font-size-5xl: 48px;
  
  /* Font weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  /* Line heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.4;
  --line-height-relaxed: 1.6;
}

/* Responsive font size adjustments */
@media (min-width: 768px) {
  :root {
    --font-size-base: 16px;
  }
}

/* ==========================================
   SPACING - Variables CSS
   ========================================== */
:root {
  /* Spacing scale */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  
  /* Semantic spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Sections/layouts */
  --spacing-section: 48px;
  --spacing-card-inner: 16px;
  --spacing-card-gap: 20px;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  /* Container */
  --container-max-width: 1200px;
  --container-padding: 16px;
}

/* Responsive spacing adjustments */
@media (min-width: 768px) {
  :root {
    --spacing-section: 64px;
    --container-padding: 24px;
  }
}

/* ==========================================
   BUTTONS - Variables CSS
   ========================================== */
:root {
  --button-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --button-focus-ring: 0 0 0 3px rgba(246, 192, 0, 0.3);
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

/* Typography utilities */
.text-hero {
  font-family: var(--font-family-gaming);
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;
}

.text-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.text-subtitle {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}

.text-body {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
}

.text-caption {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--optimus-text-muted);
}

.text-badge {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Gaming typography */
.text-gaming-title {
  font-family: var(--font-family-gaming);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--optimus-primary);
}

.text-platform {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.text-score {
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-lg);
}

/* Utility classes */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-gradient-primary {
  background: linear-gradient(135deg, var(--optimus-primary), var(--optimus-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Container utility */
.container-optimus {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ==========================================
   BADGE SYSTEM
   ========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.badge--category {
  background: var(--optimus-secondary);
  color: white;
}

.badge--platform {
  background: transparent;
  border: 1px solid var(--optimus-border-color);
  color: var(--optimus-text-muted);
}

.badge--free {
  background: var(--optimus-success);
  color: white;
}

.badge--genre {
  background: var(--optimus-bg-hover);
  color: var(--optimus-text-secondary);
}

.badge--promo {
  background: var(--optimus-warning);
  color: var(--optimus-bg-primary);
}

/* ==========================================
   RESPONSIVE UTILITIES
   ========================================== */
@media (max-width: 767px) {
  .text-hero {
    font-size: var(--font-size-4xl);
  }
  
  .text-title {
    font-size: var(--font-size-2xl);
  }
}

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

@media (prefers-contrast: high) {
  .badge,
  .game-card,
  .news-list__item {
    border-width: 2px;
  }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}