/* Petit Jour : feuille de style du site.
   Identité : planche validée (direction-artistique/planche.html) ; structure : gabarit scroll-cinema.
   Sans JavaScript ou en mouvement réduit : version fixe de la séquence (tout se lit).
   Avec l'animation : site.js ajoute la classe « cinema-anime » sur <html>. */
/* Titres : Archivo élargie (125 %) en 800, choisie par Louis le 2026-11-22 (« trop IA » pour l'ancienne serif étroite). Instance unique de 14,5 Ko. */
@font-face { font-family: "Archivo"; src: url("../polices/archivo-125-800-latin.woff2") format("woff2"); font-weight: 800; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../polices/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

:root {
  /* Palette de la planche (contrastes calculés par contraste.py, voir controle/contrastes.txt). */
  --nuit: #0E1B3C; --cobalt: #1B3A7A; --ardoise: #46527A; --ciel: #E6EDF8; --porcelaine: #F4F6FA; --crema: #E3B26B;
  --crema-survol: #EDC88E; --brume: #C9D3EA; --rouge: #B3261E; --blanc: #FFFFFF;
  --filet: rgba(14, 27, 60, 0.18); --filet-clair: rgba(244, 246, 250, 0.28);
  --titre: "Archivo", "Arial Black", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, "Segoe UI", sans-serif;
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 32px; --e7: 48px; --e8: 72px; --e9: 112px;
  --angle: 4px;
  --marge: 20px;
  --entete: 60px;
  /* Marge gauche et droite du contenu, la même pour toute la page : 5 % de la largeur, entre la marge et 120 px. */
  --gauche: max(var(--marge), min(5vw, 120px));
  --vh: 1vh;
  --focus: var(--nuit);
  /* Point de l'image gardé à l'écran quand elle est rognée (même valeur que --focus-* de sequence.py). */
  --focus-paysage: 66% 40%;
  --focus-portrait: 50% 20%;
}
@supports (height: 1svh) { :root { --vh: 1svh; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--entete) + 16px); background: var(--nuit); }
body { margin: 0; background: var(--ciel); color: var(--nuit); font: 400 1.125rem/1.55 var(--sans); }
img, canvas, svg { display: block; max-width: 100%; }
h1, h2 { font-family: var(--titre); font-weight: 800; font-stretch: 125%; letter-spacing: -0.02em; line-height: 1; margin: 0 0 var(--e4); text-wrap: balance; }
h1 { font-size: clamp(2.125rem, 4.6vw, 4.25rem); line-height: 0.98; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
h3 { font: 600 1.25rem/1.25 var(--sans); font-stretch: 85%; margin: 0 0 var(--e2); }
p { margin: 0 0 var(--e4); max-width: 38em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 3px; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Zones sombres : le contour de focus prend la couleur claire (planche : focus porcelaine sur le bleu). */
.entete, .cinema, .tete-page, .pied, .appel { --focus: var(--porcelaine); }

.evitement { position: absolute; left: -999px; top: 0; z-index: 30; background: var(--crema); color: var(--nuit); padding: 12px 16px; font-weight: 600; }
.evitement:focus { left: 8px; top: 8px; }

/* ---------- Boutons et liens ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--e5);
  border: 2px solid transparent; border-radius: var(--angle); cursor: pointer;
  font: 600 1.0625rem/1.1 var(--sans); font-stretch: 90%; text-decoration: none; text-align: center;
}
.bouton:active { transform: translateY(1px); }
.bouton-crema { background: var(--crema); color: var(--nuit); }
.bouton-crema:hover { background: var(--crema-survol); }
.bouton-cobalt { background: var(--cobalt); color: var(--porcelaine); }
.bouton-cobalt:hover { background: var(--nuit); }
.bouton-contour { background: transparent; color: inherit; border-color: currentColor; }
.bouton-contour:hover { background: rgba(244, 246, 250, 0.12); }
.bouton[disabled] { opacity: 0.7; cursor: progress; }
.lien-fort { display: inline-block; padding: 6px 0; font-weight: 600; color: var(--cobalt); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lien-fort:hover { color: var(--nuit); text-decoration-thickness: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--e3); align-items: center; margin-top: var(--e5); }

/* ---------- Barre du haut ---------- */
/* Visible dès l'ouverture, fixe : nom à gauche, 5 liens, la recherche, un seul bouton d'action plein à droite. */
.entete {
  position: fixed; inset: 0 0 auto 0; z-index: 20; min-height: var(--entete);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px var(--marge);
  background: var(--nuit); color: var(--porcelaine);
}
@media (prefers-reduced-motion: no-preference) { .entete { transition: background-color 0.25s; } }
.entete-nom { font: 800 1.375rem/1 var(--titre); font-stretch: 125%; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; margin-right: auto; white-space: nowrap; }
.menu ul { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; font-size: 1rem; }
.menu a:hover { text-decoration: underline; text-underline-offset: 6px; }
.menu a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--crema); }
.menu-bouton, .recherche-bouton {
  width: 44px; height: 44px; padding: 0; color: inherit; background: none; cursor: pointer;
  border: 1px solid rgba(244, 246, 250, 0.6); border-radius: var(--angle); align-items: center; justify-content: center;
}
.menu-bouton svg, .recherche-bouton svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-bouton[aria-expanded="true"], .recherche-bouton[aria-expanded="true"] { background: var(--porcelaine); color: var(--nuit); }
.entete-action { min-height: 44px; padding: 0 var(--e4); font-size: 1rem; }
.recherche-lien { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 1rem; }
.js .recherche-lien { display: none; }
.js .recherche-bouton, .js .menu-bouton { display: inline-flex; }
/* Le panneau de recherche : clair, sous la barre. */
.recherche-panneau {
  --focus: var(--nuit);
  position: absolute; top: 100%; left: 0; right: 0; background: var(--porcelaine); color: var(--nuit);
  padding: var(--e4) var(--marge) var(--e5); box-shadow: 0 16px 32px rgba(14, 27, 60, 0.3);
}
.recherche-panneau label { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.recherche-panneau input { width: 100%; min-height: 48px; padding: 0 14px; font: inherit; color: inherit; background: var(--blanc); border: 1px solid var(--ardoise); border-radius: var(--angle); }
.recherche-etat { margin: 10px 0 0; font-size: 1rem; color: var(--ardoise); }
.recherche-etat:empty { display: none; }
.recherche-resultats { list-style: none; margin: 4px 0 0; max-height: 60vh; overflow-y: auto; }
.recherche-resultats li { border-top: 1px solid var(--filet); }
.recherche-resultats a { display: flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--cobalt); }
.recherche-resultats span { display: block; font-size: 1rem; color: var(--ardoise); margin-bottom: 8px; }

