/* ==========================================================================
   Hero carrousel Accueil — [avf_hero_carousel]
   Mobile-first. Reprend les tokens de la fiche projet (fonts, noir de
   marque) pour rester cohérent avec le reste du site.
   ========================================================================== */

.avf-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #d9dbde;
}

@media (min-width: 640px) {
  .avf-hero {
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 1024px) {
  .avf-hero {
    aspect-ratio: 21 / 9;
    max-height: 825px;
  }
}

.avf-hero__slides {
  position: relative;
  width: 100%;
  height: 100%;
}

/*
 * La slide entière est un <a> (voir PHP) : toute la carte est cliquable,
 * pas seulement le titre. On neutralise donc le style de lien par défaut
 * du navigateur au niveau de la slide.
 */
.avf-hero__slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.6s ease;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.avf-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.avf-hero__slide:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -6px;
}

@media (prefers-reduced-motion: reduce) {
  .avf-hero__slide {
    transition: none;
  }
}

/*
 * !important nécessaire : le thème applique un reset d'images global
 * (souvent "height: auto" pour du contenu responsive) qui, sans ça,
 * empêche l'image de remplir le cadre et casse le cover/centrage.
 */
.avf-hero__image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: 50% 50% !important;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Léger zoom au survol/focus : affordance "c'est cliquable" à la place du
   soulignement du titre. */
.avf-hero__slide:hover .avf-hero__image,
.avf-hero__slide:focus-visible .avf-hero__image {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .avf-hero__image {
    transition: none;
  }
  .avf-hero__slide:hover .avf-hero__image {
    transform: none;
  }
}

.avf-hero__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.avf-hero__caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 28px;
  color: #fff;
}

@media (min-width: 1024px) {
  .avf-hero__caption {
    left: 60px;
    right: 140px;
    bottom: 64px;
    max-width: 610px;
  }
}

/*
 * Couleur forcée en dur (!important) : les réglages globaux Elementor
 * (Typography > H2) appliquent maintenant une couleur de titre par défaut
 * (noir) sur tous les H2 du site, y compris celui-ci qui est posé sur une
 * image sombre et doit rester blanc quoi qu'il arrive.
 */
.avf-hero__title {
  margin: 0 0 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff !important;
}

.avf-hero__text {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.55;
  color: #fff !important;
}

@media (min-width: 1024px) {
  .avf-hero__text {
    font-size: 16px;
  }
}

/* ---------- Dots de navigation ---------- */

.avf-hero__dots {
  position: absolute;
  right: 20px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

@media (min-width: 1024px) {
  .avf-hero__dots {
    right: 60px;
    bottom: 64px;
  }
}

/*
 * Comme sur la fiche projet : le thème (Hello Elementor + réglages globaux
 * non configurés) applique un style par défaut aux <button> — pas
 * uniquement le fond, mais aussi padding/largeur/hauteur/rayon selon les
 * états, ce qui transformait le petit point en gros pavé blanc au survol.
 * On verrouille donc TOUTES les propriétés de boîte avec !important, sur
 * tous les pseudo-états.
 */
.avf-hero__dot,
.avf-hero__dot:hover,
.avf-hero__dot:focus,
.avf-hero__dot:active,
.avf-hero__dot:visited,
.avf-hero__dot:focus-visible {
  appearance: none !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  width: 9px !important;
  height: 9px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
  background-color: rgba(255, 255, 255, 0.4) !important;
  background-image: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.avf-hero__dot.is-active {
  background-color: #fff !important;
  transform: scale(1.2);
}

.avf-hero__dot:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px;
}
