/* ========================================
   ACCUEIL : IMAGE PRINCIPALE (maquette « L'architecture du vivant »)
   Image et textes réglés dans l'admin (Page d'accueil) : une image par format
   (ordinateur 1920 × 1080, tablette 1536 × 2048, mobile 1080 × 1920).
   Couleurs et polices : variables de site-header.css.
   ======================================== */
.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--site-header-h, 96px));
  min-height: calc(100svh - var(--site-header-h, 96px));
  overflow: hidden;
  background: var(--site-green-deep, #10201a);
  isolation: isolate;
}

.home-hero-media,
.home-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero-media {
  z-index: -2;
}

.home-hero-media img {
  object-fit: cover;
  object-position: center;
  animation: home-hero-zoom 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes home-hero-zoom {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
}

/* Fondu du bas de la photo vers le vert des cartes univers (aucune arête entre les deux) */
.home-hero::after {
  content: "";
  position: absolute;
  right: 0;
  /* Déborde d'un rien : aucune fraction de pixel de photo sous le dégradé */
  bottom: -2px;
  left: 0;
  z-index: -1;
  height: clamp(160px, 32%, 340px);
  /* Paliers progressifs : aucune bande visible même sur une photo claire */
  background: linear-gradient(180deg, rgba(16, 32, 26, 0) 0%, rgba(16, 32, 26, 0.12) 22%, rgba(16, 32, 26, 0.35) 45%, rgba(16, 32, 26, 0.66) 66%, rgba(16, 32, 26, 0.9) 82%, var(--site-green-deep, #10201a) 94%);
  pointer-events: none;
}

/* Pas de voile sur toute l'image (demande de Max) : une zone d'ombre douce, seulement derrière
   le bloc de textes (ellipse qui se fond dans la photo), plus une ombre portée sur les lettres */
.home-hero-content {
  --hero-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 14px rgba(0, 0, 0, 0.55);
  position: relative;
}

/* closest-side : l'ellipse s'efface entièrement avant les bords de son cadre (aucune arête visible) */
.home-hero-content::before {
  content: "";
  position: absolute;
  top: -22%;
  bottom: -22%;
  left: -22%;
  z-index: -1;
  width: min(1250px, 100%);
  background: radial-gradient(ellipse closest-side at 50% 50%,
    rgba(8, 16, 12, 0.8) 0%,
    rgba(8, 16, 12, 0.72) 40%,
    rgba(8, 16, 12, 0.42) 68%,
    rgba(8, 16, 12, 0.14) 87%,
    rgba(8, 16, 12, 0) 100%);
  pointer-events: none;
}

.home-hero .home-hero-title,
.home-hero .home-hero-title span,
.home-hero .home-hero-text,
.home-hero-universes a {
  text-shadow: var(--hero-shadow);
}

/* Points verts de la liste et bouton : ombre douce pour rester lisibles sur une photo claire */
.home-hero-universes li:not(:last-child)::after {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.home-hero-cta {
  box-shadow: 0 8px 26px -8px rgba(0, 0, 0, 0.65);
}

.home-hero-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) clamp(20px, 4vw, 56px);
}

.home-hero-content > * {
  max-width: 620px;
  animation: home-hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-hero-content > :nth-child(2) { animation-delay: 0.12s; }
.home-hero-content > :nth-child(3) { animation-delay: 0.22s; }
.home-hero-content > :nth-child(4) { animation-delay: 0.32s; }

@keyframes home-hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Titre serif sur deux lignes : blanc puis vert clair */
.home-hero .home-hero-title {
  margin: 0 0 22px;
  font-family: var(--site-serif);
  font-size: clamp(48px, 7vw, 102px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: #fff;
}

.home-hero .home-hero-title span {
  display: block;
  font-family: inherit;
  color: #fff;
}

.home-hero .home-hero-title .is-accent {
  color: var(--site-lime);
}

.home-hero .home-hero-text {
  margin: 0 0 26px;
  max-width: 470px;
  font-family: var(--site-sans);
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 300;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

/* Univers en capitales, séparés par un point vert */
.home-hero-universes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 0 0 32px;
  padding: 0;
  max-width: 480px;
  list-style: none;
}

.home-hero-universes li {
  display: inline-flex;
  align-items: center;
}

/* Point après chaque univers (sauf le dernier) : à la coupure de ligne, il reste en fin de ligne */
.home-hero-universes li:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin: 0 12px;
  border-radius: 50%;
  background: var(--site-lime);
}

.home-hero-universes a {
  font-family: var(--site-sans);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
}

.home-hero-universes a:hover {
  color: var(--site-lime);
}

/* Bouton pilule vert foncé */
.home-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 58px;
  padding: 0 30px 0 36px;
  font-family: var(--site-sans);
  font-size: 17px;
  font-weight: 400;
  color: #fff;
  background: rgba(16, 40, 24, 0.92);
  border: 1.5px solid rgba(157, 198, 107, 0.7);
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.home-hero-cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-hero-cta:hover {
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-color: var(--site-lime);
}

.home-hero-cta:hover svg {
  transform: translateX(4px);
}

.home-hero-cta:focus-visible,
.home-hero-universes a:focus-visible {
  outline: 2px solid var(--site-lime);
  outline-offset: 4px;
}

/* Tablette et mobile : premier écran = image principale + cartes univers, comme sur la maquette.
   Le bloc a la hauteur de l'écran (moins la barre) ; l'image prend la place laissée par les cartes.
   Textes et bouton réduits. */
@media (max-width: 1199px) {
  .home-top {
    display: flex;
    flex-direction: column;
    /* - 1px : bordure du bas de la barre de navigation */
    min-height: calc(100vh - var(--site-header-h, 76px) - 1px);
    min-height: calc(100svh - var(--site-header-h, 76px) - 1px);
  }

  .home-top .home-hero {
    flex: 1 1 auto;
    min-height: 0;
  }

  /* Photo plus courte : fondu proportionnellement plus haut */
  .home-hero::after {
    height: clamp(90px, 38%, 240px);
  }

  .home-hero-content {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .home-hero .home-hero-title {
    margin-bottom: 16px;
    font-size: clamp(38px, 6vw, 58px);
  }

  .home-hero .home-hero-text {
    max-width: 420px;
    margin-bottom: 18px;
    font-size: 15px;
  }

  .home-hero-universes {
    margin-bottom: 22px;
  }

  .home-hero-universes a {
    font-size: 12px;
  }

  .home-hero-cta {
    height: 46px;
    gap: 12px;
    padding: 0 22px 0 26px;
    font-size: 15px;
  }

  .home-hero-cta svg {
    width: 17px;
    height: 17px;
  }
}

/* Tablette et mobile en portrait : textes en bas de l'image, zone d'ombre recentrée sur eux */
@media (max-width: 1199px) and (orientation: portrait) {
  .home-hero {
    align-items: flex-end;
  }

  .home-hero-content::before {
    top: -30%;
    bottom: -30%;
    left: -30%;
    width: 160%;
  }
}

@media (max-width: 575px) {
  .home-hero .home-hero-title {
    margin-bottom: 12px;
    font-size: 34px;
  }

  .home-hero .home-hero-text {
    margin-bottom: 14px;
    font-size: 13.5px;
    line-height: 1.45;
  }

  .home-hero-universes {
    margin-bottom: 18px;
  }

  .home-hero-universes a {
    font-size: 10.5px;
    letter-spacing: 0.08em;
  }

  .home-hero-universes li:not(:last-child)::after {
    width: 3px;
    height: 3px;
    margin: 0 7px;
  }

  .home-hero-cta {
    height: 42px;
    gap: 10px;
    padding: 0 18px 0 22px;
    font-size: 14px;
  }

  .home-hero-cta svg {
    width: 15px;
    height: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-media img,
  .home-hero-content > * {
    animation: none;
  }
}
