/**
 * Fallback internal Events
 */

.fallback-events__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

@media screen and (max-width: 1024px) {
  .fallback-events__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 640px) {
  .fallback-events__grid {
    grid-template-columns: 1fr;
  }
}

/**
 * MODAL
 */

.fallback-events-modal {
  max-width:100%!important;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 9999; /* assure que ça passe au-dessus de tout */
}

.fallback-events-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.fallback-events-modal__overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  cursor: pointer;
}

.fallback-events-modal__inner {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  background: #fff;
  margin: 5vh auto 0;
  padding: 30px;
  overflow-y: auto;
  border-radius: 8px;
}

.fallback-events-modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  border: none;
  background: none;
  font-size: 32px;
  cursor: pointer;
}

.fallback-events-modal__image {
  width: 100%;
  height: auto;
  margin: 20px 0;
}

/* Slider de la galerie dans la modale */
.fallback-events-gallery-slider {
  margin: 25px 0;
}

.fallback-events-gallery-slide img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* Wrapper du slider Tiny dans la modale */
.fallback-events-modal .tns-outer {
  position: relative;
}

/* Container des flèches : centré verticalement, couvre toute la largeur du slider */
.fallback-events-modal .tns-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index:10;
  pointer-events: none; /* laisse passer les clics sauf sur les boutons */
}

/* Boutons de navigation */
.fallback-events-modal .tns-controls button {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

/* Légère translation pour ne pas coller au bord du slider */
.fallback-events-modal .tns-controls button:first-child {
  margin-left: 10px;
}

.fallback-events-modal .tns-controls button:last-child {
  margin-right: 10px;
}

.fallback-events-modal .tns-controls button:hover {
  background: #ffffff;
  transform: scale(1.05);
}

/* Mobile : on rapproche un peu encore les flèches de l'image */
@media screen and (max-width: 768px) {
  .fallback-events-modal .tns-controls button:first-child {
    margin-left: 4px;
  }
  .fallback-events-modal .tns-controls button:last-child {
    margin-right: 4px;
  }
}