﻿@charset "utf-8";
/* ═══════════════════════════════════════════════════════════════
   DU DUEL AU DUO — feuille de style
   Palette « braise & miel », dérivée de la photographie du couloir.
   Type : Amiri (une seule famille pour le latin et l'arabe) + Karla.
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. Jetons ────────────────────────────────────────────────── */
:root {
  /* couleurs — voir LISEZ-MOI.md pour les mesures de contraste */
  --nuit:     oklch(0.190 0.028 48);    /* fond profond, le couloir      */
  --nuit-2:   oklch(0.245 0.032 46);    /* surface sur fond nuit         */
  --braise:   oklch(0.340 0.055 45);    /* filets, bordures sur nuit     */
  --safran:   oklch(0.800 0.148 72);    /* ACCENT PRIMAIRE — la lanterne */
  --grenade:  oklch(0.520 0.155 26);    /* accent secondaire — le duel   */
  --grenade-t: oklch(0.470 0.150 26);   /* la même, lisible en petit corps sur fond clair */
  --miel:     oklch(0.930 0.045 78);    /* fond clair                    */
  --platre:   oklch(0.972 0.018 80);    /* surface sur fond clair        */
  --encre:    oklch(0.260 0.030 50);    /* texte sur fond clair          */
  --encre-2:  oklch(0.430 0.028 50);    /* texte secondaire sur clair    */
  --creme:    oklch(0.930 0.030 75);    /* texte sur fond nuit           */
  --creme-2:  oklch(0.760 0.028 70);    /* texte secondaire sur nuit     */

  /* typographie */
  --f-titre: "Amiri", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-corps: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pas-hero:  clamp(3rem, 1.4rem + 6.6vw, 6.75rem);
  --pas-titre: clamp(1.95rem, 1.25rem + 2.9vw, 3.4rem);
  --pas-large: clamp(2.4rem, 1.4rem + 4.1vw, 4.4rem);
  --pas-sous:  clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  --pas-corps: 1.0625rem;
  --pas-menu:  0.8125rem;

  /* espace, rayons */
  --largeur: 1240px;
  --gouttiere: clamp(1.25rem, 4vw, 4rem);
  --r-1: 4px; --r-2: 10px; --r-3: 20px; --r-4: 34px;

  /* mouvement */
  --t-clic: 110ms;
  --t-survol: 180ms;
  --t-entree: 320ms;
  --e-entree: cubic-bezier(0.2, 0, 0, 1);
  --e-sortie: cubic-bezier(0.4, 0, 1, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Le passage se joue en deux temps : --a referme les battants, --b les ouvre. */
@property --a { syntax: "<number>"; initial-value: 0; inherits: true; }
@property --b { syntax: "<number>"; initial-value: 0; inherits: true; }

/* ─── 2. Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--nuit);
  color: var(--creme);
  font-family: var(--f-corps);
  font-size: var(--pas-corps);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--f-titre); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--safran); outline-offset: 3px; border-radius: var(--r-1); }
::selection { background: var(--safran); color: var(--nuit); }
.defs { position: absolute; }

.evitement {
  position: absolute; left: 50%; top: 0; translate: -50% -120%; z-index: 100;
  padding: 0.75rem 1.25rem; background: var(--safran); color: var(--nuit);
  font-weight: 700; border-radius: 0 0 var(--r-2) var(--r-2); transition: translate var(--t-survol) var(--e-entree);
}
.evitement:focus-visible { translate: -50% 0; }

.conteneur { width: min(100% - var(--gouttiere) * 2, var(--largeur)); margin-inline: auto; }
section[id] { scroll-margin-top: 5.5rem; }

/* ─── 3. Typographie partagée ──────────────────────────────────── */
.surtitre {
  margin: 0 0 0.9rem;
  font-size: var(--pas-menu); font-weight: 700; letter-spacing: 0.17em;
  text-transform: uppercase; color: var(--safran);
}
.titre { font-size: var(--pas-titre); max-width: 20ch; }
.titre--large { font-size: var(--pas-large); max-width: 17ch; }
.chapeau { font-size: var(--pas-sous); line-height: 1.5; max-width: 46ch; color: var(--encre-2); }

/* marqueur des données non tranchées dans le dossier */
.jalon {
  display: inline-block; padding: 0.1em 0.5em; border-radius: var(--r-1);
  background: color-mix(in oklch, var(--grenade) 22%, transparent);
  border: 1px dashed color-mix(in oklch, var(--grenade) 55%, transparent);
  color: inherit; font-family: var(--f-corps); font-size: 0.82em; font-style: normal;
  letter-spacing: 0.01em; white-space: nowrap;
}

/* ─── 4. Matière : grain, arcs, étoile ─────────────────────────── */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background-image: var(--grain); opacity: 0.05; mix-blend-mode: overlay;
}

/* Deux traitements d'image, selon l'orientation : l'arc pour les portraits,
   le cadre arrondi pour les paysages — la découpe en arc écrase une image large. */
.cadre-arc {
  clip-path: url(#arc);
  overflow: hidden;
  background: var(--braise);
}
.cadre-arc img { width: 100%; height: 100%; object-fit: cover; }

.img-cadre { border-radius: var(--r-4); overflow: hidden; background: var(--braise); }
.img-cadre img { width: 100%; height: 100%; object-fit: cover; }
.img-cadre--sombre { box-shadow: 0 0 0 1px oklch(1 0 0 / 0.1) inset, 0 34px 64px -34px oklch(0.08 0.02 45 / 0.95); }
.img-cadre--clair  { box-shadow: 0 0 0 1px oklch(0 0 0 / 0.1) inset, 0 26px 52px -28px oklch(0.3 0.05 50 / 0.4); }

/* ─── Fonds de section : image ou vidéo, toujours sous un voile ─────────── */
.fond-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fond-media__img, .fond-media__video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.06);
}
.fond-media__voile { position: absolute; inset: 0; }
@supports (animation-timeline: view()) {
  .zoom-scroll {
    animation: zoom-fond linear both;
    animation-timeline: view(); animation-range: cover 0% cover 100%;
  }
  @keyframes zoom-fond {
    from { transform: scale(1.02); }
    to   { transform: scale(1.17); }
  }
  /* variante lente : quand un autre zoom joue déjà dans le même écran */
  .zoom-scroll--doux { animation-name: zoom-fond-doux; }
  @keyframes zoom-fond-doux {
    from { transform: scale(1.03); }
    to   { transform: scale(1.10); }
  }
}

