/* HARAMEIN — Accueil v2 · Hero (aligné maquette cliente) */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Suit le thème global (fond / texte / accent) — plus de crème figé */
.home-v2 {
  --home-cream: var(--warm-elevated, #f9f6f1);
  --home-brown: var(--cream, #4a3728);
  --home-brown-mid: var(--cream-muted, #5c4636);
  --home-brown-soft: var(--cream-muted, rgba(74, 55, 40, 0.78));
  --home-gold: var(--gold, #b8956a);
  --home-gold-light: var(--gold-bright, #d4b78f);
  --font-hero: "Cormorant Garamond", "Times New Roman", serif;
}

/* theme.css met le hero en blanc — accueil v2 = texte marron lisible sur toute image */
html body.home-v2 .hero__title {
  color: #2c2118;
  text-shadow:
    0 0 28px rgba(249, 246, 241, 0.98),
    0 0 12px rgba(249, 246, 241, 0.92),
    0 1px 2px rgba(249, 246, 241, 0.8);
  min-height: 0;
}

html body.home-v2 .hero__title em {
  color: var(--home-gold);
  font-style: normal;
}

html body.home-v2 .hero__lead {
  color: #3a2b20;
  text-shadow:
    0 0 22px rgba(249, 246, 241, 0.96),
    0 0 10px rgba(249, 246, 241, 0.88),
    0 1px 1px rgba(249, 246, 241, 0.75);
}

html body.home-v2 .hero__eyebrow,
html body.home-v2 #heroTag {
  color: #2c2118;
  font-weight: 600;
  text-shadow:
    0 0 24px rgba(249, 246, 241, 0.98),
    0 0 8px rgba(249, 246, 241, 0.9),
    0 1px 0 rgba(249, 246, 241, 0.7);
}

html body.home-v2 .hero__values-label {
  color: rgba(44, 33, 24, 0.92);
  text-shadow:
    0 0 18px rgba(249, 246, 241, 0.95),
    0 0 8px rgba(249, 246, 241, 0.85);
}

html body.home-v2 .hero__values-icon {
  color: var(--home-gold);
}

html body.home-v2 .hero__dot {
  min-height: 0;
  width: auto;
  display: block;
}

html body.home-v2 .hero__dot::before {
  content: none;
  display: none;
}

/* ── Header ── */
.home-v2 .header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  height: auto;
  min-height: var(--header-h);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  background: var(--home-cream);
  backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

.home-v2 .header.is-scrolled {
  background: rgba(249, 246, 241, 0.97);
  border-bottom: 1px solid rgba(74, 55, 40, 0.07);
  box-shadow: 0 4px 18px rgba(58, 35, 12, 0.05);
}

.home-v2 .header__brand {
  justify-self: start;
  grid-column: 1;
  gap: 0.65rem;
  color: var(--home-gold);
  font-size: clamp(0.78rem, 2.8vw, 0.88rem);
  letter-spacing: 0.3em;
}

.home-v2 .header__brand span {
  color: var(--home-gold);
  font-weight: 500;
  font-size: inherit;
  letter-spacing: inherit;
}

.home-v2 .header__logo {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  flex-shrink: 0;
  border-color: rgba(184, 149, 106, 0.45);
}

.home-v2 .header__motto {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  font-family: var(--font-body, inherit);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(74, 55, 40, 0.55);
  white-space: nowrap;
}

.home-v2 .header__motto span {
  margin: 0 0.4rem;
  color: rgba(184, 149, 106, 0.9);
}

.home-v2 .header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.home-v2 .header__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--home-brown);
  cursor: pointer;
  text-decoration: none;
}

.home-v2 .header__tool svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
}

.home-v2 .header__tool--cart {
  position: relative;
  color: var(--home-brown);
}

.home-v2 .header__tool--cart:hover {
  color: var(--home-gold);
}

.home-v2 .header__tool--cart .header__cart-icon {
  width: 1.28rem;
  height: 1.28rem;
  display: block;
}

.home-v2 .header__tool--cart .header__cart-count {
  position: absolute;
  top: -0.05rem;
  right: -0.35rem;
  min-width: 0.92rem;
  height: 0.92rem;
  padding: 0 0.22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.5rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 999px;
  background: var(--home-brown);
  color: var(--home-cream);
  box-shadow: 0 0 0 1.5px var(--home-cream);
}

.home-v2 .header__tool--cart .header__cart-count.is-hidden {
  display: none;
}

.home-v2 .header__toggle {
  display: flex;
  color: var(--home-brown);
}

.home-v2 .header__toggle span {
  background: var(--home-brown);
}

@media (max-width: 899px) {
  .home-v2 .header {
    grid-template-columns: 1fr auto;
  }

  .home-v2 .header__motto {
    display: none;
  }

  .home-v2 .header__actions {
    grid-column: 2;
  }

  .home-v2 .header__nav {
    position: fixed;
    inset: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.25rem clamp(1rem, 4vw, 2.5rem) 2rem;
    background: rgba(249, 246, 241, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(74, 55, 40, 0.08);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    display: flex;
    z-index: 105;
    overflow-y: auto;
  }

  .home-v2 .header__nav.is-open {
    transform: translateX(0);
  }

  .home-v2 .header__nav a {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(74, 55, 40, 0.08);
    color: var(--home-brown);
  }

  .home-v2 .header__nav .header__nav-link--desktop {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .home-v2 .header {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 0.15rem;
  }

  .home-v2 .header__brand {
    grid-row: 1;
  }

  .home-v2 .header__motto {
    grid-row: 1;
  }

  .home-v2 .header__actions {
    grid-row: 1;
  }

  .home-v2 .header__toggle {
    display: none;
  }

  .home-v2 .header__nav {
    position: static;
    inset: auto;
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(0.85rem, 2vw, 1.65rem);
    padding: 0 0 0.35rem;
    margin: 0;
    background: transparent;
    backdrop-filter: none;
    border: none;
    transform: none;
    overflow: visible;
    display: flex !important;
    z-index: auto;
  }

  .home-v2 .header__nav a {
    padding: 0;
    border-bottom: none;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--home-brown);
  }

  .home-v2 .header__nav a:hover {
    color: var(--home-gold);
  }

  .home-v2 .header__nav .header__nav-link--mobile {
    display: none !important;
  }

  .home-v2 .header__nav-cta.header__nav-link--mobile {
    display: none !important;
  }
}

/* ── Hero — 1 écran sans scroll ── */
.home-v2 .hero {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  align-items: stretch;
  padding: 0;
  margin-top: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--home-cream);
}

.home-v2 .hero__stage {
  inset: var(--header-h) 0 0 0;
}

.home-v2 .hero__wash {
  background:
    radial-gradient(
      ellipse 70% 55% at 50% 48%,
      rgba(249, 246, 241, 0.72) 0%,
      rgba(249, 246, 241, 0.38) 42%,
      transparent 72%
    ),
    linear-gradient(
      180deg,
      rgba(249, 246, 241, 0.55) 0%,
      rgba(249, 246, 241, 0.22) 38%,
      transparent 68%
    );
  pointer-events: none;
}

.home-v2 .hero__orb,
.home-v2 .hero__smoke,
.home-v2 .hero__pattern,
.home-v2 .hero__vignette {
  display: none;
}

.home-v2 .hero__slide img {
  object-position: var(--hero-focus, 50% 42%);
  filter: brightness(0.99) saturate(1.02) contrast(1.01);
}

.home-v2 .hero__frame-slide img {
  object-position: var(--hero-focus, 50% 42%);
  filter: brightness(0.99) saturate(1.02) contrast(1.01);
}

.home-v2 .hero__slide.is-active img {
  /* Durée = diapo (--slide-duration) : zoom doux jusqu’au changement d’image */
  animation: homeHeroKen var(--slide-duration, 5200ms) linear forwards;
  will-change: transform;
  backface-visibility: hidden;
}

.home-v2 .hero__slide:not(.is-active) img {
  will-change: auto;
  transform: scale3d(1, 1, 1);
}

/* Sections hors écran : le navigateur saute le rendu jusqu’au scroll */
.home-v2 #faq,
.home-v2 #contact,
.home-v2 #haramein-admin {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

@keyframes homeHeroKen {
  from { transform: scale3d(1, 1, 1); }
  to { transform: scale3d(1.045, 1.045, 1); }
}

.home-v2 .hero__layout {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  height: calc(100dvh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  min-height: 0;
  margin: 0;
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 clamp(1.15rem, 5vw, 5rem);
  padding-top: 0;
  padding-bottom: clamp(2rem, 5vh, 3rem);
  box-sizing: border-box;
}

.home-v2 .hero__copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 28rem);
  max-width: 28rem;
  margin-inline: 0;
  gap: 0;
  transform: none;
  padding: 0.85rem 1.15rem 1.1rem;
  border-radius: 14px;
  text-align: center;
  background:
    linear-gradient(
      180deg,
      rgba(249, 246, 241, 0.48) 0%,
      rgba(249, 246, 241, 0.34) 55%,
      rgba(249, 246, 241, 0.2) 100%
    );
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 32px rgba(44, 33, 24, 0.05);
}

