/* ============================================================
   LEFA ONE — enhancements (always on)
   · Intro loader  · Method scroll-pinned (desktop)
   ============================================================ */

/* ---------- HOVER-FLICKER FIX (site-wide) ----------------
   Cause: a `transform: scale` transition on an image whose ancestor card
   also transitions `transform` (lift), both inside `overflow: hidden`,
   makes Chromium re-rasterize/blink while the pointer rests on the photo.
   Fix: give every clipping media-container its own stable compositing
   layer, and promote the scaled child + lifting card to their own layers
   so the scale composites cleanly instead of repainting each frame. */
.program__media,
.format__media,
.feature-row__media,
.method__portrait,
.gallery__item,
.ba__stage {
  transform: translateZ(0);
  will-change: transform;
}
.program__media image-slot,
.format__media image-slot,
.feature-row__media image-slot,
.gallery__item img {
  backface-visibility: hidden;
  will-change: transform;
}
.program,
.format,
.benefit,
.plan,
.pcard,
.bento__cell {
  backface-visibility: hidden;
}

/* ---------- INTRO LOADER ---------------------------------- */
#fx-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: #0a0a0a;
  overflow: hidden;
}
#fx-loader .fx-word {
  font-family: var(--font-display, 'Archivo'), sans-serif;
  font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 9vw, 6rem); color: #fff;
  display: flex; gap: 0.12em; overflow: hidden;
}
#fx-loader .fx-word small {
  align-self: flex-end; font-size: 0.28em; letter-spacing: 0.35em;
  color: var(--lefa-accent); margin-bottom: 0.9em; font-weight: 600;
}
#fx-loader .fx-word span {
  display: inline-block; transform: translateY(110%);
  animation: fx-rise 0.75s cubic-bezier(0.16,1,0.3,1) forwards;
}
#fx-loader .fx-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--lefa-accent); animation: fx-load 1.5s ease forwards 0.2s;
}
#fx-loader.is-out { animation: fx-curtain 0.7s cubic-bezier(0.7,0,0.3,1) forwards; }
@keyframes fx-rise { to { transform: translateY(0); } }
@keyframes fx-load { to { width: 100%; } }
@keyframes fx-curtain { to { transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) {
  #fx-loader .fx-word span { animation: none; transform: none; }
  #fx-loader .fx-bar { animation: none; width: 100%; }
}

/* ---------- METHOD SCROLL-PINNED (desktop) ---------------- */
@media (min-width: 880px) {
  #methode .method-grid { align-items: start; }
  #methode .method__portrait {
    position: sticky; top: 12vh; height: 76vh;
  }
  #methode .pillars { margin-top: 0; }
  #methode .pillar {
    min-height: 60vh; display: flex; flex-direction: column; justify-content: center;
    opacity: 0.28; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    transform: translateY(8px);
  }
  #methode .pillar.is-active { opacity: 1; transform: none; }
  #methode .pillar.is-active .pillar__n { color: var(--lefa-accent); }
  #methode .method__portrait::after {
    content: ""; position: absolute; left: -1.2rem; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(var(--lefa-accent) var(--fx-prog,0%), rgba(255,255,255,0.12) 0%);
  }
}

/* ---------- GALLERY (masonry) ----------------------------- */
.gallery {
  columns: 3; column-gap: 1rem; margin-top: 2.5rem;
}
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 560px) { .gallery { columns: 1; } }

.gallery__item {
  display: block; width: 100%; margin: 0 0 1rem; padding: 0; border: 0;
  break-inside: avoid; position: relative; overflow: hidden; cursor: zoom-in;
  border-radius: 14px; background: #111; line-height: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.14);
  /* isolate paint/layout so the hover scale never reflows the column
     (CSS multicol otherwise re-balances mid-transition -> hover flicker) */
  contain: layout paint style;
  transform: translateZ(0);
}
.gallery__item img {
  width: 100%; height: auto; display: block;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.5s ease;
  filter: saturate(0.94);
  backface-visibility: hidden; will-change: transform;
}
.gallery__item::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 45%);
  opacity: 0; transition: opacity 0.4s ease;
}
.gallery__zoom {
  position: absolute; right: 0.85rem; bottom: 0.75rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border-radius: 50%; font-size: 1.4rem; line-height: 1; color: #0a0a0a;
  background: var(--lefa-accent); transform: scale(0.6); opacity: 0;
  transition: transform 0.4s var(--ease,cubic-bezier(0.16,1,0.3,1)), opacity 0.4s ease;
}
.gallery__item:hover img { transform: scale(1.05); filter: saturate(1.05); }
.gallery__item:hover::before { opacity: 1; }
.gallery__item:hover .gallery__zoom { transform: scale(1); opacity: 1; }
.gallery__item:focus-visible { outline: 2px solid var(--lefa-accent); outline-offset: 3px; }

.gallery-more { text-align: center; margin-top: 2.5rem; }

