/* Buzzily « La Ruche » : la pellicule.
   La suite du site tient sur une bande de film : le film, deux résultats, la méthode, les formules, le générique, le brief.
   Par défaut (petit écran, ou sans script) : bande verticale dans le flux de la page.
   Grand écran avec script (html.pelli) : bande horizontale, fixe à l'écran, que le défilement fait avancer. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#pellicule {
  --film: #141312;
  --film-clair: #1c1a18;
  --cadre: #070707;
  --r: 30px;
  position: relative; padding: 0; border: 0;
}
.projo { position: relative; }

/* ---------- La bande ---------- */
.bande { position: relative; display: grid; gap: 10px; padding: 18px var(--r); background: var(--film); }
.bande::before, .bande::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: var(--r); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='36'%3E%3Crect y='8' width='16' height='20' rx='4' fill='%230b0b0c'/%3E%3Crect x='.5' y='8.5' width='15' height='19' rx='3.5' fill='none' stroke='%23fff' stroke-opacity='.06'/%3E%3C/svg%3E") repeat-y center 0 / 16px 36px;
}
.bande::before { left: 0; }
.bande::after { right: 0; }

.case { position: relative; scroll-margin-top: 84px; min-width: 0; display: flex; flex-direction: column; }
.case .bord.haut { order: 2; } /* à la verticale, les impressions de bord passent sous l'image, comme une légende */
.case .bord.bas { order: 3; padding-top: 0; }
.case .bord.bas .num { display: none; }
.case .image { position: relative; border-radius: 6px; overflow: hidden; background: var(--cadre); isolation: isolate; }

/* Impressions de bord de pellicule : numéro d'image, nom, mention de brouillon */
.bord { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0; max-width: none; padding: 6px 4px; font-size: 0.8125rem; line-height: 1.25; color: var(--gris); }
.bord.haut { justify-content: flex-start; }
.bord .num { color: var(--gris); font-weight: 500; }
.case.actif .bord.haut .num { color: var(--jaune); }

/* Fond filmé d'une image */
.fonds { position: absolute; inset: 0; z-index: -2; transform-origin: 50% 50%; }
.fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
video.fond:fullscreen { object-fit: contain; }
.c-film video.fond { opacity: 0; transition: opacity 500ms var(--sortie); }
.c-film.joue video.fond { opacity: 1; }
.voile { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(11, 11, 12, 0.94) 8%, rgba(11, 11, 12, 0.62) 46%, rgba(11, 11, 12, 0) 82%); } /* taste-skill-ignore : voile neutre de lisibilité sur une image filmée */
.voile.fort { background: rgba(11, 11, 12, 0.84); }

/* Texte posé sur une image filmée */
.case .texte { position: relative; display: grid; gap: 14px; align-content: end; min-height: min(74svh, 620px); padding: 28px 22px; max-width: 34rem; }
.case .texte > p { color: var(--craie); }
.case .texte .note, .petit { font-size: 0.8125rem; color: var(--gris); }
.c-film h2 { font-size: clamp(2.5rem, 12vw, 3.75rem); }
.c-methode h2 { font-size: clamp(3.25rem, 17vw, 5rem); letter-spacing: -0.045em; }
.recu { position: relative; padding-left: 20px; font-size: 0.9375rem; }
.recu::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--jaune); }
.recu span { color: var(--gris); margin-right: 0.35em; }
.rang { position: absolute; right: 22px; top: 20px; margin: 0; font-size: 0.8125rem; color: var(--gris); }

/* Compteur à rouleaux */
.odo { display: inline-flex; font-variant-numeric: tabular-nums; line-height: 1.1; }
.odo .col { display: block; height: 1.1em; overflow: hidden; }
.odo .rouleau { display: block; will-change: transform; }
.odo .rouleau::before { content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9\A 0"; white-space: pre; display: block; text-align: center; } /* les onze chiffres du rouleau */
.odo .esp { width: 0.2em; }

/* ---------- Les deux résultats ---------- */
.deux { position: relative; display: grid; gap: 26px; padding: 28px 22px 32px; }
.reel { margin: 0; width: min(44vw, 170px); aspect-ratio: 9 / 16; border-radius: 10px; background: rgba(7, 7, 7, 0.72); display: grid; place-items: center; align-content: center; gap: 14px; padding: 14px; text-align: center; }
.reel figcaption { font-size: 0.8125rem; line-height: 1.35; color: var(--gris); }
.amorce { width: 62%; fill: none; stroke: rgba(243, 241, 234, 0.34); stroke-width: 1.2; }
.amorce .plein { fill: var(--craie); stroke: none; }
.resultat { display: grid; gap: 8px; align-content: center; min-width: 0; }
.resultat h2 { font-size: clamp(1.5rem, 2.4vw, 2.25rem); letter-spacing: -0.02em; }
.grand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.16em; margin: 4px 0 0; max-width: none; font-family: var(--titre); font-weight: 600; color: var(--jaune); line-height: 1; letter-spacing: -0.045em; font-size: clamp(3.25rem, 17vw, 5.25rem); }
.grand .unite { font-size: 0.2em; letter-spacing: 0; font-weight: 500; color: var(--craie); }
.stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; color: var(--gris); font-size: 0.9375rem; }
.stats b { color: var(--craie); font-weight: 600; }
.resultat dl { margin: 12px 0 0; display: grid; gap: 12px; }
.resultat dt { font-weight: 600; font-size: 0.875rem; }
.resultat dd { margin: 2px 0 0; color: var(--gris); font-size: 0.9375rem; }

