/* ============================================
   PAGE ACCUEIL — hero vidéo, mur botanique, transition des branches,
   ferme florale
   ============================================ */

:root {
  --nav-link: #cebdeb;
  --title-orange: #f1ad52;
  /* ivoire/lilas pour les sections éditoriales, violet profond pour le hero */
  --ivoire: #f6f2ef;
  --ivoire-soft: #faf8f5;
  --violet-deep: #2a1a52;
  --violet-electric: #8a5cc9;
  --champagne: #dcb677;
  /* --ink-text pointe vers --indigo (base.css) */
  --ink-text: var(--indigo);
  --bw-bg: var(--cream-light);
  --bw-ink: var(--indigo);
  --bw-ink-dim: rgba(50, 44, 114, 0.66);
  /* liens et intitulés du mur botanique */
  --bw-rose: var(--violet-mid);
  --bw-gold: #d5a85a;
}

body {
  background: var(--white);
}

/* ============================================================
   HERO + NAV — logo et liens intégrés au hero, fond vidéo
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 780px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* couleur moyenne de la vidéo, visible avant le poster */
  background: #422b75;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 10, 45, 0.45) 0%,
    rgba(15, 10, 45, 0.1) 30%,
    rgba(15, 10, 45, 0.15) 60%,
    rgba(15, 10, 45, 0.65) 100%
  );
}

.site-nav {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(0.9rem, 2.6vw, 2.6rem);
  padding: 2.2rem clamp(1rem, 3vw, 3rem) 0;
}

.nav-group {
  display: flex;
  list-style: none;
  gap: clamp(0.9rem, 2vw, 2.2rem);
}

.nav-group-left { justify-self: end; }
.nav-group-right { justify-self: start; }

.nav-group li {
  overflow: hidden;
  padding-bottom: 2px;
}

.nav-group a {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-weight: 200;
  font-size: clamp(14px, 1.3vw, 20px);
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--nav-link);
  text-decoration: none;
  opacity: 0;
  transform: translateY(130%);
  transition: color 0.3s var(--ease);
}

/* Même spécificité que components.css : ce fichier, chargé après, garde
   les animations propres à l'accueil une fois .nav-in posée. */
.nav-in .nav-group a {
  animation: navRiseAccueil 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-in .nav-group-left li:nth-child(1) a { animation-delay: 0.75s; }
.nav-in .nav-group-left li:nth-child(2) a { animation-delay: 0.85s; }
.nav-in .nav-group-left li:nth-child(3) a { animation-delay: 0.95s; }
.nav-in .nav-group-right li:nth-child(1) a { animation-delay: 1.05s; }
.nav-in .nav-group-right li:nth-child(2) a { animation-delay: 1.15s; }
.nav-in .nav-group-right li:nth-child(3) a { animation-delay: 1.25s; }

.nav-group a:hover,
.nav-group a.active {
  color: var(--nav-link-hover);
}

.nav-logo {
  grid-column: 2;
  justify-self: center;
  width: clamp(114px, 9vw, 150px);
  height: clamp(114px, 9vw, 150px);
  opacity: 0;
  filter: blur(10px);
  transform: scale(0.93);
}

/* idem pour le logo */
.nav-in .nav-logo {
  animation: logoEmergeAccueil 2.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes logoEmergeAccueil {
  to { opacity: 1; filter: blur(0px); transform: scale(1); }
}

.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.35));
  transition: transform 0.4s var(--ease);
}

.nav-logo:hover img { transform: scale(1.05); }

@keyframes navRiseAccueil {
  to { opacity: 1; transform: translateY(0); }
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem 12vh;
}

