/* Message sous l'image mise à jour */
.update-message {
  position: absolute;
  bottom: -40px; /* Ajuste la position sous l'image */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #ff0;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
  display: block; /* Toujours visible pour l'instant */
}

/* Le reste de ton CSS reste inchangé */

/* Galerie avec Flexbox */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* réduit l'espace entre les items */
  justify-content: center;
  margin-top: 10px;
}

.gallery-item {
  position: relative;
  max-width: 400px;
  width: 100%;
  flex: 1 1 250px; /* permet l'adaptation */
}

/* Effet zoom sur les images */
.gallery-img, .start-image {
  width: 100%;
  border-radius: 15px;
  cursor: pointer;
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-img:hover, .start-image:hover {
  transform: scale(1.2); /* Agrandir l'image */
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* ✅ Responsive : réduire le gap sur petits écrans */
@media (max-width: 768px) {
  .gallery {
    gap: 10px;
  }
}


.caption {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 50, 0.6);
  color: #fff;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.caption-date {
  position: absolute;
  bottom: -85px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 50, 0.7);
  color: #fff;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 10px;
}

/* Badge Nouveau avec l'icône et effet glow */
.new-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 255, 255, 0); /* Fond transparent */
  padding: 5px;
  border-radius: 5px;
  position: absolute;
  top: 65px;
  right: 10px;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  color: cyan; /* Couleur par défaut, sera remplacée par celle de l'activité */
}

/* Icône de l'activité dans le badge */
.new-badge .badge-icon {
  width: 24px; /* Taille de l'icône */
  height: 24px;
  margin-right: 8px; /* Espacement entre l'icône et le texte */
  filter: drop-shadow(0 0 5px cyan) drop-shadow(0 0 10px cyan); /* Effet de glow initial */
  transition: filter 0.3s, transform 0.3s;
}

/* Effet glow sur l'icône */
.new-badge .badge-icon.glow {
  transform: scale(1.4); /* Augmente la taille de l'icône */
  animation: bounce 1.0s infinite alternate; /* Animation de rebond */
}

/* Animation rebond de l'icône */
@keyframes bounce {
  0% { transform: scale(1.4) translateY(0); }
  50% { transform: scale(1.5) translateY(-5px); }
  100% { transform: scale(1.4) translateY(0); }
}

/* Animation des puces autour de l'icône */
.new-badge .badge-icon.glow::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: cyan;
  border-radius: 50%;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  animation: bubble 0.8s infinite; /* Animation de bubble */
  opacity: 0.8;
}

@keyframes bubble {
  0% { transform: translateX(-50%) translateY(0) scale(0.5); opacity: 0.8; }
  50% { transform: translateX(-50%) translateY(-8px) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-16px) scale(0.5); opacity: 0; }
}

/* Classe glow pour les effets */
.glow {
  transition: filter 0.3s ease;
}




/* Lightbox plein écran */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 25px cyan;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Grille responsive avec Flexbox */
@media (min-width: 600px) {
  .gallery {
    justify-content: center;
    /* La grille devient flexible avec une taille d'élément minimale de 250px */
  }
}

@media (max-width: 599px) {
  .gallery {
    flex-direction: column; /* Sur petits écrans, empile les images verticalement */
    align-items: center; /* Centre les éléments horizontalement */
  }
}

