/* Styles pour la galerie interactive */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: var(--card-bg);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15), 0 0 10px var(--gold);
  border: 1px solid var(--gold);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  padding: 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-modal.active {
  display: flex;
  opacity: 1;
  justify-content: center;
  align-items: center;
}

.gallery-modal-content {
  max-width: 80%;
  max-height: 80%;
  position: relative;
}

.gallery-modal-content img {
  max-width: 100%;
  max-height: 80vh;
  border: 3px solid var(--gold);
  box-shadow: 0 0 30px rgba(212,175,55,0.3);
}

.gallery-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0,0,0,0.5);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.gallery-close:hover {
  background-color: var(--gold);
  transform: rotate(90deg);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  background-color: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

.gallery-nav:hover {
  background-color: var(--gold);
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

/* Animation d'entrée pour la galerie */
.gallery-container.animate-in,
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-container.animate-in.visible,
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animation pour les textes */
.animate-text {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: 0.2s;
}

.animate-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.description-container {
  overflow: hidden;
}

.description-container p {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s ease;
}

.description-container.visible p {
  opacity: 1;
  transform: translateX(0);
}

.description-container p:nth-child(1) { transition-delay: 0.1s; }
.description-container p:nth-child(2) { transition-delay: 0.2s; }
.description-container p:nth-child(3) { transition-delay: 0.3s; }
.description-container p:nth-child(4) { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .gallery-modal-content {
    max-width: 95%;
  }
  
  .gallery-nav {
    width: 40px;
    height: 40px;
  }
}