/* Chaise Bleue Scooters — fondations : polices, couleurs, conteneur des affiches, pièces communes. */
@font-face { font-family: "Rozha One"; src: url("../fonts/rozha-one-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Proza Libre"; src: url("../fonts/proza-libre-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Proza Libre"; src: url("../fonts/proza-libre-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Proza Libre"; src: url("../fonts/proza-libre-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --soleil: #F6C21A; --chaise: #1553A0; --tomate: #BF2B1B; --nuit: #0A2A52; --blanc: #FFFFFF; --second: #3D5577;
  --rozha: "Rozha One", "Georgia", serif;
  --proza: "Proza Libre", "Segoe UI", system-ui, sans-serif;
  --marge: clamp(20px, 5vw, 64px);
  --gout: clamp(12px, 1.6vw, 32px);
  --barre: 0px;
  --bas: 32px;
  --haut: 32px;
  color-scheme: light;
}
@media (max-width: 1023px) { :root { --barre: calc(60px + env(safe-area-inset-bottom)); --bas: calc(var(--barre) + 16px); --haut: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--nuit); color: var(--nuit); font: 400 18px/1.45 var(--proza); font-synthesis: none; -webkit-font-smoothing: antialiased; }
@media (max-width: 1023px) { body { font-size: 16px; } }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
sup { font-size: .6em; line-height: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.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(--nuit); color: var(--soleil); font-weight: 600; text-decoration: none;
  transform: translateY(calc(-100% - 60px)); }
.evitement:focus { transform: none; outline: 3px solid var(--soleil); outline-offset: -6px; }

/* La fenêtre ne défile pas : un seul conteneur, accroché affiche par affiche. */
html.js, html.js body { height: 100%; overflow: hidden; }
.js .affiches {
  height: calc(100svh - var(--demobar-offset, 0px)); overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; overscroll-behavior: none; scrollbar-width: none; outline: none;
}
.js .affiches::-webkit-scrollbar { display: none; }
.affiche { position: relative; isolation: isolate; }
.js .affiche { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.affiche:nth-child(1) { z-index: 1; } .affiche:nth-child(2) { z-index: 2; } .affiche:nth-child(3) { z-index: 3; }
.affiche:nth-child(4) { z-index: 4; } .affiche:nth-child(5) { z-index: 5; } .affiche:nth-child(6) { z-index: 6; }
@media (max-height: 480px) and (orientation: landscape) {
  .js .affiches { scroll-snap-type: y proximity; }
  .js .affiche { height: auto; min-height: 100%; }
}

/* Grille : 12 colonnes, 4 au téléphone. */
.recto, .verso {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gout);
  padding: var(--haut) var(--marge) var(--bas);
  padding-left: max(var(--marge), env(safe-area-inset-left)); padding-right: max(var(--marge), env(safe-area-inset-right));
}
@media (max-width: 1023px) { .recto, .verso { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Pièces communes des affiches */
.soleil, .lune { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.titre-ajuste { display: inline-block; white-space: nowrap; }
.slogan { font: 400 clamp(1.5rem, 2.6vw, 2.6rem)/1.05 var(--rozha); }
.chiffre-cle { font: 400 clamp(2.6rem, 7vw, 7.5rem)/.9 var(--rozha); margin-bottom: .12em; }
.chiffres p:not(.chiffre-cle) { font-weight: 600; }
.temps { font-variant-numeric: proportional-nums; }

/* Coin corné : bouton « Au dos ». */
.coin {
  position: absolute; z-index: 5; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 14px;
  min-height: 88px; padding: 0 0 18px 18px; border: 0; background: none; color: inherit; font-weight: 600; font-size: 16px;
}
.coin__mot { padding: 6px 10px; white-space: nowrap; background: var(--fond, var(--nuit)); }
.a1 .recto, .a6 .recto { --fond: var(--soleil); } .a2 .recto { --fond: var(--chaise); } .a3 .recto { --fond: var(--tomate); } .a4 .recto { --fond: var(--nuit); } .a5 .recto { --fond: var(--blanc); }
.coin__pli { position: relative; width: 88px; height: 88px; margin-bottom: -18px; flex: none; background: var(--nuit); clip-path: polygon(100% 0, 100% 100%, 0 100%, 0 0); }
.coin__pli { background: linear-gradient(to top left, var(--nuit) 50%, transparent 50%); }
.coin__pli::before { content: ""; position: absolute; inset: 0; background: var(--blanc); clip-path: polygon(0 100%, 100% 0, 0 0); box-shadow: none; }
.coin__pli::after { content: ""; position: absolute; inset: 0; background: rgb(10 42 82 / .28); clip-path: polygon(0 100%, 100% 0, 100% 6%, 6% 100%); }
.coin:hover .coin__pli, .coin:focus-visible .coin__pli { transform: scale(1.08); transform-origin: 100% 100%; }
.coin__pli { transition: transform .2s; }
.coin:active .coin__pli { transform: scale(.94); }
.coin:focus-visible { outline-offset: -6px; }
@media (max-width: 1023px) {
  .coin { bottom: var(--barre); min-height: 64px; padding: 0 0 14px 14px; font-size: 15px; }
  .coin__pli { width: 64px; height: 64px; margin-bottom: -14px; }
}
/* Écran court : le coin ferme la feuille au lieu de couvrir son contenu. */
@media (max-width: 1023px) and (max-height: 760px) {
  .coin { position: relative; grid-column: 1 / -1; justify-self: end; bottom: auto; margin: 12px calc(-1 * var(--marge)) 0 0; }
  .a2 .recto, .a4 .recto { padding-bottom: var(--barre); }
}

/* Bouton « Retourner » des dos */
.retourner {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 14px; border: 2px solid var(--nuit);
  border-radius: 2px; background: var(--blanc); color: var(--nuit); font-weight: 600; font-size: 16px;
}
.retourner svg { width: 20px; height: 20px; transform: rotate(90deg); }
.retourner:hover { background: var(--nuit); color: var(--blanc); }

/* Cases rectangulaires (permis, saisons) */
.case { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; font-weight: 600; font-size: 16px; line-height: 1.2; }
.case input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.case span::before {
  content: ""; flex: none; display: inline-block; width: 24px; height: 24px; margin-right: 12px; vertical-align: -6px;
  border: 2px solid currentColor; background: transparent;
  background-image: linear-gradient(currentColor, currentColor); background-size: 0 0; background-position: center; background-repeat: no-repeat;
  transition: background-size .12s;
}
.case span { display: inline-block; padding-left: 36px; text-indent: -36px; }
.case input:checked + span::before { background-size: 12px 12px; }
.case input:focus-visible + span { outline: 3px solid currentColor; outline-offset: 4px; }

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

/* Sans script : les affiches se lisent à la suite, dos sous les rectos. */
.no-js .affiche { min-height: 100vh; }
.no-js .verso { border-top: 2px solid var(--nuit); background: var(--blanc); }
.no-js .coin, .no-js .retourner, .no-js .pastille, .no-js .pilote, .no-js .barre, .no-js .mur { display: none !important; }
