/**
 * Design Tokens - Trace Design System
 *
 * Variables CSS globales pour assurer la cohérence visuelle
 * à travers tous les composants de l'application.
 */

/* Font Faces */
@font-face {
  font-family: 'Excalifont';
  src: url('/fonts/Excalifont-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ===== Colors ===== */

  /* Primary & Secondary */
  --color-primary: #667eea;
  --color-primary-hover: #5568d3;
  --color-secondary: #764ba2;
  --color-secondary-hover: #6a4391;

  /* Semantic colors */
  --color-success: #10b981;
  --color-success-hover: #059669;
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-warning: #f59e0b;
  --color-warning-hover: #d97706;
  --color-info: #3b82f6;
  --color-info-hover: #2563eb;

  /* Dark theme - Backgrounds */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #252525;
  --bg-quaternary: #2a2a2a;

  /* Dark theme - Text */
  --text-primary: #e0e0e0;
  --text-secondary: #ccc;
  --text-tertiary: #888;
  --text-quaternary: #666;
  --text-white: #fff;

  /* Dark theme - Borders */
  --border-primary: #333;
  --border-secondary: #444;
  --border-tertiary: #555;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  /* Badge colors */
  --badge-cache-bg: rgba(16, 185, 129, 0.15);
  --badge-cache-border: rgba(16, 185, 129, 0.3);
  --badge-cache-text: #10b981;

  --badge-fresh-bg: rgba(168, 85, 247, 0.15);
  --badge-fresh-border: rgba(168, 85, 247, 0.3);
  --badge-fresh-text: #a855f7;

  --badge-info-bg: rgba(59, 130, 246, 0.15);
  --badge-info-border: rgba(59, 130, 246, 0.3);
  --badge-info-text: #3b82f6;

  --badge-warning-bg: rgba(245, 158, 11, 0.15);
  --badge-warning-border: rgba(245, 158, 11, 0.3);
  --badge-warning-text: #f59e0b;

  --badge-danger-bg: rgba(239, 68, 68, 0.15);
  --badge-danger-border: rgba(239, 68, 68, 0.3);
  --badge-danger-text: #ef4444;

  /* ===== Spacing ===== */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */

  /* ===== Border Radius ===== */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-round: 50px;
  --radius-circle: 50%;

  /* ===== Shadows ===== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

  /* Focus shadows */
  --shadow-focus-primary: 0 0 0 3px rgba(102, 126, 234, 0.5);
  --shadow-focus-danger: 0 0 0 3px rgba(239, 68, 68, 0.5);
  --shadow-focus-success: 0 0 0 3px rgba(16, 185, 129, 0.5);

  /* ===== Typography ===== */
  --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  --font-family-mono: 'Monaco', 'Menlo', 'Courier New', monospace;
  --font-family-handwritten: 'Excalifont', 'Comic Sans MS', cursive;

  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-md: 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-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* ===== Transitions ===== */
  --transition-fast: 0.1s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* ===== Z-index ===== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* ===== Layout ===== */
  --max-width-xs: 320px;
  --max-width-sm: 640px;
  --max-width-md: 768px;
  --max-width-lg: 1024px;
  --max-width-xl: 1280px;
  --max-width-2xl: 1536px;

  /* ===== Opacity ===== */
  --opacity-disabled: 0.5;
  --opacity-hover: 0.8;
  --opacity-active: 0.9;
}

/* Dark theme overrides (optional, for future light mode support) */
[data-theme="dark"] {
  /* Already using dark theme by default */
}

/* Light theme (future) */
[data-theme="light"] {
  /* To be implemented */
}
