/* Naëlya, maquette indicative. Socle commun : police, jetons, contrôles, toast. */
@font-face {
  font-family: "Atkinson";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --line: #f6c400;          /* jaune de ligne */
  --line-deep: #d9a900;
  --line-soft: #fff4c2;
  --ink: #16181a;
  --ink-2: #3d4145;
  --muted: #676d72;         /* texte secondaire, 5,3:1 sur blanc */
  --passed: #b9bec2;        /* station passée */
  --rule: #e3e6e8;
  --ground: #f4f5f6;
  --paper: #ffffff;
  --danger: #b4321c;
  --ok: #1d6b45;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --shadow-card: 0 1px 2px rgba(22, 24, 26, 0.06), 0 8px 24px -12px rgba(22, 24, 26, 0.18);
  --font: "Atkinson", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--line); color: var(--ink); }
input, textarea, select { caret-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); 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; }

/* Boutons : appui à 0,97 (retour immédiat), survol réservé aux pointeurs fins */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 16px;
  background: var(--ink); color: #fff;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, opacity 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn-line { background: var(--line); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-quiet { background: var(--ground); color: var(--ink); }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not([disabled]) { background: #000; }
  .btn-line:hover:not([disabled]) { background: var(--line-deep); }
  .btn-ghost:hover:not([disabled]), .btn-quiet:hover:not([disabled]) { background: var(--rule); }
}

.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--danger); min-height: 18px; }
.input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1.5px solid var(--passed); border-radius: var(--r-s);
  background: var(--paper);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input::placeholder { color: #6b7075; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--line-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.45; }

/* Interrupteur */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--passed);
  transition: background-color 180ms ease;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 220ms var(--ease-out);
}
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Toast, à la Sonner : 400 ms ease, entre et sort par le bas */
.toast-zone { position: absolute; left: 0; right: 0; bottom: 96px; display: grid; justify-items: center; pointer-events: none; z-index: 60; }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
  transition: transform 400ms ease, opacity 400ms ease;
}
.toast[data-state="hidden"] { transform: translateY(calc(100% + 24px)); opacity: 0; }
.toast svg { flex: none; color: var(--line); }

.wordmark { font-weight: 800; letter-spacing: -0.03em; font-size: 24px; display: inline-flex; align-items: center; gap: 8px; }
.wordmark svg { width: 1em; height: 1em; }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Mouvement réduit : on garde les fondus et les couleurs, on retire les déplacements */
@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
  .switch span::after { transition: none; }
  .toast { transition: opacity 200ms ease; }
  .toast[data-state="hidden"] { transform: none; }
}