.khatam { display: block; }
.khatam rect {
  fill: none; stroke: currentColor; stroke-width: 4; vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center;
}
.khatam--fixe { width: 34px; height: 34px; color: var(--safran); }
.khatam--fixe rect { stroke-width: 2; }
.khatam--fixe rect:nth-child(2) { transform: rotate(45deg); }

/* ─── 5. Réactivité : boutons, liens ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 48px; padding: 0.85rem 1.55rem;
  background: var(--safran); color: var(--nuit);
  font-family: var(--f-corps); font-size: 1rem; font-weight: 700; letter-spacing: 0.005em;
  text-decoration: none; border: 0; border-radius: var(--r-2); cursor: pointer;
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.35) inset, 0 10px 24px -14px oklch(0.2 0.1 60 / 0.9);
  transition: background-color var(--t-survol) var(--e-entree),
              transform var(--t-clic) var(--e-entree),
              box-shadow var(--t-survol) var(--e-entree);
}
.btn:hover { background: color-mix(in oklch, var(--safran) 88%, white); box-shadow: 0 1px 0 oklch(1 0 0 / 0.4) inset, 0 18px 34px -16px oklch(0.2 0.1 60 / 1); }
.btn:active { transform: scale(0.96); box-shadow: 0 1px 0 oklch(1 0 0 / 0.25) inset, 0 6px 14px -10px oklch(0.2 0.1 60 / 0.8); }
.btn--petit { min-height: 42px; padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.btn--large { min-height: 56px; padding: 1rem 1.8rem; font-size: 1.075rem; }

.fleche { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-survol) var(--e-entree); }
.btn--fleche:hover .fleche { transform: translateX(4px); }

.lien {
  color: inherit; text-decoration: none;
  transition: color var(--t-survol) var(--e-entree), opacity var(--t-survol) var(--e-entree);
}
.lien:hover { color: var(--safran); }
.lien:active { opacity: 0.7; }
.lien--souligne {
  position: relative; font-weight: 600; padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size var(--t-survol) var(--e-entree), color var(--t-survol) var(--e-entree);
}
.lien--souligne:hover { background-size: 0% 1px; color: var(--safran); }

/* ─── 6. Entête + barre de progression ─────────────────────────── */
.progression {
  position: fixed; inset: 0 auto auto 0; z-index: 60;
  height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--grenade), var(--safran));
}
@supports (animation-timeline: scroll()) {
  .progression { animation: barre linear both; animation-timeline: scroll(); }
  @keyframes barre { to { transform: scaleX(1); } }
}

.entete {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0.9rem var(--gouttiere);
  background: color-mix(in oklch, var(--nuit) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in oklch, var(--braise) 70%, transparent);
}
.marque { display: flex; align-items: center; gap: 0.7rem; color: var(--creme); text-decoration: none; }
.marque__texte { display: grid; }
.marque__titre { font-family: var(--f-titre); font-size: 1.2rem; line-height: 1.1; }
.marque__sous { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--creme-2); }
.marque .khatam { transition: transform var(--t-entree) var(--e-entree); }
.marque:hover .khatam { transform: rotate(45deg); }

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 2rem); }
.nav .lien { font-size: 0.92rem; font-weight: 500; padding: 0.45rem 0; }
/* Une seule action possible sur cette page : sous 860 px on ne garde qu'elle. */
@media (max-width: 860px) { .nav .lien { display: none; } }
@media (max-width: 560px) { .marque__sous { display: none; } .marque__titre { font-size: 1.1rem; } }

