/* =========================================================
   HERO — Produits animés (remplace la photo d'arrière-plan)
   Chaque produit détouré flotte à droite avec ses flèches
   (fines, qui s'arrêtent avant le produit) ; nom centré en dessous.
   ========================================================= */
.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Même bordeaux pour tous les produits */
  background: #3b0a1c;
}

/* Halo lumineux derrière le produit */
.hero-stage__glow {
  position: absolute;
  right: 8%;
  top: 50%;
  width: min(60vw, 860px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(237, 225, 216, 0.2) 0%,
    rgba(237, 225, 216, 0.05) 40%,
    transparent 68%
  );
  pointer-events: none;
}

/* Voile sombre à gauche pour garder le texte lisible */
.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    100deg,
    rgba(10, 5, 8, 0.72) 0%,
    rgba(10, 5, 8, 0.38) 34%,
    transparent 58%
  );
  pointer-events: none;
}

/* Zone des produits */
.hero-stage__items {
  position: absolute;
  right: calc(clamp(1.2rem, 3vw, 2.5rem) + 250px);
  top: 0;
  bottom: 0;
  z-index: 4;
  width: min(33vw, 500px);
  pointer-events: none;
}
.hero-stage__item {
  position: absolute;
  inset: 15vh 0 16vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
  opacity: 0;
  transform: translateY(18%) scale(0.86) rotate(-3deg);
  filter: blur(8px);
  transition:
    opacity 1200ms ease,
    transform 1600ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1200ms ease;
}
.hero-stage__item.is-active {
  opacity: 1;
  transform: none;
  filter: none;
}
.hero-stage__item.is-leaving {
  opacity: 0;
  transform: translateY(-14%) scale(1.06) rotate(2deg);
  filter: blur(6px);
}

/* Cadre = taille exacte de la photo (les flèches se placent en %) */
.hero-stage__frame {
  position: relative;
  height: min(calc(var(--h, 1) * 100cqh), calc(var(--h, 1) * 100cqw / var(--ratio)));
  aspect-ratio: var(--ratio);
}
.hero-stage__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.55));
}
/* Flottement léger du produit visible (photo + flèches ensemble) */
.hero-stage__item.is-active .hero-stage__frame {
  animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* Nom du produit, centré sous la photo */
.hero-stage__name {
  position: absolute;
  top: calc(100% + 1.4rem);
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--creme);
}
.hero-stage__name::before,
.hero-stage__name::after {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(237, 225, 216, 0.5);
}

/* ---------- Flèches : texte dans le vide + trait fin vers le produit ---------- */
/* --y : hauteur sur la photo · --e : bord du produit à cette hauteur.
   La flèche s'arrête 12px avant le bord : elle ne touche jamais le produit.
   .fl--g : texte à gauche · .fl--d : texte à droite. */
.hero-stage__frame {
  --marge: 200px;
  --marge-d: 165px;
}
.fl {
  position: absolute;
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  translate: 0 -50%;
  pointer-events: none;
}
.fl--g {
  left: calc(-1 * var(--marge));
  width: calc(var(--marge) + var(--e) - 12px);
}
.fl--d {
  left: calc(var(--e) + 12px);
  width: calc(var(--marge-d, var(--marge)) + 100% - var(--e) - 12px);
  flex-direction: row-reverse;
}
.fl span {
  flex: 0 1 auto;
  max-width: 10.5em;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--creme);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.fl--g span {
  text-align: right;
  transform: translateX(-10px);
}
.fl--d span {
  transform: translateX(10px);
}
/* Le trait + la pointe */
.fl b {
  position: relative;
  flex: 1 1 auto;
  min-width: 18px;
  height: 1px;
  background: rgba(237, 225, 216, 0.75);
  transform: scaleX(0);
  transition: transform 800ms cubic-bezier(0.65, 0, 0.35, 1);
}
.fl b::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1px solid rgba(237, 225, 216, 0.95);
  border-right: 1px solid rgba(237, 225, 216, 0.95);
}
.fl--g b {
  transform-origin: left;
}
.fl--g b::after {
  right: 0;
  transform: translateY(-50%) rotate(45deg);
}
.fl--d b {
  transform-origin: right;
}
.fl--d b::after {
  left: 0;
  transform: translateY(-50%) rotate(-135deg);
}

/* Apparition une par une : le texte, puis le trait vers le produit */
.hero-stage__item.is-active .fl span {
  opacity: 1;
  transform: none;
  transition-delay: calc(1200ms + var(--i, 0) * 700ms);
}
.hero-stage__item.is-active .fl b {
  transform: scaleX(1);
  transition-delay: calc(1400ms + var(--i, 0) * 700ms);
}

/* Points cliquables (nom du produit au survol) */
.hero-stage__dots {
  position: absolute;
  right: clamp(1.2rem, 3vw, 2.5rem);
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.hero-stage__dot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 0.2rem 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(237, 225, 216, 0.45);
  transition: color 400ms ease;
}
.hero-stage__dot::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-stage__dot span {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 400ms ease, transform 500ms ease;
}
.hero-stage__dot:hover,
.hero-stage__dot.is-active {
  color: var(--creme);
}
.hero-stage__dot.is-active::after {
  width: 42px;
  background: linear-gradient(var(--creme), var(--creme)) left / 0% 100% no-repeat,
    rgba(237, 225, 216, 0.35);
  animation: dotProgress var(--duree, 10s) linear forwards;
}
/* Barre de progression : le temps avant le produit suivant */
@keyframes dotProgress {
  to { background-size: 100% 100%, auto; }
}
.hero-stage__dot:hover span {
  opacity: 1;
  transform: none;
}

