/*!
Theme Name: DPEA Divi Child
Template: Divi
Version: 1.0
Description: Divi child theme for Des Pas En Avant.
Author: Mosaïk | David NOGUES
Author URI: https://mosaikit.fr
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

.dpea-projets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 0 auto;
  width: 100%;
}

.dpea-projet {
  overflow: hidden;
  position: relative;
}

.dpea-projet a {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
}

.dpea-projet-image {
  position: relative;
  overflow: hidden;
}

.dpea-projet-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

/* Effet de zoom léger au survol */
.dpea-projet-image:hover img {
  transform: scale(1.05);
}

/* Le voile */
.dpea-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Apparition du voile au survol */
.dpea-projet-image:hover .dpea-overlay {
  opacity: 1;
}

/* Picto oeil */
.dpea-overlay i {
  font-size: 2rem;
  color: white;
}

/* Informations sous l'image */
.dpea-projet-infos {
  margin-bottom: 20px;
  padding: 0 5px 0 0;
}

.dpea-projet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1rem;
}

.dpea-projet-header .client {
  color: #2bbad9;
  font-size: 1.2rem;
}

.dpea-projet-infos .lieu {
  font-size: 1rem;
  font-weight: bold;
  color: #555;
  margin-top: -5px;
}

.acf-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding: 10px 0;
}

.glider-contain .glider-prev, .glider-contain .glider-next {
  color: #2bbad9;
  font-weight: bold;
  /*background-color: #27354c;*/
  height: 20%;
  top: 10%;
  padding-left: 5px;
  padding-right: 5px;
}

.glider-contain .glider-prev {
  margin-left: -10px;
}

.glider-contain .glider-next {
  margin-right: -10px;
}

.acf-gallery-item {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  scroll-snap-align: start;
  justify-content: flex-start; /* ← Aligne en haut */
  align-items: center;
  width: 300px; /* largeur de chaque image */
  margin-right: 30px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.acf-gallery-item.show {
  opacity: 1;
  transform: translateY(0);
}

.acf-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0; /* optionnel pour arrondir les angles */
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .dpea-projets-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .dpea-projets-grid {
      grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .acf-gallery-item {
      /*overflow: hidden;  ← Très important pour contenir le zoom */
      position: relative;
  }

  .acf-gallery-item img {
      transition: transform 0.5s ease;
      transform: scale(1);
      display: block;
      width: 100%;
      height: auto;
  }

  .acf-gallery-item:hover img {
      transform: scale(1.05); /* Zoom x1.05 */
  }
}

@media (max-width: 768px) {
  .glider {
      all: unset !important;
      display: block !important;
      overflow: visible !important;
  }
  .glider-track {
      all: unset !important;
      display: block !important;
  }
  .acf-gallery-item {
      width: 100% !important;
      margin-right: 0 !important;
      margin-bottom: 20px;
  }
}