@media (max-width: 819px) {
  /* Une seule ligne à 375 px avec des zones de clic de 44 px (mesuré : nom 96 px, deux boutons de 44, action 137, 3 écarts de 4). */
  .entete { gap: 4px; padding-left: 16px; padding-right: 16px; }
  .entete-nom { font-size: 1rem; flex: 1 1 auto; min-width: 0; }
  .entete-action { padding: 0 10px; white-space: nowrap; }
  .menu { order: 5; flex-basis: 100%; }
  .menu ul { display: block; padding: var(--e2) 0; }
  .menu a { display: flex; font-size: 1.125rem; border-top: 1px solid var(--filet-clair); }
  .js .menu { display: none; }
  .js .menu-ouvert .menu { display: block; }
  /* Sans script : tous les liens sont affichés en ligne ; la barre, plus haute, reste en haut de page au lieu de suivre. */
  html:not(.js) .entete { position: relative; }
  html:not(.js) .menu ul { display: flex; flex-wrap: wrap; padding: 0; }
  html:not(.js) .menu a { display: inline-flex; border-top: 0; font-size: 1rem; }
  html:not(.js) .recherche { order: 6; }
  html:not(.js) .tete-page { padding-top: clamp(48px, 7vw, 96px); }
  html:not(.js) .cinema { padding-top: 0; --entete: 0px; }
}
/* (Les largeurs des requêtes comptent la barre de défilement : une fenêtre d'ordinateur de 375 px n'a que 360 px de
   contenu ; d'où 389 et 374 au lieu de 374 et 359.) */
@media (max-width: 389px) {
  .entete { padding-left: 12px; padding-right: 12px; }
  .entete-nom { font-size: 0.9375rem; }
  .entete-action { padding: 0 6px; }
}
/* 320 à 359 px : le nom et le bouton d'action rapetissent (même police), la barre reste sur une ligne. */
@media (max-width: 374px) {
  :root { --marge: 12px; }
  .entete { padding-left: 10px; padding-right: 10px; }
  .entete-nom { font-size: 0.8125rem; }
  .entete-action { font-size: 0.875rem; padding: 0 5px; }
}
/* Liens du menu visibles dès 820 px (mesuré : nom, 5 liens, loupe et bouton tiennent en 790 px). */
@media (min-width: 820px) {
  .menu-bouton { display: none !important; }
  .menu a { padding: 0 8px; }
}
@media (min-width: 960px) {
  :root { --marge: 40px; --entete: 64px; }
  .menu a { padding: 0 10px; }
  .entete { gap: 8px 12px; }
  .entete-nom { margin-right: var(--e4); }
  .menu { margin-right: auto; }
  .recherche-panneau { left: auto; right: var(--marge); width: min(28rem, calc(100vw - 2 * var(--marge))); border-radius: 0 0 var(--angle) var(--angle); }
}

/* ---------- La séquence : premier écran, étapes, mondes ----------
   Principe (2026-11-22) : une phrase courte et énorme par écran, le texte et la tasse chacun dans sa zone, un monde
   (couleurs) par étape : nuit (6 h 40), aube (7 h 10), matin (7 h 40), plein jour (8 h 10).
   L'image commence sous la barre. Deux compositions, choisies par le format de la fenêtre et jamais par l'appareil :
   - large (rapport > 5/4) : texte à gauche (43 % de la largeur au plus), tasse à droite (elle commence à 49,7 %) ;
   - haute ou presque carrée (≤ 5/4) : l'image couvre tout l'écran, tasse en haut, texte en bas, sous la soucoupe.
   Le titre est réglé sur sa zone : la ligne la plus large des quatre titres mesure 5,84 em (« le sachet. »), d'où zone / 6.
   Par défaut (sans JavaScript, mouvement réduit, connexion lente) : version fixe, les étapes 2 à 4 en bandes sous le premier
   écran, chacune avec son image. Avec l'animation (classe « cinema-anime » posée par site.js) : les étapes se succèdent
   au même endroit pendant que la séquence défile. */
