/* ------------------
   Galerie
------------------- */
.gallery {
  padding: 2rem;
}
.gallery .gallery-link {
  position: relative;
  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);
  padding: 10px;
}
.gallery img:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.gallery .gallery-link::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(40px, 18%, 80px);
  height: clamp(40px, 18%, 80px);
  transform: translate(-50%, -50%);
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='white'%20stroke-width='1.5'%3E%3Ccircle%20cx='10'%20cy='10'%20r='9'%20fill='none'%20stroke='white'/%3E%3Cline%20x1='15'%20y1='15'%20x2='22'%20y2='22'%20stroke='white'%20stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.75;
  pointer-events: none;
}

/* ------------------
   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; }