/* ---------- Titres des images sans film ---------- */
.chapeau { display: grid; gap: 10px; align-content: start; }
.chapeau h2 { font-size: clamp(1.75rem, 3.2vw, 3rem); }
.chapeau > p { color: var(--gris); }

/* ---------- Les formules : trois petites images sur la bande ---------- */
.c-formules .image { background: none; overflow: visible; display: grid; gap: 14px; }
.c-formules .chapeau { padding: 10px 4px 2px; }
.trio { display: grid; gap: 10px; }
.formule { background: var(--cadre); border-radius: 6px; padding: 24px 22px; display: grid; gap: 12px; align-content: start; }
.formule h3 { font-size: 1.75rem; letter-spacing: -0.02em; }
.formule p, .formule li { color: var(--gris); font-size: 0.9375rem; }
.formule ul { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 8px; }
.formule li { position: relative; padding-left: 18px; }
.formule li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--jaune); }
.formule .prix { color: var(--craie); font-weight: 500; font-size: 0.875rem; }
.formule .bouton { margin-top: 4px; }
.formule.phare .prix { color: var(--noir); }

/* ---------- Le générique ---------- */
.c-generique .image, .c-brief .image { display: grid; gap: 24px; padding: 28px 22px; }
#pause-generique { justify-self: start; margin-top: 8px; }
#pellicule [hidden] { display: none !important; }
.bloc-generique { display: grid; gap: 16px; }
.credits { margin: 0; display: grid; gap: 14px; }
.credits div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 18px; align-items: baseline; }
.credits dt { text-align: right; color: var(--gris); font-size: 0.9375rem; }
.credits dd { margin: 0; color: var(--craie); font-weight: 500; line-height: 1.35; }
.bloc-generique h3 { margin-top: 30px; text-align: center; font-size: 0.9375rem; font-weight: 400; letter-spacing: 0; color: var(--gris); }
.distribution { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: center; font-weight: 500; }
.bloc-generique .petit { text-align: center; margin-inline: auto; max-width: 44ch; }

/* ---------- Le brief ---------- */
.c-brief form.brief { max-width: none; }
.c-brief .champ input, .c-brief .champ select, .c-brief .champ textarea { background: var(--charbon); }
.envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.envoi .retour-brief { margin: 0; min-height: 0; flex: 1 1 220px; }

.fin-bobine, .hud { display: none; }

/* ---------- Pied de page ---------- */
.pied { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; border-top: 0; background: var(--charbon); }
.pied-marque { display: grid; gap: 4px; }
.pied nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; }
.pied nav h2 { flex: 0 0 100%; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; color: var(--craie); margin-bottom: 4px; }
.pied nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--gris); transition: color 180ms var(--sortie); }
@media (hover: hover) and (pointer: fine) { .pied nav a:hover { color: var(--craie); } }
@media (min-width: 900px) { .pied { grid-template-columns: minmax(0, 1fr) auto auto; gap: 56px; align-items: end; } .pied nav h2 { flex-basis: auto; margin: 0 6px 0 0; } }

/* =====================================================================
   Grand écran : la bande passe à l'horizontale et reste à l'écran
   ===================================================================== */
html.pelli #experience { height: 1390vh; } /* la scène reste en place pendant le raccord vers la pellicule */
html.pelli #pellicule {
  --haut: 84px; --bas: 58px;
  --r: clamp(42px, 6.4vh, 56px);
  --peek: clamp(36px, 5.2vw, 104px);
  --gap: clamp(8px, 0.9vw, 14px);
  --hb: calc(100vh - var(--haut) - var(--bas));
  --cw: calc(100vw - 2 * var(--peek));
  height: var(--long, 900vh); margin-top: -190vh; pointer-events: none;
}
html.pelli .projo { position: sticky; top: 0; height: 100dvh; overflow: hidden; overflow: clip; background: var(--noir); z-index: 20; visibility: hidden; pointer-events: auto; cursor: grab; touch-action: pan-y; }
html.pelli .projo.visible { visibility: visible; }
html.pelli .projo.saisie { cursor: grabbing; user-select: none; -webkit-user-select: none; }

