/* ============================================================
   Motion design (repris de la vitrine Manora Live)
   Chargé après style.css. Les attributs [data-reveal], .mo-split,
   .mo-* sont posés par /assets/js/motion.js : sans JS, rien ne
   change et tout reste visible.
   ============================================================ */

:root {
  --coral: #ec5c46;
  --coral-light: #ff8d78;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

::selection { background: var(--coral); color: #fff; }
html { scroll-padding-top: 90px; }

/* ── Révélations au scroll ─────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ── Titres découpés en mots ───────────────────────────────── */
.mo-split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .1em;
  margin-bottom: -.1em;
}
.mo-split .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 55ms + var(--d, 0) * 1ms);
}
.mo-split.is-in .w > span { transform: none; }

/* Le hero d'accueil remplace ses anciennes entrées par le découpage */
.js .hero h1,
.js .hero .lead,
.js .hero-actions,
.js .hero-media { animation: none; }

/* ── Boutons : remplissage qui monte + flèche qui glisse ───── */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --btn-fill: var(--terracotta);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--btn-fill);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
  pointer-events: none;
}
.btn:hover::after { transform: translateY(0); }
.btn-primary:hover { background: var(--ink); }
.btn-soft { --btn-fill: var(--cream); }
.btn-soft:hover { border-color: var(--ink); }
.mo-arrow { display: inline-block; transition: transform .4s var(--ease-out); }
.btn:hover .mo-arrow { transform: translateX(4px); }

/* ── En-tête : toujours visible, se compacte au scroll ─────── */
.site-header { transition: box-shadow .4s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(19, 37, 55, .25); }

@media (min-width: 981px) {
  .nav-wrap { transition: min-height .4s var(--ease-out); }
  .site-header .brand { transition: height .4s var(--ease-out); }
  .site-header.is-scrolled .nav-wrap { min-height: 72px; }
  .site-header.is-scrolled .brand { height: 54px; }
}

/* Soulignement corail qui glisse sous les liens */
.site-nav a { position: relative; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.site-nav a:not(.active):hover { background: transparent; }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Menu mobile : liens en cascade */
.mobile-menu.open a { animation: mo-rise .5s var(--ease-out) both; }
.mobile-menu.open a:nth-child(2) { animation-delay: .04s; }
.mobile-menu.open a:nth-child(3) { animation-delay: .08s; }
.mobile-menu.open a:nth-child(4) { animation-delay: .12s; }
.mobile-menu.open a:nth-child(5) { animation-delay: .16s; }
.mobile-menu.open a:nth-child(6) { animation-delay: .2s; }
.mobile-menu.open a:nth-child(7) { animation-delay: .24s; }
.mobile-menu.open a:nth-child(8) { animation-delay: .28s; }
@keyframes mo-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ── Hero d'accueil ────────────────────────────────────────── */
.mo-blobs { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.mo-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .7;
  animation: mo-drift 18s ease-in-out infinite;
}
.mo-blob.b1 { width: 520px; height: 520px; background: var(--cream); top: -120px; left: -140px; }
.mo-blob.b2 { width: 460px; height: 460px; background: rgba(169, 222, 210, .55); bottom: -160px; right: 8%; animation-delay: -6s; }
.mo-blob.b3 { width: 300px; height: 300px; background: rgba(236, 92, 70, .16); top: 18%; right: -60px; animation-delay: -12s; }
@keyframes mo-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 20px) scale(.95); }
}

.hero-stage > * { transition: translate .9s var(--ease-out); }

/* La photo se dévoile de bas en haut (le clip disparaît ensuite pour garder l'ombre) */
.js .hero-photo-frame { animation: mo-frame-in 1.4s var(--ease-out) backwards; }
@keyframes mo-frame-in {
  from { clip-path: inset(100% 0 0 0 round 200px 200px 36px 36px); }
  to { clip-path: inset(0 0 0 0 round 200px 200px 36px 36px); }
}

/* Le flash de la borne, toutes les 6 s */
.mo-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 59% 13%, #fff 0%, rgba(255, 255, 255, .85) 12%, rgba(255, 250, 235, 0) 60%);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: mo-flash 6s 1.6s infinite;
}
@keyframes mo-flash {
  0%, 100% { opacity: 0; }
  2% { opacity: 1; }
  8% { opacity: 0; }
}

/* « 3, 2, 1… souriez ! » arrive juste avant le premier flash */
.js .photo-note { animation: mo-pop .8s 1.1s var(--ease-spring) backwards; }
@keyframes mo-pop {
  from { opacity: 0; scale: .8; }
  to { opacity: 1; scale: 1; }
}

.mo-hero-mark {
  position: absolute;
  z-index: 5;
  top: 46px;
  right: calc(50% - 236px);
  pointer-events: none;
  animation: mo-pop .9s 1s var(--ease-spring) backwards;
}
@media (max-width: 980px) {
  .mo-hero-mark { right: calc(50% - 200px); }
  .mo-hero-mark svg { width: 86px; height: 86px; }
}
@media (max-width: 768px) {
  .mo-hero-mark { top: 0; right: calc(50% - 180px); }
  .mo-hero-mark svg { width: 70px; height: 70px; }
}
@media (max-width: 420px) {
  .mo-hero-mark { right: 2px; }
}

