/* =============================================================
   ROLEX EXPLORE - HBJO WEB - Abder Kinane
   Section : Continuez d'explorer
   Fixes :
   - compatibilité Swiper dans grille/flex
   - suppression du conflit width:auto sur .swiper-slide
   - pagination dashes animés
   - flèches dans les marges latérales du site (8vw)
   - flèches masquées en mobile
   ============================================================= */

.rolex-explore {
  overflow: visible;
  padding-top: clamp(2.5rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

.rolex-explore-grid {
  row-gap: 1.5rem;
  min-width: 0;
}

.rolex-explore-heading h2 {
  margin: 0;
  color: #111111;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.rolex-explore-slider-col {
  width: 100%;
  min-width: 0;
  /* IMPORTANT : permettre aux flèches de déborder dans les marges */
  overflow: visible;
}

.rolex-explore-slider-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  /* IMPORTANT : overflow visible pour que les flèches débordent */
  overflow: visible;
  --rolex-explore-delay: 5000ms;
}

/* =============================================================
   SWIPER
   ============================================================= */

.rolexExploreSwiper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.rolexExploreSwiper .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.rolexExploreSwiper .swiper-slide {
  height: auto;
  min-width: 0;
  flex-shrink: 0;
}

.rolexExploreSwiper .swiper-slide>* {
  width: 100%;
  height: 100%;
  min-width: 0;
}

/* =============================================================
   CARD
   ============================================================= */

.rolex-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  background: transparent;
  text-decoration: none;
  color: inherit;
}

.rolex-card-media {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  margin-bottom: 0.85rem;
  background: #f3f3f3;
}

.rolex-card-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transform: scale(1);
}

.rolex-card:hover .rolex-card-media img {
  transform: scale(1.03);
}

.rolex-card-body {
  display: block;
  width: 100%;
  min-width: 0;
}

.rolex-card-title {
  margin: 0;
  color: #191919;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0;
}

/* =============================================================
   FLÈCHES - CONTINUEZ D'EXPLORER
   Positionnées dans les marges latérales du site
   Masquées en mobile, visibles en desktop/tablette
   ============================================================= */

/* Style de base des flèches : masquées par défaut (mobile-first) */
.rolex-side-arrow {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: #EEECEB;
  color: #000000;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.rolex-side-arrow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 300;
}

.rolex-side-arrow:hover,
.rolex-side-arrow:focus-visible {
  background: #D2D0CF !important;
  color: #000000 !important;
}

/* État désactivé : flèche masquée aux extrémités du slider
   (Swiper ajoute automatiquement cette classe via disabledClass dans le JS) */
.rolex-side-arrow.rolex-side-arrow-disabled {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =============================================================
   POSITIONNEMENT DESKTOP / TABLETTE (≥ 768px)
   Flèches dans les marges latérales du site (8vw de chaque côté)
   Centrées verticalement sur les IMAGES uniquement
   ============================================================= */

@media (min-width: 768px) {
  .rolex-side-arrow {
    display: flex;
    /* Centrage vertical sur les images :
       le wrap contient images + titres + pagination,
       donc on positionne via top/transform sur l'image */
    top: 0;
    /* On utilise une variable pour caler la flèche au centre
       de la zone image. Comme les images font ~ratio paysage,
       on cale à ~30% de la hauteur du wrap pour tomber au milieu de l'image */
    transform: translateY(0);
    /* Centrer la flèche dans la marge latérale de 8vw :
       décalage de 8vw vers l'extérieur, puis recentrage */
  }

  /* Centrage vertical précis sur la zone IMAGE
     (le wrap inclut images + titres + pagination, donc on cible la moitié des images) */
  .rolex-side-arrow-prev,
  .rolex-side-arrow-next {
    top: 50%;
    transform: translateY(-50%);
    /* Compensation : on remonte la flèche pour la centrer sur l'image
       et non sur l'ensemble (image + titre + pagination) */
    margin-top: -1.75rem;
  }

  .rolex-side-arrow-prev {
    left: calc(-8vw / 2 - 28px);
  }

  .rolex-side-arrow-next {
    right: calc(-8vw / 2 - 28px);
  }
}

/* Mobile : flèches complètement masquées (renforcement) */
@media (max-width: 767.98px) {

  .rolex-side-arrow,
  .rolex-side-arrow-prev,
  .rolex-side-arrow-next {
    display: none !important;
  }
}

/* =============================================================
   PAGINATION DASHES ANIMÉS - HBJO-WEB - Abder kinane
   (NE PAS MODIFIER - fonctionne correctement)
   ============================================================= */

.rolex-explore-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 1.75rem;
  width: auto;
  text-align: center;
}

.rolex-explore-pagination .swiper-pagination-bullet {
  position: relative;
  width: 26px;
  height: 4px;
  margin: 0 !important;
  padding: 0;
  opacity: 1;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.16);
  flex: 0 0 auto;
  cursor: pointer;
  transition:
    width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.35s ease;
}

@media (max-width: 767.98px) {
  .rolex-explore-pagination .swiper-pagination-bullet {
    width: 24px;
    height: 4px;
  }
}

.rolex-explore-pagination .swiper-pagination-bullet::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0%;
  height: 100%;
  background: #127749;
  border-radius: inherit;
  transform-origin: left center;
  will-change: width;
}

.rolex-explore-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  width: 50px;
  background: rgba(0, 0, 0, 0.24);
}

.rolex-explore-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active::before {
  width: 0%;
}

.rolex-explore-pagination .swiper-pagination-bullet.dash-animating::before {
  animation: rolex-explore-dash-fill var(--rolex-explore-delay, 5s) linear forwards;
}

@keyframes rolex-explore-dash-fill {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

@media (hover: hover) and (pointer: fine) {
  .rolex-explore-pagination .swiper-pagination-bullet:not(.swiper-pagination-bullet-active):hover::before {
    width: 100%;
    transition: width 0.25s ease;
  }
}

@media (max-width: 767.98px) {
  .rolex-explore-pagination {
    gap: 8px;
    margin-top: 1.4rem;
  }

  .rolex-explore-pagination .swiper-pagination-bullet {
    width: 24px;
    height: 6px;
  }

  .rolex-explore-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
    width: 46px;
  }
}

/* =============================================================
   COMPATIBILITÉ LC / GRID
   ============================================================= */

.lc-grid-item,
.rolex-explore-slider-col,
.rolex-explore-grid {
  min-width: 0;
}

/* Surcharge utile si LiveCanvas applique un max-width
   ou un centrage automatique à certains wrappers internes */
.rolex-explore .lc-grid-12,
.rolex-explore [class*="container"] {
  max-width: 100%;
}

.rolex-explore .lc-grid-12 {
  margin-left: 0;
  margin-right: 0;
}

/* =============================================================
   ROLEX EDITORIAL GRID
   ============================================================= */
.rolex-editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .rolex-editorial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rolex-editorial-card,
  .rolex-editorial-grid>.lc-grid-item {
    grid-column: span 1;
    width: 100%;
    max-width: 100%;
  }
}