@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;
}

/* --- SECTION NOS PROJETS --- */
.projets-section {
  padding: 6vh 10vw;
  margin: 0 auto;
}

.secteur-separateur {
  display: flex;
  align-items: center;
  gap: 1.5vh;
  margin: 3vh 0 2vh 0;
  background: linear-gradient(135deg, #e53e3e 0%, #b91c1c 100%);
  /* rouge semi-transparent */
  border-radius: 30px;
  padding: 1.5vh 2vh;
  box-shadow: 0 4px 16px rgba(229, 62, 62, 0.07);
  position: relative;
}

.secteur-img {
  width: 8vh;
  height: 8vh;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.secteur-titre {
  font-size: 3vh;
  font-weight: bold;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.11);
}

.projets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5vh;
  margin-bottom: 2vh;
}

.projet-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.3s;
  position: relative;
  cursor: pointer;
  width: 100%;
  height: 28vh;
  padding-top: 2vh;
}

.projet-card:hover {
  transform: translateY(-8px) scale(1.03);
  z-index: 2;
}

.projet-img {
  width: 100%;
  height: 22vh;
  object-fit: contain;
  padding: 2vh;
  background: #fff;
  display: block;
}

.projet-content {
  width: 100%;
  padding: 1.5vh 1.2vh 2.5vh 1.2vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.projet-titre {
  font-size: 1.7vh;
  font-weight: bold;
  color: #1a365d;
  text-align: center;
  margin-bottom: 0;
  transition: opacity 0.35s;
  opacity: 1;
  z-index: 2;
  position: relative;
}

.projet-details-btn {
  display: flex;
  align-items: center;
  gap: 0.7vh;
  padding: 0.7vh 1.5vh;
  background: red;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1.5vh;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  left: 50%;
  bottom: 1.5vh;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(229, 62, 62, 0.14);
}

@media (hover: hover) {
  .projet-card:hover .projet-titre {
    opacity: 0;
  }

  .projet-card:hover .projet-details-btn {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (hover: none) {
  .projet-titre {
    opacity: 1;
  }

  .projet-details-btn {
    opacity: 1;
    pointer-events: auto;
    bottom: 1.5vh;
    top: auto;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 0.9);
  }
}

.projet-details-btn svg {
  width: 2vh;
  height: 2vh;
  fill: #fff;
  margin-left: 0.5vh;
  transition: transform 0.2s;
}

.projet-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;
  margin-top: -7vh;
}

.modal {
  background: white;
  width: 80%;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: scale(0.8);
  transition: all 0.3s ease;
  height: 80vh;
  overflow: hidden;
}

.modal-content {
  padding: 2vh;
  overflow-y: auto;
}

.modal-media {
  position: relative;
  background: #f5f5f5;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  text-align: center;
  font-size: 2vh;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
  color: #e53e3e;
}

.swiper-pagination-bullet-active {
  background: #e53e3e;
}

.modal.active {
  transform: scale(1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
  .modal {
    grid-template-columns: 1fr;
    width: 95%;
    height: 90vh;
    overflow-y: auto;
  }

  .modal-media {
    height: 50vh;
    width: 100%;
  }

  .modal-content {
    display: block;
    padding: 2vh;
    max-height: none;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: none;
  width: 4vh;
  height: 4vh;
  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: 3vh;
  color: #1a365d;
  margin-bottom: 1vh;
}

.modal-description {
  color: #4a5568;
  line-height: 1.8;
  font-size: 2.2vh;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.view-doc-btn {
  display: none;
  padding: 1vh 2vh;
  background: #e53e3e;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 2vh;
  transition: background-color 0.3s;
}

.view-doc-btn:hover {
  background: #c53030;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .projets-section {
    padding: 7vh 0.5vh 3vh 0.5vh;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2vh;
  }
}

@media (max-width: 768px) {
  .secteur-separateur {
    flex-direction: column;
    gap: 1vh;
    padding: 1vh;
  }

  .secteur-titre {
    font-size: 1.3vh;
  }

  .projets-grid {
    grid-template-columns: 1fr;
    gap: 1.2vh;
  }

  .projet-img {
    height: 170px;
  }

  .projet-card {
    width: 100vw;
  }
}