/* ── Citation qui s'allume mot à mot ───────────────────────── */
.mo-scrub .w { transition: opacity .45s ease, color .45s ease; opacity: .16; }
.mo-scrub .w.on { opacity: 1; }

/* ── Pictogramme Manora animé ──────────────────────────────── */
.mark { overflow: visible; display: block; }
.mark * { transform-box: fill-box; transform-origin: center; }
.mark--live .mark__front { animation: mo-float 6s ease-in-out infinite; }
.mark--live .mark__back { animation: mo-float 6s ease-in-out infinite reverse; }
.mark--live .mark__eye { animation: mo-blink 5s infinite; }
.mark--live .mark__pupil { animation: mo-look 9s var(--ease-out) infinite; }
.mark--live .ray { animation: mo-ray 2.4s var(--ease-out) infinite; transform-origin: right bottom; }
.mark--live .r2 { animation-delay: .12s; }
.mark--live .r3 { animation-delay: .24s; }
.mark--live .mark__smile { animation: mo-smile 9s ease-in-out infinite; }
@keyframes mo-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(2px, -4px) rotate(-2deg); }
}
@keyframes mo-blink {
  0%, 44%, 50%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(.08); }
}
@keyframes mo-look {
  0%, 12% { transform: translate(0, 0); }
  18%, 34% { transform: translate(-4px, 2px); }
  40%, 58% { transform: translate(4px, -2px); }
  64%, 100% { transform: translate(0, 0); }
}
@keyframes mo-ray {
  0%, 55% { opacity: 1; transform: scale(1); }
  70% { opacity: .2; transform: scale(.4); }
  85% { opacity: 1; transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes mo-smile {
  0%, 60%, 100% { d: path('M42 92 Q60 106 80 92'); }
  66%, 80% { d: path('M42 90 Q60 112 80 90'); }
}

/* ── Pré-footer corail : « Une fête en préparation ? » ─────── */
.section-sm:has(> .container > .cta-panel) { padding: 0; }
/* !important : style.css force la largeur des .container en mobile */
.section-sm:has(> .container > .cta-panel) > .container { width: 100% !important; max-width: none; }

.section-sm .cta-panel {
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(135deg, #e3553e 0%, #cf4730 55%, #c13f28 100%);
  padding: clamp(90px, 13vw, 160px) max(22px, calc((100% - 1180px) / 2));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}
.section-sm .cta-panel > div,
.section-sm .cta-panel > .btn { position: relative; z-index: 1; }
.section-sm .cta-panel h2 {
  font-size: clamp(2.2rem, 5.6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  max-width: 18ch;
  margin: 0 auto;
}
.section-sm .cta-panel p {
  margin: 22px auto 0;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .94);
}
.section-sm .cta-panel .btn {
  --btn-fill: var(--ink);
  margin-top: 36px;
  height: 58px;
  padding: 0 32px;
  font-size: 1.05rem;
}
.section-sm .cta-panel .btn:hover { color: #fff; background: #fff; }

.mo-marks { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.mo-marks .m { position: absolute; opacity: .9; }
.mo-marks .mark__body { fill: var(--ink); }
.mo-marks .m1 { top: -36px; left: 3%; animation: mo-bob 7s ease-in-out infinite; }
.mo-marks .m2 { bottom: 4%; right: 5%; rotate: 14deg; opacity: .5; animation: mo-bob 6s -2s ease-in-out infinite; }
.mo-marks .m3 { top: 28%; right: 13%; rotate: -10deg; opacity: .35; animation: mo-bob 8s -4s ease-in-out infinite; }
@keyframes mo-bob { 50% { translate: 0 -16px; } }

@media (max-width: 768px) {
  .section-sm .cta-panel { padding: 96px 22px 84px; align-items: center; }
  .section-sm .cta-panel .btn { width: auto; max-width: 100%; }
  .mo-marks .m1 { top: -46px; left: -12px; }
  .mo-marks .m3 { display: none; }
}

/* ── Footer : grand wordmark ───────────────────────────────── */
.mo-wordmark {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  padding-bottom: 56px;
  margin-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.mo-wordmark-mark { flex-shrink: 0; }
.mo-wordmark-mark .mark { width: clamp(56px, 8vw, 88px); height: auto; }
.mo-wordmark .word {
  margin: 0;
  font-size: clamp(2.6rem, 6.4vw, 6.2rem);
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .95;
  color: var(--cream-2);
}
.mo-wordmark .word .accent { color: var(--coral); margin-left: .18em; }
@media (max-width: 680px) {
  .mo-wordmark { flex-direction: column; align-items: flex-start; padding-bottom: 40px; margin-bottom: 40px; }
  .mo-wordmark .word { white-space: normal; font-size: clamp(2.6rem, 13vw, 4rem); }
  .mo-wordmark .word .accent { display: block; margin-left: 0; }
}

/* ── Accessibilité : moins d'animations ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .mo-split .w > span { transform: none; transition: none; }
  .mo-scrub .w { opacity: 1; }
  .mo-blob, .mo-flash, .mark--live *, .mo-marks .m, .mo-hero-mark,
  .js .hero-photo-frame, .js .photo-note, .mobile-menu.open a { animation: none !important; }
  .site-header, .btn::after, .mo-arrow { transition: none; }
}