.cinema { background: var(--nuit); color: var(--porcelaine); padding-top: var(--entete); }
.cinema-scene {
  --scene: max(calc(var(--vh) * 100 - var(--entete)), 30rem);
  --zone: calc(43vw - var(--gauche));
  --corps-titre: max(2.25rem, min(calc(var(--zone) / 6), calc(var(--vh) * 15)));
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--scene);
}
.cinema-visuel { grid-area: 1 / 1; position: relative; overflow: hidden; background: var(--nuit); }
.cinema-depart img, .cinema-toile { position: absolute; inset: 0; width: 100%; height: 100%; }
.cinema-depart img { object-fit: cover; object-position: var(--focus-paysage); }
.cinema-toile { visibility: hidden; }
.cinema-textes { display: contents; }
.cinema-pan, .cinema-passer, .cinema-progres { display: none; }
.cinema-etape { min-width: 0; }
.cinema-titre { font-size: var(--corps-titre); line-height: 0.92; letter-spacing: -0.025em; margin: 0 0 var(--e5); overflow-wrap: break-word; }
.etape-phrase { font-size: clamp(1.1875rem, 1.3vw, 1.5rem); max-width: 27em; margin: 0; }
.cinema .actions { margin-top: var(--e5); }
.etape-heure { font: 600 1.0625rem/1.2 var(--sans); font-stretch: 85%; color: var(--crema); margin: 0 0 var(--e4); }
.cinema .tampon { align-self: flex-start; border-color: currentColor; color: var(--crema); margin: var(--e5) 0 0; font-size: 1rem; }
.cinema .monde-matin .tampon, .cinema .monde-jour .tampon { color: var(--nuit); } /* fond crema ou ciel (version fixe) */
/* La preuve de l'étape « un seul café » : le nom du café du mois, sous un filet. */
.etape-preuve { margin: var(--e5) 0 0; padding-top: var(--e3); border-top: 1px solid currentColor; font-size: 1.0625rem; max-width: 27em; }
/* Le premier écran (et, en version animée, chaque étape) : à l'affiche, par-dessus l'image. */
.cinema-etape:first-child, .cinema-anime .cinema-etape {
  grid-area: 1 / 1; z-index: 2; position: relative; display: flex; flex-direction: column; justify-content: center;
  width: var(--zone); margin: 0 0 0 var(--gauche); padding: 0 0 var(--e7);
}
/* L'information utile du premier écran (le prix), au pied de la zone de texte. */
.cinema .cinema-infos {
  position: absolute; left: 0; right: 0; bottom: var(--e5); max-width: none;
  margin: 0; padding-top: var(--e3); border-top: 1px solid var(--filet-clair); font-size: clamp(1rem, 1.1vw, 1.25rem); line-height: 1.45;
}
/* Le cadran du lever : repère de la séquence (une heure par étape), en haut à droite de l'image, hors du sujet. */
.cadran { position: absolute; z-index: 3; top: var(--e5); right: var(--gauche); display: flex; align-items: center; gap: var(--e3); font: 600 1.0625rem/1 var(--sans); font-stretch: 85%; color: var(--porcelaine); }
.cadran svg { width: 56px; height: 56px; }
.cadran-fond { fill: none; stroke: rgba(244, 246, 250, 0.45); stroke-width: 1.5; }
.cadran-arc { fill: none; stroke: var(--crema); stroke-width: 2.5; stroke-linecap: round; }
.cadran-soleil { fill: var(--crema); }

/* Fenêtre haute ou presque carrée : tasse en haut, texte en bas. Cadrage 4:3 (tasse à droite du centre : on la ramène
   au milieu) ; en dessous de 2/3, cadrage 9:16 calé en bas (sur un écran court, cela remonte la tasse et libère le texte). */
@media (max-aspect-ratio: 5/4) {
  .cinema-scene { --zone: calc(100vw - 2 * var(--gauche)); --corps-titre: max(2.25rem, min(calc(var(--zone) / 6), calc(var(--vh) * 8))); }
  .cinema-depart img { object-position: 90% 0%; }
  .cinema-etape:first-child, .cinema-anime .cinema-etape { justify-content: flex-end; width: auto; margin: 0 var(--gauche); padding: 0 0 var(--e5); }
  .cinema-titre { margin-bottom: var(--e4); }
  .cinema .cinema-infos { position: static; margin-top: var(--e4); }
}
@media (max-aspect-ratio: 2/3) {
  .cinema-scene { --corps-titre: max(2.25rem, min(calc(var(--zone) / 6), calc(var(--vh) * 5.8))); }
  .cinema-depart img { object-position: 50% 100%; }
  .cinema-titre { margin-bottom: var(--e3); }
  .etape-phrase { font-size: 1.0625rem; line-height: 1.45; }
  .cinema .actions { margin-top: var(--e3); }
  .cinema .cinema-infos { margin-top: var(--e3); padding-top: var(--e2); }
  .cinema .tampon { margin-top: var(--e3); }
  .cadran { top: var(--e4); gap: var(--e2); }
  .cadran svg { width: 40px; height: 40px; }
}
/* Téléphone de moins de 860 px de haut (375 × 667, 375 × 812, 390 × 844 : presque tous, une fois la barre du navigateur
   comptée) : le titre, le bouton et le prix tiennent sous la soucoupe ; la phrase d'accroche se lit dans la section suivante.
   Mesuré : à 375 × 812 avec la phrase, le titre montait de 8 px sur la zone de la tasse (defilement.mjs, 2026-11-22). */
@media (max-aspect-ratio: 2/3) and (max-height: 860px) {
  .cinema-etape:first-child .etape-phrase { display: none; }
}
/* Téléphone court (375 × 667) : au monde du colis, le surtitre touchait le bas de la boîte (juge, tour 2) ; texte
   descendu de 24 px (marges sous le bouton, le surtitre et le titre) ; écart vu sur controle/tour3/cinq-tailles. */
