/* ============================================================================
 * INFINITE WEALTH ERP™ — Design Tokens
 * Source unique de vérité pour couleurs, typo, espacements.
 * Importer en premier dans toutes les pages.
 * Copyright © 2026 TEK DS INNOVATION CORP.
 * ============================================================================ */

:root {
  /* ── Brand ────────────────────────────────────────── */
  --iw-gold:        #d4af37;
  --iw-gold-light:  #f0d060;
  --iw-gold-dark:   #b8941f;
  --iw-gold-glow:   rgba(212, 175, 55, 0.35);

  /* ── Surfaces (dark theme par défaut) ─────────────── */
  --iw-bg:          #0a1020;
  --iw-bg-1:        #0f172a;
  --iw-bg-2:        #1a2942;
  --iw-bg-3:        #243759;
  --iw-surface:     rgba(255, 255, 255, 0.04);
  --iw-surface-2:   rgba(255, 255, 255, 0.07);
  --iw-overlay:     rgba(5, 10, 20, 0.85);

  /* ── Text ─────────────────────────────────────────── */
  --iw-text:        #e2e8f0;
  --iw-text-2:      #94a3b8;
  --iw-text-3:      #64748b;
  --iw-text-muted:  #475569;
  --iw-text-on-gold:#0f172a;

  /* ── Borders ──────────────────────────────────────── */
  --iw-border:      rgba(212, 175, 55, 0.15);
  --iw-border-2:    rgba(212, 175, 55, 0.30);
  --iw-border-soft: rgba(255, 255, 255, 0.08);

  /* ── Semantic ─────────────────────────────────────── */
  --iw-success:     #10b981;
  --iw-success-bg:  rgba(16, 185, 129, 0.12);
  --iw-warning:     #f59e0b;
  --iw-warning-bg:  rgba(245, 158, 11, 0.12);
  --iw-danger:      #ef4444;
  --iw-danger-bg:   rgba(239, 68, 68, 0.12);
  --iw-info:        #3b82f6;
  --iw-info-bg:     rgba(59, 130, 246, 0.12);

  /* ── Typography ───────────────────────────────────── */
  --iw-font-display: 'Space Grotesk', system-ui, sans-serif;
  --iw-font-body:    'Inter', system-ui, sans-serif;
  --iw-font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --iw-fs-xs:   0.70rem;
  --iw-fs-sm:   0.82rem;
  --iw-fs-md:   0.95rem;
  --iw-fs-lg:   1.10rem;
  --iw-fs-xl:   1.40rem;
  --iw-fs-2xl:  1.85rem;
  --iw-fs-3xl:  2.50rem;

  /* ── Spacing (4px base) ───────────────────────────── */
  --iw-s-1:  0.25rem;
  --iw-s-2:  0.50rem;
  --iw-s-3:  0.75rem;
  --iw-s-4:  1.00rem;
  --iw-s-5:  1.50rem;
  --iw-s-6:  2.00rem;
  --iw-s-7:  3.00rem;
  --iw-s-8:  4.00rem;

  /* ── Radii ────────────────────────────────────────── */
  --iw-r-sm:   6px;
  --iw-r-md:   10px;
  --iw-r-lg:   14px;
  --iw-r-xl:   20px;
  --iw-r-full: 999px;

  /* ── Shadows ──────────────────────────────────────── */
  --iw-sh-sm: 0 2px 8px rgba(0, 0, 0, 0.20);
  --iw-sh-md: 0 6px 24px rgba(0, 0, 0, 0.35);
  --iw-sh-lg: 0 20px 50px rgba(0, 0, 0, 0.50);
  --iw-sh-glow: 0 0 28px var(--iw-gold-glow);

  /* ── Layout ───────────────────────────────────────── */
  --iw-sidebar-w:        260px;
  --iw-sidebar-w-collapsed: 64px;
  --iw-topbar-h:         60px;
  --iw-content-max:      1600px;
  --iw-z-sidebar:  100;
  --iw-z-topbar:   200;
  --iw-z-overlay:  900;
  --iw-z-modal:    1000;
  --iw-z-toast:    1100;

  /* ── Motion ───────────────────────────────────────── */
  --iw-ease:    cubic-bezier(.4, 0, .2, 1);
  --iw-dur-fast: 0.15s;
  --iw-dur-mid:  0.25s;
  --iw-dur-slow: 0.40s;

  /* ── Density (compact / comfort) ──────────────────── */
  --iw-density: 1;  /* compact = 0.85, comfort = 1.15 */
}

/* Light theme override */
[data-iw-theme="light"] {
  --iw-bg:          #f8fafc;
  --iw-bg-1:        #ffffff;
  --iw-bg-2:        #f1f5f9;
  --iw-bg-3:        #e2e8f0;
  --iw-surface:     rgba(15, 23, 42, 0.04);
  --iw-surface-2:   rgba(15, 23, 42, 0.07);
  --iw-text:        #0f172a;
  --iw-text-2:      #475569;
  --iw-text-3:      #64748b;
  --iw-text-muted:  #94a3b8;
  --iw-text-on-gold:#0f172a;
  --iw-border:      rgba(212, 175, 55, 0.30);
  --iw-border-2:    rgba(212, 175, 55, 0.50);
  --iw-border-soft: rgba(15, 23, 42, 0.10);
  --iw-overlay:     rgba(248, 250, 252, 0.85);
  --iw-gold-glow:   rgba(212, 175, 55, 0.22);
  --iw-sh-sm:       0 1px 4px rgba(0, 0, 0, 0.08);
  --iw-sh-md:       0 4px 16px rgba(0, 0, 0, 0.10);
  --iw-sh-lg:       0 12px 40px rgba(0, 0, 0, 0.15);
  --iw-sh-glow:     0 0 20px rgba(212, 175, 55, 0.18);
}

/* Density variants */
[data-iw-density="compact"] { --iw-density: 0.85; }
[data-iw-density="comfort"] { --iw-density: 1.15; }

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