/* ==========================================================================
   Amétrine Web — Hero scroll-driven
   Réutilise les tokens de style.css (fallbacks fournis pour usage isolé).
   ========================================================================== */

.hero-scroll {
  --hs-purple-950: var(--purple-950, #160b1c);
  --hs-purple-900: var(--purple-900, #25102f);
  --hs-purple-800: var(--purple-800, #3d1751);
  --hs-purple-700: var(--purple-700, #5f2a84);
  --hs-purple-400: var(--purple-400, #a978c9);
  --hs-gold-500: var(--gold-500, #d6b36a);
  --hs-gold-300: var(--gold-300, #ead7aa);
  --hs-cream: var(--cream, #fbf7ef);
  --hs-serif: Georgia, "Times New Roman", serif;
  --hs-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  position: relative;
  height: 350vh;
  background: var(--hs-purple-950);
}

/* --------------------------------------------------------------------------
   1. Rideau de chargement
   -------------------------------------------------------------------------- */
.hs-curtain {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  background: var(--hs-purple-950);
}
.hs-curtain-inner { text-align: center; }
.hs-curtain-name {
  font-family: var(--hs-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -.03em;
  color: var(--hs-cream);
  margin: 0 0 22px;
}
.hs-curtain-bar {
  width: min(260px, 60vw);
  height: 1px;
  margin: 0 auto 14px;
  background: rgba(234, 215, 170, .18);
  position: relative;
  overflow: hidden;
}
.hs-curtain-bar i {
  position: absolute;
  inset: 0 100% 0 0;
  background: var(--hs-gold-500);
}
.hs-curtain-count {
  font-family: var(--hs-sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: rgba(251, 247, 239, .5);
}

/* --------------------------------------------------------------------------
   2. Canvas améthyste (arrière-plan scrubé)
   -------------------------------------------------------------------------- */
.hs-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 38%, rgba(95, 42, 132, .55), transparent 58%),
    radial-gradient(circle at 22% 82%, rgba(214, 179, 106, .10), transparent 55%),
    var(--hs-purple-950);
}
.hs-stage-inner {
  position: absolute;
  inset: 0;
  transform: scale(1.05);
  will-change: transform;
}
.hs-canvas { width: 100%; height: 100%; display: block; }

/* voile de lisibilité : sombre en bas, où vit le titre */
.hs-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(22, 11, 28, .82) 0%, rgba(22, 11, 28, .18) 45%, transparent 70%);
}

/* --------------------------------------------------------------------------
   3. Titre géant qui se disloque au scroll
   -------------------------------------------------------------------------- */
.hs-float {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  pointer-events: none;
}
@media (min-width: 768px) { .hs-float { padding: 2rem; } }

.hs-float .hs-display {
  font-family: var(--hs-serif);
  font-weight: 400;
  font-size: clamp(3.6rem, 14vw, 260px);
  line-height: .86;
  letter-spacing: -.045em;
  color: var(--hs-cream);
  margin: 0;
  text-wrap: nowrap;
}
.hs-float .hs-display em {
  font-style: italic;
  color: var(--hs-gold-300);
}
.hs-line { display: block; }
.hs-word { display: inline-block; }
.hs-char { display: inline-block; will-change: transform, opacity; }

.hs-float-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 22px;
  font-family: var(--hs-sans);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, .55);
}
.hs-float-meta span { display: inline-flex; align-items: center; gap: 10px; }
.hs-float-meta span::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--hs-gold-500);
}

.hs-scroll-hint {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 12;
  font-family: var(--hs-sans);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, .45);
  writing-mode: vertical-rl;
  pointer-events: none;
}
.hs-scroll-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 46px;
  margin: 14px auto 0;
  background: linear-gradient(to bottom, var(--hs-gold-500), transparent);
}
@media (max-width: 767px) { .hs-scroll-hint { display: none; } }

/* --------------------------------------------------------------------------
   4. Navigation pilule
   -------------------------------------------------------------------------- */
.hs-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--hs-sans);
}
.hs-logo {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(234, 215, 170, .3);
  background: var(--hs-purple-950);
  cursor: pointer;
  overflow: hidden;
}
.hs-logo svg { width: 24px; height: 24px; }
.hs-logo img { width: 34px; height: 34px; object-fit: contain; }

.hs-nav-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 50px;
  background: rgba(251, 247, 239, .1);
  border: 1px solid rgba(251, 247, 239, .12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}
.hs-pill {
  position: relative;
  display: inline-block;
  padding: 8px 24px;
  border: 0;
  border-radius: 50px;
  background: var(--hs-cream);
  color: var(--hs-purple-950);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}
