/* Yunsha.be — motion globale (site public). Pas de hijack, pas de GSAP. */
html.ym {
  --ym-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ym-sy: 0;
}

html.ym .hero-inner { animation: none; }

html.ym .hero-atmosphere,
html.ym .sasha-hero-atmo {
  animation: none;
  will-change: transform;
  transform: translate3d(0, calc(var(--ym-sy, 0) * 0.22px), 0) scale(1.1);
}

html.ym .site-header {
  transition: background .45s var(--ym-ease), box-shadow .45s var(--ym-ease), border-color .45s var(--ym-ease);
}
html.ym .site-header.ym-scrolled {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 40px rgba(3, 45, 96, 0.08);
}

/* Titres hero : rideau mot à mot */
.ym-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}
html.ym .ym-word {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  transition: transform 1.05s var(--ym-ease), opacity .5s ease;
  transition-delay: calc(var(--i, 0) * 52ms + 60ms);
}
html.ym-hero-ready .ym-word {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

html.ym .hero h1,
html.ym .sasha-hero h1,
html.ym .feat-hero h1,
html.ym .abo-hero h1 {
  opacity: 0;
}
html.ym.ym-hero-ready .hero h1,
html.ym.ym-hero-ready .sasha-hero h1,
html.ym.ym-hero-ready .feat-hero h1,
html.ym.ym-hero-ready .abo-hero h1 {
  opacity: 1;
}

html.ym .ym-hero-item {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
}
html.ym.ym-hero-ready .ym-hero-item {
  opacity: 1;
  transform: none;
  transition: opacity .85s var(--ym-ease), transform .85s var(--ym-ease);
  transition-delay: calc(var(--i, 0) * 90ms + 280ms);
}

html.ym .sasha-hero-icon {
  opacity: 0;
  transform: scale(.86) translate3d(0, 18px, 0);
}
html.ym.ym-hero-ready .sasha-hero-icon {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--ym-ease), transform 1s var(--ym-ease);
}

/* Blocs au scroll */
html.ym .ym-reveal {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition:
    opacity .85s var(--ym-ease),
    transform .85s var(--ym-ease),
    box-shadow .5s var(--ym-ease);
  transition-delay: calc(var(--ym-i, 0) * 70ms);
}
html.ym .ym-reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html.ym .ym-reveal-soft {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .7s var(--ym-ease), transform .7s var(--ym-ease);
  transition-delay: calc(var(--ym-i, 0) * 60ms);
}
html.ym .ym-reveal-soft.is-in {
  opacity: 1;
  transform: none;
}

/* Hover cartes — après apparition */
html.ym .module-card,
html.ym .feature-item,
html.ym .solution-card,
html.ym .dual-panel,
html.ym .sasha-card,
html.ym .plan-card,
html.ym .why-grid article,
html.ym .choice-card {
  transition: transform .5s var(--ym-ease), box-shadow .5s var(--ym-ease), border-color .4s ease, background .4s ease;
}
html.ym .module-card.is-in:hover,
html.ym .feature-item.is-in:hover,
html.ym .solution-card.is-in:hover,
html.ym .dual-panel.is-in:hover,
html.ym .sasha-card.is-in:hover,
html.ym .plan-card.is-in:hover,
html.ym .why-grid article.is-in:hover {
  transform: translate3d(0, -8px, 0);
  box-shadow: 0 28px 60px rgba(3, 45, 96, 0.12);
}

html.ym .btn {
  transition: transform .4s var(--ym-ease), box-shadow .4s var(--ym-ease), background .25s ease, border-color .25s ease;
}
html.ym .btn:hover { transform: translateY(-3px); }

html.ym .sasha-flow span:not(.arrow) {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity .55s var(--ym-ease), transform .55s var(--ym-ease), background .3s ease;
  transition-delay: calc(var(--ym-i, 0) * 80ms);
}
html.ym .sasha-flow.is-in span:not(.arrow) {
  opacity: 1;
  transform: none;
}

html.ym .sasha-home-icon {
  transition: transform .8s var(--ym-ease);
}
html.ym .sasha-hero-copy.is-in .sasha-home-icon {
  transform: scale(1);
}

/* Compat ancien .reveal de styles.css */
html.ym .reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity .85s var(--ym-ease), transform .85s var(--ym-ease);
}
html.ym .reveal.is-visible,
html.ym .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 991px) {
  html.ym .ym-reveal { transform: translate3d(0, 22px, 0); }
  html.ym .module-card.is-in:hover,
  html.ym .feature-item.is-in:hover,
  html.ym .solution-card.is-in:hover,
  html.ym .dual-panel.is-in:hover,
  html.ym .sasha-card.is-in:hover,
  html.ym .plan-card.is-in:hover,
  html.ym .why-grid article.is-in:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.ym .hero-inner { animation: none; }
  html.ym .hero-atmosphere,
  html.ym .sasha-hero-atmo { transform: none; will-change: auto; }
  html.ym .hero h1,
  html.ym .sasha-hero h1,
  html.ym .feat-hero h1,
  html.ym .abo-hero h1,
  html.ym .ym-hero-item,
  html.ym .sasha-hero-icon,
  html.ym .ym-reveal,
  html.ym .ym-reveal-soft,
  html.ym .ym-word,
  html.ym .sasha-flow span,
  html.ym .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
}
