/* Hallmark · checked: 2026-11-22 · genre: editorial (inferred)
 * floor: 1 FAIL kept (19: « Naturelle. Douce. Traditionnelle. » is the copy of the brand's own brief, one word per piece of the jar)
 * fixed: 16 (6a, 7a, 19 dashes, 26a, 26b, 28b, 29, 34, 44d, 48, 62, 63, 67, 69, 70, 76) · structural: 2 printed (6b, 58)
 * built: the project · redesign: 3D scroll story · v2.0.0 */
/* Hallmark · answered F8 · the thin line on the right edge shows the position in the page, it rides the same scroll as the 3D story */

/* =========================================================
   May'Bee Sugar, site vitrine
   Identité reprise des visuels de la marque : abeille, bruns
   chauds (espresso, moka, chocolat), latte, caramel, sable,
   lettrage en italique, arches.

   1 à 4. Le récit « Le rituel du sucre » : des chapitres
      transparents, hauts de plusieurs écrans, au-dessus de la
      scène 3D fixe (rituel3d.js). Leur texte reste à l'écran
      pendant que le défilement fait avancer la scène.
   5 à 8 et 10. Pages de contenu : une seule grille pour toutes
      (titre à gauche, contenu à droite ; l'un sous l'autre sur
      téléphone). Elles recouvrent la scène.
   9. Fin du récit : le pot se referme.
   Sans WebGL, sans JavaScript ou en mouvement réduit
   (data-scene="image") : chaque chapitre tient en un écran,
   sur une image fixe de la scène.

   Règles de la maison : pas de petites capitales espacées,
   pas d'étiquette décorative au-dessus des titres, pas de
   cadre quand un filet suffit, aucune couleur écrite en dur
   hors de la liste ci-dessous.
   ========================================================= */

/* ---------- Jetons (couleurs relevées sur le logo et les flyers, palette du kit) ---------- */
:root {
  --nuit: #140904;        /* noir chaud : l'écran avant que la lumière naisse */
  --brun: #2B160F;        /* espresso */
  --brun-bas: #2E170C;    /* bas du dégradé des pages brunes */
  --brun-2: #4A2B20;      /* moka */
  --or: #CDA55F;          /* or du logo */
  --or-clair: #F2C988;
  --caramel: #C98743;
  --creme: #FFF7E2;       /* texte clair */
  --ivoire: #FBF2E4;      /* fond des champs */
  --sable: #F6E9D9;       /* crème */
  --sable-bas: #EBD0B3;   /* bas du dégradé des pages sable */
  --encre: #402217;       /* texte sombre */
  --accent: #694332;      /* chocolat : texte secondaire sur fond clair */

  /* filets et voiles */
  --filet-clair: rgba(255, 247, 226, .3);
  --voile-clair: rgba(255, 247, 226, .08);
  --filet-sombre: rgba(64, 34, 23, .3);
  --voile-sombre: rgba(64, 34, 23, .08);
  --ombre-texte: rgba(20, 9, 4, .62);   /* voile sous le texte posé sur la scène */
  --ombre-ruban: rgba(20, 9, 4, .42);
  --ombre-haut: rgba(20, 9, 4, .3);     /* sous le haut de page, sur la scène */
  --ombre-nulle: rgba(20, 9, 4, 0);

  --f: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-sans: "Hanken Grotesk", "Segoe UI", Roboto, sans-serif;

  --ecran: 100vh;                  /* hauteur de l'écran ; voir juste en dessous */
  --ecran-fixe: 100vh;             /* hauteur stable (barres du navigateur affichées) */
  --m: clamp(22px, 5.5vw, 88px);   /* marge latérale */
  --bord: max(var(--m), calc((100vw - 1480px) / 2));   /* sur très grand écran, le contenu reste dans 1480 px centrés */
  --bar: 64px;                     /* hauteur de la zone du haut */
  --rayon: 12px;                   /* champs, cases du calendrier */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* la vraie hauteur visible sur téléphone, barres du navigateur comprises */
@supports (height: 100dvh) {
  :root { --ecran: 100dvh; }
}
@supports (height: 100svh) {
  :root { --ecran-fixe: 100svh; }
}

@media (min-width: 900px) {
  :root { --bar: 80px; }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  background: var(--nuit);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--nuit);
  color: var(--creme);
  font-family: var(--f);
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }
img { display: block; }
em { font-style: italic; }

