/* ------------------
   Galerie
------------------- */
.gallery {
  padding: 2rem;
}
.gallery .gallery-link {
  display: block;
  margin-bottom: 1.5rem;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  border-radius: 100px;
  transition: all 0.3s ease;
  filter: sepia(0.12) contrast(1.05);
}
.gallery img:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* ------------------
   Modal
------------------- */
body.modal-open {
  overflow: hidden;
}
.modal-custom {
  display: none;
  position: fixed;
  z-index: 1050;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.55);

  align-items: center;
  justify-content: center;
}

.modal-content-custom {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  z-index: 1; /* image derrière les boutons */
}
.modal-content-custom img {
  max-width: 90vw;
  max-height: 90vh;
  display: block;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 8px 8px 25px rgba(0,0,0,0.5);
  z-index: 1; /* pour s'assurer que boutons sont au-dessus */
  position: relative;
}
.modal-content-custom img.show {
  opacity: 1;
  transform: scale(1);
}
.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  background-color: rgba(0, 0, 0, 0.7); /* fond noir semi-transparent */
  padding: 0.2rem 0.5rem;
  /*border-radius: 5px;*/
  z-index: 10; /* priorité au-dessus de l'image */
}
.close-modal:hover { 
  color: #ddd;
  background-color: rgba(0, 0, 0, 0.9); 
}
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s;
  background-color: rgba(0, 0, 0, 0.5); /* fond noir semi-transparent */
  padding: 0.2rem 0.6rem;
  /*border-radius: 5px;*/
  z-index: 10; /* priorité au-dessus de l'image */
}
.modal-nav:hover { color: #ddd; background-color: rgba(0, 0, 0, 0.8); }
.modal-prev { left: 10px; }
.modal-next { right: 10px; }