/* Emplacement : /assets/css/index.css — Page d'accueil : hero plein écran (carrousel d'images Unsplash en fondu), tuiles promo. */

/* ===================== Hero ===================== */
.afl-hero { position: relative; padding: 0 12px; }
.afl-hero__stage {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(600px, 88vh, 860px);
  min-height: clamp(600px, 88svh, 860px); /* hauteur stable malgré la barre d'adresse mobile */
  border-radius: 0 0 var(--afl-radius-lg) var(--afl-radius-lg);
  background: var(--afl-dark);
}

/* Chaque diapositive couvre toute la largeur ; transition en fondu enchaîné + léger zoom (Ken Burns) */
.afl-hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1), visibility 0s linear 1.4s; z-index: 0; display: flex; align-items: center; }
.afl-hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1), visibility 0s; z-index: 1; }
.afl-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 8s linear; will-change: transform; }
.afl-hero__slide.is-active .afl-hero__bg { transform: scale(1); }
.afl-hero__slide::after { content: ''; position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(90deg, rgba(10, 11, 12, 0.82) 0%, rgba(10, 11, 12, 0.55) 42%, rgba(10, 11, 12, 0.12) 75%),
  linear-gradient(0deg, rgba(10, 11, 12, 0.6) 0%, rgba(10, 11, 12, 0) 40%); }

.afl-hero__container { position: relative; z-index: 2; width: 100%; padding-top: 3rem; padding-bottom: 9rem; }
.afl-hero__content { max-width: 680px; }

/* Apparition décalée du texte à chaque changement de diapositive */
.afl-hero__content > * { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .7, .2, 1); }
.afl-hero__slide.is-active .afl-hero__content > * { opacity: 1; transform: none; }
.afl-hero__slide.is-active .afl-hero__content > *:nth-child(1) { transition-delay: 0.35s; }
.afl-hero__slide.is-active .afl-hero__content > *:nth-child(2) { transition-delay: 0.5s; }
.afl-hero__slide.is-active .afl-hero__content > *:nth-child(3) { transition-delay: 0.65s; }
.afl-hero__slide.is-active .afl-hero__content > *:nth-child(4) { transition-delay: 0.8s; }

.afl-hero__chip { margin-bottom: 1.4rem; padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.afl-hero__title { color: var(--afl-white); font-size: clamp(2.5rem, 6vw, 4.8rem); font-weight: 900; line-height: 1.02; letter-spacing: -0.045em; margin-bottom: 1.3rem; }
.afl-hero__title span { display: block; color: var(--afl-primary); }
.afl-hero__lead { color: rgba(255, 255, 255, 0.85); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 560px; margin-bottom: 2.2rem; }
.afl-hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Barre de contrôle (progression, compteur, flèches) + preuve sociale */
.afl-hero__ui { position: absolute; left: 0; right: 0; bottom: 5.2rem; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.afl-hero__controls { display: flex; align-items: center; gap: 1.2rem; }
.afl-hero__progress { display: flex; gap: 0.5rem; }
.afl-hero__progress button { width: 56px; height: 4px; padding: 0; border: none; border-radius: 4px; background: rgba(255, 255, 255, 0.3); overflow: hidden; position: relative; cursor: pointer; }
.afl-hero__progress button::before { content: ''; position: absolute; inset: -10px 0; }
.afl-hero__progress button span { position: absolute; inset: 0; width: 0; background: var(--afl-primary); border-radius: 4px; }
.afl-hero__progress button.is-done span { width: 100%; }
.afl-hero__progress button.is-active span { animation: afl-hero-progress var(--afl-hero-delay, 7s) linear forwards; }
.afl-hero.is-paused .afl-hero__progress button.is-active span { animation-play-state: paused; }
@keyframes afl-hero-progress { from { width: 0; } to { width: 100%; } }
.afl-hero__counter { color: rgba(255, 255, 255, 0.65); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.afl-hero__counter strong { color: var(--afl-white); }
.afl-hero__arrows { display: flex; gap: 0.4rem; }
.afl-hero__arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(8px); color: var(--afl-white); display: inline-flex; align-items: center; justify-content: center; transition: var(--afl-transition); }
.afl-hero__arrows button:hover { background: var(--afl-primary); border-color: var(--afl-primary); color: var(--afl-dark); }
.afl-hero__trust { display: flex; align-items: center; gap: 0.9rem; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(12px); border-radius: var(--afl-radius-pill); padding: 0.45rem 1.1rem 0.45rem 0.45rem; color: var(--afl-white); }
.afl-hero__avatars { display: flex; }
.afl-hero__avatars img, .afl-hero__avatars span { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--afl-white); object-fit: cover; margin-left: -10px; }
.afl-hero__avatars img:first-child { margin-left: 0; }
.afl-hero__avatars span { display: inline-flex; align-items: center; justify-content: center; background: var(--afl-primary); color: var(--afl-dark); font-size: 0.7rem; font-weight: 800; }
.afl-hero__trust strong { display: block; font-size: 0.95rem; line-height: 1.1; }
.afl-hero__trust strong i { color: var(--afl-primary); font-size: 0.8rem; }
.afl-hero__trust small { font-size: 0.75rem; color: rgba(255, 255, 255, 0.75); }

/* Tuiles promotionnelles */
.afl-promo--tall { min-height: 100%; height: 100%; }
@media (min-width: 992px) { .afl-promo--tall { min-height: 624px; } }

@media (max-width: 991.98px) {
  .afl-hero { padding: 0 8px; }
  .afl-hero__stage { min-height: 640px; border-radius: 0 0 var(--afl-radius) var(--afl-radius); }
  .afl-hero__container { padding-bottom: 10rem; }
  .afl-hero__slide::after { background: linear-gradient(0deg, rgba(10, 11, 12, 0.88) 0%, rgba(10, 11, 12, 0.55) 55%, rgba(10, 11, 12, 0.25) 100%); }
  .afl-hero__slide { align-items: flex-end; }
  .afl-hero__ui { bottom: 4.6rem; }
}
@media (max-width: 575.98px) {
  .afl-hero { padding: 0; }
  .afl-hero__stage { min-height: 620px; border-radius: 0 0 24px 24px; }
  .afl-hero__container { padding-bottom: 8.5rem; }
  .afl-hero__actions .btn { width: 100%; }
  .afl-hero__trust { display: none; }
  .afl-hero__progress button { width: 36px; }
  .afl-hero__ui { bottom: 4.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .afl-hero__bg, .afl-hero__slide.is-active .afl-hero__bg { transform: none; transition: none; }
  .afl-hero__content > * { transition: none; }
}

/* Diapositives empilées dans une grille : le hero prend la hauteur de la diapositive la plus haute,
   le texte n'est jamais rogné (textes longs, petits écrans, grande taille de police système). */
.afl-hero__stage { display: grid; }
.afl-hero__slide { position: relative; inset: auto; grid-area: 1 / 1; min-height: inherit; }
@media (max-width: 374.98px) {
  .afl-hero__counter { display: none; }
  .afl-hero__controls { gap: 0.7rem; }
  .afl-hero__progress button { width: 26px; }
}

.afl-hero__actions .btn { font-size: 1rem; }
