/* ==========================================================
   MARMAILLE & CO — main.css
   Reset + variables + header/menu (à conserver).
   Les styles du hero + 5 sections sont dans main-sections.css.
   ========================================================== */

/* ----- RESET ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.4; scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); overflow-x: hidden; min-height: 100vh; width: 100%; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ----- VARIABLES ----- */
:root {
  --color-primary: #2BB5C8;
  --color-secondary: #EF6055;
  --color-bg: #C8E8F5;
  --color-text: #2D2D2D;
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-display: 'Nunito', sans-serif;
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
  --radius-pill: 999px;
  --radius-lg: 24px;
}

/* ==========================================================
   HEADER + MENU — groupe marque unique, sans végétation
   ========================================================== */
body { --wp-admin-offset: 0px; --header-h: 130px; }
body.admin-bar { --wp-admin-offset: 32px; }
.m-header { position: absolute; inset: 0 0 auto; width: 100%; height: var(--header-h); z-index: 100; pointer-events: none; }
.m-header__skip { position: absolute; top: -100px; left: 0; padding: .5rem 1rem; background: var(--color-primary); color: #fff; z-index: 9999; pointer-events: auto; }
.m-header__skip:focus { top: 0; }
.m-brand { position: absolute; left: 12px; top: calc(6px + var(--wp-admin-offset)); width: 360px; height: 150px; pointer-events: auto; transform-origin: top left; transform: scale(var(--brand-scale, 1)); filter: drop-shadow(0 4px 16px rgba(43,181,200,.18)); }
.m-brand__scene { position: relative; display: block; width: 360px; height: 150px; background: url(../svg/zone1/cloud-corner-left.svg) left top / 100% 100% no-repeat; }
.m-brand__logo, .m-brand__mascot { position: absolute; display: block; transform-origin: center; }
.m-brand__logo { left: 92px; top: 5px; width: 148px; }
.m-brand__mascot { left: 213px; top: 27px; width: 50px; }
.m-brand img { display: block; width: 100%; height: auto; }
.m-brand:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 3px; border-radius: 24px; }
.m-header__actions { position: absolute; left: 392px; top: calc(42px + var(--wp-admin-offset)); display: flex; gap: 10px; pointer-events: auto; }
.m-header__action { padding: 10px 18px; border-radius: var(--radius-pill); color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; box-shadow: 0 4px 12px rgba(43,181,200,.18); }
.m-header__action--newsletter { background: var(--color-primary); }
.m-header__action--contact { background: var(--color-secondary); }
.m-header__action:hover, .m-header__action:focus-visible { transform: translateY(-2px); outline: 3px solid #fff; outline-offset: 2px; }
















@media (max-width: 899px) { .m-header__actions { display: none; } }
@media (max-width: 782px) { body.admin-bar { --wp-admin-offset: 46px; } }
@media (max-width: 767px) {
  body { --header-h: 150px; --brand-scale: .66; }
  .m-brand { left: 8px; top: calc(8px + var(--wp-admin-offset)); }






}
@media(min-width:768px) and (max-width:1023px){body{--header-h:150px;--brand-scale:.86}}

/* ==========================================================
   FOOTER
   ========================================================== */
.m-footer { background: var(--color-primary); color: white; padding: 2rem 1rem; text-align: center; }
.m-footer__copy { font-family: var(--font-body); font-size: .9rem; opacity: .9; }

/* ==========================================================
   Déco héro — forcer les <img> (Earth, Mascot) à fill leur parent
   (le brief cible .hero-deco svg mais on a swapé par <img>)
   ========================================================== */
.hero-deco img { display: block; width: 100%; height: auto; }

/* ==========================================================
   SECTION 2 — contenu narratif "Marmaille&Co c'est quoi ?"
   Empilé PAR-DESSUS les 4 layers parallax existants (sans les toucher).
   ========================================================== */
.m-z2-content-stack {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.m-z2-deco { position: absolute; pointer-events: none; }

/* Décor hors-box (avion papier, anchored au viewport) */
.m-z2-deco--plane {
  top: clamp(4rem, 9vh, 7rem);
  right: clamp(2rem, 5vw, 5rem);
  width: 280px;
  height: auto;
}

/* Box 1500 centree avec layout 2 colonnes (fillette / texte) */
.m-z2-box {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1500px;
  height: 100%;
  padding: clamp(14rem, 42vh, 28rem) clamp(2rem, 5vw, 5rem) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 6rem);
  pointer-events: auto;
}
.m-z2-col {
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-z2-col--left {
  flex: 0 1 auto;
}
.m-z2-col--right {
  flex: 1 1 540px;
  min-width: 0;
  max-width: 540px;
  flex-direction: column;
  text-align: center;
}
.m-z2-deco--girl {
  width: clamp(220px, 28vw, 420px);
  height: auto;
  display: block;
}
.m-z2-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: .02em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.m-z2-lead {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: #2D2D2D;
  margin-bottom: 1.8rem;
}
.m-z2-cta {
  display: inline-block;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(.95rem, 1.2vw, 1.1rem);
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #ffffff;
  background: var(--color-secondary);
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(239, 96, 85, .3);
  transition: transform .2s var(--ease-smooth), box-shadow .2s var(--ease-smooth), filter .2s var(--ease-smooth);
}
.m-z2-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(239, 96, 85, .45);
  filter: brightness(1.05);
}

/* Mobile : 2 colonnes empilées */
@media (max-width: 767px) {
  .m-z2-deco--plane { top: 5rem; right: 1rem; width: 160px; }
  .m-z2-box {
    flex-direction: column;
    padding: 6rem 1.5rem 4rem;
    gap: 1.5rem;
    justify-content: center;
  }
  .m-z2-deco--girl { width: clamp(160px, 50vw, 220px); }
  .m-z2-title { font-size: 1.6rem; }
  .m-z2-col--right { max-width: 100%; flex: 0 1 auto; }
}

/* ==========================================================
   SECTION 4 — contenu "Plus de 70 musées membres" (Zone 3)
   ========================================================== */
.m-z3-content-stack {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.m-z3-content-stack a,
.m-z3-content-stack img,
.m-z3-content-stack svg,
.m-z3-content-stack h2,
.m-z3-content-stack p { pointer-events: auto; }

/* Box 1500 centree avec 2 colonnes — zone haute du section (au-dessus des nuages bas) */
.m-z3-box {
  position: absolute;
  top: 0;
  bottom: clamp(20vh, 28vh, 32vh);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1500px;
  padding: clamp(2rem, 5vh, 4rem) clamp(2rem, 5vw, 5rem) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 4vw, 5rem);
}

/* COL GAUCHE — texte + musée + CTA */
.m-z3-col--left {
  flex: 0 1 480px;
  min-width: 0;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 2vh, 1.6rem);
}
.m-z3-title {
  width: 100%;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: .02em;
  color: var(--color-primary);
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}
.m-z3-lead {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.5;
  color: var(--color-text);
  text-align: center;
  width: 100%;
}
.m-z3-museum {
  width: clamp(200px, 22vw, 320px);
  height: auto;
  display: block;
  margin: 0 auto;
}
.m-z3-cta {
  display: inline-block;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(.95rem, 1.2vw, 1.1rem);
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #fff;
  background: var(--color-primary);
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(43, 181, 200, .3);
  transition: transform .2s var(--ease-smooth), box-shadow .2s var(--ease-smooth), filter .2s var(--ease-smooth);
  align-self: center;
}
.m-z3-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(43, 181, 200, .45);
  filter: brightness(1.05);
}