.hero-content h1 {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.4em;
  color: var(--title-orange);
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  filter: blur(24px);
  /* démarre avec le logo de la nav */
  animation: heroEmerge 3.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes heroEmerge {
  to { opacity: 1; filter: blur(0px); }
}

.hero-line { display: block; }
.hero-line-2 { margin-left: 0.55em; margin-top: 0.35em; }

.hero-subtitle {
  margin-top: 2.6rem;
  font-style: italic;
  font-weight: 400;
  color: #fff;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(40px);
  animation: navRiseAccueil 2.8s cubic-bezier(0.16, 1, 0.3, 1) 1.6s forwards;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2.4rem;
  border-radius: 8px;
  padding: 17px 40px;
  cursor: pointer;
  border: 1px solid rgb(255 255 255 / 80%);
  background-color: transparent;
  box-shadow: none;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: 19px;
  color: #fff;
  opacity: 0;
  transform: translateY(40px);
  animation: navRiseAccueil 2.8s cubic-bezier(0.16, 1, 0.3, 1) 2.1s forwards;
  transition: all 0.5s ease;
}

.hero-button:hover {
  letter-spacing: 3px;
  border-color: var(--title-orange);
  color: var(--title-orange);
  text-shadow: 0 0 18px rgb(241 173 82 / 60%);
}

.hero-button:active {
  letter-spacing: 3px;
  border-color: var(--title-orange);
  color: var(--title-orange);
  text-shadow: 0 0 18px rgb(241 173 82 / 60%);
  transform: translateY(10px);
  transition: 100ms;
}

@media (max-width: 1024px) {
  .site-nav { grid-template-columns: 1fr; justify-items: center; padding-top: 1.8rem; }
  .nav-group { display: none; }
  .nav-logo { grid-column: 1; }
}

@media (max-width: 560px) {
  .nav-logo { width: clamp(96px, 28vw, 128px); height: clamp(96px, 28vw, 128px); }
  .hero-content h1 { letter-spacing: 0.22em; font-size: 3rem; }
  .hero-button { padding: 15px 30px; }

  /* écran haut et étroit : espace ouvert entre titre et sous-titre pour que
     la fleur de la vidéo s'y retrouve */
  .hero-content { padding: 2rem 1.5rem 14vh; }
  .hero-subtitle { margin-top: 28vh; font-size: 1.8rem; }
}

/* Tablette (761–1100px) : plus d'air sous le titre du hero, sous-titre et
   paragraphes agrandis (20px). */
@media (min-width: 761px) and (max-width: 1100px) {
  .hero-subtitle {
    margin-top: 16rem;
    font-size: clamp(2.5rem, 2.6vw, 2.5rem);
  }
  /* préfixés pour battre les règles de base à spécificité égale */
  .botanical-wall .bw-intro .body-text,
  .botanical-wall .bw-promise-list span,
  .farm-band .farm-text .body-text,
  .farm-band .farm-cta-text .body-text {
    font-size: 20px;
  }
  .botanical-wall .bw-intro .text-cta,
  .botanical-wall .bw-promise .text-cta,
  .farm-band .farm-text .text-cta,
  .farm-band .farm-cta-text .text-cta {
    font-size: 20px;
  }
}

/* ============================================================
   TYPOGRAPHIE PARTAGÉE — titres éditoriaux (serif) / interface (sans-serif)
   ============================================================ */
.eyebrow {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.editorial-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.14;
  text-wrap: balance;
}

.gold-rule {
  width: 54px;
  height: 1px;
  background: var(--champagne);
}

.body-text {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  line-height: 1.85;
}

.text-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: gap 0.35s var(--ease), opacity 0.35s ease;
}

.text-cta:hover { gap: 0.85rem; }

/* ============================================================
   SECTION 01 — MUR BOTANIQUE
   Texte + fleurs dans une seule scène, positions en % du canvas.
   ============================================================ */
.botanical-wall {
  position: relative;
  overflow: hidden;
  background: var(--bw-bg);
  padding-bottom: 0;
}

.bw-field {
  position: relative;
  width: min(100%, 1680px);
  margin: 0 auto;
  height: clamp(2500px, 250vh, 3000px);
}

.botanical-text { position: static; display: block; z-index: 8; }

.bw-intro,
.bw-promise {
  position: absolute;
  z-index: 8;
}

.bw-intro {
  top: clamp(150px, 7.5%, 220px);
  left: 9%;
  width: min(31rem, 34vw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.bw-intro .eyebrow { color: var(--bw-rose); }
.bw-intro .editorial-title {
  font-size: clamp(2.7rem, 4.4vw, 4.4rem);
  line-height: 1.02;
  color: var(--bw-ink);
  max-width: 9.5ch;
}
.bw-intro .gold-rule { background: var(--bw-gold); }
.bw-intro .body-text {
  font-size: 18px;
  color: var(--bw-ink-dim);
  max-width: 39ch;
}
.bw-intro .text-cta { color: var(--bw-rose); }
.bw-intro .text-cta:hover { color: var(--bw-gold); }
.bw-promise .text-cta { display: inline-flex; margin-top: 1.45rem; color: var(--bw-rose); }
.bw-promise .text-cta:hover { color: var(--bw-gold); }

.bw-promise {
  top: 37%;
  left: 10%;
  width: min(26rem, 30vw);
  max-width: 27rem;
}

.bw-promise > .eyebrow {
  display: block;
  color: var(--bw-rose);
  margin-bottom: 1.45rem;
}

.bw-promise-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bw-promise-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.bw-promise-icon {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--bw-ink-dim);
}

.bw-promise-list strong {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bw-ink);
  margin-bottom: 0.25rem;
}

.bw-promise-list span {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.55;
  color: var(--bw-ink-dim);
}

.botanical-flower-layer {
  position: absolute;
  inset: 0;
  /* au-dessus de .branch-transition-zone (z-index:2), qui chevauche le bas
     de la section */
  z-index: 5;
  pointer-events: none;
}

.bw-flower {
  position: absolute;
  margin: 0;
  pointer-events: none;
}

/* will-change seulement pendant l'animation (IntersectionObserver) */
.botanical-wall.bw-inview .bw-flower {
  will-change: opacity, transform;
}