/* ─── 7. Hero ──────────────────────────────────────────────────── */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 9vw, 7.5rem);
  background: var(--nuit);
}
/* le plâtre sculpté donne la matière, les lueurs passent par-dessus */
.hero .fond-media__img { opacity: 0.2; filter: saturate(0.85) brightness(0.75); }
.hero .fond-media__voile {
  background:
    radial-gradient(120% 90% at 78% 8%, color-mix(in oklch, var(--safran) 17%, transparent), transparent 58%),
    radial-gradient(90% 70% at 4% 96%, color-mix(in oklch, var(--grenade) 17%, transparent), transparent 62%),
    linear-gradient(to bottom, color-mix(in oklch, var(--nuit) 45%, transparent) 0%,
                    color-mix(in oklch, var(--nuit) 30%, transparent) 45%, var(--nuit) 100%);
}
.hero__grille {
  position: relative; z-index: 2;
  width: min(100% - var(--gouttiere) * 2, var(--largeur));
  margin-inline: auto;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.hero__texte { grid-column: 1 / 8; }
.hero__media { grid-column: 8 / 13; margin: 0; }

.hero__titre { font-size: var(--pas-hero); line-height: 0.94; margin-bottom: 1.4rem; }
.hero__mot { display: block; }
.hero__mot--duel { color: var(--creme); font-style: italic; opacity: 0.72; }
.hero__mot--duo {
  padding-left: clamp(1.5rem, 6vw, 5.5rem); color: var(--safran); font-weight: 700;
}
.hero__sous { font-size: var(--pas-sous); line-height: 1.45; max-width: 30ch; color: var(--creme); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin: 2rem 0 0.9rem; }
.hero__note { font-size: 0.92rem; color: var(--creme-2); }

.faits {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3rem);
  margin: 2.6rem 0 0; padding-top: 1.6rem;
  border-top: 1px solid color-mix(in oklch, var(--braise) 85%, transparent);
}
.fait dt { font-family: var(--f-titre); font-size: 1.9rem; color: var(--safran); line-height: 1; }
.fait dd { margin: 0.3rem 0 0; font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--creme-2); }

/* cadrage haut : coupe la bâche bleue du bas, seule note froide de la page */
.hero__media .cadre-arc { aspect-ratio: 3 / 3.7; }
.hero__media img { object-position: center 13%; }
.hero__legende {
  margin: 1.1rem 0 0; font-family: var(--f-titre); font-style: italic;
  font-size: 1.05rem; color: var(--creme-2); text-align: center;
}
/* Le zoom est piloté par le défilement, pas par un minuteur : l'image respire quand
   on descend et s'immobilise dès qu'on s'arrête pour lire. Là où les animations
   pilotées par le scroll ne sont pas gérées, l'image reste simplement fixe. */
.ken { transform: scale(1.06); transform-origin: 58% 40%; }
@supports (animation-timeline: view()) {
  .ken {
    animation: ken-scroll linear both;
    animation-timeline: view(); animation-range: cover 0% cover 100%;
  }
  @keyframes ken-scroll {
    from { transform: scale(1.02) translateY(1.5%); }
    to   { transform: scale(1.18) translateY(-2%); }
  }
}

@media (max-width: 900px) {
  .hero__grille { grid-template-columns: 1fr; }
  .hero__texte, .hero__media { grid-column: 1; }
  .hero__media { max-width: 300px; margin-inline: auto; }
  .hero__mot--duo { padding-left: 1.25rem; }
}

/* ─── 8. Les phrases ───────────────────────────────────────────── */
.phrases {
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(80% 60% at 100% 0%, color-mix(in oklch, var(--grenade) 20%, transparent), transparent 60%),
    var(--nuit-2);
  border-block: 1px solid color-mix(in oklch, var(--braise) 60%, transparent);
}
.phrases .titre { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 24ch; }

.champ { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem clamp(1rem, 2vw, 2rem); }
.citation {
  margin: 0; font-family: var(--f-titre); line-height: 1.2; color: var(--creme);
  border-left: 2px solid var(--grenade); padding-left: 1.1rem;
}
.citation--a { grid-column: 1 / 7;  font-size: clamp(1.5rem, 1rem + 2.1vw, 2.6rem); }
.citation--b { grid-column: 8 / 13; font-size: clamp(1.2rem, 0.95rem + 1vw, 1.7rem); margin-top: 1.4rem; }
.citation--c { grid-column: 2 / 8;  font-size: clamp(1.2rem, 0.95rem + 1vw, 1.75rem); margin-top: 1.2rem; }
.citation--d { grid-column: 9 / 13; font-size: clamp(1.1rem, 0.9rem + 0.7vw, 1.45rem); margin-top: 0.2rem; }
.citation--e { grid-column: 1 / 6;  font-size: clamp(1.1rem, 0.9rem + 0.7vw, 1.4rem); margin-top: 1rem; }
.citation--f { grid-column: 6 / 13; font-size: clamp(1.4rem, 1rem + 1.7vw, 2.2rem); margin-top: 0.6rem; border-left-color: var(--safran); }

