/* ============================================================
   CINÉMA — v2 (commun à monarque2 et mexico2)
   1. Caméra au défilement sur le film d'ouverture :
      plongée dans le premier plan, puis dans le fond.
   2. Premier plan de plantes en profondeur de champ.
   3. Le clip qui s'ouvre jusqu'au plein écran.
   4. Halo de lumière au curseur (mexico2).
   ============================================================ */

/* ---------- 1. La piste de la caméra ---------- */
.cine { position: relative; height: 185vh; }
.cine > .hero {
  position: sticky; top: 0;
  height: 100vh; height: 100svh; min-height: 0;
  overflow: hidden;
}
.cine .hero__film {
  transform-origin: var(--cine-ox, 66%) var(--cine-oy, 60%);
  transform: scale(var(--cine-s, 1));
  will-change: transform;
}
.cine .hero__inner,
.cine .hero__dedans,
.cine .hero__texte,
.cine .hero__contenu {
  opacity: var(--cine-c1, 1);
  filter: blur(var(--cine-b1, 0px));
}
.cine .hero__scroll,
.cine .hero__descendre,
.cine .hero__lire,
.cine .hero__defiler { opacity: var(--cine-c1, 1); }

.cine__voile {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(12, 8, 5, .55) 100%),
    linear-gradient(180deg, transparent 55%, rgba(12, 8, 5, calc(var(--cine-v, 0) * .9)) 100%);
  opacity: calc(.08 + var(--cine-v, 0) * .4);
}

.cine__fond {
  position: absolute; z-index: 6;
  left: 50%; top: 50%;
  width: min(880px, 88vw);
  transform: translate(-50%, -50%);
  text-align: center;
  color: #f6efe4;
  opacity: var(--cine-c2, 0);
  filter: blur(calc((1 - var(--cine-c2, 0)) * 8px));
  pointer-events: none;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
}
.cine__fond small {
  display: block; margin-bottom: 1.1rem;
  font-size: .78rem; letter-spacing: .32em; text-transform: uppercase;
  color: #e0a32e;
}
.cine__fond strong {
  display: block;
  font-family: var(--font-display, "Zodiak", Georgia, serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  line-height: 1.02; letter-spacing: -.02em;
}
.cine__fond p {
  margin: 1.4rem auto 0; max-width: 36rem;
  font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.6;
  color: rgba(246, 239, 228, .86);
}

.cine__barre {
  position: absolute; z-index: 7; left: 50%; bottom: 28px;
  width: 120px; height: 2px; transform: translateX(-50%);
  background: rgba(246, 239, 228, .22); border-radius: 2px; overflow: hidden;
}
.cine__barre i {
  display: block; height: 100%; width: 100%;
  background: #e0a32e; transform-origin: left;
  transform: scaleX(var(--cine-p, 0));
}

/* ---------- 2. Premier plan : plantes en profondeur de champ ---------- */
.cine__plantes { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.cine__plante {
  position: absolute;
  width: var(--w, 30vw);
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%) translate3d(var(--tx, 0px), var(--ty, 0px), 0) rotate(var(--r, 0deg)) scale(var(--ps, 1));
  filter: blur(var(--pb, 3px)) brightness(var(--lum, .5)) saturate(.8) sepia(.28) contrast(1.05);
  opacity: var(--po, 1);
  will-change: transform, filter, opacity;
}
.cine__plante img { display: block; width: 100%; height: auto; }
html[data-theme="nuit"] .cine__plante,
html[data-theme="dark"] .cine__plante,
html.nuit .cine__plante,
html[data-monde="nuit"] .cine__plante { --lum: .2; filter: blur(var(--pb, 3px)) brightness(var(--lum)) saturate(.4) hue-rotate(190deg); }

@media (max-width: 760px) {
  .cine { height: 165vh; }
  .cine__plante { width: calc(var(--w, 30vw) * 1.7); }
  .cine__plante[data-mobile="non"] { display: none; }
  .cine__barre { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cine { height: auto; }
  .cine > .hero { position: relative; height: 100vh; }
  .cine__fond, .cine__barre, .cine__plantes { display: none; }
}

/* ---------- 3. Le clip ---------- */
.clip { position: relative; height: 190vh; background: #0d0a08; color: #f6efe4; }
.clip__scene {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center; overflow: hidden;
}
.clip__cadre {
  position: absolute; inset: 0;
  clip-path: inset(calc(var(--clip-i, 22%) * 1.3) var(--clip-ix, 18%) calc(var(--clip-i, 22%) * .7) round var(--clip-r, 28px));
  will-change: clip-path;
}
.clip__cadre video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(var(--clip-s, 1.18));
  will-change: transform;
}
.clip__titre {
  position: absolute; z-index: 2; left: 0; right: 0; top: 8vh;
  text-align: center; pointer-events: none; padding: 0 6vw;
  opacity: var(--clip-t, 1);
}
.clip__titre small { display: block; font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: #e0a32e; margin-bottom: .8rem; }
.clip__titre strong { font-family: var(--font-display, "Zodiak", Georgia, serif); font-weight: 400; font-size: clamp(2rem, 5vw, 4.4rem); letter-spacing: -.02em; line-height: 1.05; }
.clip__legende {
  position: absolute; z-index: 2; left: 50%; bottom: 7vh; transform: translateX(-50%);
  display: flex; gap: .8rem; align-items: center;
  opacity: var(--clip-l, 0);
}
.clip__son {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .75rem 1.2rem; border-radius: 999px;
  border: 1px solid rgba(246, 239, 228, .35);
  background: rgba(13, 10, 8, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #f6efe4; font: inherit; font-size: .9rem; white-space: nowrap;
}
.clip__son:hover { border-color: #e0a32e; }
.clip__son svg { width: 18px; height: 18px; }
.clip__son[aria-pressed="true"] .ico-off, .clip__son[aria-pressed="false"] .ico-on { display: none; }
@media (max-width: 760px) {
  .clip { height: 160vh; }
  .clip__cadre { --clip-ix: 6%; }
}
@media (prefers-reduced-motion: reduce) {
  .clip { height: auto; }
  .clip__scene { position: relative; height: 70vh; }
  .clip__cadre { clip-path: none; }
}

/* ---------- 4. Halo de lumière au curseur ---------- */
.halo-curseur {
  position: fixed; inset: 0; z-index: 46; pointer-events: none;
  mix-blend-mode: screen;
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .halo-curseur { display: none; }
}