::selection {
  background: var(--or);
  color: var(--brun);
}

.sprite { position: absolute; }

.abeille {
  aspect-ratio: 692 / 759;
  fill: currentColor;
}

.picto {
  flex: none;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.picto * { vector-effect: non-scaling-stroke; }

/* l'anneau de focus prend une couleur qui se voit sur le fond de la page (--anneau, fixé par ton) */
:focus-visible {
  outline: 2px solid var(--anneau, currentColor);
  outline-offset: 4px;
}
.page:focus { outline: 0; }

.saut {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--creme);
  color: var(--brun);
  font-family: var(--f-sans);
  font-size: 1rem;
  text-decoration: none;
  transform: translateY(-300%);
  transition: transform .3s var(--ease-out);
}
.saut:focus {
  outline: 2px solid var(--or-clair);
  outline-offset: 3px;
  transform: none;
}

/* ---------- Tons ---------- */
.sombre,
.brun,
.chapitre {
  --trait: var(--filet-clair);
  --voile: var(--voile-clair);
  --relief: var(--or-clair);          /* sous-titres, prix, pictogrammes */
  --plein: var(--creme);              /* fond des éléments choisis */
  --plein-texte: var(--brun);
  --anneau: var(--or-clair);
  color: var(--creme);
}
.sable {
  --trait: var(--filet-sombre);
  --voile: var(--voile-sombre);
  --relief: var(--accent);
  --plein: var(--encre);
  --plein-texte: var(--creme);
  --anneau: var(--encre);
  color: var(--encre);
}
.sombre { background: var(--brun); }
.sable { background: linear-gradient(180deg, var(--sable) 0%, var(--sable-bas) 100%); }
.brun { background: linear-gradient(180deg, var(--brun-2) 0%, var(--brun-bas) 100%); }

/* =========================================================
   La scène 3D : fixe, derrière tout le reste
   ========================================================= */
.scene {
  position: fixed;
  z-index: 0;
  inset: 0 0 auto;
  height: 100vh;
  background: radial-gradient(120% 90% at 30% 35%, var(--brun-2) 0%, var(--brun) 55%, var(--nuit) 100%);
  pointer-events: none;
}
@supports (height: 100lvh) {
  .scene { height: 100lvh; }
}
.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.scene canvas.est-prete { opacity: 1; }
/* le récit en film (téléphone) : il remplace le canvas */
.scene__recit {
  display: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.scene__recit video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[data-lecteur="film"] .scene__recit { display: block; }
[data-lecteur="film"] .scene canvas { visibility: hidden; }
.scene__recit.est-prete { opacity: 1; }
/* le film de l'ouverture, par-dessus la première image du récit, puis il s'efface */
.scene__ouverture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.scene__ouverture.est-pret { opacity: 1; }
/* les voiles sous les textes du récit, fixes avec la scène (rituel3d.js règle leur opacité) :
   du côté où le texte est posé, ou au centre pour le titre du ruban */
.scene__voile {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, var(--ombre-texte) 0%, var(--ombre-nulle) 46%);
}
.scene__voile[data-voile="centre"] { background: radial-gradient(60% 40% at 50% 50%, var(--ombre-ruban) 0%, var(--ombre-nulle) 100%); }
@media (min-aspect-ratio: 1/1) {
  .scene__voile[data-voile="cote"] { background: linear-gradient(90deg, var(--ombre-texte) 0%, var(--ombre-nulle) 52%); }
}
/* sous le haut de page, une ombre légère qui ne bouge pas : le nom et le bouton restent lisibles
   sur la lumière de la scène */
.scene::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--bar) * 2 + env(safe-area-inset-top));
  background: linear-gradient(180deg, var(--ombre-haut) 0%, var(--ombre-nulle) 100%);
  transition: opacity .9s var(--ease);
}
.js[data-ouverture="attente"] .scene::after,
.js[data-ouverture="lecture"] .scene::after { opacity: 0; }
/* avant que la lumière naisse, l'écran est sombre */
.js[data-ouverture="attente"] .scene { background: var(--nuit); }

main {
  position: relative;
  z-index: 1;
}

