/* Vidéo d'accueil : grande carte arrondie (hauteur réglable, 75 % de l'écran par défaut), PC et téléphone.
   Grand titre + mot en italique, phrase, bouton, carte « clients » et bouton rond « défiler » : tout est facultatif. */

[section="video-hero"] {
  --hero-tint: #000;
  --hero-ink: var(--lux-ivory);

  position: relative;
  width: 100%;
  margin-block-end: 40px; /* place pour le bouton rond qui dépasse sous la vidéo */
}

[section="video-hero"][data-tone="dark"] {
  --hero-tint: #fff;
  --hero-ink: var(--fm-ink);
}

[section="video-hero"] .video-box {
  position: relative;
  width: 100%;
  height: calc(var(--hero-h, 75) * 1vh);   /* repli pour anciens navigateurs */
  height: calc(var(--hero-h, 75) * 1svh);  /* même avec la barre d'adresse mobile */
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background-color: var(--color-surface-container);
}

[section="video-hero"] video,
[section="video-hero"] img.hero-fill,
[section="video-hero"] .video-box > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Vidéo mobile uniquement si une vidéo différente est fournie */
[section="video-hero"] .video-mobile { display: none; }

[section="video-hero"] .video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-24);
  color: var(--color-on-surface-variant);
}

/* ---------- Texte par-dessus ---------- */
[section="video-hero"] .video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--spacing-24);
  padding: clamp(20px, 3.2vw, 52px);
  color: var(--hero-ink);
  background:
    linear-gradient(to top, color-mix(in srgb, var(--hero-tint) 38%, transparent), transparent 55%),
    color-mix(in srgb, var(--hero-tint) var(--hero-overlay, 20%), transparent);
}

/* Grand titre : le mot en italique se pose en haut à droite, au-dessus de la dernière lettre */
[section="video-hero"] .hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-weight: 400;
  text-align: center;
}

[section="video-hero"] .hero-title-main {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--hero-title-size, 17vw);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

[section="video-hero"] .hero-title-accent {
  align-self: flex-end;
  order: -1;
  margin-block-end: -0.1em;
  margin-inline-end: 4%;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: calc(var(--hero-title-size, 17vw) * 0.3);
  line-height: 1;
}

[section="video-hero"] .hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--spacing-24);
  margin-block-start: auto;
}

[section="video-hero"] .video-content {
  display: grid;
  gap: var(--spacing-24);
  justify-items: start;
  max-width: 420px;
}

[section="video-hero"] .video-content .description {
  font: 400 clamp(19px, 1.7vw, 24px) / 1.25 var(--font-display);
  text-wrap: balance;
}

[section="video-hero"][data-tone="light"] .video-content .fm-cta--solid {
  color: var(--fm-ink);
  background: var(--lux-ivory);
}

[section="video-hero"][data-tone="light"] .video-content .fm-cta--solid:hover,
[section="video-hero"][data-tone="light"] .video-content .fm-cta--solid:active,
[section="video-hero"][data-tone="light"] .video-content .fm-cta--solid:focus-visible {
  color: var(--lux-ivory);
  background: var(--fm-ink);
}

/* ---------- Carte « clients » ---------- */
[section="video-hero"] .hero-proof {
  display: grid;
  gap: var(--spacing-4);
  justify-items: center;
  min-width: 220px;
  padding: var(--spacing-16) var(--spacing-24);
  border-radius: var(--radius-md);
  color: var(--fm-ink);
  background: color-mix(in srgb, var(--fm-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: center;
}

[section="video-hero"] .proof-faces {
  display: flex;
  margin-block-end: var(--spacing-4);
}

[section="video-hero"] .proof-faces img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-circled);
  border: 2px solid var(--fm-bg);
}

[section="video-hero"] .proof-faces img + img {
  margin-inline-start: -12px;
}

[section="video-hero"] .proof-number {
  font: 400 36px/1 var(--font-display);
}

[section="video-hero"] .proof-text {
  font: var(--font-body-sm);
  text-wrap: balance;
}

/* ---------- Bouton rond « défiler » : dépasse sous la vidéo, entouré d'une découpe couleur du fond ---------- */
[section="video-hero"] .scroll-down {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-end: -38px;
  z-index: 2;
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: none;
  border-radius: var(--radius-circled);
  color: var(--fm-bg);
  background: var(--fm-ink);
  box-shadow: 0 0 0 10px var(--color-background);
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 12px;
  -webkit-tap-highlight-color: transparent;
}

[dir="rtl"] [section="video-hero"] .scroll-down {
  translate: 50% 0;
}

[section="video-hero"] .scroll-down:focus-visible {
  outline-color: var(--fm-ink);
}

@media (prefers-reduced-motion: no-preference) {
  [section="video-hero"] .scroll-down [ui-icon] {
    animation: hero-nudge 2.4s var(--lux-ease) infinite;
  }
}

@keyframes hero-nudge {
  0%, 60%, 100% { translate: 0 0; }
  30% { translate: 0 5px; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 769px) {
  [section="video-hero"] .video-box { border-radius: var(--radius-lg); min-height: 420px; }
  [section="video-hero"] .video-desktop:not(:only-of-type) { display: none; }
  [section="video-hero"] .video-mobile { display: block; }

  [section="video-hero"] .hero-title-main { font-size: min(var(--hero-title-size, 17vw), 26vw); }
  [section="video-hero"] .hero-title-accent { font-size: calc(min(var(--hero-title-size, 17vw), 26vw) * 0.34); }

  [section="video-hero"] .hero-bottom { flex-direction: column; align-items: flex-start; }
  [section="video-hero"] .video-content .description { font-size: 20px; }
  [section="video-hero"] .hero-proof { display: none; }

  [section="video-hero"] .scroll-down { width: 64px; height: 64px; inset-block-end: -32px; box-shadow: 0 0 0 8px var(--color-background); }
}