.bw-flower img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1);
  /* bas de tige fondu dans le papier ivoire */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, rgba(0,0,0,.78) 87%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 76%, rgba(0,0,0,.78) 87%, transparent 100%);
}

/* Positions de la maquette Figma desktop (frame 1440px) : % du canvas,
   largeurs en vw, fluides jusqu'à la bascule mobile. */
.bw-flower--zinnia { left: 3.26%; top: 21.53%; width: clamp(178px, 15.5vw, 272px); }
.bw-flower--agapanth { left: 69%; top: 5%; width: clamp(432px, 37.5vw, 659px); }
.bw-flower--peony { left: 14.86%; top: 19.03%; width: clamp(642px, 55.7vw, 978px); z-index: 3; }
.bw-flower--lavande { left: 62.57%; top: 16.75%; width: clamp(480px, 41.7vw, 732px); }
.bw-flower--ammi { left: 58.8%; top: 54%; width: clamp(402px, 46.5vw, 670px); }
.bw-flower--ammi img { transform: rotate(-10.84deg); }
.bw-flower--dahlia { left: 0.35%; top: 38.77%; width: clamp(334px, 29vw, 509px); }
.bw-flower--cosmos { left: 54%; top: 15%; width: clamp(219px, 19vw, 334px); }
.bw-flower--allium { left: -5.35%; top: -0.52%; width: clamp(390px, 33.9vw, 595px); }
.bw-flower--allium img { transform: rotate(-0.33deg); }
.bw-flower--anemone { left: 67%; top: 46%; width: clamp(147px, 12.8vw, 224px); }
.bw-flower--anemone img { transform: rotate(30.09deg); }
.bw-flower--lavande-03 { left: -22.69%; top: 48.51%; width: clamp(747px, 64.8vw, 1139px); }
.bw-flower--lavande-03 img { transform: rotate(19.84deg); }
.bw-flower--allium-02 { left: 38%; top: 87%; width: clamp(158px, 13.7vw, 241px); }
.bw-flower--allium-02 img { transform: rotate(-30.59deg); }

/* Branches : coordonnées Figma, utilisées par la copie animée de
   .branch-transition-zone (voir TRANSITION BRANCHES → FERME FLORALE). */
.bw-branch-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.bw-branch {
  position: absolute;
  margin: 0;
  pointer-events: none;
}

.bw-branch img {
  display: block;
  width: 100%;
  height: auto;
}

.bw-branch--02 { left: 11.96%; top: 93.07%; width: clamp(744px, 64.6vw, 1135px); }
.bw-branch--02 img { transform: rotate(-90.31deg); }
.bw-branch--03 { left: -41.35%; top: 94.88%; width: clamp(1198px, 104vw, 1828px); }
.bw-branch--03 img { transform: rotate(-89.88deg); }
.bw-branch--05a { left: 13.33%; top: 116.12%; width: clamp(1674px, 145.3vw, 2552px); }
.bw-branch--05a img { transform: rotate(-89.02deg); }
.bw-branch--05b { left: 17.5%; top: 98.53%; width: clamp(1674px, 145.3vw, 2552px); }
.bw-branch--05b img { transform: rotate(-51.06deg); }
.bw-branch--01a { left: 17.93%; top: 92.88%; width: clamp(402px, 34.9vw, 613px); }
.bw-branch--01a img { transform: rotate(-90deg); }
.bw-branch--01b { left: 47.6%; top: 93.39%; width: clamp(689px, 59.8vw, 1051px); }
.bw-branch--01b img { transform: rotate(-90deg); }
.bw-branch--01c { left: -7.71%; top: 95.15%; width: clamp(624px, 54.2vw, 952px); }
.bw-branch--01c img { transform: rotate(-90deg); }
.bw-branch--04a { left: 21.33%; top: 98.2%; width: clamp(630px, 54.7vw, 961px); }
.bw-branch--04a img { transform: rotate(-91.28deg); }
.bw-branch--04b { left: 24.05%; top: 91.87%; width: clamp(892px, 77.4vw, 1360px); }
.bw-branch--04b img { transform: rotate(-91.28deg); }

.bw-finale {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  width: min(90vw, 40rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.bw-finale-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.5;
  color: var(--bw-ink);
}
.bw-finale-line { display: block; }
.bw-finale .gold-rule { background: var(--bw-gold); }
.bw-finale .text-cta { color: var(--bw-rose); }
.bw-finale .text-cta:hover { color: var(--bw-gold); }
.bw-finale cite {
  display: block;
  font-family: "Poppins", sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bw-ink-dim);
}

/* Tablette : on resserre */
@media (max-width: 1100px) {
  .bw-field { height: 2550px; }
  .bw-intro { left: 8%; width: min(32rem, 42vw); }
  .bw-promise { left: 8%; top: 37%; width: min(25rem, 36vw); }

}

/* Tablette : pivoine décalée à gauche pour libérer « Notre promesse » */
@media (min-width: 761px) and (max-width: 1100px) {
  .bw-flower--peony { left: 1%; }
  .bw-flower--anemone { top: 49%; }
}