.hs-pill-circle {
  position: absolute;
  left: 50%;
  bottom: -60%;
  width: 100%;
  aspect-ratio: 1;
  transform: translateX(-50%) scale(0);
  border-radius: 50%;
  background: var(--hs-purple-700);
  z-index: -1;
}
.hs-pill-labels { position: relative; display: block; overflow: hidden; }
.hs-pill-label { display: block; }
.hs-pill-label.is-alt {
  position: absolute;
  inset: 0;
  color: var(--hs-cream);
  transform: translateY(100%);
}

.hs-burger {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(251, 247, 239, .18);
  border-radius: 50%;
  background: rgba(251, 247, 239, .08);
  cursor: pointer;
}
.hs-burger i {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  background: var(--hs-cream);
  transition: transform .25s ease, opacity .25s ease;
}
.hs-burger.is-open i:first-child { transform: translateY(5.5px) rotate(45deg); }
.hs-burger.is-open i:last-child { transform: translateY(-5.5px) rotate(-45deg); }

.hs-mobile-menu {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 99;
  width: min(320px, calc(100% - 32px));
  padding: 10px;
  border-radius: 26px;
  border: 1px solid rgba(251, 247, 239, .14);
  background: rgba(22, 11, 28, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.hs-mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.hs-mobile-menu a {
  display: block;
  padding: 13px 16px;
  border-radius: 16px;
  color: var(--hs-cream);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hs-mobile-menu a:hover { background: rgba(95, 42, 132, .5); }

@media (max-width: 767px) {
  .hs-nav-bar { display: none; }
  .hs-burger { display: block; }
  .hs-nav { top: 16px; }
}

/* --------------------------------------------------------------------------
   5. Panneau de verre
   -------------------------------------------------------------------------- */
.hs-panel-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  perspective: 1000px;
  pointer-events: none;
}
.hs-panel {
  pointer-events: auto;
  width: 100%;
  max-width: 1180px;
  height: 900px;
  max-height: 85vh;
  margin-bottom: 2rem;
  padding: clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  border-radius: 38px;
  border: 1px solid rgba(234, 215, 170, .16);
  background-color: rgba(22, 11, 28, .3);
  backdrop-filter: blur(160px);
  -webkit-backdrop-filter: blur(160px);
  box-shadow: 0 40px 120px rgba(10, 4, 14, .5);
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
}
@supports not (backdrop-filter: blur(10px)) {
  .hs-panel { background-color: rgba(22, 11, 28, .88); }
}

.hs-panel-eyebrow {
  font-family: var(--hs-serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(251, 247, 239, .7);
  text-align: center;
  margin: 0 0 auto;
}
.hs-panel h2 {
  font-family: var(--hs-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 84px);
  line-height: 1.08;
  letter-spacing: -.035em;
  color: var(--hs-cream);
  max-width: 1000px;
  margin: 0 auto;
  text-wrap: balance;
}
.hs-panel h2 em { font-style: italic; color: var(--hs-gold-300); }

.hs-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: clamp(24px, 4vh, 44px) auto auto;
}
.hs-btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--hs-sans);
  font-weight: 850;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.hs-btn:hover { transform: translateY(-2px); }
.hs-btn-gold { background: var(--hs-gold-500); color: var(--hs-purple-950); }
.hs-btn-ghost { border-color: rgba(251, 247, 239, .28); color: var(--hs-cream); }
.hs-btn-ghost:hover { background: rgba(251, 247, 239, .1); }

.hs-marquee {
  margin: clamp(24px, 4vh, 40px) calc(clamp(28px, 5vw, 72px) * -1) calc(clamp(28px, 5vw, 72px) * -1);
  padding-top: 22px;
  border-top: 1px solid rgba(251, 247, 239, .1);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hs-marquee-track {
  display: flex;
  width: max-content;
  animation: hs-marquee 26s linear infinite;
}
.hs-marquee span {
  padding: 0 32px;
  font-family: var(--hs-sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hs-cream);
  opacity: .4;
  transition: opacity .3s ease;
  white-space: nowrap;
}
.hs-marquee:hover span { opacity: 1; }
@keyframes hs-marquee { to { transform: translateX(-50%); } }

/* En-tête classique masqué sur l'accueil : la nav pilule le remplace */
body.home .site-header { display: none; }

/* --------------------------------------------------------------------------
   6. Suite du site : passe au-dessus du canvas fixe
   -------------------------------------------------------------------------- */
.hs-after {
  position: relative;
  z-index: 30;
  background: var(--cream, #fbf7ef);
}

/* --------------------------------------------------------------------------
   7. Mouvement réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hs-curtain { display: none; }
  .hs-marquee-track { animation: none; }
  .hs-char { opacity: 1 !important; transform: none !important; }
  .hs-scroll-hint { display: none; }
  .hero-scroll { height: auto; }
  .hs-stage, .hs-float { position: absolute; }
  .hs-float { position: relative; min-height: 70vh; }
  .hs-panel-wrap { position: relative; transform: none !important; }
  .hs-panel { transform: none !important; }
}