html.pelli .bande { position: absolute; left: 0; top: var(--haut); height: var(--hb); width: max-content; display: flex; gap: var(--gap); padding: 0 var(--peek); will-change: transform; background: var(--film); border-block: 1px solid var(--film-clair); }
html.pelli .bande::before, html.pelli .bande::after {
  left: 0; right: 0; width: auto; height: var(--r); top: 0; bottom: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='16'%3E%3Crect x='8' width='20' height='16' rx='4' fill='%230b0b0c'/%3E%3Crect x='8.5' y='.5' width='19' height='15' rx='3.5' fill='none' stroke='%23fff' stroke-opacity='.06'/%3E%3C/svg%3E") repeat-x 0 6px / 36px 16px;
}
html.pelli .bande::after { top: auto; bottom: 0; background-position: 0 calc(100% - 6px); }

html.pelli .case { display: block; flex: 0 0 var(--cw); width: var(--cw); height: 100%; padding: var(--r) 0; }
html.pelli .case .image { height: 100%; }
html.pelli .case .image::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; background: var(--noir); opacity: 0.6; pointer-events: none; transition: opacity 500ms var(--sortie); }
html.pelli .case.actif .image::after { opacity: 0; }
html.pelli .case:not(.actif) { cursor: pointer; }

html.pelli .bord { position: absolute; left: 6px; right: 6px; height: var(--r); padding: 0 4px; z-index: 2; white-space: nowrap; }
html.pelli .bord.haut { top: 0; align-items: flex-end; padding-bottom: 4px; }
html.pelli .bord.bas { bottom: 0; align-items: flex-start; padding-top: 4px; }
html.pelli .case .bord.bas .num { display: inline; }

html.pelli .voile { background: linear-gradient(90deg, rgba(11, 11, 12, 0.93) 0%, rgba(11, 11, 12, 0.62) 36%, rgba(11, 11, 12, 0) 66%); } /* taste-skill-ignore : voile neutre de lisibilité sur une image filmée */
html.pelli .voile.fort { background: linear-gradient(90deg, rgba(11, 11, 12, 0.95) 30%, rgba(11, 11, 12, 0.8)); } /* taste-skill-ignore : voile neutre de lisibilité sur une image filmée */
html.pelli .miroir .voile.fort { background: linear-gradient(270deg, rgba(11, 11, 12, 0.95) 30%, rgba(11, 11, 12, 0.8)); } /* taste-skill-ignore : voile neutre de lisibilité sur une image filmée */
html.pelli .case .texte { position: absolute; left: clamp(28px, 4.2vw, 72px); bottom: clamp(24px, 6.4vh, 60px); width: min(35rem, 46%); min-height: 0; padding: 0; gap: clamp(10px, 2vh, 16px); }
html.pelli .c-film h2 { font-size: clamp(2.5rem, min(5.4vw, 11.5vh), 5rem); }
html.pelli .c-methode h2 { font-size: clamp(3.5rem, min(8vw, 17vh), 7.5rem); }
html.pelli .rang { top: auto; right: clamp(28px, 4.2vw, 72px); bottom: clamp(24px, 6.4vh, 60px); }

html.pelli .deux { position: absolute; inset: 0; grid-template-rows: minmax(0, 1fr); grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(32px, 5.4vw, 96px); padding: clamp(20px, 5vh, 44px) clamp(32px, 5.4vw, 96px); }
html.pelli .miroir .deux { grid-template-columns: minmax(0, 1fr) auto; }
html.pelli .miroir .reel { order: 2; }
html.pelli .reel { height: 100%; width: auto; }
html.pelli .grand { font-size: clamp(4rem, min(9.6vw, 19vh), 10rem); margin: 0; }
html.pelli .resultat h2 { font-size: clamp(1.375rem, min(2.4vw, 4.6vh), 2.25rem); }
html.pelli .resultat dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; max-width: 46rem; margin-top: clamp(6px, 1.6vh, 14px); }