/* Mobile : même canvas, texte centré ; les fleurs qui croisent le texte
   sont atténuées par le JS. */
@media (max-width: 760px) {
  .botanical-wall { overflow: hidden; }
  /* Hauteur liée aux top% ci-dessous : la changer impose de recalculer
     toutes les positions (fleurs, citation, branches). */
  .bw-field { height: 3000px; }

  .bw-intro {
    top: 115px;
    left: 50%;
    width: min(82vw, 28rem);
    transform: translateX(-50%);
    align-items: center;
    text-align: center;
    gap: 1.05rem;
  }
  .bw-intro .editorial-title {
    font-size: clamp(2.25rem, 9vw, 3.15rem);
    max-width: 10ch;
  }
  .bw-intro .body-text { max-width: 32ch; }

  .bw-promise {
    top: 42%;
    left: 50%;
    width: min(80vw, 27rem);
    transform: translateX(-50%);
    text-align: center;
  }
  .bw-promise-list { gap: 1.1rem; }
  .bw-promise-list li { justify-content: center; text-align: left; }

  /* maquette Figma mobile (frame 390px) */
  .bw-flower--allium { left: -12.08%; top: -0.78%; width: clamp(186px, 58.1vw, 272px); }
  .bw-flower--agapanth { left: 59.14%; top: 4.5%; width: clamp(145px, 45.5vw, 213px); }
  .bw-flower--agapanth img { transform: rotate(-7.5deg); }
  .bw-flower--cosmos { left: 70%; top: 26%; width: clamp(68px, 21.3vw, 100px); }
  .bw-flower--peony { left: -6.67%; top: 27%; width: clamp(241px, 75.4vw, 353px); }
  .bw-flower--lavande { left: 10%; top: 30%; width: clamp(330px, 103.1vw, 482px); }
  .bw-flower--ammi { left: 38%; top: 77%; width: clamp(290px, 47.6vw, 223px); }
  .bw-flower--ammi img { transform: rotate(-15.66deg); }
  .bw-flower--zinnia { left: 17%; top: 44%; width: clamp(75px, 23.3vw, 109px); }
  .bw-flower--dahlia { left: 48%; top: 69.5%; width: clamp(145px, 45.4vw, 212px); }
  .bw-flower--dahlia img { transform: rotate(-2.44deg); }
  .bw-flower--anemone { left: 15%; top: 90%; width: clamp(87px, 27.1vw, 127px); }
  .bw-flower--anemone img { transform: rotate(-26.4deg); }
  .bw-flower--lavande-03 { left: -45.86%; top: 70%; width: clamp(368px, 115.1vw, 539px); }
  .bw-flower--allium-02 { left: 36.84%; top: 79%; width: clamp(78px, 24.5vw, 115px); }
  .bw-flower--allium-02 img { transform: rotate(28.28deg); }
  /* pas de place sous la citation à cette largeur */
  .bw-field .bw-flower--allium-02 { display: none; }

  .bw-branch--02 { left: 16.16%; top: 100%; width: clamp(182px, 58.4vw, 278px); }
  .bw-branch--03 { left: -31.54%; top: 94%; width: clamp(294px, 94.2vw, 448px); }
  .bw-branch--05a { left: 7%; top: 100%; width: clamp(410px, 131.5vw, 626px); }
  .bw-branch--05b { left: 18%; top: 94%; width: clamp(410px, 131.5vw, 626px); }
  .bw-branch--01a { left: 21.64%; top: 100%; width: clamp(99px, 31.6vw, 150px); }
  .bw-branch--01b { left: 64%; top: 99%; width: clamp(169px, 54.2vw, 258px); }
  .bw-branch--01c { left: -7.99%; top: 99%; width: clamp(194px, 62.2vw, 296px); }
  .bw-branch--04a { left: 23.5%; top: 99%; width: clamp(154px, 49.5vw, 236px); }
  .bw-branch--04b { left: 25.39%; top: 95%; width: clamp(219px, 70.1vw, 334px); }

  .bw-finale { top: 95%; width: min(88vw, 32rem); }
}

@media (max-width: 480px) {
  .bw-field { height: 3000px; }
  .bw-intro { top: 105px; width: 84vw; }
  .bw-intro .editorial-title { font-size: clamp(2.15rem, 10vw, 2.8rem); }
  .bw-promise { top: 42.5%; width: 84vw; }

  .bw-finale { top: 95%; }
}

@media (prefers-reduced-motion: reduce) {
  .bw-reveal, .bw-flower { opacity: 1 !important; transform: none !important; }
  .bw-flower img { filter: none !important; }
  .bw-syllable { opacity: 1 !important; transform: none !important; filter: none !important; }
  .bw-cascade-title .s, .bw-cascade-line .s { opacity: 1 !important; transform: none !important; }
}

/* Titre et citation : cascade lettre par lettre au scroll (accueil.js).
   .w = mot insécable, .s = lettre animée. */
