/* Ratonneau Motos : jetons, grille, typographie, plaque d'émail commune, routage des pages. */

@font-face { font-family: "Yesteryear"; src: url("fonts/yesteryear-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rokkitt"; src: url("fonts/rokkitt-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bleu: #1740a6;
  --caisson: #0e2766;
  --levre: #081a47;
  --blanc: #fff;
  --tole: #e9edf4;
  --encre: #101521;
  --pale: #c7d6f5;
  --rouge: #b92c1a;
  --script: "Yesteryear", "Brush Script MT", cursive;
  --meca: "Rokkitt", Rockwell, "Roboto Slab", serif;
  --marge: clamp(20px, 5vw, 96px);
  --largeur: 1728px;
  --gout: clamp(16px, 1.8vw, 32px);
  --caisson-h: 72px;
  --comptoir-h: 64px;
  --bandeau-h: 40px;
  --utile: calc(100svh - var(--caisson-h) - var(--comptoir-h));
  --ressort: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (max-width: 767px) {
  :root { --caisson-h: 60px; --bandeau-h: 36px; }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bleu);
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--caisson-h) + 16px);
  scroll-padding-bottom: calc(var(--comptoir-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100svh;
  padding-bottom: calc(var(--comptoir-h) + env(safe-area-inset-bottom));
  background: var(--bleu);
  color: var(--blanc);
  font: 400 18px/1.45 var(--meca);
  font-kerning: normal;
  overflow-x: clip;
}
@media (max-width: 767px) { body { font-size: 17px; } }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 2px solid var(--blanc); outline-offset: 3px; }
.sur-blanc :focus-visible, .sur-blanc:focus-visible { outline-color: var(--bleu); }
main:focus, [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(--blanc); color: var(--bleu); font-weight: 700; text-decoration: none;
  transform: translateY(calc(-100% - 80px));
}
.evitement:focus { transform: none; outline: 2px solid var(--bleu); outline-offset: -5px; }

.grille {
  width: 100%;
  max-width: calc(var(--largeur) + 2 * var(--marge));
  margin-inline: auto;
  padding-inline: max(var(--marge), env(safe-area-inset-left)) max(var(--marge), env(safe-area-inset-right));
}

/* Plaque d'émail blanc vissée : l'action de la marque (en-tête, comptoir, lot, guichet).
   Deux vis dessinées aux extrémités, liseré intérieur bleu de 2 px, angles de 3 px. */
.plaque-btn {
  --vis: radial-gradient(circle at 40% 38%, #fff 0 18%, #b9c3d6 42%, #6d7a93 100%);
  position: relative; display: inline-grid; place-items: center; flex: none;
  min-height: 48px; min-width: 140px; padding: 0 30px;
  background: var(--blanc); color: var(--bleu); border-radius: 3px;
  font: 700 17px/1 var(--meca); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 0 0 4px var(--blanc), inset 0 0 0 6px var(--bleu), 0 1px 0 rgb(0 0 0 / .25);
  transition: transform .1s;
}
.plaque-btn::before, .plaque-btn::after {
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--vis); box-shadow: 0 0 0 1px rgb(23 64 166 / .5);
}
.plaque-btn::before { left: 11px; }
.plaque-btn::after { right: 11px; }
.plaque-btn:focus-visible { outline-color: var(--blanc); }
.plaque-btn:active { transform: scale(.97); }
@media (hover: hover) { .plaque-btn:hover { background: var(--caisson); color: var(--blanc); box-shadow: inset 0 0 0 4px var(--caisson), inset 0 0 0 6px var(--blanc), 0 1px 0 rgb(0 0 0 / .25); } }
.plaque-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
/* Deux libellés superposés : la plaque garde sa largeur quand le texte change. */
.libelles { display: inline-grid; }
.libelles > * { grid-area: 1 / 1; text-align: center; }
.libelles > [data-cache] { visibility: hidden; }

.euro { white-space: nowrap; }

/* Pages : sans script, elles se suivent dans le flux ; avec, l'adresse en montre une. */
.js .page { display: none; }
.js[data-page="mur"] #mur, .js[data-page="lot-1"] #lot-1, .js[data-page="lot-2"] #lot-2, .js[data-page="lot-3"] #lot-3,
.js[data-page="lot-4"] #lot-4, .js[data-page="lot-5"] #lot-5, .js[data-page="sorties"] #sorties, .js[data-page="garage"] #garage { display: block; }
.js:not([data-page="mur"]) .entree { display: none; }
.vue { position: relative; z-index: 2; }
.js[data-page="mur"] .vue, html:not(.js) .vue { margin-top: calc(-1 * var(--utile)); }
.page { scroll-margin-top: calc(var(--caisson-h) + 16px); }

/* Transition de vue : la plaque devient la photo du lot, le reste entre en fondu. */
::view-transition-group(lot) { animation-duration: .45s; animation-timing-function: cubic-bezier(.3, .7, .2, 1); }
::view-transition-old(lot), ::view-transition-new(lot) { height: 100%; object-fit: cover; }
::view-transition-old(root) { animation: .22s ease-in both vt-sort; }
::view-transition-new(root) { animation: .3s .12s ease-out both vt-entre; }
@keyframes vt-sort { to { opacity: 0; } }
@keyframes vt-entre { from { opacity: 0; } }
.caisson { view-transition-name: caisson; }
.comptoir { view-transition-name: comptoir; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Pas de mot seul en fin de paragraphe. */
p, li, dd, figcaption { text-wrap: pretty; }
