/* ==========================================
   GALERIE VÉHICULE - CSS DÉFINITIF
   ========================================== */

/* 📱 MOBILE : Slider tactile */
.mobile-gallery {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.vehicle-mobile-slider {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.vehicle-mobile-slider .swiper-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #f5f5f5;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Pagination masquée */
.vehicle-mobile-slider .swiper-pagination {
  display: none;
}

/* Flèches de navigation mobile */
.vehicle-mobile-slider .swiper-button-prev,
.vehicle-mobile-slider .swiper-button-next {
  color: white;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.vehicle-mobile-slider .swiper-button-prev:after,
.vehicle-mobile-slider .swiper-button-next:after {
  font-size: 18px;
}

/* ✅ Compteur d'images (1/9) */
.image-counter {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 700;
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

/* 💻 DESKTOP : Image principale + miniatures */
.desktop-gallery {
  width: 100%;
}

.main-vehicle-image {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-vehicle-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -ms-interpolation-mode: nearest-neighbor;
  transition: transform 0.3s ease;
}

.main-vehicle-image img:hover {
  transform: scale(1.02);
}

/* Miniatures avec flèches */
.thumbnails-container {
  width: 100%;
  position: relative;
  padding: 0 50px; /* ✅ Espace pour les flèches */
  margin-top: 20px;
}

.vehicle-thumbs-slider {
  width: 100%;
  overflow: hidden;
}

.vehicle-thumbs-slider .swiper-wrapper {
  display: flex;
  gap: 12px;
}

.thumb-slide {
  width: auto !important;
  flex-shrink: 0;
}

.thumbnail-img {
  width: 120px;
  height: 90px;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
  background: #f5f5f5;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.thumbnail-img:hover {
  opacity: 1;
  transform: scale(1.05);
  border-color: #ec5a13;
}

.thumbnail-img.active {
  border-color: #ec5a13;
  opacity: 1;
}

/* ✅ FLÈCHES DE NAVIGATION pour miniatures */
.thumbs-button-prev,
.thumbs-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: #ec5a13;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(67, 118, 251, 0.3);
}

.thumbs-button-prev:hover,
.thumbs-button-next:hover {
  background: #2563eb;
  transform: translateY(-50%) scale(1.1);
}

.thumbs-button-prev {
  left: 0;
}

.thumbs-button-next {
  right: 0;
}

/* Icônes des flèches */
.thumbs-button-prev::after,
.thumbs-button-next::after {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 18px;
}

.thumbs-button-prev::after {
  content: '\f053'; /* fa-chevron-left */
}

.thumbs-button-next::after {
  content: '\f054'; /* fa-chevron-right */
}

/* Flèches désactivées */
.thumbs-button-prev.swiper-button-disabled,
.thumbs-button-next.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .image-counter {
    font-size: 13px;
    padding: 8px 14px;
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 576px) {
  .vehicle-mobile-slider .swiper-button-prev,
  .vehicle-mobile-slider .swiper-button-next {
    width: 35px;
    height: 35px;
  }

  .vehicle-mobile-slider .swiper-button-prev:after,
  .vehicle-mobile-slider .swiper-button-next:after {
    font-size: 16px;
  }

  .image-counter {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (min-width: 992px) and (max-width: 1400px) {
  .thumbnail-img {
    width: 100px;
    height: 75px;
  }
}

@media (min-width: 1400px) {
  .thumbnail-img {
    width: 140px;
    height: 105px;
  }
}
