

:root {
  --mvt-masque: 1.6s;    
  --mvt-ouvre: cubic-bezier(.7, 0, .2, 1);   
  --mvt-recul: 1.9s;     
  --mvt-fondu: .8s;     
}

@media (prefers-reduced-motion: no-preference) {

  html.mvt [data-mvt-photo] {
    transition: clip-path var(--mvt-masque) var(--mvt-ouvre) var(--mvt-d, 0s), opacity var(--mvt-fondu) var(--doux) var(--mvt-d, 0s);
  }
  html.mvt [data-mvt-photo]:not(.mvt-ouvert) { opacity: 0; clip-path: inset(15% 12% 15% 12%); }
  html.mvt [data-mvt-photo="rideau"]:not(.mvt-ouvert) { clip-path: inset(26% 0 26% 0); }
  html.mvt [data-mvt-photo].mvt-ouvert { opacity: 1; clip-path: inset(0 0 0 0); }
  html.mvt [data-mvt-photo] img { transition: scale var(--mvt-recul) var(--expo) var(--mvt-d, 0s), transform var(--d-survol) var(--expo); }
  html.mvt [data-mvt-photo]:not(.mvt-ouvert) img { scale: 1.24; }
  html.mvt [data-mvt-photo="rideau"]:not(.mvt-ouvert) img { scale: 1.18; }
  html.mvt [data-mvt-photo].mvt-ouvert img { scale: 1; }
  
  html.mvt [data-mvt-photo] > picture { opacity: 1; }
  
  html.mvt .monte.mvt-porte { opacity: 1; transform: none; }
  html.mvt .monte.mvt-porte > :not([data-mvt-photo]):not(:has([data-mvt-photo])) {
    opacity: 0; translate: 0 14px;
    transition: opacity 1.2s var(--expo) calc(var(--delai, 0s) + .55s), translate 1.3s var(--expo) calc(var(--delai, 0s) + .55s);
  }
  html.mvt .monte.mvt-porte.est-visible > :not([data-mvt-photo]):not(:has([data-mvt-photo])) { opacity: 1; translate: none; }

  html.mvt .chambre__photo { transition: clip-path var(--mvt-masque) var(--mvt-ouvre); }
  html.mvt .chambre:not(.est-visible) .chambre__photo { clip-path: inset(14% 0 14% 0); }
  html.mvt .chambre.est-visible .chambre__photo { clip-path: inset(0 0 0 0); }
  html.mvt .chambre:not(.est-visible) .chambre__photo img { scale: 1.2; }
  
  html.mvt.js[data-sejour="2"] .sj-apparait .pile__lien { transition: clip-path var(--mvt-masque) var(--mvt-ouvre) calc(.1s + var(--i, 0) * .16s); }
  html.mvt.js[data-sejour="2"] .sj-apparait .pile__carte:not(.est-visible) .pile__lien { clip-path: inset(9% 9% 9% 9%); }
  html.mvt.js[data-sejour="2"] .sj-apparait .pile__carte.est-visible .pile__lien { clip-path: inset(0 0 0 0); }
  html.mvt.js[data-sejour="2"] .sj-apparait .pile__carte:not(.est-visible) .pile__photo img { scale: 1.2; }
  
  html.mvt .porte__lien { transition: clip-path var(--mvt-masque) var(--mvt-ouvre) calc(.15s + var(--i, 0) * .14s); }
  html.mvt .portes:not(.est-visible) .porte__lien { clip-path: inset(9% 9% 9% 9%); }
  html.mvt .portes.est-visible .porte__lien { clip-path: inset(0 0 0 0); }
  html.mvt .portes:not(.est-visible) .porte img { scale: 1.2; }
  
  html.mvt .gf__grande { transition: clip-path var(--mvt-masque) var(--mvt-ouvre) calc(var(--i, 0) * .14s); }
  html.mvt .gf__grande:not(.est-visible) { clip-path: inset(12% 10% 12% 10%); }
  html.mvt .gf__grande.est-visible { clip-path: inset(0 0 0 0); }
  html.mvt .gf__grande:not(.est-visible) img { scale: 1.2; }

  html.mvt [data-mvt-profondeur] > picture, html.mvt .ouverture__photo > picture, html.mvt .fo__photo > picture { will-change: transform; }

  html.mvt .mvt-mots .mot { opacity: .16; transition: opacity 1.1s var(--doux) calc(.1s + var(--i, 0) * 55ms); }
  html.mvt .mvt-mots.mvt-eclaire .mot { opacity: 1; }
  html.mvt .monte.mvt-mots { opacity: 1; transform: none; }

  html.mvt .monte { transition-delay: calc(var(--delai, 0s) + var(--mvt-c, 0s)); }
  
  html.mvt .etiquette.monte::before, html.mvt .etiquette.monte::after,
  html.mvt .ouverture__etiquette.monte::before, html.mvt .ouverture__etiquette.monte::after {
    transform: scaleX(0); transition: transform 1.4s var(--expo) calc(var(--delai, 0s) + var(--mvt-c, 0s) + .3s);
  }
  html.mvt .etiquette.monte::before, html.mvt .ouverture__etiquette.monte::before { transform-origin: right center; }
  html.mvt .etiquette.monte::after, html.mvt .ouverture__etiquette.monte::after { transform-origin: left center; }
  html.mvt .etiquette.monte.est-visible::before, html.mvt .etiquette.monte.est-visible::after,
  html.mvt .ouverture__etiquette.monte.est-visible::before, html.mvt .ouverture__etiquette.monte.est-visible::after { transform: none; }

  html.mvt .monte.mvt-cascade { opacity: 1; transform: none; }
  html.mvt .mvt-cascade > * {
    opacity: 0; translate: 0 26px;
    transition: opacity 1.2s var(--expo) calc(var(--delai, 0s) + var(--mvt-c, 0s) + var(--mvt-i, 0) * 90ms),
                translate 1.4s var(--expo) calc(var(--delai, 0s) + var(--mvt-c, 0s) + var(--mvt-i, 0) * 90ms);
  }
  html.mvt .mvt-cascade.est-visible > * { opacity: 1; translate: none; }

  @media (min-width: 768px) {
    html.mvt .respiration__phrase.monte { opacity: 1; transform: none; }
    html.mvt .respiration__ligne { opacity: 0; translate: -5% 0; transition: opacity 1.4s var(--doux), translate 2s var(--expo); }
    html.mvt .respiration__ligne--2 { translate: 5% 0; transition-delay: .2s; }
    html.mvt .respiration__phrase.est-visible .respiration__ligne { opacity: 1; translate: none; }
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  
  html.mvt .etiquette.monte::before, html.mvt .ouverture__etiquette.monte::before { transform-origin: center; }
}

html.anim-secours.mvt [data-mvt-photo], html.anim-secours.mvt .chambre__photo, html.anim-secours.mvt .pile__lien,
html.anim-secours.mvt .porte__lien, html.anim-secours.mvt .gf__grande { opacity: 1 !important; clip-path: none !important; }
html.anim-secours.mvt .mvt-cascade > * { opacity: 1 !important; translate: none !important; }
html.anim-secours.mvt .mvt-mots .mot { opacity: 1 !important; }
html.anim-secours.mvt .monte.mvt-porte > * { opacity: 1 !important; translate: none !important; }