/* COL DROITE — cluster d'artefacts (positions en % de la col, compact superposé) */
.m-z3-col--right {
  flex: 0 1 580px;
  min-width: 0;
  max-width: 580px;
  width: 580px;
  position: relative;
  height: clamp(520px, 60vh, 700px);
}
.m-z3-art {
  position: absolute;
  height: auto;
  display: block;
}
/* Cluster dense (cf. screenshot graphiste) : empilage serré, beaucoup de chevauchement */
.m-z3-art--column      { top:  12%; left: 36%; width: clamp(70px, 9vw, 120px);   z-index: 1; }
.m-z3-art--sarcophagus { top:  16%; right: 0%; width: clamp(110px, 13vw, 180px); z-index: 4; }
.m-z3-art--telescope   { top:  44%; left: -4%; width: clamp(120px, 15vw, 210px); z-index: 5; }
.m-z3-art--skeleton    { top:  30%; left:  6%; width: clamp(220px, 30vw, 360px); z-index: 3; }
.m-z3-art--painting    { top:  48%; right: 2%; width: clamp(90px, 11vw, 150px);  z-index: 2; }
.m-z3-art--amphora     { top:  50%; left: 42%; width: clamp(60px, 7vw, 100px);   z-index: 6; }
.m-z3-art--sword       { top:  62%; right: 6%; width: clamp(140px, 17vw, 220px); z-index: 6; transform-origin: center; }
.m-z3-art--atom        { top:  70%; left: 14%; width: clamp(80px, 10vw, 140px);  z-index: 7; }

