/* ============================================================
   HERO — fullscreen, contenu en bas
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Le contenu occupe toute la hauteur — eyebrow haut, titre bas */
  justify-content: flex-start;
}

/* Tous les enfants sauf .hero-content sont absolus */
.hero-media,
.hero-scroll-hint,
.hero-countdown {
  position: absolute;
}

/* ---- Médias ---- */
.hero-media { inset: 0; z-index: 0; }

/* Image poster — toujours visible, s'efface quand la vidéo joue */
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 1;
  transition: opacity 0.6s ease;
}
.hero-poster.hidden { opacity: 0; }

/* Vidéo — invisible au départ, apparaît quand prête */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-video.playing { opacity: 1; }

.hero-fallback-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-fallback-bg {
  width: 100%; height: 100%;
  background: radial-gradient(ellipse 140% 100% at 65% 30%,
    #0d2a4e 0%, #060d18 60%, #080a0d 100%);
}

/* ---- Overlays ---- */
.hero-overlay-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 75%;
  background: linear-gradient(to top, var(--c-black) 0%, rgba(8,10,13,0.6) 50%, transparent 100%);
}
.hero-overlay-left {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 55%;
  background: linear-gradient(to right, rgba(8,10,13,0.7) 0%, transparent 100%);
}
.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
}

/* ---- Contenu — seul élément dans le flux ---- */
.hero-content {
  position: relative;
  z-index: 2;
  /* Prend toute la hauteur du hero */
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(90px + 24px) clamp(20px, 5vw, 80px) clamp(48px, 7vw, 100px);
  max-width: 900px;
}

/* Eyebrow colle juste sous la nav */
.hero-main {
  margin-top: auto; /* Pousse titre+tagline+CTA vers le bas */
}

/* ---- Eyebrow ---- */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0; /* pas de marge — hero-main s'en charge via margin-top:auto */
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-eyebrow-line {
  display: block;
  width: 40px; height: 1px;
  background: var(--c-blue);
}

/* ---- Bloc titre/CTA poussé vers le bas ---- */
.hero-main {
  margin-top: auto;
}

/* ---- Titre ---- */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 110px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

/* AINA — rectangle teal derrière */
.hero-title-first {
  display: inline-block;
  color: var(--c-white);
  background: rgb(2, 104, 111);
  padding: 0 14px 6px 4px;
  line-height: 1;
  margin-left: -4px;
}

/* BAUZA ROIG — même police/taille, fill teal + contour blanc */
.hero-title-last {
  display: block;
  color: rgba(2, 104, 111, 0.55);
  -webkit-text-stroke: 2px #f0f4f8;
  text-stroke: 2px #f0f4f8;
}

/* Ligne AINA BAUZA ROIG complète, très petite sous les titres */
.hero-title-full {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(160, 200, 255, 0.25);
  margin-top: 14px;
}

/* ---- Tagline ---- */
.hero-tagline {
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--c-muted);
  margin-top: 6px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.85s forwards;
}
.hero-tagline-route {
  display: block;
  color: rgba(58,143,255,0.8);
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.5vw, 18px);
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* ---- Actions ---- */
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.9s forwards;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--c-blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background 0.2s, transform 0.15s;
}
.btn-hero-primary:hover { background: #5aa3ff; transform: translateY(-2px); }

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border: 0.5px solid var(--c-border-2);
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-hero-secondary:hover { border-color: var(--c-blue); color: var(--c-white); }

/* ---- Scroll hint — absolu ---- */
.hero-scroll-hint {
  bottom: clamp(24px, 4vw, 48px);
  right: clamp(20px, 4vw, 60px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 1s ease 1.4s forwards;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--c-blue), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
.hero-scroll-hint span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--c-muted-2);
  writing-mode: vertical-rl;
}

/* ---- Countdown hero — absolu, bas gauche ---- */
.hero-countdown {
  bottom: clamp(24px, 4vw, 48px);
  left: clamp(20px, 5vw, 80px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.2s forwards;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1;
}
.countdown-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted-2);
  margin-top: 4px;
}
.countdown-sep {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--c-blue);
  margin-bottom: 14px;
  opacity: 0.6;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.8; }
  50%       { transform: scaleY(0.6); opacity: 0.4; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hero-countdown { display: none; }
  .hero-title-last { -webkit-text-stroke-width: 1px; }
}

/* ---- Nationalité sous le titre ---- */
.hero-nationality {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.65s forwards;
}
.hero-flag {
  font-size: 32px;
  line-height: 1;
}
.hero-country {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  color: var(--c-white);
  letter-spacing: 0.08em;
  line-height: 1;
}
.hero-separator {
  color: var(--c-muted-2);
  font-size: 22px;
}
.hero-class40-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
  background: rgb(126, 146, 239);
  border-radius: 10px;
  padding: 8px 12px;
}

/* ---- Race label ---- */
.hero-race-label {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(58,143,255,0.75);
  margin-top: 16px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.75s forwards;
}

/* Eyebrow secondaire — dans le hero-main, sous la nationalité */
.hero-eyebrow--inline {
  margin-top: 16px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.78s forwards;
}

/* Route du Rhum inline — avec trait bleu, espace au-dessus, collé au tagline */
.hero-race-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200,220,255,0.75);
  margin-top: 20px;
  margin-bottom: 0;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.75s forwards;
}
.hero-race-inline::before {
  content: '';
  display: block;
  width: 40px;
  height: 1.5px;
  background: var(--c-blue);
  flex-shrink: 0;
}

/* ============================================================
   SIGNATURE SVG INLINE — sans fond, tracé rouge animé
   ============================================================ */
.hero-signature {
  position: absolute;
  top: clamp(88px, 11vh, 120px);
  right: clamp(80px, 10vw, 180px);   /* assez à gauche */
  z-index: 3;
  pointer-events: none;
}
.hero-sig-svg {
  height: clamp(110px, 15vh, 170px);  /* grande */
  width: auto;
  overflow: visible;
}
@media (max-width: 600px) {
  .hero-signature { display: none; }
}

/* Textes sous le titre — alignés à droite */
.hero-nationality,
.hero-race-inline,
.hero-tagline,
.hero-actions {
  align-self: flex-end;
  text-align: right;
}
.hero-nationality {
  justify-content: flex-end;
}
.hero-actions {
  justify-content: flex-end;
}