.phrases__pied {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.75rem, 3vw, 3rem);
  margin: clamp(2.5rem, 5vw, 3.75rem) 0 0; align-items: start;
}
.phrases__mot {
  grid-column: 1 / 7; display: grid; grid-template-columns: auto 1fr;
  gap: 1.5rem; align-items: start;
}
.phrases__mot p { color: var(--creme-2); margin: 0; }
.phrases__figure { grid-column: 8 / 13; margin: 0; }
.phrases__figure .img-cadre { aspect-ratio: 3 / 2; }
.phrases__figure figcaption {
  margin-top: 0.9rem; font-family: var(--f-titre); font-style: italic;
  font-size: 1.05rem; line-height: 1.35; color: var(--creme-2);
}
.khatam--sceau { width: 62px; height: 62px; color: color-mix(in oklch, var(--safran) 60%, transparent); }
.khatam--sceau rect { stroke-width: 2; }

@media (max-width: 860px) {
  .phrases__pied { grid-template-columns: 1fr; }
  .phrases__mot, .phrases__figure { grid-column: 1; }
}
@media (max-width: 760px) {
  .champ { display: flex; flex-direction: column; gap: 1.6rem; }
  .citation { margin-top: 0 !important; font-size: 1.35rem; }
}

/* ─── 9. Le passage — élément signature ────────────────────────── */
.passage { height: 330vh; position: relative; background: var(--nuit); }
.passage__scene {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: grid; place-items: center;
  background: var(--nuit);
}
.porte {
  position: absolute; inset: 0; z-index: 2; display: flex;
  perspective: 1700px; pointer-events: none;
}
/* Chaque battant est une fenêtre sur la MÊME image cadrée en « cover » sur la scène
   entière : jointe, la porte se reconstitue exactement, à n'importe quel format. */
.porte__moitie {
  flex: 1; position: relative; overflow: hidden;
  filter: saturate(1.06) brightness(calc((0.66 + var(--a) * 0.44) * (1 - var(--b) * 0.4)));
}
.porte__image {
  position: absolute; top: 0; bottom: 0; width: 200%;
  background: url("assets/img/porte-etoile.jpg") 50% 45% / cover no-repeat;
}
/* --a rapproche les battants, --b les fait pivoter sur leurs gonds extérieurs */
.porte__moitie--g {
  transform-origin: left center;
  transform: translateX(calc((var(--a) - 1) * 30%)) rotateY(calc(var(--b) * -84deg));
  box-shadow: 20px 0 48px -8px oklch(0.1 0.02 45 / calc(0.9 - var(--a) * 0.9));
}
.porte__moitie--d {
  transform-origin: right center;
  transform: translateX(calc((1 - var(--a)) * 30%)) rotateY(calc(var(--b) * 84deg));
  box-shadow: -20px 0 48px -8px oklch(0.1 0.02 45 / calc(0.9 - var(--a) * 0.9));
}
.porte__moitie--g .porte__image { left: 0; }
.porte__moitie--d .porte__image { right: 0; }
.porte__voile {
  position: absolute; inset: 0;
  opacity: calc((1 - var(--a) * 0.42) * (1 - var(--b)));
  background:
    radial-gradient(56% 42% at 50% 50%, transparent, color-mix(in oklch, var(--nuit) 78%, transparent) 82%),
    linear-gradient(to bottom, var(--nuit) 0%, color-mix(in oklch, var(--nuit) 22%, transparent) 24%,
                    color-mix(in oklch, var(--nuit) 22%, transparent) 64%, var(--nuit) 100%);
}

.passage__contenu {
  position: relative; z-index: 3; text-align: center; padding-inline: var(--gouttiere);
  /* la première phrase doit avoir disparu AVANT que la porte ne s'entrouvre,
     sinon les deux messages se superposent */
  pointer-events: none; opacity: calc(1 - var(--b) * 5);
}
.khatam--anime { width: clamp(84px, 13vw, 148px); height: clamp(84px, 13vw, 148px); margin: 0 auto 2.2rem; color: var(--safran); }
.khatam--anime .k { stroke-width: 3; opacity: calc(0.4 + var(--a) * 0.6); }
.khatam--anime .k--1 { transform: translateX(calc((var(--a) - 1) * 56%)); }
.khatam--anime .k--2 { transform: translateX(calc((1 - var(--a)) * 56%)) rotate(calc(var(--a) * 45deg)); }

.passage__titre {
  margin: 0; font-family: var(--f-titre); letter-spacing: -0.01em;
  font-size: clamp(2rem, 1.1rem + 3.8vw, 4.2rem); line-height: 1.06;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0 0.35em;
}
.passage__mot { display: inline-block; opacity: calc(var(--a) * 3.4 - var(--i) * 0.55); }
.passage__mot--1 { --i: 0; }
.passage__mot--2 { --i: 1; }
.passage__mot--3 { --i: 2; }
.passage__mot--4 { --i: 3; color: var(--safran); font-style: italic; }
.passage__pied {
  margin: 1.8rem auto 0; max-width: 38ch; color: var(--creme-2);
  opacity: calc(var(--a) * 2.6 - 1.4); translate: 0 calc((1 - var(--a)) * 14px);
}

