/* ============================================================
   ECOCLIM — Hero Section
   ============================================================ */

.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 55fr 45fr;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* --- Left: Content --- */
.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl) var(--container-pad) var(--space-2xl) var(--container-pad);
  padding-left: max(var(--container-pad), calc((100vw - var(--container-max)) / 2 + var(--container-pad)));
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero__headline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.hero__headline-line {
  display: block;
  overflow: hidden;
}

.hero__headline-word {
  display: inline-block;
}

.hero__headline em {
  font-style: normal;
  color: var(--accent);
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.6;
  max-width: 460px;
  margin-bottom: var(--space-xl);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

/* --- Right: Image --- */
.hero__visual {
  position: relative;
  overflow: hidden;
  animation: hero-slide-in 0.9s 0.4s both cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hero-slide-in {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__visual-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--bg-base) 100%);
  z-index: 1;
}

/* Fallback gradient when no video */
.hero__visual-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 60% 40%, rgba(74, 124, 89, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(4, 124, 14, 0.18) 0%, transparent 50%),
    var(--bg-surface);
}

/* --- Marquee Band --- */
.hero__marquee-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  border-top: 1px solid var(--border);
  background-color: rgba(15, 17, 14, 0.7);
  backdrop-filter: blur(8px);
  overflow: hidden;
  height: 44px;
}

.hero__marquee {
  display: flex;
  gap: var(--space-2xl);
  white-space: nowrap;
  animation: marquee-scroll 35s linear infinite;
  width: max-content;
}

.hero__marquee-wrap:hover .hero__marquee {
  animation-direction: reverse;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.hero__marquee-item {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.7;
  padding-block: 13px;
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.hero__marquee-item::after {
  content: '·';
  color: var(--text-tertiary);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero__visual {
    position: absolute;
    inset: 0;
    z-index: 0;        /* crée un contexte d'empilement isolé */
    opacity: 1;
    transform: none;
    animation: none;
  }

  /* Overlay sombre — à l'intérieur du contexte de .hero__visual */
  .hero__visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, 0.70);
    z-index: 1;
  }

  .hero__content {
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
    min-height: 100dvh;
    position: relative;
    z-index: 2;        /* au-dessus de .hero__visual (z-index:0) */
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
