/* Ultima 2.0 — hero vidéo et slider éditorial. */

/* Cadre : la vidéo occupe tout le hero, le texte se superpose. */
.u2-hero--video {
  display: block;
  position: relative;
  margin: 0;
  border: 0;
  background: #171b16;
  color: #fff;
  min-height: min(88vh, 900px);
  overflow: hidden;
  isolation: isolate;
}

.u2-hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.u2-hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  background: #171b16;
}

.u2-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 24, 19, .34) 0%, rgba(20, 24, 19, .04) 38%, rgba(20, 24, 19, .88) 100%);
  pointer-events: none;
}

/* Slider : les slides se superposent dans la même cellule. */
.u2-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  pointer-events: none;
}

.u2-hero-slide {
  grid-area: 1 / 1;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 860px;
  padding: 0 var(--gutter) clamp(112px, 14vh, 168px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(22px);
  transition: opacity .55s var(--ease), transform .55s var(--ease), visibility .55s;
}

.u2-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.u2-hero-slide > * {
  pointer-events: auto;
}

.u2-hero-slide .u2-eyebrow {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, .82);
}

.u2-hero-slide h1,
.u2-hero-slide h2 {
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(48px, 6.2vw, 100px);
  line-height: .96;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.u2-hero-slide .u2-hero-deck {
  max-width: 380px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  line-height: 1.8;
}

.u2-hero-slide .u2-button {
  min-height: 50px;
  min-width: 220px;
  background: var(--chalk);
  color: var(--ink);
  border-color: var(--chalk);
}

.u2-hero-slide .u2-button:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

/* Commandes : précédent, pastilles, suivant, lecture. */
.u2-hero-controls {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: clamp(24px, 5vh, 48px);
  display: none;
  align-items: center;
  gap: 10px;
}

.u2-hero--ready .u2-hero-controls {
  display: flex;
}

.u2-hero-arrow,
.u2-hero-video-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(23, 27, 22, .35);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.u2-hero-arrow:hover,
.u2-hero-video-toggle:hover {
  background: var(--chalk);
  border-color: var(--chalk);
  color: var(--ink);
}

.u2-hero-arrow:focus-visible,
.u2-hero-video-toggle:focus-visible,
.u2-hero-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.u2-hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 6px;
}

.u2-hero-dot {
  width: 9px;
  height: 9px;
  min-height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  transition: background .2s, width .2s, border-radius .2s;
}

.u2-hero-dot.is-active {
  width: 26px;
  border-radius: 5px;
  background: #fff;
}

/* Icône lecture / pause, dessinée en CSS. */
.u2-hero-video-toggle > span {
  position: relative;
  display: block;
  width: 11px;
  height: 12px;
}

.u2-hero-video-toggle > span::before,
.u2-hero-video-toggle > span::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: currentColor;
}

.u2-hero-video-toggle > span::before {
  left: 0;
}

.u2-hero-video-toggle > span::after {
  right: 0;
}

.u2-hero-video-toggle.is-paused > span::before {
  left: 1px;
  top: 1px;
  bottom: auto;
  width: 0;
  height: 0;
  background: none;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.u2-hero-video-toggle.is-paused > span::after {
  display: none;
}

@media (max-width: 767px) {
  .u2-hero--video {
    min-height: 76vh;
  }

  .u2-hero-slide {
    padding-bottom: 118px;
  }
  .u2-hero-slide h1,
  .u2-hero-slide h2 {
    font-size: clamp(40px, 11vw, 60px);
    margin-bottom: 18px;
  }

  .u2-hero-slide .u2-hero-deck {
    max-width: 300px;
    margin-bottom: 24px;
    font-size: 13px;
  }

  .u2-hero-slide .u2-button {
    min-height: 48px;
  }

  .u2-hero-controls {
    bottom: 20px;
    gap: 8px;
  }

  .u2-hero-arrow,
  .u2-hero-video-toggle {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .u2-hero-slide {
    transition: none;
    transform: none;
  }
}