/* ---------- GALLERY VIDEO (cinematic player) -------------- */
.vplayer {
  position: relative; margin: 2.75rem auto 0; width: 100%; max-width: 400px;
  aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden;
  background: #0a0a0a; isolation: isolate;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
}
/* soft gold ambient glow behind the frame */
.vplayer::after {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 22px;
  background: radial-gradient(120% 120% at 50% 0%, var(--lefa-accent), transparent 55%);
  opacity: 0.22; filter: blur(22px);
}
.vplayer__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: #0a0a0a;
}
.vplayer__overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 32%),
              linear-gradient(to bottom, rgba(0,0,0,0.35), transparent 28%);
  transition: opacity 0.45s ease;
}
.vplayer__tag {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff; padding: 0.4rem 0.7rem; border-radius: 100px;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.14);
  transition: opacity 0.45s ease;
}
.vplayer__tag::first-letter { color: var(--lefa-accent); }
.vplayer__play {
  position: absolute; inset: 0; margin: auto; z-index: 3;
  width: 5rem; height: 5rem; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #0a0a0a;
  background: rgba(255,255,255,0.92); border: 0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transition: transform 0.4s var(--ease,cubic-bezier(0.16,1,0.3,1)), background 0.3s ease, opacity 0.35s ease;
}
.vplayer__play svg { width: 1.9rem; height: 1.9rem; margin-left: 3px; }
.vplayer__play::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  animation: vplayer-pulse 2.4s ease-out infinite;
}
.vplayer__play:hover { transform: scale(1.08); background: var(--lefa-accent); }
.vplayer:hover .vplayer__play:not(:hover) { transform: scale(1.04); }
@keyframes vplayer-pulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}
/* playing state: reveal native controls, fade chrome out */
.vplayer[data-state="playing"] .vplayer__video { /* controls toggled via JS attribute */ }
.vplayer[data-state="playing"] .vplayer__play,
.vplayer[data-state="playing"] .vplayer__overlay,
.vplayer[data-state="playing"] .vplayer__tag {
  opacity: 0; pointer-events: none;
}
.vplayer[data-state="playing"] .vplayer__play::before { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .vplayer__play::before { animation: none; }
}

/* ---------- LIGHTBOX -------------------------------------- */
#fx-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,8,0.92); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s;
}
#fx-lightbox.is-open { opacity: 1; visibility: visible; }
#fx-lightbox .fx-lb-img {
  max-width: min(92vw, 1100px); max-height: 86vh; width: auto; height: auto;
  object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transform: scale(0.96); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
#fx-lightbox.is-open .fx-lb-img { transform: scale(1); }
#fx-lightbox .fx-lb-btn {
  position: absolute; z-index: 2; background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.18); cursor: pointer;
  width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center; transition: background 0.25s ease, transform 0.25s ease;
}
#fx-lightbox .fx-lb-btn:hover { background: var(--lefa-accent); color: #0a0a0a; transform: scale(1.06); }
#fx-lightbox .fx-lb-close { top: 1.2rem; right: 1.2rem; }
#fx-lightbox .fx-lb-prev { left: 1.4rem; top: 50%; transform: translateY(-50%); }
#fx-lightbox .fx-lb-next { right: 1.4rem; top: 50%; transform: translateY(-50%); }
#fx-lightbox .fx-lb-prev:hover, #fx-lightbox .fx-lb-next:hover { transform: translateY(-50%) scale(1.06); }
#fx-lightbox .fx-lb-count {
  position: absolute; bottom: 1.3rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 0.85rem; letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  #fx-lightbox .fx-lb-prev { left: 0.6rem; } #fx-lightbox .fx-lb-next { right: 0.6rem; }
  #fx-lightbox .fx-lb-btn { width: 2.6rem; height: 2.6rem; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery__item img, #fx-lightbox, #fx-lightbox .fx-lb-img { transition: none; }
}

/* ============================================================
   PROMO — 1 séance offerte / semaine les 2 premiers mois
   ============================================================ */
.pricing-promo {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  justify-content: center; text-align: center;
  margin: 0 auto 2.6rem; padding: 1rem 1.5rem; max-width: 760px;
  border: 1px solid var(--color-gold, #c9a24b);
  background: linear-gradient(135deg, rgba(201,162,75,0.16), rgba(201,162,75,0.04));
  box-shadow: 0 14px 40px rgba(0,0,0,0.4);
}
.pricing-promo__tag {
  display: inline-flex; align-items: center; gap: 0.4em;
  background: var(--color-gold, #c9a24b); color: #0a0a0a;
  font-family: var(--font-family-display); font-weight: 800;
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.5em 0.9em; white-space: nowrap;
}
.pricing-promo__text { font-size: 1rem; color: #f1f1f1; line-height: 1.4; margin: 0; }
.pricing-promo__text b { color: var(--color-gold, #c9a24b); font-weight: 700; }
.pricing-promo__text small { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-top: 0.2rem; }

/* Ligne promo dorée dans les cartes de prix */
.pcard__feats li.is-promo { color: var(--color-gold, #c9a24b); font-weight: 700; }
.pcard__feats li.is-promo .ck { color: var(--color-gold, #c9a24b); }