/* Flèches ‹ › : uniquement sur téléphone */
.hero-stage__fleche {
  display: none;
}

/* Les points restent cliquables sous la zone de texte */
.hero--bg .hero-bg__inner {
  pointer-events: none;
}
.hero--bg .hero-bg__content {
  pointer-events: auto;
}

/* ---------- Texte d'accueil : marges + touche dorée ---------- */
.hero--bg {
  --or-clair: #f3dca0;
  --or: #d9b775;
  --or-fonce: #b8913f;
}
/* La zone de texte reprend la largeur normale de la page (avec ses marges) */
.hero--bg .hero-bg__inner {
  width: var(--page);
  margin-inline: auto;
}
/* Fin trait doré qui se dessine au-dessus du titre */
.hero--bg .hero-bg__content::before {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin-bottom: clamp(1.4rem, 2.4vw, 2rem);
  background: linear-gradient(90deg, var(--or-fonce), var(--or-clair), var(--or-fonce));
  transform-origin: left;
  animation: traitOr 1.4s cubic-bezier(0.65, 0, 0.35, 1) 2.6s both;
}
@keyframes traitOr {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
/* « n'oublieront jamais. » en doré, avec un reflet qui passe lentement */
.hero--bg .hero-bg__title em {
  color: transparent;
  background: linear-gradient(
      100deg,
      var(--or-fonce) 0%,
      var(--or) 30%,
      #fff3d1 45%,
      var(--or) 60%,
      var(--or-fonce) 100%
    )
    0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 18px rgba(217, 183, 117, 0.25));
  animation: refletOr 7s ease-in-out infinite;
}
@keyframes refletOr {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0% 0; }
}
/* Petit texte : liseré doré à gauche */
.hero--bg .hero-bg__sub {
  padding-left: 1.1rem;
  border-left: 1px solid rgba(217, 183, 117, 0.6);
}

/* Tablette */
@media (max-width: 1024px) {
  .hero-stage__items {
    right: 70px;
    width: 44vw;
  }
  .hero-stage::after {
    background: linear-gradient(
      100deg,
      rgba(10, 5, 8, 0.75) 0%,
      rgba(10, 5, 8, 0.45) 45%,
      transparent 75%
    );
  }
  .hero-stage__frame {
    --marge: 130px;
    --marge-d: 130px;
  }
  .fl span {
    font-size: 0.74rem;
  }
}

/* Téléphone : texte en haut, produits qui défilent en dessous */
@media (max-width: 720px) {
  .hero-stage__glow {
    right: 50%;
    top: auto;
    bottom: 22svh;
    width: 120vw;
    transform: translate(50%, 50%);
  }
  .hero-stage__items {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: 56svh;
  }
  .hero-stage__item {
    inset: 1rem 22% 5.2rem;
  }
  /* Trop serrée sur petit écran : cette flèche n'apparaît que sur ordinateur */
  .fl--cache-mobile {
    display: none;
  }
  /* Voile sombre derrière le texte (en haut), transparent sur les produits */
  .hero-stage::after {
    background: linear-gradient(
      180deg,
      rgba(10, 5, 8, 0.7) 0%,
      rgba(10, 5, 8, 0.45) 35%,
      transparent 52%
    );
  }
  /* Pas d'ombre ni de flou sur téléphone : Safari (iPhone) les affiche
     parfois comme un rectangle de fond derrière les produits */
  .hero-stage__item,
  .hero-stage__item.is-active,
  .hero-stage__item.is-leaving {
    filter: none;
  }
  .hero-stage__item {
    transition:
      opacity 1200ms ease,
      transform 1600ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .hero-stage__frame img {
    filter: none;
  }
  /* Le produit qui s'en va descend un peu (il ne remonte pas vers les boutons) */
  .hero-stage__item.is-leaving {
    transform: translateY(6%) scale(0.97);
  }
  .hero-stage__name {
    top: calc(100% + 0.8rem);
    font-size: 0.62rem;
  }
  .hero-stage__frame {
    --marge: 76px;
    --marge-d: 76px;
  }
  .fl {
    gap: 0.3rem;
  }
  .fl span {
    max-width: 6.2em;
    font-size: 0.62rem;
  }
  .fl b {
    min-width: 10px;
  }
  /* Navigation au doigt : traits plus grands + flèches ‹ › */
  .hero-stage__dots {
    top: auto;
    bottom: 0.9rem;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    gap: 0;
  }
  .hero-stage__dot {
    padding: 0.9rem 0.35rem;
  }
  .hero-stage__dot::after {
    width: 22px;
    height: 2px;
  }
  .hero-stage__dot.is-active::after {
    width: 40px;
  }
  .hero-stage__dot span {
    display: none;
  }
  .hero-stage__fleche {
    position: absolute;
    bottom: 0.55rem;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(237, 225, 216, 0.35);
    border-radius: 50%;
    background: rgba(20, 6, 10, 0.4);
    color: var(--creme);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
  }
  .hero-stage__fleche--prec {
    left: 1rem;
  }
  .hero-stage__fleche--suiv {
    right: 1rem;
  }
  /* Le texte en premier, les produits dessous */
  .hero--bg {
    align-items: flex-start;
    padding-top: 6.5rem;
    padding-bottom: 56svh;
  }
}

/* Mouvement réduit (réglage d'accessibilité) : simple fondu */
@media (prefers-reduced-motion: reduce) {
  .hero-stage__item,
  .hero-stage__item.is-leaving {
    transform: none;
    filter: none;
  }
  .hero-stage__item.is-active .hero-stage__frame,
  .hero--bg .hero-bg__title em,
  .hero--bg .hero-bg__content::before {
    animation: none;
  }
  .fl b {
    transition: none;
  }
}
