/* 1. Les polices, les couleurs de chaque heure, l'en-tête, les boutons */

@font-face { font-family: Barlow; src: url("../assets/polices/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url("../assets/polices/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/polices/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Une lettre par enseigne */
@font-face { font-family: Petale; src: url("../assets/polices/elsie-swash-caps-latin-900-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Pile; src: url("../assets/polices/federo-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Famie; src: url("../assets/polices/caprasimo-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Chambre; src: url("../assets/polices/michroma-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Lumen; src: url("../assets/polices/limelight-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Peigne; src: url("../assets/polices/big-shoulders-inline-display-latin-800-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Roue; src: url("../assets/polices/bungee-inline-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Billet; src: url("../assets/polices/bungee-latin-400-normal.woff2") format("woff2"); font-display: swap; }

:root {
  --email: #173a85;          /* l'émail bleu des plaques de rue */
  --email-fonce: #0f2a63;
  --craie: #fffaf0;
  --texte: Barlow, "Segoe UI", sans-serif;
  --titre: "Barlow Condensed", "Arial Narrow", sans-serif;
  --entete: 58px;
  --marge: clamp(18px, 4vw, 72px);
  --jour: 0;                 /* 0 = 07:15, 1 = 21:05 */
  font: 400 1.0625rem/1.45 var(--texte);
}

/* Chaque heure a ses couleurs. haut et bas : le fond. papier : les panneaux. accent : ce qui se remarque. panneau et or : l'enseigne de la boutique. */
.heure-petale, .heure-demain { --haut: #f9cfb4; --bas: #fbe3bd; --encre: #2a1d35; --doux: #5a4350; --papier: #fff6e8; --trait: #b98b78; --accent: #24523f; --sur-accent: #fff6e8; --panneau: #2f5a47; --or: #f6e3ab; }
.heure-pile { --haut: #fbe3bd; --bas: #f5edcf; --encre: #2a2130; --doux: #57483f; --papier: #fffaec; --trait: #a88f63; --accent: #6b3a1c; --sur-accent: #fffaec; --panneau: #56351f; --or: #f4dcab; }
.heure-famie { --haut: #f5edcf; --bas: #e2efe2; --encre: #22222b; --doux: #4b4a3f; --papier: #fffdf3; --trait: #9a9a74; --accent: #7d1f2c; --sur-accent: #fffdf3; --panneau: #7d1f2c; --or: #ffe9c4; }
.heure-chambre { --haut: #cfe9f5; --bas: #eef6f4; --encre: #14233a; --doux: #3c4f64; --papier: #ffffff; --trait: #7f9cb0; --accent: #41305f; --sur-accent: #ffffff; --panneau: #41305f; --or: #efe6fb; }
.heure-lumen { --haut: #3d1029; --bas: #521a37; --encre: #fff1d8; --doux: #f0cfc0; --papier: #2a0a1c; --trait: #b06a7d; --accent: #ffcf6b; --sur-accent: #2a0a1c; --panneau: #fff1d8; --or: #3d1029; }
.heure-peigne { --haut: #8a2d42; --bas: #4d265f; --encre: #fff5e4; --doux: #f9d9cf; --papier: #3a1838; --trait: #c98aa0; --accent: #ffd585; --sur-accent: #3a1838; --panneau: #1f4f55; --or: #f6e6c8; }
.heure-monter { --haut: #33235f; --bas: #17194a; --encre: #fff3e0; --doux: #d8cdec; --papier: #14123a; --trait: #8577b8; --accent: #ffd27d; --sur-accent: #14123a; --panneau: #1b1650; --or: #ffd27d; }
.heure-billet { --haut: #13153f; --bas: #0b0d26; --encre: #fdf1df; --doux: #c9c6e6; --papier: #1d1f52; --trait: #6f70ab; --accent: #ffe08a; --sur-accent: #12133a; --panneau: #f0cf85; --or: #3a1838; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fbe3bd; color: #2a1d35; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p, figure, ul, ol, fieldset, dl, dd { margin: 0; padding: 0; border: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
button, input { font: inherit; color: inherit; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
main:focus, h2:focus { outline: none; }
h2:focus-visible, main:focus-visible { outline: none; box-shadow: none; }
time { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.sr-only, .saut:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saut:focus { position: fixed; top: 8px; left: 8px; z-index: 60; background: var(--craie); color: #14123a; padding: 14px 18px; }

/* Ce qui a besoin de JavaScript n'apparaît qu'avec lui */
html:not([data-motion]) .avec-js, [data-motion] .sans-js { display: none !important; }
.sans-script { background: var(--craie); padding: 20px var(--marge); }

/* Le contour de focus : deux traits, visibles sur clair comme sur sombre */
:focus-visible { outline: 3px solid #fffaf0; outline-offset: 2px; box-shadow: 0 0 0 6px #14123a; border-radius: 2px; }

/* ---------- Les boutons ---------- */
button:disabled { color: inherit; cursor: auto; }
button { min-height: 44px; padding: 8px 14px; border: 2px solid currentColor; border-radius: 3px; background: none; font-weight: 600; line-height: 1.15; cursor: pointer; }
input[type="range"] { width: 100%; height: 32px; margin: 0; accent-color: var(--accent, #173a85); cursor: pointer; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent, #173a85); }

.bouton-boutique { position: relative; padding: 10px 20px; border-color: var(--encre); background: var(--encre); color: var(--papier); border-radius: 4px; }
/* L'appui : la propriété scale est réservée au CSS, GSAP n'y touche jamais */
/* Un bouton qui change de mots garde sa largeur : tous ses mots sont écrits dessous, sans hauteur et sans encre */
button[data-mots]::after { content: attr(data-mots); display: block; height: 0; overflow: hidden; visibility: hidden; white-space: pre; }
[data-motion="full"] button { transition: scale .09s ease-out, background-color .15s, color .15s; }
[data-motion="full"] button:active { scale: .96; }
[data-motion="reduce"] button { transition: background-color .15s, color .15s; }
@media (hover: hover) {
  .bouton-boutique:hover { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
}
.bouton-boutique:active { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }

/* ---------- L'en-tête : une plaque émaillée, et le fil de la journée ---------- */
.entete { position: relative; z-index: 30; display: flex; align-items: center; gap: 10px 26px; min-height: var(--entete); padding: 6px var(--marge) 9px; background: var(--email-fonce); color: #fff; }
.entete::before, .entete::after { content: ""; position: absolute; bottom: 0; }
.entete::before { left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #f3b99a, #fbe6bf 10%, #a2d2ee 25%, #85c5ed 38%, #f6e6c4 56%, #ee8a62 74%, #39316f 88%, #0f1236); }
.entete::after { width: 14px; height: 14px; margin-left: -7px; bottom: -5px; left: calc(2.5% + var(--jour) * 95%); border-radius: 50%; background: #ffd466; border: 2px solid var(--email-fonce); }
.marque { display: flex; align-items: center; gap: 10px; font: 700 1.35rem/1 var(--titre); text-decoration: none; white-space: nowrap; }
.entete nav { display: flex; gap: 22px; margin-right: auto; }
.entete nav a, .pied a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.entete nav a:hover, .pied a:hover { text-decoration: underline; }
/* Premier à la tabulation, dernier à l'œil : le bouton d'arrêt est juste après le lien d'évitement */
#motion-toggle { order: 2; font-size: .94rem; white-space: nowrap; }
.choix-mouvement { order: 3; display: flex; gap: 2px; padding: 3px; border-radius: 4px; background: rgb(255 255 255 / .16); }
.choix-mouvement label { position: relative; display: grid; }
.choix-mouvement input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choix-mouvement span { display: grid; place-items: center; min-height: 38px; padding: 0 11px; border-radius: 3px; font-size: .9rem; font-weight: 600; white-space: nowrap; background: var(--email-fonce); }
.choix-mouvement input:checked + span { background: #fff; color: var(--email-fonce); }
.choix-mouvement input:focus-visible + span { outline: 3px solid #ffd466; outline-offset: 1px; }
@media (hover: hover) { #motion-toggle:hover { background: #fff; color: var(--email-fonce); } }

.pied { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 24px; padding: 14px var(--marge); background: var(--email-fonce); color: #fff; }

@media (min-width: 761px) {
  .entete { position: sticky; top: 0; }
  html { scroll-padding-top: var(--entete); }
}
@media (max-width: 1150px) {
  .choix-mouvement span { padding: 0 8px; font-size: .84rem; }
  .entete { gap: 8px 16px; }
  .entete nav { gap: 14px; }
}
@media (max-width: 1000px) {
  .entete { flex-wrap: wrap; }
  .marque span { display: none; }
}
@media (max-width: 760px) {
  .entete nav { margin-right: 0; }
  .entete nav a:not(.lien-plan) { display: none; }
  .marque { min-height: 44px; }
  .entete .marque span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .marque { margin-right: auto; gap: 7px; font-size: 1.2rem; }
  .marque img { width: 24px; }
  .entete { gap: 8px 10px; padding-inline: 14px; }
  #motion-toggle { font-size: .88rem; padding: 6px 10px; }
  .choix-mouvement { width: 100%; }
  .choix-mouvement label { flex: 1 1 auto; }
  .choix-mouvement span { padding: 0 5px; font-size: .86rem; }
}

/* Dernier filet, pour ce que la page n'aurait pas prévu */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) *, html:not([data-motion="full"]) ::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