/* ── Derrière la porte ─────────────────────────────────────────── */
.passage__fond {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center; padding-inline: var(--gouttiere);
  opacity: calc(var(--b) * 4);
  background: var(--nuit);
}
/* La pièce derrière la porte. Elle recule pendant qu'on ouvre : on y entre. */
.passage__piece {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
  transform: scale(calc(1.24 - var(--b) * 0.22));
  filter: saturate(1.08) brightness(0.38);
}
/* la lumière vient du fond de la pièce, au-dessus du texte : le bloc de texte
   reste sur du sombre, sinon plus rien ne se lit par-dessus */
.passage__lueur {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(52% 40% at 50% 22%, color-mix(in oklch, var(--safran) 46%, transparent), transparent 74%),
    radial-gradient(115% 80% at 50% 14%, color-mix(in oklch, var(--safran) 16%, transparent), transparent 72%),
    radial-gradient(130% 84% at 50% 114%, color-mix(in oklch, var(--grenade) 24%, transparent), transparent 58%),
    linear-gradient(to bottom, color-mix(in oklch, var(--nuit) 34%, transparent) 0%, transparent 26%,
                    transparent 62%, color-mix(in oklch, var(--nuit) 62%, transparent) 100%);
}
.khatam--filigrane {
  position: absolute; z-index: 2; width: min(58vh, 56vw); height: min(58vh, 56vw);
  color: color-mix(in oklch, var(--safran) 22%, transparent);
  transform: scale(calc(0.86 + var(--b) * 0.14));
}
.khatam--filigrane rect { stroke-width: 1.5; }
.khatam--filigrane rect:nth-child(2) { transform: rotate(45deg); }

/* la lumière passe dès que la porte s'entrouvre, mais le texte n'arrive qu'une fois
   l'ouverture assez large : sinon on lit des demi-mots dans la fente */
.passage__but {
  position: relative; z-index: 3; text-align: center; max-width: min(92vw, 46rem);
  opacity: calc(var(--b) * 2.6 - 1.1);
  translate: 0 calc((1 - var(--b)) * 28px);
}
/* Le texte doit reposer sur du ~nuit, sinon les contrastes mesurés ne valent plus rien
   dès qu'une photo passe derrière. Ce voile le garantit sans masquer l'architecture. */
.passage__but::before {
  content: ""; position: absolute; inset: -36% -24%; z-index: -1;
  background: radial-gradient(58% 56% at 50% 50%,
    color-mix(in oklch, var(--nuit) 92%, transparent) 0%,
    color-mix(in oklch, var(--nuit) 66%, transparent) 52%,
    transparent 88%);
}
.passage__but-titre {
  font-size: clamp(2.2rem, 1.2rem + 4.2vw, 4.6rem); line-height: 1.02;
  margin: 0 0 1.1rem; color: var(--miel);
}
.passage__but-sous {
  font-size: var(--pas-sous); line-height: 1.45; color: var(--creme-2);
  margin: 0 auto 2.1rem; max-width: 34ch;
}

/* ─── 10. Programme ────────────────────────────────────────────── */
.programme {
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--miel); color: var(--encre);
}
.programme .surtitre { color: var(--grenade-t); }
.entete-section {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 3rem);
  align-items: end; margin-bottom: clamp(3rem, 6vw, 5rem);
}
.entete-section > :first-child { grid-column: 1 / 8; }
.entete-section__aparte { grid-column: 9 / 13; margin: 0; color: var(--encre-2); font-size: 0.98rem; }

.etapes { display: grid; gap: 0; }
.etape {
  display: grid; grid-template-columns: minmax(88px, 0.9fr) minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(1rem, 2.5vw, 2.5rem); align-items: baseline;
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  border-top: 1px solid color-mix(in oklch, var(--encre) 16%, transparent);
  transition: background-color var(--t-survol) var(--e-entree);
}
.etape:last-child { border-bottom: 1px solid color-mix(in oklch, var(--encre) 16%, transparent); }
.etape:hover { background: color-mix(in oklch, var(--platre) 70%, transparent); }
.etape__num {
  font-family: var(--f-titre); font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 0.8;
  color: color-mix(in oklch, var(--grenade) 32%, transparent);
  transition: color var(--t-survol) var(--e-entree);
}
.etape:hover .etape__num { color: var(--grenade); }
.etape__titre { font-size: clamp(1.35rem, 1rem + 1.2vw, 2rem); max-width: 21ch; }
.etape__clair { margin: 0; color: var(--encre-2); font-size: 1rem; max-width: 42ch; }
@media (max-width: 900px) {
  .entete-section { grid-template-columns: 1fr; }
  .entete-section > :first-child, .entete-section__aparte { grid-column: 1; }
}
@media (max-width: 780px) {
  .etape { grid-template-columns: auto 1fr; }
  .etape__clair { grid-column: 2; }
}

