/* ============================================================================
 * HERO + BANDE PREUVE — Swiss
 * ========================================================================= */

/* — Header minimal — */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  padding-block: var(--s-3);
}
/* scrim dégradé sous le header : garantit un fond sombre derrière le logo
   blanc + le CTA, même sur les passages clairs de la vidéo hero.
   Sans z-index négatif (qui créerait un stacking context renvoyant le
   header derrière la vidéo) : le scrim s'empile naturellement dans .nav. */
.nav::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  background: linear-gradient(
    to bottom,
    rgba(17, 19, 22, 0.55) 0%,
    rgba(17, 19, 22, 0.25) 55%,
    rgba(17, 19, 22, 0) 100%
  );
  pointer-events: none;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.nav__logo {
  height: 96px;
  width: auto;
  /* logo bicolore (texte blanc + flèche or), posé sur la vidéo hero.
     Glow doux + ombre portée : détache le logo du fond et le rend
     plus lumineux/net même sur les passages clairs de la vidéo. */
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.35))
    drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55)) brightness(1.06);
}
@media (max-width: 640px) {
  .nav__logo {
    height: 64px;
  }
}
.nav__cta {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 10px 18px;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}
.nav__cta:hover {
  background: var(--paper);
  color: var(--ink);
}

/* — Hero — */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  /* Débordement VERTICAL uniquement (haut/bas) pour absorber le translate de
     parallaxe sans bord noir. Latéralement = 0 pour ne pas créer d'overflow
     horizontal de la section (la parallaxe ne bouge que sur l'axe Y). */
  inset: -8% 0 -22% 0;
  z-index: 0;
  overflow: hidden; /* borne tout débordement d'enfant (vidéo/Ken Burns) */
  /* contexte de blend isolé : le duotone ne déborde pas sur le reste */
  isolation: isolate;
}
.hero__media img,
.hero__media .hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
/* La vidéo bouge déjà par elle-même : pas de scale (qui créerait un overflow). */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img {
    animation: kenburns 22s ease-in-out 1.1s infinite alternate;
    transform-origin: 60% 40%;
  }
  @keyframes kenburns {
    from {
      transform: scale(1.04) translate(0, 0);
    }
    to {
      transform: scale(1.12) translate(-1.5%, -1%);
    }
  }
}
/* ── Duotone rouge/ink ──────────────────────────────────────────────
   La photo passe en N&B contrasté, puis 2 couches blend projettent
   le bichrome : ombres ink (#111316), hautes lumières rouge course.
   Masque le flou + contraste maximal pour le texte blanc. */
.hero__media--duotone img {
  filter: grayscale(1) contrast(1.18) brightness(0.92);
}
.hero__duo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
/* Ombres → ink : 'lighten' laisse passer le clair, plaque l'ink sur le sombre */
.hero__duo--shadow {
  background: #14171b;
  mix-blend-mode: lighten;
}
/* Hautes lumières → bleu : 'multiply' teinte les clairs vers le bleu de marque */
.hero__duo--light {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  mix-blend-mode: multiply;
  opacity: 0.62;
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2; /* voile lisibilité au-dessus du duotone */
  background:
    linear-gradient(
      105deg,
      rgba(17, 19, 22, 0.78) 0%,
      rgba(17, 19, 22, 0.45) 42%,
      rgba(17, 19, 22, 0) 72%
    ),
    linear-gradient(
      180deg,
      rgba(17, 19, 22, 0.4) 0%,
      rgba(17, 19, 22, 0.15) 35%,
      rgba(17, 19, 22, 0.85) 100%
    );
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--s-7) var(--s-6);
}
.hero__label {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--s-3);
}
.hero__title {
  font-size: var(--t-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__sub {
  margin-top: var(--s-3);
  font-size: var(--t-lead);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  max-width: 52ch;
}
.hero__actions {
  margin-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* CTA principal — bleu de marque plein, flèche animée, lift au survol */
.hero .btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px rgba(11, 92, 171, 0.65);
}
.hero .btn--primary .arrow {
  display: inline-block;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero .btn--primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px rgba(11, 92, 171, 0.75);
}
.hero .btn--primary:hover .arrow {
  transform: translateX(5px);
}

/* CTA secondaire — outline clair, fond léger au survol */
.hero .btn--ghost {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
}
.hero .btn--ghost:hover {
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-2px);
}

/* — Titre : chaque LIGNE claque depuis un masque, avec overshoot « boom » — */
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-block: 0.02em; /* évite le clip des jambages */
}
.hero__title .line__in {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__title .line__in {
    transform: translateY(115%) rotate(2deg);
    opacity: 0;
    /* overshoot punchy : back-out qui dépasse puis revient = effet boom */
    animation: lineBoom 720ms cubic-bezier(0.16, 1.18, 0.3, 1) forwards;
  }
  .hero__title .line:nth-child(1) .line__in {
    animation-delay: 1120ms;
  }
  .hero__title .line:nth-child(2) .line__in {
    animation-delay: 1280ms;
  }
  .hero__title .line:nth-child(3) .line__in {
    animation-delay: 1440ms;
  }
  @keyframes lineBoom {
    to {
      transform: translateY(0) rotate(0);
      opacity: 1;
    }
  }

  /* Label / sous-titre / CTA : fade-up doux, après le titre */
  .hero__label,
  .hero__sub,
  .hero__actions {
    opacity: 0;
    transform: translateY(16px);
    animation: heroIn 640ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
  }
  .hero__label {
    animation-delay: 1040ms;
  }
  .hero__sub {
    animation-delay: 1620ms;
  }
  .hero__actions {
    animation-delay: 1760ms;
  }
  @keyframes heroIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* — Bande de preuve chiffrée (filets noirs Swiss) — */
.proof {
  border-block: 1px solid var(--line-strong);
}
.proof__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.proof__item {
  padding: var(--s-5) var(--s-3);
  border-left: 1px solid var(--line);
}
.proof__item:first-child {
  border-left: 0;
}
.proof__num {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; /* chiffres alignés pendant le comptage */
}
.proof__suffix {
  font-size: 0.5em;
  font-weight: 600;
  margin-left: 0.05em;
  color: var(--ink-3);
}
.proof__unit {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: var(--s-2);
}

@media (max-width: 720px) {
  .proof__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .proof__item:nth-child(3) {
    border-left: 0;
  }
  .proof__item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 380px) {
  .hero__title {
    font-size: clamp(2.25rem, 9vw, 3rem);
  }
}
