/* ============================================================
   HERO.CSS — Plein écran, Ken Burns, overlay intelligent
   ============================================================ */

.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--dark); /* évite tout flash blanc avant chargement */
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--duration-slow, 1.6s) var(--ease-slow);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.08);
}

/* Ken Burns : zoom très lent, imperceptible, jamais de retour brusque */
.hero-slide.ken-burns .hero-slide-img {
  animation: kenburns 14s ease-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1.08); }
  to   { transform: scale(1.16); }
}

/* Overlay dont l'intensité s'ajuste selon la luminosité analysée de la photo */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 15, 0.5) 0%,
    rgba(5, 8, 15, 0.28) 40%,
    rgba(5, 8, 15, 0.4) 70%,
    rgba(5, 8, 15, 0.78) 100%
  );
  transition: background 0.8s ease;
}

/* Photo plutôt sombre : overlay allégé, le texte reste lisible naturellement */
.hero-overlay.overlay--dark-photo {
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 15, 0.35) 0%,
    rgba(5, 8, 15, 0.15) 40%,
    rgba(5, 8, 15, 0.3) 70%,
    rgba(5, 8, 15, 0.7) 100%
  );
}

/* Photo claire : overlay renforcé pour garantir le contraste du texte blanc */
.hero-overlay.overlay--light-photo {
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 15, 0.6) 0%,
    rgba(5, 8, 15, 0.42) 40%,
    rgba(5, 8, 15, 0.5) 70%,
    rgba(5, 8, 15, 0.82) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 2rem;
  max-width: 920px;
  animation: fadeUp 1.4s var(--ease-slow) 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.hero-title span {
  display: block;
  font-weight: 300;
  font-style: italic;
  color: var(--gold-light);
  font-size: 0.85em;
  margin-top: 0.15em;
}

.hero-subtitle {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.hero-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Indicateurs (points de pagination) ---- */
.hero-indicators {
  position: absolute;
  z-index: 3;
  bottom: 2.75rem;
  right: 2.5rem;
  display: flex;
  gap: 0.6rem;
}

.hero-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.3s ease, transform 0.3s ease;
}

.hero-indicator.is-active {
  background: var(--gold);
  transform: scale(1.25);
}

/* ---- Indice de défilement ---- */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.7;
  animation: fadeUp 1.4s var(--ease-slow) 1.2s both;
}

.scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@media (max-width: 900px) {
  .hero-content { padding: 0 1.5rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; }
  .hero-indicators { right: 50%; transform: translateX(50%); bottom: 2rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.6rem; }
  .hero-subtitle { font-size: 0.7rem; letter-spacing: 0.1em; }
}