@media (max-aspect-ratio: 2/3) and (max-height: 700px) {
  /* Tour 5 : marge basse de 24 px (au lieu de 12) sous le texte de chaque monde (juge : le texte des bols touchait le bas). */
  .cinema-anime .cinema-etape { padding-bottom: var(--e5); }
  /* … et les 12 px gagnés ailleurs, pour que « 8 h 10 » ne remonte pas sur le bas du colis : phrase, bouton, titre. */
  .cinema-scene { --corps-titre: 2.25rem; }
  .cinema-anime .etape-phrase { font-size: 1rem; line-height: 1.4; }
  .cinema-anime .actions { margin-top: var(--e2); }
  .etape-heure { margin-bottom: var(--e2); }
  .cinema-anime .cinema-titre { margin-bottom: var(--e2); }
}
/* Très petit téléphone (320 × 640) : titre un peu plus petit pour rester sous la soucoupe (mesuré par cinq_tailles.mjs). */
@media (max-aspect-ratio: 2/3) and (max-height: 680px) and (max-width: 359px) {
  .cinema-scene { --corps-titre: 2rem; }
  .cinema .cinema-infos { font-size: 0.9375rem; }
}

/* ----- Les mondes : une couleur de la planche par heure -----
   nuit : l'ombre du petit matin, texte porcelaine ; aube : le premier soleil, titre crema ; matin : un pan crema, texte nuit ;
   plein jour : un pan ciel, texte nuit, bouton cobalt (planche : crema sur le bleu, cobalt sur le ciel). */
.monde-aube .cinema-titre { color: var(--crema); }
.monde-matin, .monde-jour { color: var(--nuit); --focus: var(--nuit); }
.monde-matin .etape-heure { color: var(--nuit); }
.monde-jour .etape-heure { color: var(--cobalt); }

/* ----- Version fixe : les étapes 2 à 4 en bandes, une image chacune ----- */
html:not(.cinema-anime) .cinema-etape:not(:first-child) {
  --zone: calc(100vw - 2 * var(--gauche));
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e6); align-items: center;
  padding: clamp(56px, 9vw, 120px) var(--gauche);
}
html:not(.cinema-anime) .cinema-etape:not(:first-child) .cinema-titre { font-size: max(2.25rem, min(calc(var(--zone) / 6), 5.5rem)); }
html:not(.cinema-anime) .monde-aube { background: var(--nuit); }
html:not(.cinema-anime) .monde-matin { background: var(--crema); }
html:not(.cinema-anime) .monde-jour { background: var(--ciel); }
.etape-image img { width: 100%; height: auto; border-radius: var(--angle); }
/* Avec JavaScript et sans « mouvement réduit », l'animation va démarrer : ces images ne serviraient pas (et prendraient du
   débit à l'image du premier écran). site.js pose « cinema-repli » s'il renonce à l'animation : elles reviennent. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.cinema-repli) .etape-image { display: none; }
}
@media (min-width: 820px) {
  html:not(.cinema-anime) .cinema-etape:not(:first-child) {
    --zone: calc((100vw - 2 * var(--gauche) - var(--e8)) * 5 / 11);
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--e8);
  }
  html:not(.cinema-anime) .cinema-etape:not(:first-child) .cinema-titre { font-size: max(2.25rem, calc(var(--zone) / 6)); }
  html:not(.cinema-anime) .monde-matin { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  html:not(.cinema-anime) .monde-matin .etape-image { order: -1; }
}

/* ----- Version animée (site.js : la scène reste sous la barre pendant que la page défile) ----- */
.cinema-anime .cinema-etape { visibility: hidden; opacity: 0; }
.cinema-anime .cinema-etape:first-child { visibility: visible; opacity: 1; }
/* Tour 5 : pendant un passage (site.js, voiler), un texte que le volet touche est caché : jamais de texte sur un bord
   de volet. Tour 6 : un seul fondu de sortie et un seul fondu d'entrée par passage (plus de titre en couleurs claires
   sur le volet, qui clignotait) ; le volet porte à la place l'heure de l'étape qui vient (.volet-heure). */
