/* Section accueil : accroche, portrait, bandeau de chiffres, ruban — porté de docs/handoff/preview/index.html:25-46,120-211 */

/* Projecteur : quadrillage ambre révélé autour du pointeur (--mx / --my posés par hero.js) */
.spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(242 169 59 / 55%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(242 169 59 / 55%) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: -1px -1px;
  mask-image: radial-gradient(circle 300px at var(--mx) var(--my), #000 0%, transparent 100%);
}

.hero-grille {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(48px, 6vw, 72px);
  padding: clamp(48px, 7vw, 128px) var(--pad-lateral) clamp(40px, 5vw, 96px);
}

.hero-texte {
  display: flex;
  flex: 999 1 560px;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.hero-bandeau {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--bordure-portrait);
  font-family: var(--police-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-corps-sombre);
  background: rgb(12 16 22 / 70%);
}

.live {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--ambre);
}

.live::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ambre);
  animation: pulse 1.8s ease-out infinite;
}

.hero-rotatif {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-family: var(--police-titre);
  font-size: clamp(18px, 1.9vw, 38px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-rotatif-prefixe {
  color: var(--texte-tertiaire-sombre);
}

.hero-rotatif-fenetre {
  display: inline-block;
  height: 1.3em;
  overflow: hidden;
  vertical-align: bottom;
}

.slot {
  display: flex;
  flex-direction: column;
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}

.slot > span {
  height: 1.3em;
  line-height: 1.3em;
  white-space: nowrap;
  color: var(--ambre);
}

.caret {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 6px;
  vertical-align: -0.12em;
  background: var(--ambre);
  animation: blink 1s steps(1) infinite;
}

.hero-sous-titre {
  max-width: 42em;
  margin: 0;
  font-size: clamp(16px, 1.1vw, 22px);
  line-height: 1.65;
  color: var(--texte-sous-titre-sombre);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Portrait en analyse */
.hero-portrait {
  position: relative;
  flex: 1 1 360px;
  min-width: 0;
  max-width: clamp(360px, 26vw, 600px);
  margin: 0 auto;
  padding: 28px 0;
}

.portrait-cadre {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--bordure-portrait);
  background: var(--fond-portrait);
}

.portrait-cadre img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}

.portrait-voile {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgb(12 16 22 / 55%) 0%, rgb(12 16 22 / 0%) 45%);
}

.scan {
  position: absolute;
  right: 0;
  left: 0;
  height: 90px;
  pointer-events: none;
  border-bottom: 2px solid rgb(242 169 59 / 90%);
  background: rgb(242 169 59 / 10%);
  animation: scan 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.portrait-legende {
  position: absolute;
  font-family: var(--police-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.portrait-legende--haut {
  top: 12px;
  left: 14px;
  color: var(--texte-corps-sombre);
}

.portrait-legende--bas {
  right: 14px;
  bottom: 12px;
  color: var(--ambre);
}

.coin {
  position: absolute;
  width: 26px;
  height: 26px;
}

.coin--hg {
  top: 19px;
  left: -9px;
  border-top: 2px solid var(--ambre);
  border-left: 2px solid var(--ambre);
}

.coin--hd {
  top: 19px;
  right: -9px;
  border-top: 2px solid var(--ambre);
  border-right: 2px solid var(--ambre);
}

.coin--bg {
  bottom: 19px;
  left: -9px;
  border-bottom: 2px solid var(--ambre);
  border-left: 2px solid var(--ambre);
}

.coin--bd {
  right: -9px;
  bottom: 19px;
  border-right: 2px solid var(--ambre);
  border-bottom: 2px solid var(--ambre);
}

.tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--bordure-sombre);
  font-family: var(--police-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--texte-sur-sombre);
  background: var(--encre);
  animation: floaty 5s ease-in-out infinite;
}

.tag i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--ambre);
}

.tag--1 {
  top: 14%;
  left: -64px;
  animation-delay: 0s;
}

.tag--2 {
  top: 38%;
  right: -56px;
  animation-delay: -1.2s;
}

.tag--3 {
  top: 62%;
  left: -44px;
  animation-delay: -2.4s;
}

.tag--4 {
  right: -40px;
  bottom: 9%;
  animation-delay: -3.6s;
}

/* Bandeau de chiffres */
.hero-chiffres {
  position: relative;
  border-top: 1px solid var(--separateur-sombre);
  background: rgb(8 11 16 / 85%);
}

.chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 var(--pad-lateral);
  list-style: none;
}

.chiffre {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 24px 32px 0;
  border-bottom: 1px solid var(--separateur-sombre);
}

.chiffre-valeur {
  font-family: var(--police-titre);
  font-size: clamp(44px, 4vw, 88px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ambre);
}

.chiffre-valeur--texte {
  padding-top: 10px;
  font-size: clamp(30px, 2.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.chiffre-libelle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--texte-corps-sombre);
}

/* Ruban défilant */
.marquee-wrap {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--separateur-sombre);
  color: var(--encre);
  background: var(--ambre);
}

.marquee {
  display: flex;
  width: max-content;
  font-family: var(--police-titre);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
}

.marquee-wrap:hover .marquee {
  animation-play-state: paused;
}

.marquee-groupe {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes scan {
  0% {
    top: -12%;
  }

  100% {
    top: 104%;
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2.5);
  }
}

.rise {
  opacity: 0;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.d1 {
  animation-delay: 0.05s;
}

.d3 {
  animation-delay: 0.32s;
}

.d4 {
  animation-delay: 0.46s;
}

.d5 {
  animation-delay: 0.6s;
}

.d6 {
  animation-delay: 0.75s;
}

.reveal {
  animation: reveal 1.1s cubic-bezier(0.7, 0, 0.2, 1) 0.25s both;
}

@media (width <= 720px) {
  .tag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rise,
  .reveal {
    animation: none;
    opacity: 1;
    clip-path: none;
  }

  .scan,
  .tag,
  .marquee,
  .caret,
  .live::after {
    animation: none;
  }

  .slot {
    transition: none;
  }

  .spot {
    display: none;
  }
}
