/* =========================================================
   Inagency — images du plateau et animations au défilement
   (chargé après styles.css). Toutes les animations sont coupées
   si le visiteur a demandé « réduire les animations ».
   ========================================================= */

/* ---------- Accueil : l'image du studio remplit le viseur ---------- */
.accueil .viseur { isolation: isolate; min-height: calc(100svh - var(--barre-h) - 48px); overflow: hidden; }
.accueil .coin, .accueil .hud { z-index: 2; }
.accueil .viseur-contenu { position: relative; z-index: 1; max-width: 1040px; }
.accueil .sous-titre { max-width: 46ch; }
.media-plateau.fond { position: absolute; inset: 0; z-index: -1; aspect-ratio: auto; max-height: none; width: auto; background: var(--noir); }
.media-plateau.fond img, .media-plateau.fond video { width: 100%; height: 100%; object-fit: cover; }
.media-plateau.fond::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.72) 45%, rgba(0,0,0,.25) 100%);
}
.media-plateau.fond .croix { z-index: 1; left: 72%; top: 38%; }
@media (max-width: 899px) {
  .accueil .viseur { min-height: calc(92svh - var(--barre-h)); align-content: end; padding-bottom: 32px; }
  .media-plateau.fond img { object-position: 60% center; }
}
@media (min-width: 900px) {
  .accueil .viseur { grid-template-columns: 1fr; align-content: end; padding: 96px 64px 72px; }
  .media-plateau.fond::after {
    background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.62) 42%, rgba(0,0,0,.08) 100%);
  }
}

/* ---------- Bande « coulisses » qui glisse au défilement ---------- */
.coulisses { padding: clamp(48px, 7vw, 96px) 0; overflow: hidden; }
.piste { display: flex; gap: 14px; width: max-content; padding: 0 var(--gouttiere); will-change: transform; }
.cadre-coulisse { margin: 0; width: 78vw; max-width: 760px; aspect-ratio: 3 / 2; overflow: hidden; background: var(--gris-coulisse); flex: none; }
.cadre-coulisse img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .cadre-coulisse { width: 44vw; } }
.coulisses .legende { margin-top: 20px; color: var(--texte-2); font-size: var(--t-14); }

/* ---------- Prestations : visuel collant à côté de la liste ---------- */
.prestations-grille { display: grid; gap: 40px; margin-top: 56px; }
.prestations-grille .prestations-liste { margin-top: 0; }
.visuel-prestations { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); max-height: 70vh; }
.visuel-prestations img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .visuel-prestations { aspect-ratio: 16 / 10; } }
@media (min-width: 900px) {
  .prestations-grille { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
  .visuel-prestations { position: sticky; top: calc(var(--barre-h) + 32px); }
  .prestations-grille .prestation { grid-template-columns: 1fr; gap: 10px; }
  .prestations-grille .prestation .prix { text-align: left; }
}
@media (min-width: 1200px) {
  .prestations-grille .prestation { grid-template-columns: 1fr 0.42fr; gap: 10px 32px; }
  .prestations-grille .prestation h3 { grid-column: 1; }
  .prestations-grille .prestation > div { grid-column: 1; }
  .prestations-grille .prestation .prix { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
}

/* ---------- Rendez-vous : le plateau en fond ---------- */
.rdv { position: relative; isolation: isolate; overflow: hidden; }
.rdv-fond { position: absolute; inset: -12% 0; z-index: -1; margin: 0; }
.rdv-fond img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.rdv-fond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.2) 100%); }
@media (max-width: 899px) { .rdv-fond::after { background: linear-gradient(0deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.82) 60%, rgba(0,0,0,.9) 100%); } }
.rdv .conteneur { padding-top: clamp(40px, 8vw, 120px); padding-bottom: clamp(40px, 8vw, 120px); }

/* ---------- Animations (uniquement si .anim est posé par le script) ---------- */
.anim .revele {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--delai, 0s);
}
.anim .revele.visible { opacity: 1; transform: none; }

/* Titres : ils montent derrière un masque, comme un carton de générique */
.anim .titre-revele { overflow: hidden; padding: 0.16em 0 0.24em; margin: -0.16em 0 -0.24em; }
.anim .titre-revele > .titre-masque {
  display: inline-block; transform: translateY(110%);
  transition: transform 1.1s var(--ease); transition-delay: var(--delai, 0s);
}
.anim .titre-revele.visible > .titre-masque { transform: none; }
.titre-masque { text-wrap: balance; }

/* Images : l'obturateur s'ouvre et l'image se pose */
.anim .img-revele { clip-path: inset(12% 10% 12% 10%); transition: clip-path 1.4s var(--ease); }
.anim .img-revele img { transform: scale(1.18); transition: transform 1.8s var(--ease); }
.anim .img-revele.visible { clip-path: inset(0); }
.anim .img-revele.visible img { transform: scale(1); }

/* Accueil : l'image recule doucement au chargement */
.anim .media-plateau.fond img { animation: recul-plateau 2.6s var(--ease) both; }
@keyframes recul-plateau { from { transform: scale(1.14); opacity: .2; } to { transform: scale(1); opacity: 1; } }

/* Filtre de la galerie : les vignettes se reposent quand on change de filtre */
.anim .vignette.refiltre { animation: repose .6s var(--ease) both; animation-delay: var(--delai, 0s); }
@keyframes repose { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Les images en parallaxe débordent un peu pour ne jamais laisser de bord vide */
.anim .media-plateau.fond img { height: 118%; margin-top: -9%; }
.anim .visuel-prestations img { height: 114%; margin-top: -7%; }

@media (prefers-reduced-motion: reduce) {
  .piste, [data-parallax] img { transform: none !important; translate: none !important; }
}
