/* ======================================================================
   HERO — film, titre, bouton, bandeau des références
   Balisage : index.html, <section class="hero" id="accueil">
   Script   : sections/03-hero/hero.js
   ====================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--hero-sky-top, #cee8fb);
  isolation: isolate;
}

.hero-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 80px;
  pointer-events: none;
}

.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
  z-index: -2;
  pointer-events: none;
}

.hero-portrait {
  position: absolute;
  right: 0;
  bottom: -1%;
  width: min(63cqh, max(35.7cqw, 57cqh), 52cqw);
  aspect-ratio: 9 / 16;
}

/* The sky comes from the film's own left edge, stretched across the hero on the film's
   vertical scale. ::before is that edge smoothed into an even gradient; ::after is the
   exact edge, full strength against the film and dissolving leftwards: no seam, no fade
   on the film itself. Both run underneath it. */
.hero-portrait::before,
.hero-portrait::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
}

.hero-portrait::before {
  width: 100cqw;
  background: var(--hero-sky-base, url('../../assets/hero/hero-sky-base.png')) center / 100% 100% no-repeat;
}

.hero-portrait::after {
  width: calc(100% + 46cqw);
  background: var(--hero-sky-side, url('../../assets/hero/hero-sky-side.png')) center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgb(0 0 0 / .12) 14cqw, rgb(0 0 0 / .5) 32cqw, #000 46cqw);
  mask-image: linear-gradient(to right, transparent 0, rgb(0 0 0 / .12) 14cqw, rgb(0 0 0 / .5) 32cqw, #000 46cqw);
}

.hero-portrait video,
.hero-film {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The film is painted on this canvas (poster until the first frame), so the film
   and the sky sampled from it go through the same colour pipeline in every browser. */
.hero-film {
  background: url('../../assets/hero/hero-film-poster.webp') center / 100% 100% no-repeat;
}

.hero-film[hidden] { display: none; }

/* The foot of the hero settles into the navy the next section is painted with. The sky
   already ends on that navy, so only the cropped jacket changes: no cut line is left. */
.hero-art::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 13%;
  z-index: 2;
  background: var(--hero-sky-bottom, #002565);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgb(0 0 0 / .14) 30%, rgb(0 0 0 / .52) 62%, rgb(0 0 0 / .86) 86%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, rgb(0 0 0 / .14) 30%, rgb(0 0 0 / .52) 62%, rgb(0 0 0 / .86) 86%, #000 100%);
}

.hero-motion-toggle {
  position: absolute;
  right: max(18px, 3vw);
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 50%;
  color: white;
  background: rgba(8,44,92,.66);
}

.hero-motion-toggle[hidden],
.hero-motion-toggle[aria-pressed="true"] .pause-icon,
.hero-motion-toggle[aria-pressed="false"] .play-icon {
  display: none;
}

@media (min-width: 721px) and (max-aspect-ratio: 4/3) {
  .hero { min-height: max(640px, 72vw); }
}

.hero-main {
  padding-top: clamp(128px, 17.5vh, 166px);
  padding-bottom: 24px;
}

.hero-copy {
  max-width: min(660px, 47vw);
}

/* The launch offer and the main button share one look: an oval pill in
   the site's pink with white bold text. The button is the larger of the two. */
.hero-offer {
  margin-bottom: clamp(20px, 3vh, 30px);
}

.hero-offer-tag,
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: var(--peach);
  color: #FFFFFF;
  font-weight: 600;
  line-height: 1;
}

.hero-offer-tag {
  padding: 10px 22px;
  font-size: 15.5px;
}

/* Title after the "Code Pro" reference: all capitals in a geometric sans, line one
   light, line two regular. Line two is scaled by the ratio of the two natural widths
   (measured in the browser with Outfit), so both lines run to exactly the same width. */
.hero-title {
  --hero-line: clamp(40px, 6.6vw, 104px);
  --hero-line-ratio: 0.7947; /* line 1 at weight 100 ÷ line 2 at weight 500 */
  font-family: 'Outfit', 'Avenir Next', 'Century Gothic', sans-serif;
  font-variant-numeric: lining-nums;
  text-transform: uppercase;
  color: var(--ink-dark);
}

.hero-title span,
.hero-title em {
  display: block;
  white-space: nowrap;
  font-style: normal;
  letter-spacing: 0;
}

.hero-title span {
  font-size: var(--hero-line);
  font-weight: 100;
  line-height: 0.9;
}

.hero-title em {
  margin-top: 0.05em;
  font-size: calc(var(--hero-line) * var(--hero-line-ratio));
  font-weight: 500;
  line-height: 1;
}

.hero-lead {
  margin-top: clamp(24px, 3.2vh, 34px);
  max-width: 540px;
  font-size: clamp(15px, 1.24vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-body);
}

.hero-lead strong {
  font-weight: 600;
  color: var(--ink-dark);
}

.hero-cta-wrap {
  margin-top: clamp(28px, 4vh, 38px);
}

/* Accent CTA button using Card 3 Peach (#FEA374) */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 46px;
  border-radius: 9px;
  background-color: var(--peach);
  color: #FFFFFF;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  box-shadow:
    0 2px 4px rgba(9, 49, 98, 0.12),
    0 14px 28px rgba(9, 49, 98, 0.24);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-accent:hover {
  background-color: var(--peach-hover);
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(25, 47, 84, 0.16),
    0 18px 34px rgba(25, 47, 84, 0.28);
}

.hero-cta {
  gap: 12px;
  min-height: 54px;
  padding: 0 30px 0 34px;
  border: 0;
  font-family: inherit;
  font-size: 17px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  background-color: var(--peach-hover);
  transform: translateY(-2px);
}

.hero-cta svg { transition: transform 0.2s ease; }
.hero-cta:hover svg { transform: translateX(4px); }

.hero-cta:focus-visible {
  outline: 2px solid var(--ink-dark);
  outline-offset: 4px;
}

.hero-bottom {
  padding-bottom: clamp(36px, 6.4vh, 64px);
}

/* References: one ruled line, caption on the left, marks on the right. */
.hero-refs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 40px;
  max-width: min(720px, 52vw);
  padding-top: 22px;
  border-top: 1px solid rgba(237, 241, 253, 0.28);
}

.tools-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(237, 241, 253, 0.88);
}

.tools-logos {
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.6vw, 38px);
  list-style: none;
  color: #FFFFFF;
}

.tool-item svg {
  display: block;
  width: 30px;
  height: 30px;
}
