/*
 * Thème DBHL : jetons de couleur sémantiques.
 * - Par défaut « épuré clair » : neutres très légers, bleu DBHL, touches d'orange DBHL.
 * - Sombre « premium » : selon le système, ou forcé par data-theme="dark" sur <html>.
 * - Classe theme-warm sur <html> : « chaleureux et arrondi » (espaces vus par les clients), clair et sombre.
 */
@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/fonts/jakarta.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: light;
  --dbhl-blue: #08459f;
  --dbhl-orange: #ef7106;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f4f4f5;
  --text: #18181b;
  --muted: #5f5f6a;
  --subtle: #71717a;
  --border: #ececef;
  --border-strong: #d9d9de;
  --brand: #08459f;
  --brand-hover: #063881;
  --brand-soft: #ebf1fa;
  --brand-text: #08459f;
  --on-brand: #ffffff;
  --accent: #ef7106;
  --accent-soft: #fff1e5;
  --accent-text: #a14a00;
  --ok: #15803d;
  --ok-soft: #e3f6e9;
  --ok-text: #166534;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --danger-text: #b91c1c;
  --violet-soft: #f1edfd;
  --violet-text: #5b21b6;
  --warn-bg: #fffaf0;
  --warn-border: #f5c98a;
  --warn-text: #7a3a00;
  --sidebar-bg: #ffffff;
  --note-bg: #fffcf5;
  --scrollbar: #d9d9de;
  --hero-from: #08459f;
  --hero-to: #08459f;
  --shadow-sm: 0 1px 2px rgb(24 24 27 / 0.04);
  --shadow: 0 1px 3px rgb(24 24 27 / 0.06), 0 1px 2px rgb(24 24 27 / 0.03);
  --shadow-lg: 0 18px 44px rgb(24 24 27 / 0.14), 0 2px 6px rgb(24 24 27 / 0.05);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-btn: 8px;
  --topbar-h: 56px;
  --focus: 0 0 0 3px rgb(8 69 159 / 0.25);
  --ease: 0.15s ease;
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01';
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Sombre « premium » : graphite, bleu DBHL éclairci, orange lumineux. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0a0b0f;
    --surface: #0f1117;
    --surface-2: #12141b;
    --surface-3: #181b24;
    --text: #e7e9ee;
    --muted: #a0a5b3;
    --subtle: #7d8292;
    --border: #1d2029;
    --border-strong: #2c303c;
    --brand: #6f9df5;
    --brand-hover: #92b5f8;
    --brand-soft: #142039;
    --brand-text: #a8c5fa;
    --on-brand: #0a0b0f;
    --accent: #ff8a3d;
    --accent-soft: #2f1d0e;
    --accent-text: #ffb07a;
    --ok: #4ade80;
    --ok-soft: #10261a;
    --ok-text: #86efac;
    --danger: #f87171;
    --danger-soft: #2e1416;
    --danger-text: #fca5a5;
    --violet-soft: #221d3d;
    --violet-text: #c4b5fd;
    --warn-bg: #241a0c;
    --warn-border: #6b4615;
    --warn-text: #fdd8a7;
    --sidebar-bg: #0a0b0f;
    --note-bg: #1a1812;
    --scrollbar: #2c303c;
    --hero-from: #6f9df5;
    --hero-to: #6f9df5;
    --shadow-sm: none;
    --shadow: 0 1px 3px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 18px 44px rgb(0 0 0 / 0.6);
    --focus: 0 0 0 3px rgb(111 157 245 / 0.35);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0a0b0f;
  --surface: #0f1117;
  --surface-2: #12141b;
  --surface-3: #181b24;
  --text: #e7e9ee;
  --muted: #a0a5b3;
  --subtle: #7d8292;
  --border: #1d2029;
  --border-strong: #2c303c;
  --brand: #6f9df5;
  --brand-hover: #92b5f8;
  --brand-soft: #142039;
  --brand-text: #a8c5fa;
  --on-brand: #0a0b0f;
  --accent: #ff8a3d;
  --accent-soft: #2f1d0e;
  --accent-text: #ffb07a;
  --ok: #4ade80;
  --ok-soft: #10261a;
  --ok-text: #86efac;
  --danger: #f87171;
  --danger-soft: #2e1416;
  --danger-text: #fca5a5;
  --violet-soft: #221d3d;
  --violet-text: #c4b5fd;
  --warn-bg: #241a0c;
  --warn-border: #6b4615;
  --warn-text: #fdd8a7;
  --sidebar-bg: #0a0b0f;
  --note-bg: #1a1812;
  --scrollbar: #2c303c;
  --hero-from: #6f9df5;
  --hero-to: #6f9df5;
  --shadow-sm: none;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 18px 44px rgb(0 0 0 / 0.6);
  --focus: 0 0 0 3px rgb(111 157 245 / 0.35);
}

/* Chaleureux et arrondi (espaces clients) : fond crème, grands arrondis, Plus Jakarta Sans. */
:root.theme-warm {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --surface-3: #efebe2;
  --text: #2b2a26;
  --muted: #69655c;
  --subtle: #7a756b;
  --border: #e9e4d9;
  --border-strong: #d8d1c2;
  --brand-soft: #e7eef9;
  --violet-soft: #efeafb;
  --note-bg: #fffbf2;
  --shadow-sm: 0 1px 2px rgb(60 50 30 / 0.05);
  --shadow: 0 1px 2px rgb(60 50 30 / 0.06), 0 6px 20px rgb(60 50 30 / 0.06);
  --shadow-lg: 0 20px 48px rgb(60 50 30 / 0.16);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-btn: 999px;
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-feature-settings: normal;
}
@media (prefers-color-scheme: dark) {
  :root.theme-warm:not([data-theme='light']) {
    --bg: #15140f;
    --surface: #1f1d17;
    --surface-2: #24221b;
    --surface-3: #2d2a22;
    --text: #f0ece2;
    --muted: #b6af9f;
    --subtle: #9a9384;
    --border: #322f26;
    --border-strong: #454033;
    --brand-soft: #1b2741;
    --violet-soft: #26213a;
    --note-bg: #22201a;
    --shadow-sm: none;
    --shadow: 0 1px 3px rgb(0 0 0 / 0.35);
  }
}
:root.theme-warm[data-theme='dark'] {
  --bg: #15140f;
  --surface: #1f1d17;
  --surface-2: #24221b;
  --surface-3: #2d2a22;
  --text: #f0ece2;
  --muted: #b6af9f;
  --subtle: #9a9384;
  --border: #322f26;
  --border-strong: #454033;
  --brand-soft: #1b2741;
  --violet-soft: #26213a;
  --note-bg: #22201a;
  --shadow-sm: none;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.35);
}

body { font-family: var(--font); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 999px; border: 2px solid var(--bg); }