.home-v2 .hero__headline,
.home-v2 .hero__dynamic,
.home-v2 .hero__lead,
.home-v2 .hero__eyebrow {
  width: 100%;
  text-align: center;
}

.home-v2 .hero__headline {
  align-items: center;
}

.home-v2 .hero__eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-inline: auto;
  margin-bottom: 0.75rem;
}

.home-v2 .hero__lead {
  margin-inline: auto;
}

.home-v2 .hero__values {
  justify-content: center;
  margin-inline: auto;
}

.home-v2 .hero__actions,
.home-v2 .hero__controls,
.home-v2 .hero__pager {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-v2 .hero__brand-row,
.home-v2 .hero__showcase,
.home-v2 .hero__samples,
.home-v2 .hero__scroll,
.home-v2 .hero__trust,
.home-v2 .hero__progress,
.home-v2 .hero__variant:not(.is-visible) {
  display: none !important;
}

.home-v2 .hero__headline {
  margin-bottom: 0.5rem;
  align-items: center;
}

.home-v2 .hero__eyebrow {
  gap: 0;
  font-family: var(--font-body, inherit);
  font-size: clamp(0.7rem, 1.55vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.38em;
  color: #2c2118;
}

.home-v2 .hero__eyebrow-line {
  display: none;
}

.home-v2 .hero__title {
  font-family: var(--font-hero);
  font-size: clamp(2.35rem, 6.2vw, 3.85rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.12;
  min-height: 0;
  margin-bottom: 0.5rem;
  color: #2c2118;
  text-wrap: balance;
}

.home-v2 .hero__title .hero__title-accent {
  display: block;
  margin-top: 0.08em;
  font-size: 0.92em;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--home-brown-mid);
}

.home-v2 .hero__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--home-brown);
}