/* ---------- Les chapitres du récit ---------- */
.chapitre {
  position: relative;
  height: calc(var(--long, 1) * var(--ecran-fixe));
}
.chapitre__ecran {
  position: sticky;
  top: 0;
  display: grid;
  height: var(--ecran-fixe);
  padding:
    calc(var(--bar) + env(safe-area-inset-top) + 8px)
    max(var(--bord), env(safe-area-inset-right))
    calc(clamp(28px, 6vh, 64px) + env(safe-area-inset-bottom))
    max(var(--bord), env(safe-area-inset-left));
  overflow: hidden;
  overflow: clip;
}
/* un voile très doux sous le texte, du côté où il est posé : il reste lisible quelle que soit la lumière */
.chapitre__ecran::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, var(--ombre-texte) 0%, var(--ombre-nulle) 46%);
  pointer-events: none;
}
@media (min-aspect-ratio: 1/1) {
  .chapitre__ecran::before { background: linear-gradient(90deg, var(--ombre-texte) 0%, var(--ombre-nulle) 52%); }
}
/* avec la scène en mouvement, ce voile passe sur la scène fixe (.scene__voile) */
.scene-textes .chapitre__ecran::before { content: none; }

/* Sans scène 3D (pas de WebGL, pas de JavaScript, mouvement réduit) :
   chaque chapitre tient en un écran, sur une image fixe de la scène */
html:not(.js) .chapitre,
[data-scene="image"] .chapitre { height: auto; }
html:not(.js) .chapitre__ecran,
[data-scene="image"] .chapitre__ecran {
  position: relative;
  height: auto;
  min-height: var(--ecran);
  background: var(--brun) var(--fixe-paysage, none) 50% 50% / cover no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  html:not(.js) .chapitre__ecran,
  [data-scene="image"] .chapitre__ecran { background-image: var(--fixe-portrait, none); }
}
html:not(.js) .scene canvas,
[data-scene="image"] .scene canvas { display: none; }
.accueil { --fixe-paysage: url("assets/rituel-accueil-paysage.webp"); --fixe-portrait: url("assets/rituel-accueil-portrait.webp"); }
.rituel { --fixe-paysage: url("assets/rituel-ouvert-paysage.webp"); --fixe-portrait: url("assets/rituel-ouvert-portrait.webp"); }
.matiere { --fixe-paysage: url("assets/rituel-pieces-paysage.webp"); --fixe-portrait: url("assets/rituel-pieces-portrait.webp"); }
.ruban { --fixe-paysage: url("assets/rituel-ruban-paysage.webp"); --fixe-portrait: url("assets/rituel-ruban-portrait.webp"); }
.douceur { --fixe-paysage: url("assets/rituel-fin-paysage.webp"); --fixe-portrait: url("assets/rituel-fin-portrait.webp"); }

/* ---------- Apparitions à l'arrivée sur une page de contenu ---------- */
.js .monte {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}
.js .is-in .monte {
  opacity: 1;
  transform: none;
}

/* le filet se trace */
.js .filet.monte {
  opacity: 1;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}
.js .is-in .filet.monte { transform: scaleX(1); }

/* les textes du récit sont réglés par la scène (opacité, glissement) */
.scene-textes [data-montre] { will-change: opacity, transform; }

/* ---------- Typographie commune ---------- */
.titre {
  font: italic 300 clamp(2.25rem, min(10.4vw, 7.4vh), 3rem)/1.02 var(--f);
  letter-spacing: -.01em;
}

/* la suite du titre, dans la même voix, un ton en dessous */
.soustitre {
  color: var(--relief);
  font: italic 300 clamp(1.375rem, min(2.5vw, 4.4vh), 2.25rem)/1.1 var(--f);
}

.filet {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--relief);
  transform-origin: 0 50%;
}