.bw-cascade-title .w, .bw-cascade-line .w { display: inline; white-space: nowrap; }
.bw-cascade-title .s, .bw-cascade-line .s { display: inline-block; }
/* calque par lettre tant que la phrase est proche (.is-live, JS) : glisse au sous-pixel */
.bw-cascade-title.is-live .s, .bw-cascade-line.is-live .s { will-change: opacity, transform; }

/* Cascade syllabe par syllabe (mission, promesse), spans injectés par le JS.
   display en !important : certains parents stylent leurs propres <span>
   en block. */
.bw-syllable {
  display: inline-block !important;
  opacity: 0;
}

/* will-change seulement pendant l'animation (.bw-cascade-live) : évite le
   « pop » de fin de course sans garder des dizaines de calques GPU. */
.bw-cascade-live .bw-syllable {
  will-change: opacity, filter, transform;
}

.bw-cascade-live .bw-reveal {
  will-change: opacity, transform;
}

.bw-word {
  display: inline-flex !important;
}

/* ============================================================
   TRANSITION BRANCHES → FERME FLORALE (desktop et mobile)
   .branch-transition-zone est plus haute que son pin (.botanic-pin, sticky)
   de RISE + BREATHE + EXIT (custom properties ci-dessous).
   .branch-field-crop reprend les coordonnées Figma des branches à sa propre
   échelle, indépendante de la hauteur de .bw-field.
   En fin de pin, chaque branche se fond dans l'ivoire (EXIT_CONFIG) avant
   que la page reprenne vers .farm-band. JS : branchTransition() (accueil.js).
   ============================================================ */
/* RISE (--rise-y), ENTRANCE et FLOAT partagés desktop/mobile ; seules les
   distances, la hauteur du pin et le crop changent (@media plus bas). */
/* Fond ivoire sur toute la zone : le pin est plus court que l'écran, sinon
   le fond du body apparaît dessous. */
 .branch-transition-zone {
  background: var(--bw-bg);
  margin-bottom: -120px;
  z-index: 2;
}

.branch-transition-zone .bw-branch-layer {
  transform: translateY(var(--rise-y, 0px));
}
.branch-transition-zone.is-rise-active .bw-branch-layer {
  will-change: transform;
}
.branch-transition-zone .bw-branch {
  opacity: 0;
}
.branch-transition-zone.is-rise-active .bw-branch {
  will-change: opacity, transform;
}
.branch-transition-zone .bw-branch-float {
  display: block;
  animation-play-state: paused;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.branch-transition-zone .bw-branch-layer.is-active .bw-branch-float {
  animation-play-state: running;
  will-change: transform;
}
.branch-transition-zone .bw-branch-layer:not(.is-active) .bw-branch-float {
  will-change: auto;
}

/* chaque branche respire à son rythme ; branch-02 plus ample */
@keyframes branchFloatA { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(-15px, -22px) rotate(-1.3deg) scale(1.02); } }
@keyframes branchFloatB { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(9px, 10px) rotate(0.7deg) scale(0.99); } }
@keyframes branchFloatC { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(-4px, -6px) rotate(-0.4deg) scale(1.006); } }
@keyframes branchFloatD { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(6px, -9px) rotate(1deg) scale(1.01); } }
@keyframes branchFloatE { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(-8px, 7px) rotate(-0.6deg) scale(0.995); } }
@keyframes branchFloatF { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(10px, 8px) rotate(0.8deg) scale(1.008); } }
@keyframes branchFloatG { from { transform: translate(0, 0) rotate(0deg) scale(1); } to { transform: translate(-6px, -8px) rotate(-0.7deg) scale(1.01); } }

.bw-branch--02 .bw-branch-float { animation-name: branchFloatA; animation-duration: 15s; animation-delay: -3s; }
.bw-branch--03 .bw-branch-float { animation-name: branchFloatB; animation-duration: 24s; animation-delay: -9s; }
.bw-branch--05a .bw-branch-float { animation-name: branchFloatC; animation-duration: 27s; animation-delay: -14s; }
.bw-branch--05b .bw-branch-float { animation-name: branchFloatD; animation-duration: 21s; animation-delay: -6s; }
.bw-branch--01a .bw-branch-float { animation-name: branchFloatE; animation-duration: 17s; animation-delay: -2s; }
.bw-branch--01b .bw-branch-float { animation-name: branchFloatF; animation-duration: 20s; animation-delay: -11s; }
.bw-branch--01c .bw-branch-float { animation-name: branchFloatG; animation-duration: 23s; animation-delay: -5s; }
.bw-branch--04a .bw-branch-float { animation-name: branchFloatB; animation-duration: 18s; animation-delay: -8s; }
.bw-branch--04b .bw-branch-float { animation-name: branchFloatE; animation-duration: 22s; animation-delay: -1s; }

