﻿/* =========================================================
   GALERIE GEMS RACING - VERSION PROPRE
   ========================================================= */

.gems-gallery-section {
  width: 100% !important;
  padding: 45px 0 65px !important;
  overflow: hidden !important;
}

.gems-gallery-section > .wrap {
  width: calc(100% - 40px) !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.gems-gallery-intro {
  max-width: 850px !important;
  margin: 0 auto 28px !important;
  text-align: center !important;
}

.gems-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
}

.gems-gallery-item {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: #071b35 !important;
  border: 2px solid rgba(242, 140, 40, .75) !important;
  cursor: pointer !important;
}

.gems-gallery-item img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.gems-gallery-caption {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  padding: 12px 10px !important;
  color: #ffffff !important;
  background: linear-gradient(
    transparent,
    rgba(0, 0, 0, .9)
  ) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.gems-gallery-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, .94) !important;
}

.gems-gallery-lightbox.is-open {
  display: flex !important;
}

.gems-gallery-lightbox img {
  display: block !important;
  max-width: 82vw !important;
  max-height: 86vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border: 3px solid #ffffff !important;
}

.gems-gallery-close,
.gems-gallery-prev,
.gems-gallery-next {
  position: fixed !important;
  z-index: 100000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  color: #ffffff !important;
  background: #f28c28 !important;
  border: 0 !important;
  cursor: pointer !important;
  font-size: 30px !important;
  line-height: 1 !important;
}

.gems-gallery-close {
  top: 18px !important;
  right: 22px !important;
}

.gems-gallery-prev {
  top: 50% !important;
  left: 22px !important;
  transform: translateY(-50%) !important;
}

.gems-gallery-next {
  top: 50% !important;
  right: 22px !important;
  transform: translateY(-50%) !important;
}

@media (max-width: 1000px) {
  .gems-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .gems-gallery-section > .wrap {
    width: calc(100% - 28px) !important;
  }

  .gems-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .gems-gallery-caption {
    font-size: 11px !important;
  }

  .gems-gallery-lightbox img {
    max-width: 90vw !important;
    max-height: 78vh !important;
  }

  .gems-gallery-prev {
    left: 8px !important;
  }

  .gems-gallery-next {
    right: 8px !important;
  }
}

@media (max-width: 430px) {
  .gems-gallery-grid {
    grid-template-columns: 1fr !important;
  }
}