.chapo {
  max-width: 24em;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- Boutons et liens ---------- */
.pilule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 500 1.0625rem/1.2 var(--f-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease), transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.pilule:active { transform: translateY(1px) scale(.985); }
.pilule--petite {
  min-height: 44px;
  padding: 0 20px;
  font-size: 1rem;
}
/* sur la scène : bouton crème */
.pilule--claire {
  border-color: var(--creme);
  background: var(--creme);
  color: var(--brun);
}
/* sur une page : bouton plein, dans l'encre de la page */
.pilule--pleine {
  border-color: var(--plein);
  background: var(--plein);
  color: var(--plein-texte);
}
.pilule:disabled {
  opacity: .38;
  cursor: not-allowed;
  transform: none;
}

.lien {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 400 1.0625rem/1.3 var(--f-sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  transition: text-underline-offset .3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.lien:active { opacity: .7; }

@media (hover: hover) {
  .pilule:hover:not(:disabled) {
    border-color: var(--plein, var(--creme));
    background: var(--plein, var(--creme));
    color: var(--plein-texte, var(--brun));
  }
  .pilule--claire:hover,
  .sombre .pilule--pleine:hover:not(:disabled),
  .brun .pilule--pleine:hover:not(:disabled) {
    border-color: var(--or-clair);
    background: var(--or-clair);
    color: var(--brun);
  }
  .sable .pilule--pleine:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--creme);
  }
  .lien:hover { text-underline-offset: .42em; }
}

/* ---------- Haut de page ---------- */
.chrome {
  --plein: var(--creme);
  --plein-texte: var(--brun);
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: calc(var(--bar) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--bord), env(safe-area-inset-right)) 0 max(var(--bord), env(safe-area-inset-left));
  color: var(--creme);
  pointer-events: none;
  transition: color .6s var(--ease), opacity .9s var(--ease), visibility 0s;
}
.chrome > * { pointer-events: auto; }
/* sur une page, le haut de page prend le fond de la page, avec un filet :
   le texte qui défile passe dessous sans se mêler au nom (script.js pose data-haut) */
.chrome::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-bottom: 1px solid var(--filet-sombre);
  background: var(--sable);
  opacity: 0;
  transition: opacity .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease);
}
[data-haut="sable"] .chrome::before { opacity: 1; }
[data-haut="brun"] .chrome::before {
  border-bottom-color: var(--filet-clair);
  background: var(--brun-2);
  opacity: 1;
}
[data-tone="clair"] .chrome {
  --plein: var(--encre);
  --plein-texte: var(--creme);
  color: var(--encre);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  font: 400 1.3125rem/1 var(--f);
  text-decoration: none;
  white-space: nowrap;
}
.brand .abeille {
  width: 24px;
  color: var(--or);
  transition: color .6s var(--ease);
}
[data-tone="clair"] .brand .abeille { color: inherit; }

.chrome__nav {
  display: flex;
  align-items: center;
  gap: 4px clamp(14px, 2vw, 28px);
}
.chrome__lien {
  display: none;
  align-items: center;
  min-height: 44px;
  font: 400 1rem/1 var(--f-sans);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 720px) {
  .chrome__lien { display: inline-flex; }
}
@media (hover: hover) {
  .chrome__lien:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .32em;
  }
}

/* Pendant l'ouverture, le haut de page attend que la lumière soit là */
.js[data-ouverture="attente"] .chrome,
.js[data-ouverture="lecture"] .chrome {
  opacity: 0;
  visibility: hidden;
}

