/*
 * Claude Code Dashboard — Design Tokens
 * Design System v1.0
 * Stack: Dark OLED + Glassmorphism + Developer aesthetic
 * Fonts: JetBrains Mono (headings/code) + IBM Plex Sans (body)
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ============================================================
   DESIGN TOKENS — :root (dark mode par défaut)
   ============================================================ */
:root {
  /* --- Background layers --- */
  --bg-base:        #080D14;   /* OLED base, sidebar */
  --bg-surface:     #0F172A;   /* Canvas principal */
  --bg-card:        #1E293B;   /* Cards, panels */
  --bg-card-hover:  #263348;   /* Card hover state */
  --bg-elevated:    #293548;   /* Dropdowns, popovers */
  --bg-input:       #162032;   /* Champs de saisie */
  --bg-overlay:     rgba(8, 13, 20, 0.7); /* Modal backdrop */

  /* --- Glass effect --- */
  --glass-bg:       rgba(30, 41, 59, 0.6);
  --glass-border:   rgba(255, 255, 255, 0.07);
  --glass-blur:     16px;

  /* --- Borders --- */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong:  rgba(255, 255, 255, 0.18);
  --border-focus:   #22C55E;

  /* --- Text --- */
  --text-primary:   #F8FAFC;   /* slate-50 */
  --text-secondary: #CBD5E1;   /* slate-300 */
  --text-muted:     #64748B;   /* slate-500 */
  --text-disabled:  #334155;   /* slate-700 */
  --text-code:      #7DD3FC;   /* sky-300, pour les identifiers */

  /* --- Brand / Accent --- */
  --accent-green:   #22C55E;   /* CTA principal, success, run */
  --accent-green-dim: rgba(34, 197, 94, 0.15);
  --accent-green-glow: 0 0 20px rgba(34, 197, 94, 0.35);

  --accent-blue:    #38BDF8;   /* Info, links */
  --accent-blue-dim: rgba(56, 189, 248, 0.12);

  --accent-purple:  #A78BFA;   /* Agents, IA */
  --accent-purple-dim: rgba(167, 139, 250, 0.12);

  --accent-amber:   #FCD34D;   /* Warnings, coût */
  --accent-amber-dim: rgba(252, 211, 77, 0.12);

  --accent-red:     #F87171;   /* Erreurs, danger */
  --accent-red-dim: rgba(248, 113, 113, 0.12);

  /* --- Status colors --- */
  --status-active:  #22C55E;
  --status-waiting: #FCD34D;
  --status-error:   #F87171;
  --status-idle:    #64748B;
  --status-info:    #38BDF8;

  /* --- Spacing scale (8px base) --- */
  --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;

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

  /* --- Typography scale --- */
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-body:   'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */
  --text-5xl:  3rem;      /* 48px */

  --font-light:    300;
  --font-regular:  400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* --- Shadows --- */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl:  0 16px 40px rgba(0, 0, 0, 0.7);
  --shadow-green: 0 4px 20px rgba(34, 197, 94, 0.25);
  --shadow-card:  0 0 0 1px rgba(255,255,255,0.06), 0 4px 16px rgba(0,0,0,0.4);

  /* --- Transitions --- */
  --transition-fast:   100ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;
  --transition-spring: 200ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-index scale --- */
  --z-base:    0;
  --z-raised:  10;
  --z-dropdown: 20;
  --z-sticky:  30;
  --z-overlay: 50;
  --z-modal:   60;
  --z-toast:   70;

  /* --- Layout --- */
  --sidebar-width:       240px;
  --sidebar-collapsed:   64px;
  --topbar-height:       56px;
  --content-max-width:   1280px;
  --panel-border-radius: var(--radius-lg);
}

/* ============================================================
   LIGHT MODE (override si besoin)
   ============================================================ */
[data-theme="light"] {
  --bg-base:        #F1F5F9;
  --bg-surface:     #FFFFFF;
  --bg-card:        #FFFFFF;
  --bg-card-hover:  #F8FAFC;
  --bg-elevated:    #FFFFFF;
  --bg-input:       #F8FAFC;

  --glass-bg:       rgba(255, 255, 255, 0.8);
  --glass-border:   rgba(0, 0, 0, 0.06);

  --border-subtle:  rgba(0, 0, 0, 0.05);
  --border-default: rgba(0, 0, 0, 0.10);
  --border-strong:  rgba(0, 0, 0, 0.18);

  --text-primary:   #0F172A;
  --text-secondary: #334155;
  --text-muted:     #64748B;
  --text-disabled:  #CBD5E1;
  --text-code:      #0369A1;

  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl:  0 16px 40px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 0 0 1px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.08);
}
