/* ═══════════════════════════════════════════════════════════
   TOKENS — Design system "Antigravity"
   Fond profond teinté bleu, accents électriques, verre dépoli.
   Toutes les pages consomment ces variables (styles inline compris).
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Couleurs — Mode clair (raffiné, neutre bleuté) */
  --bg: #f3f4f8;
  --bg-secondary: #eceef4;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --border: #e5e8f0;
  --border-strong: #d5dae6;
  --text: #14161d;
  --text-secondary: #64708a;
  --accent: #4c6fff;
  --accent-dark: #3a58e8;
  --accent-2: #8b5cf6;
  --accent-light: rgba(76, 111, 255, 0.09);
  --accent-gradient: linear-gradient(135deg, #4c6fff 0%, #8b5cf6 100%);
  --success: #14a06b;
  --success-light: rgba(20, 160, 107, 0.1);
  --warning: #ea8a1a;
  --warning-light: rgba(234, 138, 26, 0.12);
  --error: #e5484d;
  --error-light: rgba(229, 72, 77, 0.1);
  --badge-bg: #e5484d;
  --badge-text: #ffffff;
  --bg-light: #eceef4;
  --sidebar-bg: #f8f9fd;

  /* Verre dépoli (topbar / navbar / panneaux flottants) */
  --glass: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(20, 22, 29, 0.07);

  /* Halos lumineux */
  --glow-accent: 0 4px 20px rgba(76, 111, 255, 0.35);
  --glow-accent-lg: 0 8px 32px rgba(76, 111, 255, 0.45);

  /* Typographie */
  --font: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-lg: 17px;
  --fs-xl: 21px;
  --fs-2xl: 26px;
  --fs-3xl: 32px;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Espacements */
  --gap: 12px;
  --pad: 16px;
  --pad-lg: 24px;

  /* Coins */
  --radius: 16px;
  --radius-btn: 11px;
  --radius-pill: 999px;
  --radius-icon: 10px;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgba(15, 20, 40, 0.05);
  --shadow: 0 4px 14px rgba(15, 20, 40, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 20, 40, 0.12);
  --shadow-xl: 0 18px 50px rgba(15, 20, 40, 0.18);

  /* Navigation */
  --navbar-h: 64px;
  --sidebar-w: 68px;
  --sidebar-w-open: 250px;
  --topbar-h: 56px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ═══ Échelle mobile — resserre toute l'interface sur smartphone ═══
   Les pages utilisent ces variables partout (styles inline compris),
   donc textes / paddings / espacements s'adaptent globalement ici. */
@media (max-width: 480px) {
  :root {
    --fs-base: 14px;
    --fs-lg: 15px;
    --fs-xl: 17px;
    --fs-2xl: 21px;
    --fs-3xl: 26px;

    --gap: 10px;
    --pad: 12px;
    --pad-lg: 14px;

    --radius: 14px;
    --topbar-h: 52px;
  }
}

/* ═══ Mode sombre — thème vitrine "Antigravity" ═══ */
[data-theme="dark"] {
  --bg: #0a0c11;
  --bg-secondary: #0e1118;
  --surface: #12151d;
  --surface-2: #181c27;
  --border: rgba(148, 163, 200, 0.13);
  --border-strong: rgba(148, 163, 200, 0.24);
  --text: #edeff4;
  --text-secondary: #8b93a7;
  --accent: #6d8dff;
  --accent-dark: #5573f3;
  --accent-2: #a78bfa;
  --accent-light: rgba(109, 141, 255, 0.13);
  --accent-gradient: linear-gradient(135deg, #5b7cfa 0%, #9a6bff 100%);
  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.12);
  --error: #f87171;
  --error-light: rgba(248, 113, 113, 0.12);
  --bg-light: #181c27;
  --sidebar-bg: #0d1017;

  --glass: rgba(15, 18, 26, 0.72);
  --glass-border: rgba(148, 163, 200, 0.12);

  --glow-accent: 0 4px 22px rgba(91, 124, 250, 0.45);
  --glow-accent-lg: 0 8px 36px rgba(91, 124, 250, 0.55);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 18px 50px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c11;
    --bg-secondary: #0e1118;
    --surface: #12151d;
    --surface-2: #181c27;
    --border: rgba(148, 163, 200, 0.13);
    --border-strong: rgba(148, 163, 200, 0.24);
    --text: #edeff4;
    --text-secondary: #8b93a7;
    --accent: #6d8dff;
    --accent-dark: #5573f3;
    --accent-2: #a78bfa;
    --accent-light: rgba(109, 141, 255, 0.13);
    --accent-gradient: linear-gradient(135deg, #5b7cfa 0%, #9a6bff 100%);
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.12);
    --error: #f87171;
    --error-light: rgba(248, 113, 113, 0.12);
    --bg-light: #181c27;
    --sidebar-bg: #0d1017;

    --glass: rgba(15, 18, 26, 0.72);
    --glass-border: rgba(148, 163, 200, 0.12);

    --glow-accent: 0 4px 22px rgba(91, 124, 250, 0.45);
    --glow-accent-lg: 0 8px 36px rgba(91, 124, 250, 0.55);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 18px 50px rgba(0, 0, 0, 0.55);
  }
}