/* Progression : une ligne fine sur le bord droit */
.progress {
  position: fixed;
  top: 50vh;
  right: clamp(8px, 1.4vw, 22px);
  width: 3px;
  height: clamp(56px, 12vh, 96px);
  transform: translateY(-50%);
  pointer-events: none;
}
.progress::before {
  content: "";
  position: absolute;
  inset: 0 1px;
  background: currentColor;
  opacity: .3;
}
.progress i {
  position: absolute;
  inset: 0 0 auto;
  height: 16.667%;
  background: currentColor;
}
@supports (animation-timeline: scroll()) {
  .progress i {
    animation: avance linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes avance {
  to { transform: translateY(500%); }
}

/* Passer le récit : en bas à droite, tant que le récit en 3D est à l'écran */
.passer {
  position: fixed;
  z-index: 30;
  right: max(var(--bord), env(safe-area-inset-right));
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  /* une pastille sombre : le lien reste lisible sur la pierre claire comme sur l'ombre */
  background: var(--ombre-texte);
  color: var(--creme);
  font: 400 1rem/1 var(--f-sans);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease), visibility 0s .5s, background-color .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
[data-scene="images"][data-recit="oui"][data-ouverture="fini"] .passer {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s var(--ease), visibility 0s, background-color .3s var(--ease);
}
.passer:active { background: var(--brun); }
@media (hover: hover) {
  .passer:hover { background: var(--brun); }
}
.passer:focus-visible { outline-color: var(--or-clair); }

/* ---------- Arches : la forme de la marque ---------- */
.arche {
  flex: none;
  width: var(--w);
  overflow: hidden;
  border-radius: calc(var(--w) / 2) calc(var(--w) / 2) 0 0;
}
.arche img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* la photo se dévoile de bas en haut, comme un store qu'on lève */
.js .arche {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.3s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}
.js .is-in .arche { clip-path: inset(0 0 0 0); }

/* =========================================================
   1 · Accueil : le pot fermé
   Écran large : le texte à gauche, le pot à droite.
   Écran étroit : le texte en haut, le pot en dessous.
   ========================================================= */
.accueil .chapitre__ecran {
  align-content: start;
  justify-items: center;
  text-align: center;
}
.accueil__bloc {
  display: grid;
  justify-items: center;
  width: min(100%, 560px);
}
.accueil__contenu {
  display: grid;
  justify-items: inherit;
  width: 100%;
}
.accueil__abeille {
  width: clamp(40px, min(11vw, 7vh), 64px);
  color: var(--or);
}
.marque {
  margin-top: clamp(6px, 1.2vh, 14px);
  font: 350 clamp(1.5rem, min(5vw, 4vh), 2.25rem)/1.1 var(--f);
  letter-spacing: .005em;
}
.slogan {
  margin-top: clamp(4px, 1vh, 12px);
  font: italic 300 clamp(2.375rem, min(11vw, 7.4vh), 4.75rem)/1.02 var(--f);
  letter-spacing: -.012em;
}
/* ce que fait la marque, en une phrase */
.lede {
  max-width: 19em;
  margin-top: clamp(8px, 1.6vh, 20px);
  color: var(--or-clair);
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.4;
  text-wrap: balance;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 26px;
  margin-top: clamp(14px, 3vh, 34px);
}

@media (min-aspect-ratio: 1/1) {
  .accueil .chapitre__ecran {
    align-content: center;
    justify-items: start;
    text-align: left;
  }
  .accueil__bloc {
    justify-items: start;
    width: min(44vw, 600px);
  }
  .accueil .actions { justify-content: flex-start; }
  .slogan { font-size: clamp(2.25rem, min(5.4vw, 10vh), 5rem); }
}

@media (max-width: 480px) {
  .actions { gap: 6px 20px; }
  .chapitre .pilule { padding: 0 22px; }
}
@media (max-width: 380px) {
  .actions { gap: 6px 14px; }
  .chapitre .pilule { padding: 0 18px; }
}

/* ---------- L'ouverture ----------
   data-ouverture est posé sur <html> avant le premier affichage :
   attente (la scène se charge) -> lecture (la lumière naît) -> fini. */
.accueil__bloc {
  transition: opacity 1.1s var(--ease), transform 1.3s var(--ease-out);
}
.js[data-ouverture="attente"] .accueil__bloc,
.js[data-ouverture="lecture"] .accueil__bloc {
  opacity: 0;
  transform: translateY(14px);
}

/* =========================================================
   2 à 4 · Le récit
   ========================================================= */
/* 2 · le pot s'ouvre : texte en bas à gauche (écran large), en haut (écran étroit) */
.rituel .chapitre__ecran { align-content: start; }
.chapitre__texte {
  display: grid;
  gap: clamp(8px, 1.6vh, 16px);
  max-width: 30rem;
}
@media (min-aspect-ratio: 1/1) {
  .rituel .chapitre__ecran { align-content: end; }
  .rituel .titre { font-size: clamp(2.5rem, min(4.6vw, 8.6vh), 4.5rem); }
}

/* 3 · les pièces séparées : trois mots, l'un sous l'autre */
.matiere .chapitre__ecran { align-content: start; }
.mots {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .4em;
  font: italic 300 clamp(1.75rem, min(8vw, 5vh), 2.75rem)/1.08 var(--f);
  letter-spacing: -.01em;
}
.mots span { display: block; }
@media (min-aspect-ratio: 1/1) {
  .matiere .chapitre__ecran { align-content: center; }
  .mots {
    flex-direction: column;
    font-size: clamp(2.5rem, min(5vw, 9vh), 4.75rem);
  }
}

/* 4 · le ruban : le titre au centre, le ruban passe derrière */
.ruban .chapitre__ecran {
  align-content: center;
  justify-items: center;
  text-align: center;
}
.ruban .chapitre__ecran::before { background: radial-gradient(60% 40% at 50% 50%, var(--ombre-ruban) 0%, var(--ombre-nulle) 100%); }
.ruban__titre { font-size: clamp(2.75rem, min(11vw, 12vh), 6.5rem); }

/* 9 · fin : le pot se referme, la phrase arrive */
.douceur .chapitre__ecran {
  align-content: start;
  justify-items: center;
  text-align: center;
}
.douceur__bloc {
  display: grid;
  justify-items: center;
  width: min(100%, 620px);
}
.douceur__titre { font-size: clamp(2.125rem, min(9.4vw, 6.6vh), 4.25rem); }
@media (min-aspect-ratio: 1/1) {
  .douceur .chapitre__ecran {
    align-content: center;
    justify-items: start;
    text-align: left;
  }
  .douceur__bloc {
    justify-items: start;
    width: min(46vw, 640px);
  }
  .douceur .actions { justify-content: flex-start; }
}

/* =========================================================
   5 à 8 et 10 · Pages de contenu : une seule grille
   ========================================================= */
.page {
  position: relative;
  display: grid;
  align-items: center;
  min-height: var(--ecran);
  padding:
    calc(var(--bar) + env(safe-area-inset-top))
    max(var(--m), env(safe-area-inset-right))
    calc(clamp(26px, 5.4vh, 56px) + env(safe-area-inset-bottom))
    max(var(--m), env(safe-area-inset-left));
}

.page__grille {
  display: grid;
  gap: clamp(16px, 3.2vh, 30px);
  width: min(100%, 1180px);
  margin-inline: auto;
}

/* en-tête : le titre, et parfois une petite arche (écran large seulement) */
.page__tete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.page__titre {
  display: grid;
  justify-items: start;
  gap: clamp(8px, 1.6vh, 16px);
  min-width: 0;
}

.arche--petite { display: none; }

@media (min-width: 900px) {
  .page__grille {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    column-gap: clamp(48px, 7vw, 120px);
  }
  .page__tete {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(22px, 4.4vh, 48px);
  }
  .page__titre { gap: clamp(12px, 2.2vh, 22px); }
  .page .titre { font-size: clamp(3rem, min(5.2vw, 9.4vh), 5rem); }
  .page .titre span { display: block; }
  .arche--petite {
    --w: min(15vw, 25vh, 220px);
    display: block;
    height: calc(var(--w) * 1.42);
  }
}

/* ---------- 5 · Le vrai matériel : la photo, et le rituel en trois temps ---------- */
.produits .page__tete { flex-direction: column; align-items: stretch; }
.etapes {
  display: grid;
  border-top: 1px solid var(--trait);
}
.etapes li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: clamp(9px, 1.9vh, 18px) 0;
  border-bottom: 1px solid var(--trait);
  font-size: clamp(1.125rem, min(1.7vw, 3.2vh), 1.4375rem);
  line-height: 1.3;
}
.etapes b {
  color: var(--relief);
  font: 500 .9375rem/1.3 var(--f-sans);
}
.materiel {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.arche--materiel {
  --w: min(62vw, 34vh, 380px);
  height: calc(var(--w) * 1.215);
}
.materiel figcaption {
  color: var(--relief);
  font: 400 .9375rem/1.3 var(--f-sans);
}
@media (min-width: 900px) {
  .produits .page__tete { align-items: flex-start; }
  .etapes { width: 100%; }
  .arche--materiel { --w: min(30vw, 56vh, 400px); }
}

/* ---------- 6 · Les tarifs : une liste, un filet par ligne ---------- */
.carte {
  display: grid;
  border-top: 1px solid var(--trait);
}
.carte li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(5px, 1.15vh, 12px) 0;
  border-bottom: 1px solid var(--trait);
  font-size: clamp(1.125rem, min(5vw, 3.2vh), 1.3125rem);
  line-height: 1.3;
}
.carte b {
  color: var(--relief);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

@media (min-width: 900px) {
  /* deux colonnes de cinq lignes, dans l'ordre de lecture */
  .carte {
    grid-template-rows: repeat(5, auto);
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    column-gap: clamp(40px, 5vw, 88px);
    border-top: 0;
  }
  .carte li {
    padding: clamp(8px, 2vh, 22px) 0;
    font-size: clamp(1.1875rem, min(1.85vw, 3.4vh), 1.625rem);
  }
  .carte li:nth-child(5n + 1) { border-top: 1px solid var(--trait); }
}

/* ---------- 7 · Les packs : deux lignes, chacune est un lien vers la réservation ---------- */
.formules {
  display: grid;
  border-top: 1px solid var(--trait);
}
.formule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 24px;
  row-gap: clamp(6px, 1.3vh, 14px);
  padding: clamp(18px, 4.2vh, 46px) 0;
  border-bottom: 1px solid var(--trait);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.formule__nom {
  font: italic 300 clamp(2rem, min(4.4vw, 7.6vh), 3.75rem)/1.05 var(--f);
  letter-spacing: -.01em;
}
.formule__prix {
  font: 400 clamp(2rem, min(4.4vw, 7.6vh), 3.75rem)/1.05 var(--f);
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.formule__detail {
  grid-column: 1 / -1;
  max-width: 30em;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.formule__action {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--relief);
  font: 400 1rem/1.3 var(--f-sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  transition: text-underline-offset .3s var(--ease-out);
}
.formule:active { opacity: .72; }
@media (hover: hover) {
  .formule:hover .formule__action { text-underline-offset: .42em; }
}

/* ---------- 8 · Informations pratiques ---------- */
.pratique {
  display: grid;
  border-top: 1px solid var(--trait);
}
.pratique li {
  padding: clamp(9px, 2vh, 20px) 0;
  border-bottom: 1px solid var(--trait);
  font-size: clamp(1.125rem, min(1.85vw, 3.3vh), 1.5625rem);
  line-height: 1.3;
  text-wrap: balance;
}
.pratique .lien {
  display: inline-block;
  min-height: 0;
  margin-block: -12px;                  /* zone tactile confortable sans changer la hauteur de la ligne */
  padding-block: 12px;
  color: var(--relief);
  font: inherit;
}

/* ---------- 10 · Rendez-vous : la page écrit le message à envoyer ---------- */
.rdv {
  grid-template-rows: 1fr auto;
  row-gap: clamp(12px, 2.4vh, 24px);
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.rdv .chapo { display: none; }

.demande {
  display: grid;
  gap: clamp(10px, 2vh, 20px);
  width: min(100%, 480px);
  margin-inline: auto;
}

.champ {
  min-width: 0;
  padding: 0;
  border: 0;
}
.champ > label,
.champ > legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  color: var(--relief);
  font: 500 .9375rem/1.3 var(--f-sans);
}

.liste { position: relative; }
.liste select {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--ivoire);
  color: inherit;
  font: 400 1.125rem/1.2 var(--f);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .3s var(--ease);
}
.liste select:hover { border-color: var(--encre); }
.liste select:focus-visible { outline-offset: 2px; }
.picto--chevron {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 14px;
  height: 8px;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Le calendrier : les semaines à venir, du lundi au dimanche */
.agenda__tete {
  display: flex;
  align-items: center;
  gap: 4px;
}
.agenda__periode {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  font: italic 400 clamp(1.0625rem, 1.4vw, 1.1875rem)/1.2 var(--f);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda__nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--rayon);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.agenda__nav .picto {
  width: 9px;
  height: 15px;
  stroke-width: 1.6px;
}
.agenda__nav:active:not(:disabled) { background: var(--voile); }
.agenda__nav:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.agenda__semaine,
.agenda__grille {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.agenda__semaine span {
  padding-bottom: 2px;
  color: var(--relief);
  font: 400 .8125rem/1.3 var(--f-sans);
  text-align: center;
}

.jour {
  position: relative;
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--rayon);
  background: transparent;
  color: inherit;
  font: 400 1rem/1 var(--f-sans);
  font-variant-numeric: lining-nums tabular-nums;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
/* le premier du mois porte le nom du mois */
.jour small {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  color: var(--relief);
  font-size: .6875rem;
  line-height: 1;
}
.jour:has(small) { padding-bottom: 10px; }
.jour[aria-current="date"] { border-color: var(--trait); }      /* aujourd'hui */
.jour:active:not(:disabled) { background: var(--voile); }
.jour[aria-pressed="true"] {
  border-color: var(--plein);
  background: var(--plein);
  color: var(--plein-texte);
}
.jour[aria-pressed="true"] small { color: inherit; }
.jour:focus-visible { outline-offset: 2px; }
.jour:disabled {
  opacity: .34;
  cursor: not-allowed;
}
@media (hover: hover) {
  .agenda__nav:hover:not(:disabled),
  .jour:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--voile); }
}

/* Le moment de la journée : trois choix dans un même cadre */
.moments {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.05fr) minmax(0, 1.25fr);
  overflow: hidden;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
}
.moments label { position: relative; }
.moments label + label { border-left: 1px solid var(--trait); }
.moments input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.moments span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 4px 6px;
  font: 400 .9375rem/1.15 var(--f-sans);
  text-align: center;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.moments input:checked + span {
  background: var(--plein);
  color: var(--plein-texte);
}
.moments input:focus-visible + span {
  outline: 2px solid var(--anneau);
  outline-offset: -4px;
}
.moments input:checked:focus-visible + span { outline-color: var(--plein-texte); }
@media (hover: hover) {
  .moments input:not(:checked):hover + span { background: var(--voile); }
}

/* Le message, écrit au fur et à mesure des choix */
.message {
  display: grid;
  gap: clamp(8px, 1.5vh, 14px);
  padding-top: clamp(10px, 2vh, 18px);
  border-top: 1px solid var(--trait);
}
.message__texte {
  min-height: 4.2em;                    /* trois lignes : la page ne bouge pas quand le texte change */
  font: italic 400 clamp(1.0625rem, 1.4vw, 1.1875rem)/1.4 var(--f);
  text-wrap: pretty;
}
.message__texte.est-vide { color: var(--relief); }
.message__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}
.message__actions .pilule { min-height: 48px; }
.message__etat {
  min-height: 1.4em;                    /* la ligne est réservée : rien ne bouge quand elle parle */
  color: var(--relief);
  font: 400 .9375rem/1.4 var(--f-sans);
}
.lien--insta { gap: 8px; }
.lien--insta .picto {
  width: 22px;
  height: 22px;
}

.pied {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 20px;
  font: 400 .875rem/1.3 var(--f-sans);
}
.pied em {
  font: italic 400 1.0625rem/1.3 var(--f);
}

@media (max-width: 639px) {
  /* téléphone : les intitulés vont de soi, on les garde pour les lecteurs d'écran seulement */
  .demande .champ > label,
  .demande .champ > legend {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  /* le bouton et le lien sur une seule ligne */
  .message__actions {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
  }
  .message__actions .pilule {
    padding: 0 18px;
    font-size: 1rem;
  }
  .message__actions .lien {
    font-size: 1rem;
    white-space: nowrap;
  }
  .rdv .filet { display: none; }        /* aucune phrase ne le suit à cette largeur */
  .progress { display: none; }          /* sur téléphone, le repère touchait la colonne des prix */
  .pied > span { display: none; }       /* la signature seule : la place manque pour deux lignes */
  .pied em { font-size: 1rem; }
}
@media (max-width: 350px) {
  /* très petits téléphones : le lien passe sous le bouton */
  .message__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px 16px;
  }
}
@media (min-width: 640px) {
  .rdv .chapo { display: block; }
}
@media (min-width: 900px) {
  .demande { margin-inline: auto 0; }
}
/* Écran large : le calendrier à droite, le reste à gauche, tout tient sans défiler */
@media (min-width: 1100px) {
  .rdv .page__grille { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .demande {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas:
      "prestation agenda"
      "moment     agenda"
      "message    agenda";
    align-items: start;
    column-gap: clamp(28px, 3vw, 48px);
    width: 100%;
    max-width: 740px;
  }
  .demande > .champ:first-child { grid-area: prestation; }
  .demande > .agenda { grid-area: agenda; }
  .demande > .moments-champ { grid-area: moment; }
  .demande > .message { grid-area: message; }
}

/* =========================================================
   Écrans bas, mouvement réduit
   ========================================================= */
/* Petits téléphones : on resserre pour que chaque page tienne à l'écran */
@media (max-height: 740px) and (max-width: 639px) {
  .page__grille { gap: 12px; }
  .page__titre { gap: 6px; }
  .demande { gap: 10px; }
  .liste select { height: 44px; }
  .agenda__tete { margin-top: -4px; }
  .message {
    gap: 8px;
    padding-top: 10px;
  }
  .arche--materiel { --w: min(54vw, 30vh); }
}
@media (max-height: 620px) and (max-width: 639px) {
  .page .titre { font-size: 2rem; }
  .carte li { padding: 3px 0; }
  .etapes li { padding: 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .monte,
  .js .filet.monte {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js .arche {
    clip-path: none;
    transition: none;
  }
  .accueil__bloc { transform: none !important; }
  .pilule:active { transform: none; }
  *,
  *::before,
  *::after { transition-duration: .01ms !important; }
}