.cinema-anime .cinema-etape, .cinema-anime .cinema-voile { transition: opacity 0.22s ease-out; }
.cinema-anime .sous-le-volet { visibility: hidden !important; opacity: 0 !important; transition: opacity 0.16s ease-in, visibility 0s linear 0.16s; }
.cinema-anime .lien-sous-le-volet:not(:focus-visible) { opacity: 0; }
.volet-heure { display: none; }
.cinema-anime .volet-heure {
  display: flex; flex-direction: column; align-items: center; gap: var(--e2);
  position: absolute; left: 50%; top: 50%; z-index: 2; margin: 0; transform: translate(-50%, -50%) rotate(-4deg);
  padding: var(--e4) var(--e6); border: 2px solid var(--crema); border-radius: 999px; color: var(--crema);
  text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
}
.cinema-anime .volet-heure strong { font: 800 clamp(2.5rem, 7vw, 4.5rem)/1 var(--titre); font-stretch: 125%; }
.cinema-anime .volet-heure small { font: 600 1rem/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.cinema-anime .volet-heure.volet-heure-vue { opacity: 1; }
.cinema-anime .etape-heure, .cinema-anime .etape-image { display: none; }
.cinema-anime .cinema-prete .cinema-toile { visibility: visible; }
/* En haut de page, l'image de départ (plus fine que les images de la séquence) reste devant. */
.cinema-anime .cinema-image-depart .cinema-toile { visibility: hidden; }
/* Matin puis plein jour : un pan de couleur entre par la gauche, coupé en biais comme l'ombre du petit matin. */
.cinema-anime .cinema-pan {
  display: block; grid-area: 1 / 1; z-index: 1; background: var(--crema);
  clip-path: polygon(0 0, 41% 0, 46.5% 100%, 0 100%);
}
.cinema-anime .pan-jour { background: var(--ciel); }
.cinema-anime .cinema-scene { overflow: hidden; }
.cinema-anime .cinema-passer {
  display: inline-flex; align-items: center; position: absolute; right: var(--gauche); bottom: var(--e3); z-index: 3;
  min-height: 44px; padding: 0 6px; font-size: 1rem;
}
.cinema-anime .cinema-progres { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; }
.cinema-progres span { display: block; height: 100%; background: var(--crema); transform: scaleX(0); transform-origin: 0 50%; }
@media (max-aspect-ratio: 5/4) {
  /* Le pan monte du bas et s'arrête sous la soucoupe (--sujet-bas : mesuré par site.js sur l'image affichée). */
  .cinema-anime .cinema-pan {
    clip-path: polygon(0 calc(var(--sujet-bas, 56%) + 6px), 100% calc(var(--sujet-bas, 56%) + 6px + 2.4vw), 100% 100%, 0 100%);
  }
  .cinema-anime .cinema-passer { right: auto; bottom: auto; left: calc(var(--gauche) - 6px); top: var(--e3); }
}

/* ---------- Sections ---------- */
/* Une seule ligne de départ à gauche pour toute la page (premier écran, récit, sections, pied) : --gauche. */
.section { padding: clamp(64px, 9vw, 112px) var(--gauche); }
.section > h2 { max-width: 16ch; }
.section + .section { border-top: 1px solid var(--filet); }
.chapo { font-size: 1.1875rem; color: inherit; }
.colonne-titre h2 { max-width: 14ch; }
/* Accueil : chaque section est un monde (ciel, cobalt, crema, ciel, nuit) et s'ouvre par deux ou trois mots en très grand. */
.accueil .section > h2, .accueil .colonne-titre h2, .accueil .section-venir h2 { font-size: clamp(2.25rem, 5.2vw, 5.5rem); line-height: 0.94; letter-spacing: -0.025em; max-width: none; margin-bottom: var(--e5); }
@media (max-width: 559px) { .accueil .section > h2, .accueil .colonne-titre h2, .accueil .section-venir h2 { font-size: min(11vw, 3.25rem); } }
.accueil .section + .section { border-top: 0; }
.section-mouture { background: var(--cobalt); color: var(--porcelaine); --focus: var(--porcelaine); }
.section-mouture .guide label { background: transparent; color: inherit; border-color: rgba(244, 246, 250, 0.6); }
.section-mouture .guide label:hover { background: rgba(244, 246, 250, 0.12); }
.section-mouture .guide input:checked + label { background: var(--crema); color: var(--nuit); border-color: var(--crema); }
.section-mouture .guide input:focus-visible + label { outline-color: var(--porcelaine); }
.section-mouture .guide-mouture { color: var(--crema); }
.section-origine { background: var(--crema); }
.section-origine .fiche { border-color: transparent; }
.section-venir { background: var(--nuit); color: var(--porcelaine); --focus: var(--porcelaine); }
.section-venir .horaires div { border-top-color: var(--filet-clair); }
.section-venir .horaires dd { color: var(--brume); }
.section-venir .lien-fort { color: var(--crema); }
.section-venir .lien-fort:hover { color: var(--crema-survol); }
.section-venir .appel { background: var(--cobalt); }
.accueil .pied { border-top: 1px solid var(--filet-clair); }
@media (min-width: 960px) {
  .section-abonnement, .section-mouture, .section-origine, .section-formulaire, .section-choix, .section-date {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--e8); align-items: start;
  }
  :is(.section-abonnement, .section-mouture, .section-origine, .section-formulaire, .section-choix, .section-date) > * { grid-column: 2; min-width: 0; }
  :is(.section-abonnement, .section-mouture, .section-origine, .section-formulaire, .section-choix, .section-date) > .colonne-titre { grid-column: 1; grid-row: 1 / span 4; }
}

