/* ============================================================
   TradingApp Design System - VARIABLES (tokens) - V1
   ============================================================
   Source de verite des couleurs, espacements, typographies.
   Les composants CSS (ds.css) et les surcharges d'app (style.css)
   ne doivent JAMAIS contenir de valeur en dur : toujours passer
   par une variable definie ici.
   ============================================================ */

:root {
  /* ---------- Neutres (sombre) ---------- */
  --bg: #0B0E11;
  --bg-elevated: #13171C;
  --bg-input: #0F1318;
  --bg-hover: #1A1F26;
  --surface: #181D24;
  --border: #252B33;
  --border-strong: #3A424D;
  --text: #E8EBEF;
  --text-muted: #9AA3AE;
  --text-faint: #6B7380;

  /* ---------- Accent (vert trading classique - option C) ---------- */
  --accent: #16A34A;
  --accent-hover: #15803D;
  --accent-contrast: #FFFFFF;

  /* ---------- Couleurs semantiques ---------- */
  --positive: var(--accent);
  --positive-soft: #0D2818;
  --negative: #EF4444;
  --negative-soft: #2A1414;
  --warning: #F59E0B;
  --warning-soft: #2A1F0F;
  --info: #3B82F6;
  --info-soft: #0F1A2A;

  /* ---------- Couleurs par app (liseret topbar + accent logo) ---------- */
  --app-hub: var(--accent);
  --app-rss: #3B82F6;
  --app-portfolio: #A855F7;

  /* ---------- Espacement (base 4px) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* ---------- Typographie ---------- */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ---------- Border radius ---------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;

  /* ---------- Ombres ---------- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 0 3px rgba(22,163,74,0.30);

  /* ---------- Transitions ---------- */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms cubic-bezier(.4,0,.2,1);
}

/* Respect du parametre OS "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
