/* Leonida Motion (règles « Emil » : ease-out, court, jamais depuis 0) — couche d'animations globale (CSS natif + motion.js, sans librairie).
   Tout est coupé si l'appareil demande de réduire les animations. */
:root{--mo-ease:cubic-bezier(.2,.8,.2,1);--mo-ease-out:cubic-bezier(.16,1,.3,1);--mo-d:.45s}

@media (prefers-reduced-motion:no-preference){
  /* 1. Transitions entre les pages (Chrome, Edge, Safari 18.2+) : la barre du haut et du bas restent en place */
  @view-transition{navigation:auto}
  .topwrap{view-transition-name:gv-top}
  .bottom-nav{view-transition-name:gv-bnav}
  ::view-transition-old(root){animation:moPgOut .12s ease-out both}
  ::view-transition-new(root){animation:moPgIn .3s var(--mo-ease-out) both}
  ::view-transition-group(gv-top),::view-transition-group(gv-bnav){animation:none}

  /* 2. Apparition au scroll (classes posées par motion.js) */
  html.mo .mo-r{opacity:0;translate:0 14px;scale:.98}
  html.mo .mo-r.mo-in{opacity:1;translate:none;scale:none;
    transition:opacity .35s var(--mo-ease),translate var(--mo-d) var(--mo-ease-out),scale var(--mo-d) var(--mo-ease-out)}

  /* 3. Entrée des héros : titre qui se dévoile, étiquette qui glisse, le reste qui suit */
  html.mo .lx-title,html.mo main [class*="-hero"] h1,html.mo main h1.page-title,html.mo main h1.s3-t{animation:moTitle .6s var(--mo-ease-out) .04s backwards}
  html.mo .iv-hero .v2-lbl,html.mo .v2-hero .lx-tag,html.mo .v2-hero .v2-lbl{animation:moSlide .45s var(--mo-ease-out) backwards}
  html.mo .iv-hero .iv-meta,html.mo .iv-hero h1~*,html.mo .v2-hero .v2-ctas{animation:moUp .5s var(--mo-ease-out) .15s backwards}
  html.mo .iv-wm{animation:moWm .9s var(--mo-ease-out) backwards}

  /* 4. Accueil : l'image du héros se pose doucement, puis s'éloigne au scroll */
  html.mo .lx-hero .lx-poster{animation:moZoom 1.2s var(--mo-ease-out) backwards}
  @supports (animation-timeline:view()){
    .lx-hero.v2-hero>.lx-media{animation:moPar linear both;animation-timeline:view();animation-range:exit 0% exit 100%}
  }

  /* 5. Réactions au toucher */
  .btn:active,.icon-btn:active,.v2-cta:active,.v2-ctas a:active,.bottom-nav a:active,.v2-topnav a:active{scale:.95}
  .v2-tile:active,.v2-card:active,.v2-game:active{scale:.985}
}

@keyframes moPgOut{to{opacity:0;scale:.99}}
@keyframes moPgIn{from{opacity:0;translate:0 10px}}
@keyframes moTitle{from{opacity:0;translate:0 .35em;clip-path:inset(-10% -6% 100% -6%)}to{opacity:1;clip-path:inset(-10% -6% -10% -6%)}}
@keyframes moSlide{from{opacity:0;translate:-12px 0}}
@keyframes moUp{from{opacity:0;translate:0 10px}}
@keyframes moWm{from{opacity:0;translate:40px 0}}
@keyframes moZoom{from{scale:1.09;opacity:.4}}
@keyframes moPar{to{scale:1.07;opacity:.55}}
/* stories : ouverture directe, l'écran noir glisse vite vers le haut (pas de fondu avec la page d'avant) */
html body .content>.sv{animation:none!important;opacity:1!important}
@media (prefers-reduced-motion:no-preference){.sv>*{animation:moStory .24s cubic-bezier(.16,1,.3,1) both}}
@keyframes moStory{from{translate:0 28px;scale:.97;opacity:0}}