/* ─── 11. Le direct ────────────────────────────────────────────── */
.direct { background: var(--platre); color: var(--encre); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.direct__media { margin: 0; width: 100vw; margin-inline: calc(50% - 50vw); }
.direct__media img { width: 100%; height: clamp(240px, 42vh, 460px); object-fit: cover; object-position: center 84%; }
.direct__corps {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 4rem);
  margin-top: clamp(-5rem, -6vw, -3rem); position: relative; z-index: 2;
}
.direct__texte {
  grid-column: 1 / 7; background: var(--platre);
  padding: clamp(1.8rem, 3vw, 2.8rem) clamp(1.5rem, 3vw, 2.6rem) clamp(1.75rem, 3vw, 2.4rem);
  border-radius: var(--r-4) var(--r-4) 0 0;
}
.direct__figure {
  display: grid; grid-template-columns: minmax(0, 250px) 1fr; gap: clamp(1.25rem, 2.5vw, 1.75rem);
  align-items: center; margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
}
.direct__figure .img-cadre { aspect-ratio: 1 / 1; border-radius: var(--r-3); }
.direct__figure img { object-position: center 20%; }
.direct__figure figcaption {
  font-family: var(--f-titre); font-style: italic; font-size: 1.12rem;
  line-height: 1.35; color: var(--encre-2);
}
.direct .surtitre { color: var(--grenade-t); }
.direct__texte .titre { margin-bottom: 1.2rem; }
.atouts { grid-column: 7 / 13; display: grid; gap: 1rem; align-self: end; padding-top: clamp(2rem, 4vw, 3.5rem); }
.atout {
  padding: 1.2rem 1.4rem; border-radius: var(--r-3); background: var(--miel);
  border-left: 3px solid color-mix(in oklch, var(--safran) 80%, transparent);
  transition: transform var(--t-survol) var(--e-entree), box-shadow var(--t-survol) var(--e-entree);
}
.atout:hover { transform: translateX(5px); box-shadow: 0 20px 40px -24px oklch(0.3 0.06 50 / 0.55); }
.atout h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.atout p { margin: 0; font-size: 0.97rem; color: var(--encre-2); }
@media (max-width: 900px) {
  .direct__texte, .atouts { grid-column: 1 / 13; }
  .atouts { padding-top: 0; }
}
@media (max-width: 560px) { .direct__figure { grid-template-columns: 1fr; } }

/* ─── 12. Pourquoi lui ─────────────────────────────────────────── */
.lui {
  color: var(--encre); padding: clamp(4.5rem, 9vw, 7.5rem) 0 clamp(3rem, 5vw, 4.5rem);
  background:
    radial-gradient(70% 60% at 8% 10%, color-mix(in oklch, var(--safran) 30%, transparent), transparent 58%),
    var(--miel);
}
.lui .surtitre { color: var(--grenade-t); }
.lui__grille { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.lui__portrait { grid-column: 1 / 6; margin: 0; }
.lui__texte { grid-column: 7 / 13; }

/* source carrée : on rogne en largeur, il reste centré, la hauteur est conservée */
.lui__portrait .cadre-arc { aspect-ratio: 4 / 4.7; }
.lui__portrait img { object-position: center 40%; }
.lui__legende { margin: 1rem 0 0; text-align: center; font-family: var(--f-titre); font-style: italic; color: var(--encre-2); }

.parcours { margin: 2.2rem 0 0; }
.parcours li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1rem;
  padding: 0.85rem 0 0.85rem 1.6rem; position: relative;
  border-bottom: 1px solid color-mix(in oklch, var(--encre) 12%, transparent);
}
.parcours li::before {
  content: ""; position: absolute; left: 0; top: 1.35rem;
  width: 7px; height: 7px; rotate: 45deg;
  background: color-mix(in oklch, var(--encre) 30%, transparent);
}
.parcours--fort::before { background: var(--safran) !important; }
.parcours__quoi { font-weight: 700; }
.parcours__ou { color: var(--encre-2); font-size: 0.95rem; }
.lui__chiffre { margin-top: 1.8rem; font-family: var(--f-titre); font-size: 1.2rem; color: var(--encre-2); }
@media (max-width: 860px) {
  .lui__portrait, .lui__texte { grid-column: 1 / 13; }
  .lui__portrait { max-width: 340px; }
}