@media (min-width: 1101px) {
  .branch-transition-zone {
    position: relative;
    --rise-scroll-px: 420px;    /* distance de scroll de la montée */
    --breathe-scroll-px: 460px; /* distance de scroll en position haute avant la ferme */
    --rise-distance: 170px;     /* amplitude de la montée */
    --entrance-rise: 34px;      /* décalage de départ de chaque branche (ENTRANCE_RISE) */
    --exit-scroll-px: 680px;    /* distance de scroll du fondu des 9 branches (EXIT_CONFIG) */
    /* Écrans plus hauts que le pin (750px) : le pin se colle en BAS de l'écran
       et branchTransition() décale son départ d'autant (durées inchangées).
       svh : hauteur stable malgré la barre d'outils tactile. */
    --pin-offset: max(0px, calc(100svh - 750px));
    height: calc(750px + var(--rise-scroll-px) + var(--breathe-scroll-px) + var(--exit-scroll-px));
    /* remonte la zone pour supprimer le blanc sous la citation, sans toucher
       à .bw-field */
    margin-top: -650px;
  }

  .botanic-pin {
    position: sticky;
    top: var(--pin-offset);
    overflow: hidden;
    height: 750px;
    background: var(--bw-bg);
    z-index: 1;
  }

  .branch-field-crop {
    position: absolute;
    top: -2600px;
    left: 50%;
    width: min(100%, 1680px);
    transform: translateX(-50%);
    height: 3350px;
  }

  /* Desktop uniquement : la règle de base s'applique aussi à la tablette */
  .bw-branch--03 { top: 92.5%; left: -32%; }
  .bw-branch--05b { top: 90%; left: 10%; }

  /* posée sur la citation */
  .bw-field .bw-flower--allium-02 {
    top: 62%;
    left: 40%;
    width: 95px;
  }

  /* Texte de la ferme (desktop) : fondu scroll-lié par ligne
     (farmTextReveal), à la place du [data-reveal] générique neutralisé
     ci-dessous. Mobile : [data-reveal] générique. */
  .farm-text[data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .farm-reveal-line {
    opacity: 0;
    will-change: opacity, transform;
  }
}

/* Mobile/tablette (≤1100px) : pin plein écran, branches qui montent depuis
   le bas de l'écran. Crop basé sur la hauteur du .bw-field mobile. */
@media (max-width: 1100px) {
  .branch-transition-zone {
    position: relative;
    --rise-scroll-px: 260px;
    --breathe-scroll-px: 300px;
    --rise-distance: 200px;
    /* départ bien plus bas qu'en desktop : les branches poussent depuis le
       bas de l'écran */
    --entrance-rise: 450px;
    /* même fondu de sortie qu'en desktop */
    --exit-scroll-px: 680px;
    /* même formule qu'en desktop, avec un pin de 100vh */
    height: calc(100vh + var(--rise-scroll-px) + var(--breathe-scroll-px) + var(--exit-scroll-px));
    /* remonte la zone juste sous la citation */
    margin-top: -850px;
  }

  .botanic-pin {
    position: sticky;
    top: 0;
    overflow: hidden;
    /* 100vh puis 100dvh si supporté (hauteur réellement visible) */
    height: 100vh;
    height: 100dvh;
    background: var(--bw-bg);
    z-index: 1;
  }

  .branch-field-crop {
    position: absolute;
    /* le bas du pin coupe naturellement les tiges */
    top: calc(100dvh - 3200px);
    left: 50%;
    width: min(100%, 1680px);
    transform: translateX(-50%) translateY(110px);
    height: 3200px;
  }
}

/* Téléphones : hauteur de transition fixe */
@media (max-width: 760px) {
  .branch-transition-zone {
    height: 1750px;
  }
}

.farm-title-line { display: block; }

.farm-reveal-line {
  opacity: 0;
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .branch-transition-zone .bw-branch-layer {
    transform: none !important;
  }
  .branch-transition-zone .bw-branch {
    opacity: 1 !important;
    transform: none !important;
  }
  .branch-transition-zone .bw-branch-float {
    animation: none !important;
  }
  .farm-reveal-line {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   SECTION 02 — LA FERME FLORALE
   Photo en parallax lent (farmParallax, accueil.js), texte posé à gauche
   sur la partie claire de la photo.
   ============================================================ */
.farm-band {
  position: relative;
  z-index: 3;
  overflow: hidden;
  min-height: 100vh;
  /* ne s'applique qu'entre 861 et 1100px ; le réglage desktop est dans
     @media (min-width:1101px) plus bas */
  height: 220vh;
  display: flex;
  align-items: stretch;
  background: var(--ivoire-soft);
  padding: 0 clamp(1.5rem, 6vw, 6rem);
}

/* Surdimensionnée (180vh, -40vh) : le parallax ne découvre jamais de bord.
   En vh et non en % : .farm-band n'a pas de height explicite. */
.farm-bg {
  display: block;
  position: absolute;
  top: -20vh;
  left: 0;
  width: 100%;
  height: 260vh;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  will-change: transform;
  pointer-events: none;
}

.farm-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  min-height: 220vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.farm-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 24rem;
  max-width: 560px;
  transform: translateY(-22vh);
}

.farm-text[data-reveal] {
  opacity: 1 !important;
  transform: translateY(-22vh) !important;
  transition: none !important;
}

.farm-cta-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(58vh);
  pointer-events: none;
}

.farm-cta-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 35rem;
  gap: 1.5rem;
  max-width: 640px;
  pointer-events: auto;
}