.home-v2 .hero__lead {
  max-width: 18rem;
  margin: 0 0 1rem;
  font-family: var(--font-body, inherit);
  font-size: clamp(0.92rem, 1.85vw, 1.05rem);
  font-weight: 400;
  line-height: 1.6;
  color: #3a2b20;
  text-wrap: pretty;
}

.home-v2 .hero__values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0;
  row-gap: 0.45rem;
  list-style: none;
  max-width: 21rem;
  margin: 0 0 1rem;
  padding: 0;
}

.home-v2 .hero__values li {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.38rem;
}

.home-v2 .hero__values li:not(:first-child) {
  margin-left: 0.65rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(184, 149, 106, 0.38);
}

.home-v2 .hero__values-label {
  font-size: clamp(0.56rem, 1.1vw, 0.64rem);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(44, 33, 24, 0.9);
  line-height: 1.2;
  white-space: nowrap;
}

.home-v2 .hero__values-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: var(--home-gold);
  opacity: 0.95;
}

.home-v2 .hero__values-icon svg {
  width: 0.88rem;
  height: 0.88rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

.home-v2 .hero__actions {
  margin-bottom: 1rem;
}

.home-v2 .hero__actions .btn--ghost {
  display: none;
}

.home-v2 .hero .btn--gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 14.5rem;
  padding: 0.88rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: var(--home-brown);
  color: var(--home-cream);
  font-family: var(--font-body, inherit);
  font-size: clamp(0.58rem, 1.25vw, 0.66rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(74, 55, 40, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.home-v2 .hero .btn--gold:hover {
  transform: translateY(-1px);
  background: #3f2f23;
  box-shadow: 0 10px 26px rgba(74, 55, 40, 0.24);
}

.home-v2 .hero .btn--gold::after {
  content: "→";
  font-size: 0.75rem;
  line-height: 1;
}

.home-v2 .hero__controls {
  margin: 0.35rem 0 0;
  padding: 0;
}

.home-v2 .hero__pager {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: auto;
  margin-inline: auto;
}

.home-v2 .hero__pager-label {
  flex-shrink: 0;
  font-family: var(--font-display, serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(44, 33, 24, 0.55);
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 16px rgba(249, 246, 241, 0.95),
    0 0 6px rgba(249, 246, 241, 0.85);
}

.home-v2 .hero__pager-label #heroPagerCurrent {
  display: inline-block;
  color: #2c2118;
}

.home-v2 .hero__pager-label #heroPagerCurrent.is-tick {
  animation: heroPagerTick 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes heroPagerTick {
  0% {
    opacity: 0.35;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-v2 .hero__pager-sep {
  margin: 0 0.12rem;
  opacity: 0.35;
}

.home-v2 .hero__dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
}

.home-v2 .hero__dot {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  width: 2.4rem;
  max-width: none;
  height: 2px;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 99px;
  background: rgba(74, 55, 40, 0.14);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.home-v2 .hero__dot::before {
  display: none;
}

.home-v2 .hero__dot-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--home-brown) 0%, var(--home-gold) 100%);
  box-shadow: 0 0 12px rgba(184, 149, 106, 0.35);
  pointer-events: none;
}

.home-v2 .hero__dot-fill.is-running {
  animation: heroDotFill var(--slide-duration, 5200ms) linear forwards;
}

.home-v2 .hero__dot.is-active {
  height: 3px;
  background: rgba(74, 55, 40, 0.1);
  transform: scaleY(1);
}

.home-v2 .hero__dot:not(.is-active):hover {
  background: rgba(74, 55, 40, 0.22);
  transform: scaleY(1.35);
}

.home-v2 .hero__dot:focus-visible {
  outline: 2px solid var(--home-gold);
  outline-offset: 4px;
}

@keyframes heroDotFill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 .hero__dot-fill.is-running {
    animation: none;
    width: 100% !important;
  }
}

.home-v2 .hero__aside {
  position: absolute;
  z-index: 3;
  right: clamp(1.15rem, 4.2vw, 2.75rem);
  bottom: clamp(0.85rem, 2.5vh, 1.65rem);
  max-width: 10.5rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-body, inherit);
  font-size: clamp(0.5rem, 1.1vw, 0.58rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.7;
  text-transform: uppercase;
  text-align: right;
  color: rgba(74, 55, 40, 0.78);
  text-shadow: 0 0 18px rgba(249, 246, 241, 0.85);
}

.home-v2 .hero__aside span {
  display: block;
}

.home-v2 .hero__aside span + span {
  margin-top: 0.12rem;
}

@media (max-width: 719px) {
  .home-v2 .hero__layout {
    align-items: center;
    justify-content: center;
    /* More top padding than bottom → optical center sits a bit lower */
    padding-top: clamp(4.25rem, 14vh, 6.5rem);
    padding-bottom: clamp(1.25rem, 3vh, 2rem);
    padding-left: max(1.15rem, env(safe-area-inset-left));
    padding-right: max(1.15rem, env(safe-area-inset-right));
  }

  .home-v2 .hero__slide img,
  .home-v2 .hero__frame-slide img {
    object-position: var(--hero-focus-mobile, var(--hero-focus, 50% 42%));
  }

  .home-v2 .hero__copy {
    width: min(100%, 22rem);
    max-width: 22rem;
    margin-inline: auto;
    align-items: center;
    text-align: center;
    padding: 1rem 1.05rem 1.15rem;
    background:
      linear-gradient(
        180deg,
        rgba(249, 246, 241, 0.58) 0%,
        rgba(249, 246, 241, 0.42) 60%,
        rgba(249, 246, 241, 0.26) 100%
      );
  }

  .home-v2 .hero__headline,
  .home-v2 .hero__lead {
    width: 100%;
    text-align: center;
  }

  .home-v2 .hero__lead {
    max-width: 18.5rem;
    margin-inline: auto;
  }

  .home-v2 .hero__values {
    justify-content: center;
    margin-inline: auto;
  }

  .home-v2 .hero__actions,
  .home-v2 .hero__controls {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .home-v2 .hero__title {
    font-size: clamp(2rem, 9.2vw, 2.55rem);
  }

  .home-v2 .hero__wash {
    background: linear-gradient(
      180deg,
      rgba(249, 246, 241, 0.88) 0%,
      rgba(249, 246, 241, 0.72) 28%,
      rgba(249, 246, 241, 0.55) 48%,
      rgba(249, 246, 241, 0.28) 68%,
      transparent 88%
    );
  }

  .home-v2 .hero__title {
    font-size: clamp(2.05rem, 9.5vw, 2.7rem);
    letter-spacing: 0.01em;
  }

  .home-v2 .hero .btn--gold {
    min-width: 0;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
  }

  .home-v2 .hero__values {
    max-width: 100%;
    row-gap: 0.55rem;
  }

  .home-v2 .hero__values li:not(:first-child) {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
  }

  .home-v2 .hero__values-label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    white-space: normal;
    max-width: 4.25rem;
    line-height: 1.25;
  }

  .home-v2 .hero__aside {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
    max-width: 8.5rem;
    border-radius: 8px;
    background: rgba(249, 246, 241, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

@media (min-width: 1100px) {
  .home-v2 .hero__copy {
    margin-inline: 0;
    width: min(100%, 32rem);
    max-width: 32rem;
  }

  .home-v2 .hero__layout {
    padding-inline: clamp(2rem, 7vw, 6.5rem);
  }
}
