body #containerProjets {
  margin: auto;
}

#containerProjets h3 {
  line-height: 55px !important;
}

#containerProjets #textBloc1 {
  position: relative;
  top: 40px;
  left: 15%;
  max-width: 350px;
  line-height: 22px;
}

.sample-header-section h2 {
  position: static;
}

.sample-header-section {
  max-width: 900px;
}

.sample-header-section {
  top: 53%;
}

.subtitle-container {
  text-align: center;
  position: relative;
  left: 50%;
  transform: translate(-50%, 0);
}

.subtitle {
  display: inline-block;
  position: relative;
  padding: 0 20px; /* Espace entre le texte et les lignes */
  font-size: 36px !important;
  color: #8bf42f;
}

.subtitle::before,
.subtitle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 50%; /* Ajuster la longueur des lignes */
  height: 2px;
  background-color: #fff; /* Couleur des lignes */
}

.subtitle::before {
  left: -100px;
  border: 0px;
  background-color: #8bf42f;
}

.subtitle::after {
  right: -100px;
  border: 0px;
  background-color: #8bf42f;
}

.carousel-control-prev,
.carousel-control-next {
  background-color: transparent !important; /* Supprime tout fond */
  border: none; /* Assure qu'il n'y a pas de bordure */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1); /* Change l'icône en noir */
  background-color: transparent !important; /* Assure que le fond de l'icône est transparent */
}

#sliderProjects {
  max-width: 1300px;
}

#sliderProjects .title {
  font-size: 36px;
  line-height: 36px;
}

hr {
  background-color: #1b0273;
  opacity: 1;
  height: 1px;
  border: 0;
}

/* filter projets */

.filter-btn {
  background-color: #ffffff !important;
  color: #6f04d9 !important;
  border: #6f04d9 solid 1px !important;
  border-radius: 20px;
  width: 150px;
  margin-left:5px;
  margin-right:5px;
}

.filter-btn:hover {
  color: #ffffff !important;
  background-color: #6f04d9 !important;
}

.filter-btn-active {
  color: #ffffff !important;
  background-color: #6f04d9 !important;
}

/* ======= GRID SYSTEM ======= */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colonnes partout */
  grid-auto-rows: 1fr;
  grid-auto-flow: dense; /* Remplissage intelligent = pas de trous */
  width: 100%;
}

/* Une carte */
.grid-item {
  width: 100%;
  aspect-ratio: 1 / 1; /* Toujours carré */
  position: relative;
  overflow: hidden;
}

/* ======= MEDIA ======= */

.grid-item img,
.grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.grid-item:hover img,
.grid-item:hover video {
  transform: scale(1.05);
}

/* ======= OVERLAY ======= */

.overlay {
  position: absolute;
  bottom: 0px !important;
  left: 0 !important;
  background: #ffffffad;
  opacity: 0;
  height: 100%;
  width: 100%;
  padding: 20px;
  transition: opacity 0.3s;
  z-index: 2;
}

.overlay .btn {
  background-color: transparent;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  transition: background-color 0.3s;
  padding: 0px;
  width: 40px !important;
  height: 40px !important;
}

.grid-item:hover .overlay {
  opacity: 1;
}

.grid-item.active .overlay {
  opacity: 1;
  pointer-events: auto;
}

.overlay .text {
  color: #1b0273;
  line-height: 18px;
}

/* ======= Bouton + ======= */

.overlay .btn img {
  transition: transform 0.2s;
}

.overlay .btn:hover img {
  transform: scale(1.2);
}


/* === Loader par carte === */

.media-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.media-loader {
  position: absolute;
  inset: 0;
  background: rgba(240, 240, 240, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.media-loader .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #ccc;
  border-top-color: #1b0273;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ======= OPTIONAL: Hover zoom ======= */

.media-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ======= NO MASONRY NEEDED ======= */

/* ======= 3 COLS MOBILE = OK (Option A) ======= */

#containerApropos {
  overflow: visible;
}

#backToProjects {
  position: absolute;
  top: 5px;
  left: 0px;
  background-color: #fff;
  width: 100%;
}

.titleProject p {
  margin-left: -45px;
}

.btn-slider-project {
  filter: invert(0);
}

@media (min-width: 1492px) {
  #aPropos .filet-green {
    width: 30%;
  }
}

@media (max-width: 1000px) {
  #containerProjets h3 {
    margin-top: 10px;
  }
  #containerProjets #textBloc1 {
    left: 17%;
  }
}

@media (min-width: 992px) {
  .image-container:hover .overlay {
    opacity: 1;
  }
}

@media (max-width: 991px) {
  .img-icon-domaines {
    scale: 0.9;
  }
}

@media (max-width: 768px) {
  .masonry-item {
    width: 33.33%;
  }

  #containerProjets h3 {
    margin-top: 15px;
  }
}

@media (max-width: 480px) {
  .masonry-item {
    width: 33.33%;
  }
}

/** MOBILE **/
@media (max-width: 575.98px) {
  .subtitle-container {
    text-align: center;
    position: static;
    margin: auto;
  }
  .subtitle {
    display: inline-block;
    position: relative;
    padding: 0 20px; /* Espace entre le texte et les lignes */
    font-size: 25px !important;
    color: #8bf42f;
  }

  .subtitle::before,
  .subtitle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 25%; /* Ajuster la longueur des lignes */
    height: 2px;
    background-color: #fff; /* Couleur des lignes */
  }

  .subtitle::before {
    left: 0px;
    border: 0px;
    background-color: #8bf42f;
  }

  .subtitle::after {
    right: 0px;
    border: 0px;
    background-color: #8bf42f;
  }

  #containerProjets h3 {
    line-height: 25px !important;
    margin-top: 15px;
  }

  #textBloc1 {
    max-width: 260px !important;
    line-height: 20px !important;
  }

  .titleProject p {
    margin-left: 15px;
  }

  .img-icon-domaines {
    scale: 0.8;
  }

  .overlay .text {
    font-size: 12px !important;
    scale:0.6;
  }
}
