/* Suniia — Hero Section */

/* Réinitialisation des couches Drupal/Olivero autour du bloc hero
   (.block, .block__content, .field__item ont padding et max-width qui cassent la pleine largeur) */
.hero-region .block,
.hero-region .block__content,
.hero-region .field,
.hero-region .field__item,
.hero-region .text-content {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =============================================
   Conteneur principal
   ============================================= */

.home-hero-split {
  position: relative;
  display: flex;
  flex-direction: column; /* Mobile : empilé */
  width: 100%;
  overflow: hidden;
}

/* =============================================
   Panneaux image — hauteur dictée par l'image
   ============================================= */

.hero-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--color-obsidian); /* Fond de secours si image ne charge pas */
}

.hero-panel img {
  display: block;
  width: 100%;
  height: auto; /* L'image détermine sa propre hauteur */
}

/* Voile dégradé sombre sur chaque panneau */
.hero-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(var(--color-obsidian-rgb), 0.25) 0%,
    rgba(var(--color-obsidian-rgb), 0.65) 100%
  );
  z-index: 1;
}

/* =============================================
   Overlay texte — centré, composition symétrique
   ============================================= */

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  pointer-events: none;
  /* Neutralise la couleur de lien Olivero dans toute la zone hero */
  --color-text-primary-medium: var(--color-pearl);
  --color--primary-40: var(--color-pearl);
}

/* Lumière ambiante de marque — halo magenta centré sous le bloc texte */
.hero-overlay::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -20%;
  transform: translateX(-50%);
  width: 70%;
  height: 120%;
  background: radial-gradient(ellipse at 50% 70%, rgba(var(--color-magenta-rgb), 0.11) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

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

/* =============================================
   Typographie
   ============================================= */

.hero-title {
  font-family: 'Playfair Display', 'Bodoni 72', Georgia, serif;
  font-size: clamp(2.8rem, 5.8vw, 6.2rem);
  font-weight: 800;
  color: var(--color-pearl);
  margin: 0 0 0.4em;
  letter-spacing: 0.05em;
  line-height: 1.1;
  hyphens: none;
  text-shadow: 0 2px 28px rgba(var(--color-black-rgb), 0.65);
}

.hero-subtitle {
  font-family: 'Playfair Display', 'Bodoni 72', Georgia, serif;
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(var(--color-champagne-rgb), 0.72);
  margin: 0 0 2.5rem;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 12px rgba(var(--color-obsidian-rgb), 0.55);
}

/* =============================================
   Boutons CTA
   ============================================= */

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Sélecteur étendu — contourne les règles de lien Olivero (a = 0-0-1, .hero-overlay a.hero-btn = 0-1-2) */
.hero-overlay a.hero-btn {
  display: inline-block;
  padding: 13px 38px;
  background: var(--color-magenta);
  color: var(--color-pearl);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: filter 0.2s;
  animation: hero-halo 3s ease-in-out infinite;
}

.hero-overlay a.hero-btn:hover {
  filter: brightness(0.85);
  color: var(--color-pearl);
}

.hero-overlay a.hero-btn--ghost {
  background: rgba(var(--color-obsidian-rgb), 0.40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(var(--color-champagne-rgb), 0.45);
  color: var(--color-pearl);
  animation: none;
}

.hero-overlay a.hero-btn--ghost:hover {
  background: rgba(var(--color-obsidian-rgb), 0.60);
  border-color: rgba(var(--color-champagne-rgb), 0.80);
  filter: none;
}

@keyframes hero-halo {
  0%, 100% { box-shadow: 0 0 18px 4px rgba(var(--color-magenta-rgb), 0.35); }
  50%       { box-shadow: 0 0 34px 10px rgba(var(--color-magenta-rgb), 0.65); }
}

/* =============================================
   Mobile <768px : hauteur verrouillée au viewport
   Les images rognées via object-fit évitent le défilement double-panneau
   ============================================= */

@media (max-width: 767px) {
  .home-hero-split {
    height: 100vh;   /* Fallback — navigateurs sans svh */
    height: 100svh;  /* Exclut la barre d'adresse rétractable sur iOS/Android */
  }

  .hero-panel {
    flex: 1;          /* Chaque panneau occupe exactement 50 % de la hauteur */
    width: 100%;
  }

  .hero-panel img {
    height: 100%;           /* Remplit son panneau en hauteur */
    object-fit: cover;
    object-position: center top; /* Cadrage prioritaire vers le haut (visages) */
  }
}

/* =============================================
   Desktop ≥768px : côte à côte
   ============================================= */

@media (min-width: 768px) {
  .home-hero-split {
    flex-direction: row;
  }

  .hero-panel {
    width: 50%;
  }
}

/* Supprimer le padding main-content sur la page d'accueil */
.path-frontpage .main-content {
  padding-block-start: 0;
}
