/* Base commune au site et au dashboard : polices, couleurs, boutons, formulaires. */
@font-face { font-family: "Sonora Text"; src: url("/fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sonora Text"; src: url("/fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Sonora Text"; src: url("/fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Sonora Display"; src: url("/fonts/display-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sonora Display"; src: url("/fonts/display-800.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --ink-1000: #030712;
  --ink-950: #050b1a;
  --ink-900: #070d1f;
  --ink-850: #0a1228;
  --ink-800: #0d1735;
  --ink-700: #13204a;
  --ink-600: #1b2c5e;
  --line: rgba(150, 180, 255, 0.14);
  --line-strong: rgba(150, 180, 255, 0.28);
  --text: #eaf2ff;
  --muted: #98abd0;
  --faint: #6f84ad;
  --blue: #0a84ff;
  --blue-hi: #46a5ff;
  --cyan: #00bde0;
  --teal: #00d6b4;
  --grad: linear-gradient(135deg, #0a84ff 0%, #00bde0 58%, #00d6b4 100%);
  --danger: #ff6b7a;
  --warn: #ffb454;
  --ok: #2ee6a6;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --font-text: "Sonora Text", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sonora Display", "Sonora Text", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink-950);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "kern", "calt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.08; letter-spacing: -0.028em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--blue-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #8cc6ff; }
img, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--font-mono); font-size: 0.92em; }

:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1160px, 100% - 48px); margin-inline: auto; }

/* Icônes (sprite SVG) */
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: currentColor; stroke: none; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s, filter 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn-primary { background: var(--grad); color: #04101f; }
.btn-primary:hover { color: #04101f; filter: brightness(1.08); }
.btn-ghost { background: rgba(150, 180, 255, 0.08); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(150, 180, 255, 0.16); color: var(--text); }
.btn-quiet { background: transparent; color: var(--muted); border-color: transparent; }
.btn-quiet:hover { background: rgba(150, 180, 255, 0.1); color: var(--text); }
.btn-danger { background: rgba(255, 107, 122, 0.12); border-color: rgba(255, 107, 122, 0.4); color: #ff9aa5; }
.btn-danger:hover { background: rgba(255, 107, 122, 0.22); color: #ffb3bb; }
.btn-light { background: #fff; color: #06326b; }
.btn-light:hover { background: #eaf4ff; color: #06326b; }
.btn-outline { border-color: rgba(255, 255, 255, 0.7); color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 0.88rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: rgba(150, 180, 255, 0.12); color: var(--text); }
.icon-btn[aria-pressed="true"], .icon-btn.is-on { color: var(--teal); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; background: transparent; color: var(--muted); }

/* Formulaires */
.field { display: grid; gap: 6px; }
.field > span, .field-label { font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.input, .select {
  width: 100%; min-height: 44px; padding: 0 14px;
  background: var(--ink-900); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--faint); }
.input:focus, .select:focus { outline: none; border-color: var(--blue-hi); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25); }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 19px, calc(100% - 14px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.select option { background: var(--ink-900); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.03em; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 10px; }

.avatar, .avatar-xs { border-radius: 50%; object-fit: cover; background: var(--ink-700); }
.flash { margin: 16px auto 0; width: min(1160px, 100% - 48px); padding: 12px 16px; border-radius: var(--r-md); background: rgba(255, 107, 122, 0.12); border: 1px solid rgba(255, 107, 122, 0.35); color: #ffc0c7; display: flex; gap: 10px; align-items: center; }
.flash-warn { background: rgba(255, 180, 84, 0.1); border-color: rgba(255, 180, 84, 0.35); color: #ffd9a6; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
