/* OFFLINE PREVIEW — transition landing -> livre.
   Le moteur du livre n'est pas modifié. Ce fichier ajoute seulement la transition visuelle. */

:root{
  --morph-duration:720ms;
  --morph-ease:cubic-bezier(.22,.78,.22,1);
}

/* Relation visuelle : la landing et le livre partagent déjà exactement la même largeur native (1180 px).
   Le morph conserve cette largeur et fait évoluer seulement la hauteur et le rayon. */
.landing-hero{
  transform-origin:center center;
  will-change:opacity,transform;
}

/* Le fond vert du livre monte progressivement sous la landing. */
.landing-transition-bg{
  position:fixed;
  inset:0;
  z-index:190;
  pointer-events:none;
  opacity:0;
  background:
    radial-gradient(circle at 50% 16%,rgba(3,195,232,.18),transparent 38%),
    linear-gradient(180deg,#043F49 0%,#075F6D 100%);
  transition:opacity 620ms ease;
}
.landing-transition-bg.is-visible{opacity:1;}

/* Copie temporaire du hero qui devient la forme du livre. */
.landing-morph-proxy{
  position:fixed!important;
  z-index:220;
  margin:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
  transform:none!important;
  transform-origin:center center;
  box-shadow:0 18px 46px rgba(24,39,36,.12);
  transition:
    left var(--morph-duration) var(--morph-ease),
    top var(--morph-duration) var(--morph-ease),
    width var(--morph-duration) var(--morph-ease),
    height var(--morph-duration) var(--morph-ease),
    border-radius var(--morph-duration) var(--morph-ease),
    box-shadow var(--morph-duration) var(--morph-ease);
}
.landing-morph-proxy .landing-intro,
.landing-morph-proxy .landing-photo{
  transition:opacity 230ms ease,filter 230ms ease;
}
.landing-morph-proxy.is-morphing .landing-intro,
.landing-morph-proxy.is-morphing .landing-photo{
  opacity:0;
  filter:blur(1.5px);
}

/* La surface crème du livre apparaît une fois le contenu du hero effacé. */
.landing-morph-paper{
  position:absolute;
  inset:0;
  z-index:50;
  opacity:0;
  pointer-events:none;
  background:#F5F2EA;
  transition:opacity 260ms ease 245ms;
}
.landing-morph-proxy.is-morphing .landing-morph-paper{opacity:1;}

/* Reliure qui apparaît pendant la transformation. */
.landing-morph-gutter{
  position:absolute;
  z-index:51;
  top:1.1%;
  bottom:1.1%;
  left:50%;
  width:24px;
  transform:translateX(-50%);
  opacity:0;
  pointer-events:none;
  background:linear-gradient(90deg,transparent 0%,rgba(25,33,31,.07) 27%,rgba(25,33,31,.19) 48%,rgba(255,255,255,.17) 56%,transparent 100%);
  transition:opacity 220ms ease 390ms;
}
.landing-morph-proxy.is-morphing .landing-morph-gutter{opacity:.82;}

/* La landing réelle disparaît derrière sa copie pendant que le fond crème devient vert. */
body.landing-transitioning .landing-view{
  opacity:0;
  transition:opacity 360ms ease 90ms;
}

/* Apparition du vrai livre au même emplacement que la forme de transition. */
body.book-preview-enter.book-open .book-shell,
body.book-preview-enter.book-open .book-ui{
  opacity:0;
}
body.book-preview-enter.book-open .book-shell{
  transform:scale(.992);
  transform-origin:center center;
}
body.book-preview-enter.book-open.book-preview-enter-active .book-shell,
body.book-preview-enter.book-open.book-preview-enter-active .book-ui{
  opacity:1;
  transition:opacity 260ms ease;
}
body.book-preview-enter.book-open.book-preview-enter-active .book-shell{
  transform:scale(1);
  transition:opacity 260ms ease,transform 360ms var(--morph-ease);
}

/* Header du livre : apparition plus douce. */
body.book-preview-enter.book-open .site-header{opacity:0;}
body.book-preview-enter.book-open.book-preview-enter-active .site-header{
  opacity:1;
  transition:opacity 280ms ease 40ms;
}

@media(max-width:1024px){
  /* Sur tablette/mobile, pas de faux morph horizontal : simple fondu propre vers la vue verticale. */
  .landing-morph-proxy{display:none!important;}
  body.landing-transitioning .landing-view{transition-duration:300ms;}
}

@media(prefers-reduced-motion:reduce){
  .landing-transition-bg,
  .landing-morph-proxy,
  .landing-morph-proxy .landing-intro,
  .landing-morph-proxy .landing-photo,
  .landing-morph-paper,
  .landing-morph-gutter,
  body.landing-transitioning .landing-view,
  body.book-preview-enter.book-open .book-shell,
  body.book-preview-enter.book-open .book-ui,
  body.book-preview-enter.book-open .site-header{
    transition:none!important;
  }
}


/* MATCH V2 — alignement landing/livre plus strict */

/* même navigation visible avant et après ouverture */
.book-open .site-header{
  display:block;
  height:76px;
  background:var(--landing-paper);
  backdrop-filter:none;
  border-bottom:1px solid var(--landing-line);
  color:var(--landing-ink);
}
.book-open .site-header .header-inner{
  width:min(var(--landing-max),calc(100% - 48px));
  margin:0 auto;
  justify-content:space-between!important;
  gap:24px;
}
.book-open .site-header .brand,
.book-open .site-header a.brand{
  color:var(--landing-ink)!important;
  font:600 18px/1 Georgia,"Times New Roman",serif!important;
  letter-spacing:-.015em!important;
}
.book-open .site-header .site-header-season{
  color:var(--landing-muted)!important;
  font-size:12px!important;
  font-weight:750!important;
  letter-spacing:.11em!important;
  text-transform:uppercase!important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
/* le livre utilise la même largeur et démarre au même rythme vertical que la landing */
.book-open .home-stage{
  top:76px!important;
  height:calc(100vh - 76px)!important;
  padding:44px 20px 0!important;
}
.book-open .book-fit-content{top:0!important;}
/* retire les aides en bas pour ne pas casser l'alignement visuel */
.book-open .book-ui{display:none!important;}
/* retire la petite note de bas du hero pour que le rectangle reste plus pur */
.landing-path{display:none!important;}


/* SMOOTH V4 — une seule transformation, aucun faux contenu intermédiaire. */
:root{
  --smooth-morph-duration:760ms;
  --smooth-morph-ease:cubic-bezier(.22,.78,.22,1);
}
body.smooth-book-preparing .home-story,
body.smooth-book-preparing .site-header{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.smooth-book-preparing .landing-view{
  visibility:hidden!important;
  opacity:0!important;
}
.landing-morph-proxy{
  transition:
    left var(--smooth-morph-duration) var(--smooth-morph-ease),
    top var(--smooth-morph-duration) var(--smooth-morph-ease),
    width var(--smooth-morph-duration) var(--smooth-morph-ease),
    height var(--smooth-morph-duration) var(--smooth-morph-ease),
    border-radius var(--smooth-morph-duration) var(--smooth-morph-ease),
    box-shadow var(--smooth-morph-duration) var(--smooth-morph-ease),
    opacity 220ms ease;
}
.landing-morph-proxy .landing-intro,
.landing-morph-proxy .landing-photo,
.landing-morph-proxy .landing-photo img{
  transition:opacity 420ms ease,filter 520ms ease,transform 760ms var(--smooth-morph-ease),background-color 520ms ease;
}
.landing-morph-proxy.is-morphing .landing-intro{
  background:#F5F2EA!important;
}
.landing-morph-proxy.is-morphing .landing-intro > *{
  opacity:0!important;
  transition:opacity 260ms ease!important;
}
.landing-morph-proxy.is-morphing .landing-photo{
  background:#F5F2EA!important;
}
.landing-morph-proxy.is-morphing .landing-photo img{
  opacity:0!important;
  filter:grayscale(.2) sepia(.1) brightness(1.04);
  transform:scale(1.018);
}
.landing-morph-proxy.is-morphing .landing-photo::after{opacity:0!important;}
.landing-morph-paper{
  opacity:0!important;
  background:#F5F2EA!important;
  transition:opacity 360ms ease 180ms!important;
}
.landing-morph-proxy.is-morphing .landing-morph-paper{opacity:1!important;}
.landing-morph-gutter{
  opacity:0!important;
  transition:opacity 260ms ease 360ms!important;
}
.landing-morph-proxy.is-morphing .landing-morph-gutter{opacity:.82!important;}
body.smooth-book-reveal .home-story,
body.smooth-book-reveal .site-header{
  visibility:visible!important;
  pointer-events:auto!important;
}
body.smooth-book-reveal .book-shell{
  opacity:0;
}
body.smooth-book-reveal.show-real-book .book-shell{
  opacity:1;
  transition:opacity 180ms ease;
}
body.smooth-book-reveal .site-header{
  opacity:1!important;
  transition:opacity 180ms ease;
}
body.smooth-book-reveal .book-ui{display:none!important;}


/* FRAME LOCK V5 — landing et livre partagent exactement le même cadre responsive. */
:root{
  --shared-frame-w:1180px;
  --shared-frame-h:747px;
  --shared-frame-top:120px;
  --shared-frame-scale:1;
}

@media (min-width:1025px){
  .landing-nav,
  .landing-main,
  .book-open .site-header .header-inner{
    width:var(--shared-frame-w)!important;
    max-width:calc(100vw - 48px)!important;
  }
  .landing-main{
    padding:44px 0 0!important;
  }
  .landing-hero{
    width:100%!important;
    height:var(--shared-frame-h)!important;
    min-height:0!important;
  }
  .book-open .home-stage{
    position:sticky!important;
    top:0!important;
    height:100vh!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .book-open .book-fit-content{
    top:var(--shared-frame-top)!important;
  }
  .book-open .book-ui,
  body.smooth-book-reveal .book-ui{
    display:grid!important;
  }
}

/* On garde seulement le support SEO repliable, sans bloc éditorial visible sous le hero. */
.landing-seo-details{
  margin-top:18px!important;
  padding-top:0!important;
  border-top:0!important;
}
.landing-seo-details summary{
  color:var(--landing-muted)!important;
  font-size:12px!important;
  font-weight:700!important;
}
.seo-crosslink-inline{
  margin:22px 0 0;
  color:var(--landing-body);
  font-size:13px;
  line-height:1.5;
}
.seo-crosslink-inline a{color:var(--landing-ink);font-weight:750;text-underline-offset:3px;}

/* La petite phrase sous les CTA reste retirée comme validé. */
.landing-path{display:none!important;}

/* NO PARASITE V6 — crossfade direct landing -> vrai livre. */
.landing-crossfade-clone{
  position:fixed!important;
  z-index:230!important;
  margin:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
  box-shadow:0 18px 46px rgba(24,39,36,.12);
  opacity:1;
  transform:translateZ(0);
  transition:opacity 420ms ease;
}
.landing-crossfade-clone.is-leaving{opacity:0;}

body.crossfade-book-preparing .home-story,
body.crossfade-book-preparing .site-header{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.crossfade-book-preparing .landing-view{
  visibility:hidden!important;
  opacity:0!important;
}

body.crossfade-book-reveal .home-story,
body.crossfade-book-reveal .site-header{
  visibility:visible!important;
  pointer-events:auto!important;
}
body.crossfade-book-reveal .book-shell,
body.crossfade-book-reveal .book-ui,
body.crossfade-book-reveal .site-header{
  opacity:0!important;
}
body.crossfade-book-visible .book-shell,
body.crossfade-book-visible .book-ui,
body.crossfade-book-visible .site-header{
  opacity:1!important;
  transition:opacity 420ms ease!important;
}

/* Neutralise l'ancien faux morph crème : il n'est plus utilisé. */
body.crossfade-book-preparing .landing-morph-proxy,
body.crossfade-book-reveal .landing-morph-proxy{display:none!important;}

/* Le fond passe au pétrole en même temps que le crossfade, sans étape opaque intermédiaire. */
.landing-transition-bg-crossfade{
  transition:opacity 460ms ease!important;
}

@media(max-width:1024px){
  .landing-crossfade-clone{display:none!important;}
  body.crossfade-book-preparing .landing-view{visibility:hidden!important;opacity:0!important;}
}

/* TRUE CROSSFADE V7 — aucun clone, aucun changement de géométrie. */
body.true-crossfade-preparing.book-open .landing-view,
body.true-crossfade-ready.book-open .landing-view,
body.true-crossfade-go.book-open .landing-view{
  display:flex!important;
  position:fixed!important;
  inset:0!important;
  z-index:300!important;
  opacity:1;
  pointer-events:none!important;
  overflow:hidden!important;
  background:var(--landing-paper)!important;
}

/* Le livre réel est déjà calculé dessous, strictement dans son cadre final. */
body.true-crossfade-preparing.book-open .home-story,
body.true-crossfade-ready.book-open .home-story,
body.true-crossfade-go.book-open .home-story,
body.true-crossfade-preparing.book-open .site-header,
body.true-crossfade-ready.book-open .site-header,
body.true-crossfade-go.book-open .site-header{
  visibility:visible!important;
  display:block!important;
}
body.true-crossfade-preparing.book-open .home-story,
body.true-crossfade-preparing.book-open .site-header,
body.true-crossfade-ready.book-open .home-story,
body.true-crossfade-ready.book-open .site-header{
  opacity:0!important;
}

/* Le seul mouvement autorisé : opacité. */
body.true-crossfade-ready.book-open .landing-view,
body.true-crossfade-ready.book-open .home-story,
body.true-crossfade-ready.book-open .site-header{
  transition:opacity 460ms ease!important;
}
body.true-crossfade-go.book-open .landing-view{
  opacity:0!important;
  transition:opacity 460ms ease!important;
}
body.true-crossfade-go.book-open .home-story,
body.true-crossfade-go.book-open .site-header{
  opacity:1!important;
  transition:opacity 460ms ease!important;
}

/* Neutralisation explicite de toutes les anciennes couches de transition. */
body.true-crossfade-preparing .landing-crossfade-clone,
body.true-crossfade-ready .landing-crossfade-clone,
body.true-crossfade-go .landing-crossfade-clone,
body.true-crossfade-preparing .landing-morph-proxy,
body.true-crossfade-ready .landing-morph-proxy,
body.true-crossfade-go .landing-morph-proxy,
body.true-crossfade-preparing .landing-transition-bg,
body.true-crossfade-ready .landing-transition-bg,
body.true-crossfade-go .landing-transition-bg{
  display:none!important;
}

@media(max-width:1024px){
  body.true-crossfade-preparing.book-open .landing-view,
  body.true-crossfade-ready.book-open .landing-view,
  body.true-crossfade-go.book-open .landing-view{
    display:flex!important;
  }
}
