:root {
  /* Brand */
  --orange: #e9530d;
  --orange-hover: #c44109;
  --orange-dim: rgba(233, 83, 13, 0.15);

  /* Background layers — dark (default) */
  --bg-base: #111110;
  --bg-surface: #1c1b1a;
  --bg-card: #242322;
  --bg-card-hover: #2c2b2a;
  --bg-input: #1c1b1a;
  --bg-overlay: rgba(0, 0, 0, 0.7);

  /* Borders */
  --border: #2e2c2b;
  --border-focus: #e9530d;

  /* Text */
  --text-primary: #f5f0ec;
  --text-secondary: #a09890;
  --text-muted: #6b6560;

  /* Avatar sans photo */
  --avatar-placeholder-bg: #2e2d2c;
  --avatar-placeholder-fg: #7a746e;

  /* Status */
  --green: #22c55e;
  --green-hover: #15803d;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-hover: #991b1b;
  --red-dim: rgba(239, 68, 68, 0.15);
  --grey: #78716c;
  --grey-hover: #44403c;
  --teal: #0d9488;
  --teal-hover: #0f766e;
  --yellow: #f59e0b;

  /* Layout */
  --topbar-height: 52px;
  --sidebar-width: 260px;
  --right-panel-width: 320px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition: 0.18s ease;

  /* Font — system-ui uniquement (pas de swap réseau) */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ─── Light theme ───────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-base: #f4f2ef;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f7f5;
  --bg-input: #f4f2ef;
  --bg-overlay: rgba(0, 0, 0, 0.35);

  --border: #e2ddd8;
  --border-focus: #e9530d;

  --text-primary: #1a1816;
  --text-secondary: #6b6560;
  --text-muted: #a09890;

  --avatar-placeholder-bg: #ebe8e4;
  --avatar-placeholder-fg: #8a847c;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { all: unset; cursor: pointer; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey); }
