/* Izoard Moto — jetons, polices, remise à zéro, typographie commune. */
@font-face { font-family: "New Title"; src: url("fonts/new-title.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Plein"; src: url("fonts/plein.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --sapin: #10241c;
  --panneau: #16301f;
  --neige: #f2f6f8;
  --jaune: #e8b21a;
  --lichen: #9db0a9;
  --rouge: #ff6a55;
  --filet: rgb(232 178 26 / .18);
  --filet-clair: rgb(242 246 248 / .1);
  --titre: "New Title", "Arial Narrow", sans-serif;
  --texte: "Plein", "Segoe UI", sans-serif;
  --barre-h: 60px;
  --rail-w: 28px;
  --bande-h: 64px;
  --bande-tot: calc(var(--bande-h) + env(safe-area-inset-bottom));
  --marge: clamp(16px, 4.4vw, 64px);
  --max: 1600px;
  --courbe: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (min-width: 768px) {
  :root { --barre-h: 72px; --rail-w: 64px; --bande-h: 72px; }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--sapin);
  scroll-padding-top: calc(var(--barre-h) + 16px);
  scroll-padding-bottom: calc(var(--bande-tot) + 16px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--sapin);
  color: var(--neige);
  font: 400 16px/1.5 var(--texte);
  font-kerning: normal;
  overflow-x: clip;
}
@media (min-width: 768px) { body { font-size: 17px; } }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

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

.visuel-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Chiffres d'instrument : aucune des deux polices n'a de chiffres tabulaires, chaque chiffre a sa case. */
.cases { display: inline-flex; align-items: baseline; }
.cases i { font-style: normal; display: inline-block; width: .28em; text-align: center; }
.cases i.esp { width: .12em; }

.evitement {
  position: fixed; z-index: 100; top: calc(var(--demobar-offset, 0px) + 8px); left: max(8px, env(safe-area-inset-left));
  min-height: 44px; padding: 12px 18px; background: var(--jaune); color: var(--sapin); font-weight: 700;
  text-decoration: none; transform: translateY(calc(-100% - 80px));
}
.evitement:focus { transform: none; outline: 2px solid var(--neige); outline-offset: 2px; }
main:focus { outline: none; }

main {
  padding-right: var(--rail-w);
  padding-bottom: var(--bande-tot);
}
.grille {
  width: min(100% - 2 * var(--marge), var(--max));
  margin-inline: auto;
}

/* Le bouton du panneau fléché : angles droits, pointe à droite. */
.panneau {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 30px 0 18px;
  background: var(--jaune); color: var(--sapin);
  font: 700 16px/1 var(--texte); text-decoration: none; border: 0;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
  transition: background-color .2s;
}
.panneau:focus-visible { outline: none; background: var(--neige); }
@media (hover: hover) { .panneau:hover { background: #f4c43a; } }
.panneau:active { transform: scale(.97); }
.panneau:disabled { background: rgb(157 176 169 / .35); color: rgb(242 246 248 / .7); cursor: not-allowed; transform: none; }

/* Cases carrées des mots-boutons et des choix. */
.case {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
  background: none; border: 0; color: var(--neige); font: 600 15.5px/1.2 var(--texte); text-align: left;
}
.case::before {
  content: ""; flex: none; width: 16px; height: 16px; border: 2px solid var(--lichen);
  background: transparent; transition: background-color .15s, border-color .15s;
}
.case[aria-pressed="true"]::before, .case[aria-checked="true"]::before, input:checked + .case::before {
  background: var(--jaune); border-color: var(--jaune); box-shadow: inset 0 0 0 2px var(--sapin);
}
input:focus-visible + .case { outline: 2px solid var(--jaune); outline-offset: 2px; }
label:has(> input:disabled) .case { opacity: .5; cursor: not-allowed; }
@media (hover: hover) { .case:hover::before { border-color: var(--neige); } }

.lien-fleche {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0;
  background: none; border: 0; color: var(--jaune); font: 700 16px/1.3 var(--texte); text-decoration: none; text-align: left;
}
.lien-fleche svg { flex: none; width: 22px; height: 12px; transition: transform .2s var(--courbe); }
@media (hover: hover) { .lien-fleche:hover svg { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
