/* =========================================================
   styles.css — jetons de design, base typographique, utilitaires
   ========================================================= */
:root {
  /* Couleurs */
  --sidebar-bg: #0f1b2d;
  --sidebar-text: #b9c4d6;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active: rgba(77, 140, 255, .16);
  --sidebar-active-text: #ffffff;

  --primary: #1d5fd1;
  --primary-dark: #174ea9;
  --primary-light: #e8f0fd;
  --primary-ring: rgba(29, 95, 209, .18);

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #dfe4ea;
  --border-strong: #c7cfda;
  --text: #1c2430;
  --muted: #66748a;
  --subtle: #97a3b5;

  --success: #1d8148;
  --success-bg: #e4f4ea;
  --warning: #b8640a;
  --warning-bg: #fdf0dc;
  --danger: #cf3434;
  --danger-bg: #fde8e8;
  --info: #4f46c8;
  --info-bg: #ecebfb;
  --neutral: #4b5768;
  --neutral-bg: #eef1f5;

  /* Formes */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .2);

  /* Mise en page */
  --sidebar-w: 248px;
  --topbar-h: 56px;

  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.ic-sm { width: 14px; height: 14px; }
.ic-lg { width: 22px; height: 22px; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 1000; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Utilitaires */
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 12px; }
.xsmall { font-size: 11px; }
.strong { font-weight: 700; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.flex { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.w-100 { width: 100%; }

.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main-side { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.span-2 { grid-column: span 2; }