html.pelli .c-formules .image { grid-template-rows: auto minmax(0, 1fr); gap: clamp(8px, 1.8vh, 16px); }
html.pelli .c-formules .chapeau { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: clamp(4px, 1.2vh, 12px) 6px 0; }
html.pelli .c-formules .chapeau h2 { font-size: clamp(1.5rem, min(2.6vw, 5.4vh), 2.5rem); }
html.pelli .trio { grid-template-columns: 1fr 1.14fr 1fr; gap: var(--gap); min-height: 0; }
html.pelli .formule { margin-block: clamp(8px, 2.2vh, 20px); padding: clamp(14px, 3vh, 28px) clamp(18px, 2vw, 32px); gap: clamp(6px, 1.4vh, 12px); grid-template-rows: auto auto 1fr auto auto; }
html.pelli .formule.phare { margin-block: 0; padding-block: clamp(20px, 4.6vh, 44px); }
html.pelli .formule h3 { font-size: clamp(1.375rem, 4.2vh, 2rem); }
html.pelli .formule ul { gap: clamp(3px, 1vh, 8px); align-content: start; }
html.pelli .formule p, html.pelli .formule li { font-size: clamp(0.8125rem, 2.1vh, 1.0625rem); }
html.pelli .formule .bouton { min-height: 44px; }

html.pelli .c-generique .image, html.pelli .c-brief .image { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); align-items: center; gap: clamp(28px, 5vw, 88px); padding: clamp(16px, 4vh, 40px) clamp(32px, 5.4vw, 96px); }
html.pelli .c-generique .image { padding-block: 0; align-items: stretch; }
html.pelli .c-generique .chapeau, html.pelli .c-brief .chapeau { align-self: center; }
html.pelli .defilant { height: 100%; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); border-radius: 4px; } /* taste-skill-ignore : fondu du générique en haut et en bas (masque, pas un aplat) */
html.pelli .defilant.roule .rouleau-generique { animation: generique 38s linear infinite paused; }
html.pelli .case.actif .defilant.roule .rouleau-generique { animation-play-state: running; }
html.pelli .case.actif .defilant.roule.pause .rouleau-generique { animation-play-state: paused; }
html.pelli .defilant.roule .bloc-generique { padding: 9vh 0 6vh; }
html.pelli .defilant:not(.roule) { overflow-y: auto; -webkit-mask-image: none; mask-image: none; align-self: center; height: auto; max-height: 100%; }
@keyframes generique { from { transform: translateY(0); } to { transform: translateY(-50%); } }

html.pelli .c-brief form.brief { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.8vh, 16px) 16px; }
html.pelli .c-brief .large { grid-column: 1 / -1; }
html.pelli .c-brief .champ textarea { min-height: clamp(60px, 12vh, 120px); }

html.pelli .bande { padding-right: 0; }
html.pelli .fin-bobine { flex: 0 0 calc(var(--peek) - var(--gap)); display: grid; place-items: center; padding: var(--r) 0; } /* amorce de fin, visible au bord droit sur la dernière image */
html.pelli .fin-bobine .amorce { width: min(62%, 60px); }

/* Repères en bas d'écran : nom de l'image, dix crans, compteur d'images */
html.pelli .hud { position: absolute; left: 0; right: 0; bottom: 0; height: var(--bas); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; padding: 0 var(--marge); font-size: 0.8125rem; color: var(--gris); cursor: default; }
.hud p { margin: 0; max-width: none; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.hud #p-nom { color: var(--craie); font-weight: 500; }
.hud-droite { display: flex; justify-content: flex-end; align-items: baseline; gap: 28px; min-width: 0; }
.hud-compteur .odo { color: var(--craie); font-weight: 500; }
.mode-emploi { transition: opacity 400ms var(--sortie); overflow: hidden; text-overflow: ellipsis; }
.mode-emploi.vu { opacity: 0; }
.reperes { display: flex; }
.reperes button { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.reperes button::after { content: ""; width: 2px; height: 12px; border-radius: 2px; background: #4a4a4c; transition: height 220ms var(--sortie), background-color 220ms var(--sortie); }
.reperes button[aria-current="true"]::after { height: 26px; background: var(--jaune); }
@media (hover: hover) and (pointer: fine) { .reperes button:hover::after { background: var(--craie); } .reperes button[aria-current="true"]:hover::after { background: var(--jaune); } }
@media (max-width: 1180px) { .mode-emploi { display: none; } }

/* Fin de l'expérience : le texte du dernier plan s'efface avant le raccord */
html.pelli .scene .rail, html.pelli .scene .chapitre, html.pelli .scene .defile { transition: opacity 240ms var(--sortie); }
html.pelli .scene.fin .plan { transition: opacity 240ms var(--sortie); }
html.pelli .scene.fin .plan, html.pelli .scene.fin .rail, html.pelli .scene.fin .chapitre, html.pelli .scene.fin .defile { opacity: 0 !important; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .c-film video.fond { transition: none; }
}
