/* ================ */
/* GALERIE CSS */
/* ================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 40px auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 200px; /* Hauteur fixe pour les miniatures */
  object-fit: cover; /* Assure que l'image couvre la zone sans déformation */
  display: block;
  transition: transform 0.3s ease;
}

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

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.8); /* Black w/ opacity */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  max-width: 90%;
  max-height: 90%;
  background-color: transparent; /* No background for content */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.modal-image {
  max-width: 100%;
  max-height: 80vh; /* Adjust as needed */
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1001;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.modal-nav {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 20px;
  box-sizing: border-box;
}

.modal-btn {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.modal-btn:hover:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-counter {
  color: white;
  font-size: 1.2em;
  margin-top: 15px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

/* ================ */
/* NAVIGATION GALERIE */
/* ================ */

.gallery-nav {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.gallery-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(227, 200, 121, 0.2);
  color: var(--gold-accent);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid rgba(227, 200, 121, 0.3);
  cursor: pointer;
  font-size: 1rem;
}

.gallery-nav .nav-link:hover {
  background: var(--gold-accent);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(227, 200, 121, 0.3);
}

.gallery-nav .back-btn {
  background: rgba(70, 84, 136, 0.2);
  color: var(--blue-indigo);
  border-color: rgba(70, 84, 136, 0.3);
}

.gallery-nav .back-btn:hover {
  background: var(--blue-indigo);
  color: var(--white-pure);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .gallery-item img {
    height: 150px;
  }

  .close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }

  .modal-btn {
    padding: 8px 12px;
    font-size: 20px;
  }
  
  .gallery-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .gallery-nav .nav-link {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}


