/**
 * Styles pour la galerie photo carousel et lightbox
 * Site web restaurant - Section galerie
 */

/* ================================================== */
/* IMAGE HISTOIRE - STYLE HARMONISÉ AVEC LE CAROUSEL */
/* ================================================== */

/* Arrondir les coins de l'image histoire comme les photos du carousel */
.imgHistory {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Conteneur de l'image histoire */
.our-story .image-wrapper {
  overflow: hidden;
  border-radius: 12px;
}

/* ================================================== */
/* SECTION GALERIE CAROUSEL */
/* ================================================== */

#gallerySection {
  padding: 30px 0;
  background: var(--background);
}

.gallery-carousel-wrapper {
  position: relative;
  padding: 20px 0 30px;
  border-bottom: solid 2px var(--line);
}

/* Items du carousel */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-photo {
  transform: scale(1.05);
}

/* Navigation Owl Carousel */
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7) !important;
  color: #fff !important;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: none;
  outline: none;
}

.owl-carousel .owl-nav button.owl-prev {
  left: -25px;
}

.owl-carousel .owl-nav button.owl-next {
  right: -25px;
}

.owl-carousel .owl-nav button.owl-prev:hover,
.owl-carousel .owl-nav button.owl-next:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  transform: translateY(-50%) scale(1.1);
}

/* Dots Owl Carousel */
.owl-carousel .owl-dots {
  text-align: center;
  margin-top: 15px;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.owl-carousel .owl-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: var(--bandeau);
  border: none;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.owl-carousel .owl-dot:hover {
  background: #9ca3af;
  transform: scale(1.15);
}

.owl-carousel .owl-dot.active {
  background: var(--bandeau);
  width: 50px;
  height: 16px;
  border-radius: 10px;
  /*box-shadow: 0 3px 10px rgba(148, 216, 168, 0.5);*/
}

.owl-carousel .owl-dot.active:hover {
  background: var(--bandeau);
  transform: scale(1.05);
  opacity: 0.8;
}

/* ================================================== */
/* LIGHTBOX */
/* ================================================== */

.gallery-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Bouton de fermeture */
.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  user-select: none;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus {
  color: #94d8a8;
  text-decoration: none;
  cursor: pointer;
}

/* Image de la lightbox */
.gallery-lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes zoomIn {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Légende */
.gallery-lightbox-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 500;
}

/* Flèches de navigation */
.gallery-lightbox-prev,
.gallery-lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 16px 20px;
  color: white;
  font-weight: bold;
  font-size: 40px;
  transition: 0.3s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

.gallery-lightbox-next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.gallery-lightbox-prev {
  left: 0;
}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
  background-color: rgba(148, 216, 168, 0.8);
  color: #000;
}

/* ================================================== */
/* RESPONSIVE DESIGN */
/* ================================================== */

/* Tablettes */
@media (max-width: 991px) {
  #gallerySection {
    padding: 25px 0;
  }

  .owl-carousel .owl-nav button.owl-prev,
  .owl-carousel .owl-nav button.owl-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .owl-carousel .owl-nav button.owl-prev {
    left: -20px;
  }

  .owl-carousel .owl-nav button.owl-next {
    right: -20px;
  }

  .gallery-lightbox-close {
    font-size: 40px;
    right: 30px;
    top: 15px;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    font-size: 30px;
    padding: 12px 16px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  #gallerySection {
    padding: 20px 0;
  }

  .owl-carousel .owl-nav button.owl-prev,
  .owl-carousel .owl-nav button.owl-next {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .owl-carousel .owl-nav button.owl-prev {
    left: 0;
  }

  .owl-carousel .owl-nav button.owl-next {
    right: 0;
  }

  .owl-carousel .owl-dots {
    margin-top: 12px;
    padding: 8px 0;
    gap: 10px;
  }

  .owl-carousel .owl-dot {
    width: 14px;
    height: 14px;
  }

  .owl-carousel .owl-dot.active {
    width: 42px;
    height: 14px;
  }

  .gallery-lightbox-close {
    font-size: 35px;
    right: 20px;
    top: 10px;
  }

  .gallery-lightbox-content {
    max-width: 95%;
    max-height: 80vh;
  }

  .gallery-lightbox-caption {
    font-size: 14px;
    bottom: 10px;
    width: 90%;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    font-size: 24px;
    padding: 10px 12px;
  }
}

/* Très petits écrans */
@media (max-width: 575px) {
  .owl-carousel .owl-nav button.owl-prev,
  .owl-carousel .owl-nav button.owl-next {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    font-size: 20px;
    padding: 8px 10px;
  }
}

/* ================================================== */
/* PAGE GALERIE - GRILLE DE PHOTOS */
/* ================================================== */

.gallery-page-title {
  font-size: 48px;
  font-weight: bold;
  color: var(--titre);
  font-family: var(--police_titre);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.gallery-page-subtitle {
  font-size: 20px;
  color: var(--text);
  font-family: var(--police_texte);
  margin-bottom: 0;
  font-style: italic;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 50px;
}

.gallery-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery-grid-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.gallery-grid-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-grid-item:hover .gallery-grid-photo {
  transform: scale(1.1);
}

.gallery-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-grid-item:hover .gallery-grid-overlay {
  opacity: 1;
}

.gallery-grid-overlay i {
  color: #fff;
  font-size: 48px;
  transition: transform 0.3s ease;
}

.gallery-grid-item:hover .gallery-grid-overlay i {
  transform: scale(1.2);
}

/* Responsive pour la grille */
@media (max-width: 991px) {
  .gallery-page-title {
    font-size: 40px;
  }

  .gallery-page-subtitle {
    font-size: 18px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
  }

  .gallery-grid-overlay i {
    font-size: 40px;
  }
}

@media (max-width: 767px) {
  .gallery-page-title {
    font-size: 32px;
  }

  .gallery-page-subtitle {
    font-size: 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
  }

  .gallery-grid-overlay i {
    font-size: 36px;
  }
}

@media (max-width: 575px) {
  .gallery-page-title {
    font-size: 28px;
    letter-spacing: 1px;
  }

  .gallery-page-subtitle {
    font-size: 14px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 25px;
  }

  .gallery-grid-overlay i {
    font-size: 32px;
  }
}