.farm-cta-text .eyebrow { color: var(--violet-mid); }
.farm-cta-text .editorial-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--violet-deep);
}
.farm-cta-text .editorial-title .hl { color: var(--violet-electric); }
.farm-cta-text .body-text {
  font-size: 18px;
  color: var(--ink-text-dim);
  max-width: 40ch;
}
.farm-cta-text .text-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--violet-mid);
  transition: gap 0.35s var(--ease), opacity 0.35s ease;
}
.farm-cta-text .text-cta:hover {
  gap: 0.85rem;
  color: var(--bw-gold);
}

.farm-text .eyebrow { color: var(--violet-mid); }

.farm-text .editorial-title {
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  color: var(--violet-deep);
}

.farm-text .editorial-title .hl { color: var(--violet-electric); }

.farm-text .body-text { font-size: 18px; color: var(--ink-text-dim); max-width: 42ch; }
.farm-text .text-cta { color: var(--violet-mid); }
.farm-text .text-cta:hover { color: var(--bw-gold); }

@media (max-width: 860px) {
  .farm-band {
    height: 200vh;
    padding: 0 1.5rem;
  }

  /* Mobile : texte centré, cadrage décalé vers la zone claire de la photo */
  .farm-bg {
    object-position: 45% center;
  }
  .farm-content {
    min-height: 220vh;
    justify-content: flex-start;
  }
  .farm-text {
    align-items: center;
    text-align: center;
    max-width: 100%;
    margin-top: 19rem;
  }
  .farm-text .body-text { max-width: 38ch; }
  .farm-cta-text {
    max-width: 38ch;
    padding: 0 0.5rem;
    margin-top: 8rem;
  }

  /* paragraphes et liens des deux blocs partagent une règle */
  .farm-text .body-text,
  .farm-cta-text .body-text,
  .farm-text .text-cta,
  .farm-cta-text .text-cta {
    font-size: 20px;
  }
}

/* Mobile : cadrage un peu plus à gauche */
@media (max-width: 760px) {
  .farm-bg { object-position: 40% center; }
  .farm-cta-text { margin-top: 5rem; }
}

/* Petits mobiles (≤380px) : plus d'écart entre les deux blocs */
@media (max-width: 380px) {
  .farm-cta-text { margin-top: 20rem; }
}

/* Tablette : 1er bloc centré, comme le 2e */
@media (min-width: 761px) and (max-width: 1100px) {
  .farm-text {
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  /* Tablette : section à la hauteur de son contenu, 2e bloc dans le flux */
  .farm-band { height: auto; min-height: 0; }
  /* garde de la course au parallax */
  .farm-content { min-height: 100vh; }
  /* annule le translateY desktop (même !important à battre) */
  .farm-text,
  .farm-text[data-reveal] {
    margin-top: 8rem;
    transform: none !important;
  }
  .farm-cta-content {
    position: static;
    transform: none;
    padding-bottom: 8rem;
  }
  .farm-cta-text {
    margin: 11rem auto 0;
  }
}

/* Tablette paysage (iPad mini) : margin-bottom repousse le footer */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: landscape) {
  .farm-cta-text {
    margin-bottom: 76rem;
  }
}

/* Toutes les tablettes en paysage (tactile au-delà de 1100px) : 1er bloc
   plus bas */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: landscape),
       (min-width: 1101px) and (max-width: 1450px) and (orientation: landscape) and (pointer: coarse) {
  .farm-text,
  .farm-text[data-reveal] {
    margin-top: 32rem;
  }
}
/* iPad mini portrait : fleur gauche du footer moins haute (elle
   chevauchait « Un événement, un projet ? ») */
@media (min-width: 721px) and (max-width: 800px) and (orientation: portrait) {
  .footer-flower--left { bottom: -44vw; }
}

/* ============================================================
   TRANSITIONS ENTRE SECTIONS — lueur décorative par section, séparée du
   contenu pour ne pas cumuler deux transform sur le même élément.
   ============================================================ */