/* ─── 13. Prix ─────────────────────────────────────────────────── */
.prix {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0; color: var(--creme);
  background:
    radial-gradient(90% 70% at 12% 0%, color-mix(in oklch, var(--safran) 15%, transparent), transparent 62%),
    var(--nuit);
}
.prix .fond-media__img { opacity: 0.34; filter: saturate(1.15); }
.prix .fond-media__voile {
  background:
    radial-gradient(78% 62% at 30% 50%, color-mix(in oklch, var(--nuit) 82%, transparent), transparent 76%),
    linear-gradient(to bottom, var(--nuit) 0%, color-mix(in oklch, var(--nuit) 45%, transparent) 26%,
                    color-mix(in oklch, var(--nuit) 45%, transparent) 74%, var(--nuit) 100%);
}
.prix__grille {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.prix__bloc { grid-column: 1 / 6; }
.prix__listes { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.prix__chiffre { font-family: var(--f-titre); font-size: clamp(4rem, 2rem + 8vw, 8rem); line-height: 0.85; color: var(--safran); margin: 0.4rem 0 1rem; }
.prix__detail { color: var(--creme-2); }
.prix__reframe {
  margin-top: 1.6rem; padding: 1rem 1.2rem; border-radius: var(--r-3);
  background: color-mix(in oklch, var(--nuit-2) 90%, transparent);
  border: 1px solid color-mix(in oklch, var(--braise) 80%, transparent);
}
.prix__reframe strong { color: var(--safran); }
.prix__sstitre { font-family: var(--f-corps); font-size: var(--pas-menu); letter-spacing: 0.15em; text-transform: uppercase; color: var(--creme-2); margin-bottom: 1rem; }
.liste-oui li, .liste-non li { position: relative; padding: 0 0 0.85rem 1.7rem; font-size: 0.98rem; }
.liste-oui li::before, .liste-non li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem; width: 8px; height: 8px; rotate: 45deg;
}
.liste-oui li::before { background: var(--safran); }
.liste-non li::before { border: 1px solid var(--creme-2); }
.liste-non li { color: var(--creme-2); }
@media (max-width: 900px) {
  .prix__bloc, .prix__listes { grid-column: 1 / 13; }
}
@media (max-width: 520px) { .prix__listes { grid-template-columns: 1fr; } }

/* ─── 14. Questions ────────────────────────────────────────────── */
.questions { background: var(--platre); color: var(--encre); padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.questions .surtitre { color: var(--grenade-t); }
.questions__grille { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.questions__intro { grid-column: 1 / 5; position: sticky; top: 6rem; align-self: start; }
.questions__intro p { color: var(--encre-2); }
.questions__figure { margin: clamp(1.75rem, 3vw, 2.5rem) 0 0; }
.questions__figure .img-cadre { aspect-ratio: 4 / 3; }
.accordeon { grid-column: 6 / 13; }
.pli { border-bottom: 1px solid color-mix(in oklch, var(--encre) 16%, transparent); }
.pli:first-child { border-top: 1px solid color-mix(in oklch, var(--encre) 16%, transparent); }
.pli summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 1rem;
  padding: 1.25rem 0; font-family: var(--f-titre); font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem);
  transition: color var(--t-survol) var(--e-entree);
}
.pli summary::-webkit-details-marker { display: none; }
.pli summary::after {
  content: ""; margin-left: auto; flex: none; width: 12px; height: 12px; rotate: 45deg;
  border-right: 2px solid var(--grenade); border-bottom: 2px solid var(--grenade);
  translate: 0 -2px;
  transition: rotate var(--t-entree) var(--e-entree), border-color var(--t-survol) var(--e-entree);
}
.pli[open] summary::after { rotate: -135deg; translate: 0 3px; }
.pli summary:hover { color: var(--grenade); }
.pli__corps { padding-bottom: 1.4rem; max-width: 56ch; }
.pli__corps p { margin: 0; color: var(--encre-2); }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .pli::details-content { block-size: 0; overflow: hidden; transition: block-size var(--t-entree) var(--e-entree), content-visibility var(--t-entree) allow-discrete; }
  .pli[open]::details-content { block-size: auto; }
}
@media (max-width: 900px) {
  .questions__intro, .accordeon { grid-column: 1 / 13; }
  .questions__intro { position: static; }
}

