/* =========================================================
   MCTD — Animations (désactivables : préférence système ou bouton « Animation »)
   ========================================================= */
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes sheet{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@keyframes kenburns{from{transform:scale(1.02)}to{transform:scale(1.12) translate(-1.5%,1%)}}
@keyframes progress{from{--p:0}to{--p:1}}

/* Apparition au scroll : le contenu reste visible sans JavaScript */
.js .reveal{opacity:0;transform:translateY(26px);transition:opacity .8s var(--ease),transform .8s var(--ease)}
.js .reveal.is-in{opacity:1;transform:none}

/* Hero : deux états (data-stage) avec transition douce */
.hero__stage{transition:opacity .9s var(--ease),transform .9s var(--ease),visibility 0s}
.hero[data-stage="1"] .hero__stage--2{opacity:0;visibility:hidden;transform:translateY(26px);pointer-events:none;transition:opacity .6s,transform .6s,visibility 0s .6s}
.hero[data-stage="2"] .hero__stage--1{opacity:0;visibility:hidden;transform:translateY(-26px);pointer-events:none;transition:opacity .6s,transform .6s,visibility 0s .6s}
.hero[data-stage="2"] .hero__shade{background:linear-gradient(100deg,rgba(112,29,43,.95),rgba(112,29,43,.82)),linear-gradient(0deg,rgba(41,37,40,.5),transparent 45%)}
.hero__shade{transition:background 1s}
.hero[data-stage="2"] .tile{animation:fadeUp .8s var(--ease) both}
.hero[data-stage="2"] .tile:nth-child(2){animation-delay:.08s}
.hero[data-stage="2"] .tile:nth-child(3){animation-delay:.16s}
.hero[data-stage="2"] .tile:nth-child(4){animation-delay:.24s}

.anim-on .hero__bg img{animation:kenburns 22s ease-in-out infinite alternate}
.anim-on .hero[data-stage="1"] .hero__title,.anim-on .hero[data-stage="1"] .hero__slogan,.anim-on .hero[data-stage="1"] .hero__eyebrow,.anim-on .hero[data-stage="1"] .hero__lead,.anim-on .hero[data-stage="1"] .hero__cta{animation:fadeUp 1s var(--ease) both}
.anim-on .hero[data-stage="1"] .hero__title{animation-delay:.15s}
.anim-on .hero[data-stage="1"] .hero__slogan{animation-delay:.35s}
.anim-on .hero[data-stage="1"] .hero__lead{animation-delay:.5s}
.anim-on .hero[data-stage="1"] .hero__cta{animation-delay:.65s}
.anim-on .dot.is-on::after{animation:dotfill var(--stage-ms,8s) linear forwards}
@keyframes dotfill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.hero__scroll{position:absolute;left:50%;bottom:10px;width:24px;height:40px;border:1.5px solid rgba(255,255,255,.6);border-radius:14px;transform:translateX(-50%)}
.hero__scroll span{position:absolute;left:50%;top:8px;width:3px;height:8px;background:#fff;border-radius:2px;transform:translateX(-50%)}
.anim-on .hero__scroll span{animation:wheel 1.8s ease-in-out infinite}
@keyframes wheel{0%{opacity:0;transform:translate(-50%,0)}30%{opacity:1}100%{opacity:0;transform:translate(-50%,14px)}}

/* Sans animation : tout est affiché immédiatement */
.anim-off *,.anim-off *::before,.anim-off *::after{animation:none!important}
.anim-off .reveal,.js.anim-off .reveal{opacity:1!important;transform:none!important;transition:none!important}
.anim-off html,html.anim-off{scroll-behavior:auto}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important}
  .js .reveal{opacity:1;transform:none}
}