/* Décors avions hors-box */
.m-z3-deco { position: absolute; height: auto; display: block; }
.m-z3-deco--paper-plane {
  bottom: 18vh;
  left: clamp(2rem, 8vw, 8rem);
  width: 280px;
  z-index: 7;
}
.m-z3-deco--kid-plane {
  bottom: 5vh;
  right: clamp(1rem, 4vw, 6rem);
  width: clamp(220px, 30vw, 460px);
  z-index: 8;
}

/* Mobile section 4 */
@media (max-width: 767px) {
  .section-gradient { height: auto; min-height: 135vh; }
  .m-z3-box {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    flex-direction: column;
    padding: 9rem 1.25rem 10rem;
    gap: 2.5rem;
  }
  .m-z3-col--left { width: 100%; max-width: 100%; align-items: center; text-align: center; flex: 0 1 auto; }
  .m-z3-col--right { width: 100%; min-height: 360px; flex: 0 1 auto; }
  .m-z3-title { font-size: 1.6rem; text-align: center; }
  /* Widths alignés sur ratios desktop pour densité similaire (objets plus serrés) */
  .m-z3-art--skeleton    { width: clamp(240px, 60vw, 360px); }
  .m-z3-art--telescope   { width: clamp(130px, 32vw, 210px); }
  .m-z3-art--sword       { width: clamp(140px, 34vw, 220px); }
  .m-z3-art--sarcophagus { width: clamp(110px, 28vw, 180px); }
  .m-z3-art--column      { width: clamp(70px, 17vw, 120px); }
  .m-z3-art--amphora     { width: clamp(60px, 15vw, 100px); }
  .m-z3-art--atom        { width: clamp(80px, 20vw, 140px); }
  .m-z3-art--painting    { width: clamp(90px, 22vw, 150px); }
  .m-z3-deco--paper-plane { width: 70px; left: 1rem; bottom: 26vh; }
  .m-z3-deco--kid-plane { width: 200px; right: .5rem; bottom: 10vh; }
}

/* ==========================================================
   POP ON SCROLL — reveal animation pour les éléments hors viewport initial
   Déclenché par ScrollTrigger dans main.js (initPopOnScroll)
   ========================================================== */
/* Home artwork is visible without the controller; GSAP fromTo arms it
   synchronously only in normal motion. Keep non-home legacy rules intact. */
body:not(.home) .pop-on-scroll { opacity: 0; transform: scale(0); will-change: transform, opacity; }
body.home .pop-on-scroll { will-change: transform, opacity; }
/* The existing controller's native pose must also survive no-JS/reduced. */
body.home .m-z3-art--sword { transform: rotate(25deg); }

/* ==========================================================
   REDUCED MOTION
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* HERO-POP-CORNER-REPAIR 2026-09-11 — header/hero only */
/* The original SVG is 2077.83×1708.6 inside a 448×186.667 scene. Its
   preserveAspectRatio letterbox is 110.5px wide: move the whole existing
   brand group by that intrinsic margin instead of painting another surface. */