/* ─── 15. Inscription ──────────────────────────────────────────── */
.inscription {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem); color: var(--creme);
  background:
    radial-gradient(100% 80% at 88% 12%, color-mix(in oklch, var(--safran) 22%, transparent), transparent 60%),
    var(--nuit);
}
/* le filtre vaut aussi pour l'affiche, plus claire que la vidéo */
.inscription .fond-media__video { opacity: 0.85; filter: brightness(0.82) saturate(1.05); }
.inscription .fond-media__voile {
  background:
    linear-gradient(to right, var(--nuit) 0%, color-mix(in oklch, var(--nuit) 74%, transparent) 52%,
                    color-mix(in oklch, var(--nuit) 52%, transparent) 100%),
    linear-gradient(to bottom, var(--nuit) 0%, transparent 22%, transparent 74%, var(--nuit) 100%);
}
.inscription__grille {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.inscription__texte { grid-column: 1 / 7; }
.inscription .chapeau { color: var(--creme-2); }
.inscription__date { font-family: var(--f-titre); font-size: 1.15rem; margin-bottom: 0; }

.formulaire { display: grid; gap: 1.1rem; max-width: 30rem; }
.inscription .formulaire {
  grid-column: 8 / 13; max-width: none; align-self: center;
  padding: 1.5rem; border-radius: var(--r-4);          /* 24 px + rayon des champs (10) = 34 */
  background: color-mix(in oklch, var(--nuit) 76%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.09) inset, 0 44px 76px -44px oklch(0.05 0.02 45 / 0.95);
}
.champ-form { display: grid; gap: 0.4rem; }
.champ-form label { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--creme-2); }
.champ-form input {
  min-height: 48px; padding: 0.7rem 1rem; font: inherit; color: var(--creme);
  background: color-mix(in oklch, var(--nuit-2) 88%, transparent);
  border: 1px solid color-mix(in oklch, var(--braise) 90%, transparent); border-radius: var(--r-2);
  transition: border-color var(--t-survol) var(--e-entree), background-color var(--t-survol) var(--e-entree);
}
.champ-form input:hover { border-color: color-mix(in oklch, var(--safran) 55%, transparent); }
.champ-form input:focus-visible { border-color: var(--safran); background: var(--nuit-2); }
.consentement { display: flex; gap: 0.7rem; align-items: start; font-size: 0.9rem; color: var(--creme-2); cursor: pointer; }
.consentement input { margin-top: 0.2rem; width: 20px; height: 20px; accent-color: var(--safran); flex: none; }
.formulaire__note { margin: 0; font-size: 0.82rem; color: var(--creme-2); font-style: italic; }
@media (max-width: 900px) {
  .inscription__texte { grid-column: 1 / 13; }
  .inscription .formulaire { grid-column: 1 / 13; }
  .inscription .fond-media__voile {
    background: linear-gradient(to bottom, var(--nuit) 0%, color-mix(in oklch, var(--nuit) 76%, transparent) 20%,
                color-mix(in oklch, var(--nuit) 76%, transparent) 80%, var(--nuit) 100%);
  }
}

/* ─── 16. Pied ─────────────────────────────────────────────────── */
.pied { background: var(--nuit-2); color: var(--creme-2); padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem; border-top: 1px solid var(--braise); }
.pied__grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.pied__marque { font-family: var(--f-titre); font-size: 1.35rem; color: var(--creme); margin: 0.8rem 0 0.4rem; }
.pied__titre { font-size: var(--pas-menu); letter-spacing: 0.15em; text-transform: uppercase; color: var(--creme); margin-bottom: 0.9rem; }
.pied__ligne { margin: 0 0 0.5rem; font-size: 0.95rem; }
.pied__ligne .lien { display: inline-block; padding: 0.2rem 0; }
.pied__credits { margin-top: 1.4rem; font-size: 0.82rem; opacity: 0.75; }

/* ─── 17. Apparitions ──────────────────────────────────────────── */
.entree { animation: monte 520ms var(--e-entree) both; }
.entree--1 { animation-delay: 60ms; }
.entree--2 { animation-delay: 140ms; }
.entree--3 { animation-delay: 220ms; }
.entree--4 { animation-delay: 300ms; }
.entree--5 { animation-delay: 380ms; }
@keyframes monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

html.js .reveal { opacity: 0; transform: translateY(20px); }
html.js .reveal.vu {
  opacity: 1; transform: none;
  transition: opacity var(--t-entree) var(--e-entree), transform var(--t-entree) var(--e-entree);
  transition-delay: var(--d, 0ms);
}

/* ─── 18. Mouvement réduit ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .ken, .zoom-scroll { animation: none !important; transform: scale(1.05); }
  html.js .reveal { opacity: 1; transform: none; }

  /* Le passage devient trois blocs empilés : la porte jointe, ce qui est écrit
     dessus, puis ce qu'il y a derrière. Rien ne bouge, rien ne manque. */
  .passage { height: auto; }
  .passage__scene { position: static; height: auto; display: block; overflow: visible; }
  .porte {
    position: relative; inset: auto; width: 100%;
    height: clamp(300px, 55vh, 520px); perspective: none;
  }
  .porte__moitie--g, .porte__moitie--d { transform: none; box-shadow: none; }
  .porte__moitie { filter: saturate(1.05) brightness(0.92); }
  .porte__voile { opacity: 0.5; }
  .passage__contenu { opacity: 1; padding-block: clamp(3rem, 7vw, 5.5rem); }
  .passage__mot, .passage__pied { opacity: 1; translate: none; }
  .khatam--anime .k { opacity: 1; }
  .khatam--anime .k--1 { transform: rotate(0deg); }
  .khatam--anime .k--2 { transform: rotate(45deg); }
  .passage__fond {
    position: relative; inset: auto; opacity: 1;
    padding-block: clamp(3.5rem, 8vw, 6.5rem);
  }
  .passage__but { translate: none; opacity: 1; }
  .passage__piece { transform: scale(1.04); }
  .khatam--filigrane { transform: none; }
  .progression { display: none; }
}
