/* ══════════════════════════════════════════════════════
   Design tokens — Quantum Panel
   ══════════════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg: #0a0b0f;
  --surface: #12141a;
  --surface-2: #15171f;
  --elevated: #1a1d26;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(0, 212, 255, 0.2);
  --hover: rgba(255, 255, 255, 0.03);

  /* Texte */
  --text: #e8eaed;
  --text-2: #8b9099;
  --text-3: #5a5f6b;

  /* Accents (usage parcimonieux) */
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --success: #00c853;
  --success-dim: rgba(0, 200, 83, 0.12);
  --danger: #ff3d57;
  --danger-dim: rgba(255, 61, 87, 0.12);
  --warning: #f5a623;
  --warning-dim: rgba(245, 166, 35, 0.12);

  /* Typo */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Espacement (échelle 4) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  /* Rayons */
  --r-card: 10px;
  --r-btn: 8px;
  --r-input: 6px;

  /* Layout */
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 56px;

  /* Divers */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6);
  --t-fast: 150ms ease;
  --t-slow: 200ms ease;
}

[data-density="compact"] {
  --pad-card: 14px;
  --gap-card: 12px;
}

[data-font="large"] {
  font-size: 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 13px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

code, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.hidden { display: none !important; }
.r { text-align: right; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.flat { color: var(--text-2); }
.muted { color: var(--text-2); font-size: 12px; }
.hint { color: var(--text-3); font-size: 11.5px; line-height: 1.5; }
.lbl {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
}

.row { display: flex; }
.col { display: flex; flex-direction: column; gap: var(--gap-card, 16px); }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.end { justify-content: flex-end; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

/* Scrollbars discrètes (visibles au survol) */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: rgba(255,255,255,0.14) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
*:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); }

::selection { background: rgba(0, 212, 255, 0.25); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
