/* ════════════════════════════════════════════════════════════════════
   HERO SLIDER PREMIUM — vanilla JS + CSS, mobile-first, accessible
   Utilise transitions opacity (fade) + crossfade entre slides
   ════════════════════════════════════════════════════════════════════ */

.rv-hero-slider{
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none; /* le contenu hero reste cliquable au-dessus */
}

.rv-hero-slider-track{
  position: absolute;
  inset: 0;
}

.rv-hero-slide{
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1100ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
.rv-hero-slide.is-active{
  opacity: 1;
}
.rv-hero-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  /* Léger zoom doux pour effet premium */
  transform: scale(1.04);
  animation: rvHeroSlideKenBurns 7000ms ease-out forwards;
}
.rv-hero-slide.is-active img{
  animation: rvHeroSlideKenBurns 7000ms ease-out forwards;
}
@keyframes rvHeroSlideKenBurns{
  0%   { transform: scale(1.00); }
  100% { transform: scale(1.06); }
}

.rv-hero-slider-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.32) 0%,
      rgba(0,0,0,0.14) 45%,
      rgba(0,0,0,0.50) 100%);
}

/* Flèches navigation */
.rv-hero-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 38, 21, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(253, 224, 71, 0.35);
  border-radius: 50%;
  color: #fffdf8;
  cursor: pointer;
  z-index: 5;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 240ms ease, transform 240ms ease, background 240ms;
}
.rv-hero-slider:hover .rv-hero-arrow,
.rv-hero-slider:focus-within .rv-hero-arrow{
  opacity: 1;
}
.rv-hero-arrow:hover{
  background: rgba(10, 38, 21, 0.85);
  border-color: rgba(253, 224, 71, 0.7);
}
.rv-hero-arrow:focus-visible{
  outline: 2px solid #fde047;
  outline-offset: 3px;
  opacity: 1;
}
.rv-hero-arrow-prev{ left: 1.5rem; }
.rv-hero-arrow-next{ right: 1.5rem; }
.rv-hero-arrow svg{ display: block; }

/* Pagination dots */
.rv-hero-pagination{
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
  pointer-events: auto;
}
.rv-hero-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.35);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 240ms, transform 240ms, width 240ms;
}
.rv-hero-dot:hover{
  background: rgba(253, 224, 71, 0.6);
}
.rv-hero-dot:focus-visible{
  outline: 2px solid #fde047;
  outline-offset: 3px;
}
.rv-hero-dot.is-active{
  background: #fde047;
  width: 28px;
  border-radius: 999px;
}

/* Annule l'animation Ken Burns si reduced-motion */
@media (prefers-reduced-motion: reduce){
  .rv-hero-slide img,
  .rv-hero-slide.is-active img{
    animation: none !important;
    transform: scale(1) !important;
  }
  .rv-hero-slide{
    transition: opacity 200ms ease;
  }
}

/* Mobile : flèches + dots compactés */
@media (max-width: 768px){
  .rv-hero-arrow{
    width: 38px;
    height: 38px;
    opacity: 0.85;
  }
  .rv-hero-arrow-prev{ left: 0.75rem; }
  .rv-hero-arrow-next{ right: 0.75rem; }
  .rv-hero-pagination{ bottom: 1rem; gap: 6px; }
  .rv-hero-dot{ width: 8px; height: 8px; }
  .rv-hero-dot.is-active{ width: 22px; }
}
