@font-face {
  font-family: 'FS Industrie Wide';
  src: url("../fonts/FS-Industrie-Wd-Bold.ttf");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'FS Industrie Wide', sans-serif;
  overflow-x: hidden;
}

/* Events Section */
.events-section {
  padding: 6vh 10vw;
  margin: 0 auto;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5vh;
  margin-bottom: 2vh;
  opacity: 0;
}

.event-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(50px);
}

.event-card:hover {
  transform: translateY(-8px) scale(1.03);
  z-index: 2;
}

.event-img {
  width: 100%;
  height: 30vh;
  object-fit: cover;
  background: #eee;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  display: block;
}

.event-content {
  width: 100%;
  padding: 1.5vh 1.2vh 2.5vh 1.2vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.event-titre {
  font-size: 2vh;
  font-weight: bold;
  color: #1a365d;
  text-align: center;
  margin-bottom: 0;
  transition: opacity 0.35s;
  opacity: 1;
  z-index: 2;
  position: relative;
}

.event-details-btn {
  display: flex;
  align-items: center;
  gap: 0.5vh;
  padding: 0.5vh 2vh;
  background: red;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1.5vh;
  font-weight: 600;
  cursor: pointer;
  position: absolute;
  left: 50%;
  bottom: 1.5vh;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  box-shadow: 0 2px 10px rgba(229, 62, 62, 0.14);
}

.event-card:hover .event-titre {
  opacity: 0;
}

.event-card:hover .event-details-btn {
  opacity: 1;
  pointer-events: auto;
}

.event-details-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  margin-left: 0.5em;
  transition: transform 0.2s;
}

.event-details-btn:hover svg {
  transform: translateX(4px);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal {
  background: white;
  width: 70vw;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: scale(0.8);
  transition: all 0.3s ease;
  height: 60vh;
  overflow: hidden;
  max-height: 90vh;
}

.modal-content {
  padding: 2vh;
  overflow-y: auto;
}

.modal-media {
  position: relative;
  background: #ffffff;
  height: 100%;
  overflow: hidden;
}

.modal.active {
  transform: scale(1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f0f0f0;
  transform: rotate(90deg);
}

.modal-title {
  font-size: 2vh;
  color: #1a365d;
  margin-bottom: 1vh;
}

.modal-description {
  color: #4a5568;
  line-height: 1.8;
}

/* Swiper Styles */
.swiper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.swiper-wrapper {
  height: 100%;
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.swiper-pagination-bullet {
  background: white;
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: #e53e3e;
}

.swiper-button-next,
.swiper-button-prev {
  color: #e53e3e;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

/* Responsive Styles */
@media (max-width: 900px) {
  .modal {
    grid-template-columns: 1fr;
    width: 95%;
    height: auto;
    max-height: 95vh;
  }

  .modal-media {
    height: 40vh;
    order: -1;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2vh;
  }
}

@media (max-width: 600px) {
  .events-grid {
    grid-template-columns: 1fr;
    gap: 1.2vh;
  }

  .contact-hero h1 {
    font-size: 2.5vh;
  }

  .contact-hero p {
    font-size: 1.2vh;
  }

  .modal-content {
    padding: 1.5vh;
  }

  .modal-title {
    font-size: 1.5vh;
  }
}