.m-brand { left: 0; top: var(--wp-admin-offset); width: 448px; height: 186.667px; z-index: 2; transform: scale(var(--brand-scale, 1)) translateX(-24.777%); }
.m-brand__scene { width: 448px; height: 186.667px; isolation: isolate; transform-origin: 34% 26%; }
.m-brand__scene::before { content: none; display: none; }
.m-brand__logo, .m-brand__mascot { z-index: 1; }
.m-brand__logo { left: 114.489px; top: 6.222px; width: 184.178px; }
.m-brand__mascot { left: 265.067px; top: 33.6px; width: 62.222px; }
/* Position lives on anchors; GSAP pops only their children. */
.m-header__decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.m-header__decor-anchor, .m-header__decor-art { position: absolute; display: block; pointer-events: none; }
.m-header__decor-anchor { top: var(--wp-admin-offset); }
.m-header__decor-art { inset: 0; background-repeat: no-repeat; background-position: center top; background-size: contain; transform-origin: 50% 0%; }
.m-header__decor-anchor--leaf-left { left: 456px; width: 112px; height: 94px; }
.m-header__decor-anchor--vine { left: 50%; width: 240px; height: 92px; overflow: hidden; transform: translateX(-50%); }
.m-header__decor-anchor--leaf-right { right: 250px; width: 110px; height: 92px; }
.m-header__decor-art--leaf-left { background-image: url(../svg/zone1/leaf-2.svg); }
.m-header__decor-art--vine { top: -58px; bottom: auto; height: 150px; background-image: url(../svg/zone1/vine.svg); }
.m-header__decor-art--leaf-right { background-image: url(../svg/zone1/leaf-1.svg); }
.m-header::before, .m-header::after { content: none !important; display: none !important; }
.m-header__actions { position: absolute; left: 12px; top: calc(100svh - var(--wp-admin-offset) - 62px); display: flex; gap: 10px; width: max-content; height: 42px; z-index: 4; }
.m-header__plane-anchor { position: absolute; left: 0; bottom: 20px; display: block; width: 185px; aspect-ratio: 1.65; pointer-events: none; }
.m-header__plane-art { position: absolute; inset: 0; display: block; background: url(../svg/zone1/plane.svg) left bottom / contain no-repeat; transform-origin: 42% 62%; pointer-events: none; }
.m-header__actions::before { content: none; display: none; }
.section-hero .hero-stage-host { top: 60px; bottom: 70px; }
.section-hero .hero-deco-plane { display: none; }
/* clearProps must not trigger the nav hover transition at the pop endpoint. */
.section-hero[data-pop-state="running"] .nav-cloud { transition: none; }
@media (max-width: 767px) {
  body { --brand-scale: .64; }
  .m-brand { left: 0; top: var(--wp-admin-offset); }
  .m-header__decor { display: none; }
  .m-header__actions { left: 8px; top: calc(100svh - var(--wp-admin-offset) - 110px); width: 125px; height: 1px; }
  .m-header__actions > a { display: none; }
  .m-header__plane-anchor { bottom: 0; width: 155px; }
  .section-hero .hero-stage-host { top: 60px; bottom: 70px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body { --brand-scale: .86; }
  .m-header__decor-anchor--leaf-left { left: 372px; width: 88px; height: 78px; }
  .m-header__decor-anchor--vine { width: 160px; height: 78px; }
  .m-header__decor-art--vine { top: -40px; height: 118px; }
  .m-header__decor-anchor--leaf-right { right: 172px; width: 78px; height: 72px; }
  body.admin-bar .m-header__actions { top: calc(100svh - var(--wp-admin-offset) - 44px); }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .m-header__decor-anchor--leaf-left { left: 456px; width: 96px; height: 84px; }
  .m-header__decor-anchor--vine { width: 210px; height: 88px; }
  .m-header__decor-art--vine { top: -48px; height: 136px; }
  .m-header__decor-anchor--leaf-right { right: 250px; width: 90px; height: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-hero-pop] { opacity: 1 !important; transform: none !important; }
  .m-brand { transform: scale(var(--brand-scale, 1)) translateX(-24.777%) !important; }
  .m-header__decor-anchor--vine { transform: translateX(-50%) !important; }
}
/* OWNER HERO SIZE 2026-10-01 — existing cloud, logo size preserved. */
.m-brand, .m-brand__scene { width: 560px; height: 233.333px; }
.m-brand__logo { left: 156.24px; top: 24.222px; }
.m-brand__mascot { left: 306.818px; top: 51.6px; }
.m-header__actions { top: calc(100svh - var(--wp-admin-offset) - 72px); height: 52px; gap: 14px; }
.m-header__action { padding: 14px 24px; font-size: 16px; line-height: 1.4; }
.m-header__plane-anchor { width: 240px; bottom: 32px; }
@media (max-width: 767px) {
  .m-header__actions { top: calc(100svh - var(--wp-admin-offset) - 110px); height: 1px; }
  .m-header__plane-anchor { width: 185px; bottom: 0; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body.admin-bar .m-header__actions { top: calc(100svh - var(--wp-admin-offset) - 54px); }
}

/* HERO FIRST PAINT AND ACTION STACK — 2026-10-01 */
.hero-pop-pending [data-hero-pop],
.hero-pop-pending .hero-stage > .hero-deco,
.hero-pop-pending .m-z2-title,
.hero-pop-pending .m-z2-lead,
.hero-pop-pending .m-z2-cta { opacity: 0; }
.m-header__plane-anchor { z-index: 0; }
.m-header__action { position: relative; z-index: 1; }

/* HOME-GIRL-FULL-PAINT: constrain only the desktop artwork slot.
   Preserve the centered copy, cloud layers, native SVG size and reveal transform. */
@media (min-width: 768px) {
  .section-nuages .m-z2-box > .m-z2-col--left {
    max-height: 100%;
    align-items: flex-end;
  }
}