.section-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.farm-glow {
  z-index: 1; /* entre .farm-bg (0) et .farm-content (2) */
  background: radial-gradient(ellipse 42% 38% at 88% 82%, rgba(138, 92, 201, 0.1) 0%, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .farm-bg { transform: none !important; }
  .section-glow { transform: none !important; }
  .farm-text,
  .farm-cta-content { transform: none !important; }
}

/* ============================================================
   MUR BOTANIQUE — ancrages du texte, scopés à .botanical-wall pour battre
   les règles de base sans !important
   ============================================================ */

.botanical-wall .bw-field {
  width: min(100%, 1680px);
  height: clamp(2890px, 272vh, 3350px);
}

/* deux ancrages éditoriaux indépendants */
.botanical-wall .bw-intro {
  top: clamp(135px, 13vh, 220px);
  left: clamp(22%, 27vw, 34%);
  width: min(37rem, 42vw);
  z-index: 8;
}

.botanical-wall .bw-promise {
  top: clamp(850px, 95vh, 1100px);
  left: clamp(50%, 56vw, 64%);
  width: min(28rem, 31vw);
  z-index: 8;
}

/* texte centré en mobile */
@media (max-width: 1100px) {
  .botanical-wall .bw-field {
    height: 2727px;
  }

  .botanical-wall .bw-intro {
    left: 25%;
    width: min(35rem, 50vw);
  }

  /* Tablette : ancré à droite avec une gouttière constante */
  .botanical-wall .bw-promise {
    top: 900px;
    left: auto;
    right: clamp(1.5rem, 3vw, 2.5rem);
    width: min(27rem, 42vw);
  }
}

@media (min-width: 1101px) {
  /* à droite et plus bas, sur le fond blanc, sans toucher la pivoine */
  .botanical-wall .bw-promise {
    top: 900px;
    left: 68%;
  }
}

/* ---- Mobile : ancrages centrés ---- */
@media (max-width: 760px) {
  .botanical-wall .bw-field {
    height: 3051px;
  }

  .botanical-wall .bw-intro {
    top: 115px;
    left: 50%;
    width: min(84vw, 30rem);
    transform: translateX(-50%);
    align-items: center;
    text-align: center;
  }

  .botanical-wall .bw-intro .editorial-title {
    font-size: clamp(2.35rem, 10vw, 3.35rem);
    max-width: 10ch;
  }

  .botanical-wall .bw-intro .body-text {
    max-width: 34ch;
  }

  /* taille de texte mobile commune (mission, promesse, liens) */
  .botanical-wall .bw-intro .body-text,
  .botanical-wall .bw-promise-list span,
  .bw-intro .text-cta,
  .bw-promise .text-cta {
    font-size: 20px;
  }

  .botanical-wall .bw-promise {
    top: 1260px;
    left: 50%;
    width: min(84vw, 29rem);
    transform: translateX(-50%);
    text-align: center;
  }

  .botanical-wall .bw-promise-list {
    align-items: center;
  }

  .botanical-wall .bw-promise-list li {
    width: min(100%, 22rem);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
  }

  .botanical-wall .bw-promise-list li > div {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .botanical-wall .bw-field {
    height: 3000px;
  }

  .botanical-wall .bw-intro {
    top: 370px;
    width: 86vw;
  }

  .botanical-wall .bw-promise {
    top: 1578px;
    width: 86vw;
  }

}

/* ---- Fondu du bas des tiges ---- */
.botanical-wall .bw-flower img {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 80%,
    rgba(0,0,0,.82) 87%,
    rgba(0,0,0,.35) 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 80%,
    rgba(0,0,0,.82) 87%,
    rgba(0,0,0,.35) 95%,
    transparent 100%
  );
}

/* .is-text-obscured (JS) : la fleur s'efface quand elle croise le texte */
.botanical-wall .bw-flower.is-text-obscured {
  z-index: 1 !important;
}

.botanical-wall .bw-flower.is-text-obscured img {
  transition: filter 180ms linear, opacity 180ms linear;
}

@media (min-width: 1101px) {
  .farm-band {
    /* Desktop : c'est cette règle qui fixe la hauteur réelle */
    height: 220vh;
  }
  .farm-content {
    min-height: 220vh;
  }
  .farm-bg {
    top: -20vh;
    height: 320vh;
    /* desktop : cadrage décalé pour que le 2e bloc tombe sur la partie claire */
    object-position: 35% center;
  }
  .farm-text {
    transform: translateY(-30vh);
  }
  .farm-text[data-reveal] {
    transform: translateY(-30vh) !important;
  }
  .farm-cta-content {
    transform: translateY(70vh);
  }
  .farm-cta-text {
    margin-bottom: 21rem;
  }
}

/* iPad mini (portrait par largeur, paysage par hauteur) : cadrage à 40%.
   pointer:coarse exclut les laptops ; placé APRÈS le bloc desktop. */
@media (min-width: 721px) and (max-width: 800px),
       (min-width: 1000px) and (max-width: 1450px) and (orientation: landscape) and (max-height: 800px) and (pointer: coarse) {
  .farm-bg { object-position: 40% center; }
}

/* Tablettes paysage >1100px (tactiles) : 2e bloc remonté et section
   raccourcie. Placé après le bloc desktop (ordre de source). */
@media (min-width: 1101px) and (max-width: 1450px) and (orientation: landscape) and (pointer: coarse) {
  .farm-band { height: 170vh; }
  .farm-content { min-height: 170vh; }
  .farm-cta-content { transform: translateY(40vh); }
}