/* L'abonnement : deux formats, prix sous un filet (pas de cartes) */
.formats { list-style: none; display: grid; gap: var(--e6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.format { border-top: 2px solid var(--nuit); padding-top: var(--e4); min-width: 0; }
.format p { margin: 0; }
.format-nom { font: 800 1.875rem/1 var(--titre); font-stretch: 125%; margin-bottom: var(--e2) !important; }
.format-detail { color: var(--ardoise); }
.format-prix { font: 600 2rem/1.2 var(--sans); font-stretch: 85%; margin-top: var(--e4) !important; }
.format-mention { font-size: 1rem; color: var(--ardoise); }
.faits { list-style: none; display: grid; gap: var(--e5); margin-top: var(--e7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .faits { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.faits li { min-width: 0; border-left: 1px solid var(--filet); padding-left: var(--e4); }
.faits h3 { font-size: 1.125rem; margin-bottom: var(--e1); }
.faits p { font-size: 1rem; margin: 0; }

/* Segments (guide de mouture et choix du formulaire) : boutons radio dessinés en barre. */
.guide { display: flex; flex-wrap: wrap; border: 0; margin: 0; padding: 0; min-width: 0; }
/* Le bouton radio, invisible, couvre son étiquette : la zone de clic est celle de l'étiquette (48 px de haut). */
.option { position: relative; display: inline-flex; }
.option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 3; }
.guide label, .option label {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--e4); cursor: pointer;
  border: 1px solid var(--ardoise); margin: 0 -1px -1px 0; background: var(--porcelaine); font-size: 1.0625rem;
}
.guide label:hover, .option label:hover { background: var(--blanc); }
.guide input:checked + label, .option input:checked + label { background: var(--cobalt); color: var(--porcelaine); border-color: var(--cobalt); position: relative; z-index: 1; }
.guide input:focus-visible + label, .option input:focus-visible + label { outline: 3px solid var(--nuit); outline-offset: 2px; position: relative; z-index: 2; }
.guide-reponse { order: 2; flex-basis: 100%; padding-top: var(--e5); }
@supports selector(:has(*)) {
  .guide-reponse { display: none; }
  .guide .option:has(input:checked) + .guide-reponse { display: block; }
}
.guide-mouture { font: 800 1.625rem/1.05 var(--titre); font-stretch: 125%; margin-bottom: var(--e3); }

/* Fiche « Origine du mois » : la date de torréfaction en tête, c'est la preuve. */
.fiche { background: var(--porcelaine); border: 1px solid var(--filet); padding: var(--e5); max-width: 34rem; }
.tampon { display: inline-block; font: 600 0.9375rem/1.2 var(--sans); font-stretch: 80%; border: 1.5px solid var(--nuit); border-radius: 999px; padding: var(--e2) var(--e3); margin-bottom: var(--e5); }
.fiche-titre { color: var(--ardoise); }
.fiche-nom { font: 800 1.75rem/1 var(--titre); font-stretch: 125%; margin-bottom: var(--e4); }
.fiche dl { margin: 0; font-size: 1rem; }
.fiche dl div { display: flex; justify-content: space-between; gap: var(--e3); border-top: 1px solid var(--filet); padding: var(--e2) 0; }
.fiche dt { font-weight: 600; }
.fiche dd { margin: 0; color: var(--ardoise); text-align: right; }

/* Questions */
.questions { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--e8); margin-top: var(--e6); }
@media (min-width: 960px) { .questions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.question { border-top: 1px solid var(--filet); min-width: 0; }
.question summary { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); min-height: 56px; padding: var(--e3) 0; cursor: pointer; list-style: none; }
.question summary::-webkit-details-marker { display: none; }
.question summary h3 { margin: 0; font-size: 1.1875rem; }
.question summary::after { content: "+"; font: 400 1.75rem/1 var(--sans); color: var(--cobalt); flex: none; }
.question[open] summary::after { content: "\2212"; }
.question p { padding-bottom: var(--e4); }
.question a { font-weight: 600; color: var(--cobalt); }

/* Boutique, horaires, appel final */
.section-venir { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e7); }
@media (min-width: 960px) { .section-venir { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; } }
.section-venir > * { min-width: 0; }
.adresse { font: 800 1.25rem/1.25 var(--titre); font-stretch: 125%; }
.horaires { margin: 0 0 var(--e4); max-width: 30rem; }
.horaires div { display: flex; justify-content: space-between; gap: var(--e4); border-top: 1px solid var(--filet); padding: var(--e2) 0; }
.horaires dt { font-weight: 600; }
.horaires dd { margin: 0; text-align: right; color: var(--ardoise); }
.appel { background: var(--nuit); color: var(--porcelaine); padding: var(--e6) var(--e5); border-radius: var(--angle); }
.appel-titre { font: 800 clamp(1.5rem, 2.4vw, 2rem)/1.02 var(--titre); font-stretch: 125%; }
.appel .actions, .appel p:last-child { margin-bottom: 0; }

/* ---------- Pages intérieures ---------- */
.tete-page {
  background: var(--nuit); color: var(--porcelaine);
  padding: calc(var(--entete) + clamp(48px, 7vw, 96px)) var(--gauche) clamp(48px, 7vw, 88px);
}
.tete-page h1 { max-width: 18ch; }
.tete-page .chapo { color: var(--porcelaine); max-width: 40em; }
.tete-page .actions { margin-top: var(--e6); }
.page-service .tete-page { min-height: 72vh; }
.liste-erreurs { margin: 0 0 var(--e4) 1.2em; }
.liste-erreurs li { margin-bottom: var(--e2); }

.cafes { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e6); margin-top: var(--e6); }
@media (min-width: 720px) { .cafes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cafe { border-top: 2px solid var(--nuit); padding-top: var(--e4); min-width: 0; }
.cafe h3 { font: 800 1.375rem/1.1 var(--titre); font-stretch: 125%; }
.cafe p { margin: 0 0 var(--e2); }
.cafe-mois { color: var(--ardoise); font-size: 1rem; }
.cafe-prix { font-weight: 600; margin-top: var(--e3) !important; }
.cafe-prix span { font-weight: 400; color: var(--ardoise); font-size: 1rem; }

.semaine { list-style: none; margin-top: var(--e6); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e5); }
@media (min-width: 720px) { .semaine { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.semaine li { display: grid; gap: var(--e2); border-top: 2px solid var(--nuit); padding-top: var(--e4); min-width: 0; }
.jour { font: 800 1.5rem/1 var(--titre); font-stretch: 125%; }
.texte-long p { max-width: 36em; }
.section-date .tampon { margin-top: var(--e3); font-size: 1rem; }

.texte-legal { max-width: 48rem; }
.texte-legal section + section { margin-top: var(--e7); }
.texte-legal h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
.texte-legal ul { margin-left: 1.2em; }
.texte-legal li { margin-bottom: var(--e2); max-width: 40em; }
.texte-legal a { color: var(--cobalt); font-weight: 600; }

.section-coordonnees { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e7); }
@media (min-width: 720px) { .section-coordonnees { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.coordonnees { min-width: 0; }
.coordonnees h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

/* Plan du site (page écrite par index_recherche.py) */
.page-plan .bloc { padding: clamp(48px, 7vw, 88px) var(--gauche); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e6); }
@media (min-width: 720px) { .page-plan .bloc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan-page { min-width: 0; }
.plan-page h2 { font-size: 1.375rem; }
.plan-page ul { list-style: none; }
.plan-page li { border-top: 1px solid var(--filet); }
.plan-page li a, .plan-page h2 a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cobalt); }

/* ---------- Formulaires ---------- */
.formulaire { max-width: 46rem; min-width: 0; }
.formulaire-note { font-size: 1rem; color: var(--ardoise); }
.groupe { border: 0; margin: 0 0 var(--e5); padding: 0; min-width: 0; }
.groupe legend { font-weight: 600; padding: 0; margin-bottom: var(--e2); }
.groupe .aide { margin: 0 0 var(--e3); }
.options { display: flex; flex-wrap: wrap; }
.option { display: inline-flex; }
.champ { margin-bottom: var(--e5); min-width: 0; }
.champ label { display: block; font-weight: 600; margin-bottom: 6px; }
.champ input, .champ textarea {
  width: 100%; min-height: 48px; padding: 0 var(--e3); font: inherit; color: var(--nuit);
  background: var(--blanc); border: 1px solid var(--ardoise); border-radius: var(--angle);
}
.champ textarea { padding: var(--e3); resize: vertical; }
.champ input:focus-visible, .champ textarea:focus-visible { outline-offset: 2px; }
[aria-invalid="true"] { border: 2px solid var(--rouge) !important; }
.groupe-erreur .option label { border-color: var(--rouge); }
.facultatif { font-weight: 400; color: var(--ardoise); }
.aide { font-size: 1rem; color: var(--ardoise); margin: 6px 0 0; }
.aide a { color: var(--cobalt); font-weight: 600; }
.erreur { color: var(--rouge); background: var(--blanc); font-size: 1rem; padding: var(--e1) var(--e2); border-radius: var(--angle); margin: var(--e2) 0 0; }
.alerte { background: var(--blanc); border-left: 4px solid var(--rouge); padding: var(--e3) var(--e4); font-weight: 600; }
.champs-deux { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--e4); }
@media (min-width: 640px) {
  .champs-deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .champs-ville { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
.champs-deux > * { min-width: 0; }
.case { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--e3); align-items: start; margin-bottom: var(--e5); }
.case input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--cobalt); }
.case label { font-size: 1.0625rem; }
.case label a { display: inline-block; padding: 2px 0; color: var(--cobalt); font-weight: 600; }
.case .erreur { grid-column: 2; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mention { font-size: 1rem; color: var(--ardoise); margin-top: var(--e5); }
.mention a { color: var(--cobalt); font-weight: 600; display: inline-block; padding: 2px 0; }
.suite-etapes { margin: var(--e5) 0 0 1.2em; }
.suite-etapes li { margin-bottom: var(--e2); }

/* ---------- Pied de page ---------- */
.pied { background: var(--nuit); color: var(--porcelaine); padding: var(--e8) var(--gauche) var(--e6); }
.pied-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e6); }
@media (min-width: 640px) { .pied-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .pied-grille { grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 3fr)); } }
.pied-grille > * { min-width: 0; }
.pied p { font-size: 1rem; }
.pied-nom { font: 800 1.5rem/1 var(--titre) !important; font-stretch: 125%; margin-bottom: var(--e3); }
.pied-titre { font: 600 1rem/1.3 var(--sans); font-stretch: 85%; color: var(--crema); margin-bottom: var(--e3); }
.pied ul { list-style: none; }
.pied li a { display: inline-flex; align-items: center; min-height: 36px; }
.pied-note { margin: var(--e7) 0 0; padding-top: var(--e4); border-top: 1px solid var(--filet-clair); color: var(--brume); max-width: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ----- Tour 2 : un monde par étape, dans les images (tasse, sachet daté, bols, boîte du mardi) -----
   Les pans de couleur du tour 1 sont retirés : le monde est dans l'image (papier crema, bleu nuit, bleu clair). Pour la
   lisibilité, chaque étape porte un voile de la couleur de son papier derrière son texte (valeurs de la planche validée
   par Louis le 2026-11-22), qui entre et sort avec elle (site.js). Le voile est un élément présent dès le chargement,
   opacité 0 et calque préparé : en pseudo-élément de l'étape, sa première peinture figeait l'écran 208 ms (mesuré). */
.cinema-voile { display: none; }
.cinema-anime .cinema-voile {
  display: block; grid-area: 1 / 1; z-index: 1; opacity: 0.001; will-change: opacity; pointer-events: none;
  --voile: 14, 27, 60; --fort: 0.55; --doux: 0.25;
  background: linear-gradient(90deg, rgba(var(--voile), var(--fort)) 0%, rgba(var(--voile), var(--doux)) 34%, rgba(var(--voile), 0) 52%);
}
.cinema-anime .voile-matin { --voile: 227, 178, 107; --fort: 0.75; --doux: 0.35; }
.cinema-anime .voile-jour { --voile: 230, 237, 248; --fort: 0.70; --doux: 0.35; }
@media (max-aspect-ratio: 5/4) {
  .cinema-anime .cinema-voile {
    background: linear-gradient(0deg, rgba(var(--voile), var(--fort)) 0%, rgba(var(--voile), var(--doux)) 30%, rgba(var(--voile), 0) 52%);
  }
}
.cinema-anime .etape-heure { display: block; }
.monde-matin .cinema-titre { color: var(--nuit); }
.monde-matin .etape-heure { color: var(--cobalt); }
/* La preuve est posée sur l'objet : son texte reste pour les lecteurs d'écran, sans s'afficher deux fois. */
.cinema-anime .cinema-etape .preuve-posee, .preuve-sur-image .preuve-posee {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; padding: 0; border: 0;
}

/* Textes posés : taille de dessin fixe, la transformation projective (site.js) les ramène sur l'objet à toute taille. */
.pose {
  position: absolute; left: 0; top: 0; z-index: 1; transform-origin: 0 0; color: var(--nuit);
  font-family: var(--sans); line-height: 1.1; opacity: 0; pointer-events: none; display: none;
}
/* Le papier de l'étiquette : de la teinte du papier rendu par Blender au repos (mesurée sur l'image), jusqu'au bord réel
   de l'étiquette (marges mesurées autour des 4 coins de la zone imprimable) : il couvre les lignes imprimées du rendu
   sans liseré ni blanc plaqué. La fiche du lot est vierge dans le rendu : le texte s'y imprime sans fond (lumière gardée). */
.pose::before {
  content: ""; position: absolute; z-index: -1; background: var(--papier, transparent);
  top: calc(-1 * var(--marge-haut, 0%)); bottom: calc(-1 * var(--marge-bas, 0%));
  left: calc(-1 * var(--marge-cote, 0%)); right: calc(-1 * var(--marge-cote, 0%));
}
.pose-sachet { --papier: rgb(178, 171, 164); --marge-cote: 6.4%; --marge-haut: 7%; --marge-bas: 7%; }
.pose-colis { --papier: rgb(187, 186, 186); --marge-cote: 4.6%; --marge-haut: 7.4%; --marge-bas: 5.2%; }
.pose p { margin: 0; }
.cinema-anime .cinema-scene > .pose { display: flex; flex-direction: column; }
.pose-sachet { width: 300px; height: 280px; padding: 26px 24px; justify-content: space-between; }
.pose-marque { font: 800 30px/1 var(--titre); font-stretch: 125%; color: var(--cobalt); }
.pose-ligne { font-size: 20px; font-weight: 600; border-top: 2px solid var(--cobalt); padding-top: 8px; }
.pose-tampon {
  position: absolute; right: 18px; bottom: 54px; width: 150px; height: 150px; border: 5px solid var(--cobalt); border-radius: 50%; color: var(--cobalt);
  display: grid; place-content: center; text-align: center; transform: rotate(-12deg); opacity: 0.9;
}
.pose-tampon small { display: block; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pose-tampon strong { display: block; font: 800 44px/1 var(--titre); font-stretch: 125%; }
.pose-lots { width: 300px; height: 205px; padding: 18px 22px; }
.pose-colis { width: 400px; height: 240px; padding: 22px 26px; }
.pose-petit { font-size: 15px; font-weight: 700; color: var(--cobalt); text-transform: uppercase; letter-spacing: 0.06em; }
.pose-colis .pose-petit { font-size: 18px; }
.pose-grand { font: 800 34px/1.02 var(--titre); font-stretch: 125%; margin: 8px 0 10px; }
.pose-colis .pose-grand { font-size: 52px; line-height: 1; margin: 10px 0 0; }
.pose-ligne-fine { font-size: 17px; }
.pose-colis .pose-ligne-fine { font-size: 20px; margin-top: 10px; }
/* Version fixe : le même texte posé sur l'image de l'étape (placé par site.js ; sans JavaScript, la preuve en texte suffit). */
.etape-image { position: relative; overflow: hidden; border-radius: var(--angle); }
.etape-image .pose.pose-place { display: flex; flex-direction: column; opacity: 1; }
.etape-image picture, .etape-image img { display: block; }

/* Tour 4 : le bouton « Choisir mon café » revient dans le premier écran du téléphone (le juge du tour 2 ne voyait que
   celui de la barre) ; il passe avant la ligne du prix, sans marge en plus. */
@media (max-aspect-ratio: 2/3) {
  .cinema-etape:first-child .actions { margin-top: var(--e3); }
}

/* ----- Pages intérieures : une image par page (contenu/photos.json, champ image de l'administration) ----- */
.photo-page { margin: var(--e6) 0 0; }
.photo-page img { display: block; width: 100%; height: auto; border-radius: var(--angle); }
@media (min-width: 960px) {
  .page-cafes .tete-page, .page-atelier .tete-page, .page-contact .tete-page {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--e8); align-items: center;
  }
  .tete-page > :not(.photo-page) { grid-column: 1; }
  .tete-page .photo-page { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
}

/* Tour 6 : site non reconstruit depuis plus de 7 jours (site.js) : aucune date de torréfaction affichée plutôt qu'une date démentie. */
.date-perimee .tampon, .date-perimee .pose-tampon { visibility: hidden; }
/* Tour 6 : formulaires du site de démonstration en ligne (site.js) : rien n'est envoyé, et c'est dit avant la saisie. */
.demo-note { margin: 0 0 var(--e5); padding: var(--e3) var(--e4); border-left: 3px solid var(--cobalt); background: var(--porcelaine); font-weight: 600; }
/* Tour 6 : volet des passages dessiné en continu (site.js, dessinerPassage), au-dessus du canvas et des étiquettes posées
   (.pose, z-index 1, placées avant lui), sous les textes (z-index 2) et le tampon de l'heure. */
.volet-continu { display: none; }
.cinema-anime .volet-continu.volet-actif { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.volet-continu .volet-nuit, .volet-continu .volet-filet { position: absolute; inset: 0; }
.volet-continu .volet-nuit { background: var(--nuit); }
.volet-continu .volet-filet { background: var(--crema); }
