/* Radar — jetons de design et socle. Thème clair uniquement (contraste maîtrisé, pas d'assombrissement forcé). */
:root {
  color-scheme: only light;
  --toile: #f5f5f7;
  --surface: #ffffff;
  --encre: #101010;
  --encre-2: rgba(16, 16, 16, 0.66);
  --encre-3: rgba(16, 16, 16, 0.4);
  --trait: rgba(16, 16, 16, 0.12);
  --trait-fort: rgba(16, 16, 16, 0.22);
  --voile: rgba(16, 16, 16, 0.05);
  --voile-2: rgba(16, 16, 16, 0.09);
  --action: #0071e3;
  --action-survol: #0064c9;
  --lien: #0066cc;
  --action-fond: #e8f2fe;
  --theatre: #101010;
  --theatre-2: #232325;
  --sur-theatre: #ffffff;
  --sur-theatre-2: rgba(255, 255, 255, 0.74);
  --trait-theatre: rgba(255, 255, 255, 0.16);
  --ambre: #ffb250;
  --ambre-2: #fec77c;
  --ambre-encre: #7a4300;
  --vert: #17713b;
  --vert-fond: #e4f5ea;
  --rouge: #b9251a;
  --rouge-fond: #fdebe9;
  --orange: #8f4b00;
  --orange-fond: #fff0d9;
  --rayon-scene: 32px;
  --rayon-carte: 20px;
  --rayon-controle: 12px;
  --ombre-verre: 0 0 0 1px rgba(16, 16, 16, 0.06), 0 14px 40px rgba(16, 16, 16, 0.1);
  --police: system-ui, -apple-system, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --courbe: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: clip; background: var(--toile); color: var(--encre);
  font: 400 15px/22px var(--police); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--lien); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.chiffres { font-variant-numeric: tabular-nums; }
.visuel-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- typographie ---------- */
.titre-ecran { font: 700 30px/34px var(--police); letter-spacing: 0.01em; text-wrap: balance; }
.titre-2 { font: 700 20px/26px var(--police); letter-spacing: 0; }
.chapeau { font: 400 17px/24px var(--police); color: var(--encre-2); letter-spacing: -0.012em; }
.etiquette { font: 600 13px/16px var(--police); color: var(--encre-2); letter-spacing: 0.01em; }
.petit { font-size: 13px; line-height: 18px; color: var(--encre-2); }
.fort { font-weight: 600; }

/* ---------- verre (barres flottantes) ---------- */
.verre {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: var(--ombre-verre);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .verre { background: rgba(255, 255, 255, 0.97); }
}

/* ---------- boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 9999px; font: 600 15px/1 var(--police); letter-spacing: -0.01em; white-space: nowrap;
  background: var(--voile-2); color: var(--encre); transition: background 0.15s var(--courbe), color 0.15s var(--courbe), transform 0.15s var(--courbe);
}
.bouton:hover { background: rgba(16, 16, 16, 0.14); text-decoration: none; }
.bouton:active { transform: scale(0.98); }
.bouton[disabled] { opacity: 0.45; cursor: not-allowed; }
.bouton.principal { background: var(--action); color: #fff; }
.bouton.principal:hover { background: var(--action-survol); }
.bouton.contour { background: transparent; color: var(--lien); box-shadow: 0 0 0 1.5px var(--action) inset; }
.bouton.contour:hover { background: var(--action-fond); }
.bouton.grand { height: 48px; padding: 0 26px; font-size: 16px; }
.bouton.compact { height: 32px; padding: 0 14px; font-size: 14px; }
.bouton.icone { width: 40px; padding: 0; }
.bouton.compact.icone { width: 32px; }
.bouton.clair { background: rgba(255, 255, 255, 0.14); color: #fff; }
.bouton.clair:hover { background: rgba(255, 255, 255, 0.24); }
.bouton.danger { background: var(--rouge-fond); color: var(--rouge); }
.bouton.danger:hover { background: #fbdad6; }
.bouton.succes { background: var(--vert); color: #fff; }
.bouton.succes:hover { background: #125e30; }
.bouton svg { flex: none; }

/* ---------- champs ---------- */
.champ { display: grid; gap: 6px; }
.champ > span { font: 600 13px/16px var(--police); color: var(--encre-2); }
.saisie, .champ input, .champ select, .champ textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--rayon-controle); background: var(--surface);
  border: 1px solid var(--trait-fort); color: var(--encre); transition: border-color 0.15s var(--courbe), box-shadow 0.15s var(--courbe);
}
.champ textarea { min-height: 96px; resize: vertical; line-height: 22px; }
.saisie:focus, .champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2); }
.saisie::placeholder, .champ input::placeholder, .champ textarea::placeholder { color: rgba(16, 16, 16, 0.5); }

/* ---------- pastilles ---------- */
.pastille {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 9999px;
  font: 600 13px/1 var(--police); background: var(--voile-2); color: var(--encre); white-space: nowrap;
}
.pastille.rouge { background: var(--rouge-fond); color: var(--rouge); }
.pastille.orange { background: var(--orange-fond); color: var(--orange); }
.pastille.vert { background: var(--vert-fond); color: var(--vert); }
.pastille.bleu { background: var(--action-fond); color: #004f9f; }
.pastille.sombre { background: var(--encre); color: #fff; }
.pastille.sur-theatre { background: rgba(255, 255, 255, 0.14); color: #fff; }
.point { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- cartes ---------- */
.carte { background: var(--surface); border-radius: var(--rayon-carte); padding: 24px; }
.carte.serree { padding: 16px; }
.separateur { height: 1px; background: var(--trait); border: 0; margin: 0; }

/* ---------- messages ---------- */
.zone-toasts { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 90; display: grid; gap: 10px; justify-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 9999px; max-width: min(92vw, 640px);
  background: var(--theatre); color: #fff; font: 500 15px/20px var(--police); box-shadow: 0 14px 40px rgba(16, 16, 16, 0.28);
  animation: monter 0.28s var(--courbe) both;
}
.toast.erreur { background: var(--rouge); }
.toast button { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@keyframes monter { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes apparaitre { from { opacity: 0; } to { opacity: 1; } }
.alerte { padding: 12px 16px; border-radius: var(--rayon-controle); background: var(--rouge-fond); color: var(--rouge); font-weight: 500; }
.squelette { border-radius: 12px; background: linear-gradient(90deg, var(--voile) 25%, var(--voile-2) 37%, var(--voile) 63%); background-size: 400% 100%; animation: balayage 1.3s ease infinite; }
@keyframes balayage { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
