.u-section-1 .u-sheet-1 {
  min-height: auto;
}

.u-section-1 .u-text-1 {
  margin: 31px auto;
}

.u-section-2 .u-sheet-1 {
  min-height: auto;
}


/* --- TAILLE DE BASE (PC ET TABLETTE) --- */
h2 {
    font-size: 100px !important; 
    
}

/* --- TAILLE ADAPTATIVE (TÉLÉPHONE) --- */
@media (max-width: 767px) {
    h2 {
        font-size: 44px !important; 
    }
}

/* ==========================================================================
   GALERIE CARRÉE 3 COLONNES AVEC EFFETS ET LIGHTBOX VIDÉO
   ========================================================================== */

.u-section-5 .u-sheet-1 {
  min-height: auto !important;
  padding: 40px 20px !important;
}

.u-section-5 .u-text-1 {
  font-size: 40px !important; 
  color: #118eef !important;
  margin: 0 auto 10px auto !important;
}

.u-section-5 .u-text-description {
  max-width: 800px;
  margin: 0 auto 30px auto !important;
  color: #666666;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}

.u-section-5 .u-gallery-1 {
  height: auto !important;
  margin: 20px auto !important;
  width: 100% !important;
}

/* GRILLE FORCÉE EN 3 COLONNES SUR PC */
.u-section-5 .u-gallery-inner-1 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important; 
  gap: 20px !important;
}

/* FORCE LE FORMAT CARRÉ PARFAIT ET LES BORDS ARRONDIS */
.u-section-5 .u-gallery-item {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important; /* Rend la case carrée automatiquement */
  border-radius: 12px !important;  /* Bords ronds sur la case */
  overflow: hidden !important;     /* Empêche le zoom de déborder des bords ronds */
  cursor: pointer !important;
}

/* GESTION DE L'IMAGE ET DE L'EFFET ZOOM */
.u-section-5 .u-back-slide {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

.u-section-5 .u-back-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* L'image remplit le carré sans se déformer */
  transition: transform 0.4s ease !important; /* Animation fluide du zoom */
}

/* DÉCLENCHEMENT DU ZOOM AU HOVER */
.u-section-5 .u-gallery-item:hover .u-back-image {
  transform: scale(1.08) !important; /* Petit zoom de 8% */
}

/* EFFET HOVER SUR LE TEXTE (Apparition du fond sombre) */
.u-section-5 .u-over-slide {
  position: absolute !important;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6) !important; /* Fond noir transparent au survol */
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 20px !important;
  opacity: 0 !important; /* Caché par défaut */
  transition: opacity 0.3s ease !important;
  border-radius: 12px !important; /* Épouse les bords ronds */
}

.u-section-5 .u-gallery-item:hover .u-over-slide {
  opacity: 1 !important; /* Visible au survol */
}

.u-section-5 .u-gallery-heading {
  color: #ffffff !important;
  margin: 0 0 5px 0 !important;
  font-size: 20px !important;
  font-weight: bold !important;
  text-align: center !important;
}

.u-section-5 .u-gallery-text {
  color: #fdd200 !important;
  margin: 0 !important;
  font-size: 14px !important;
  text-align: center !important;
}

/* CSS DE LA FENÊTRE MODALE POP-UP VIDÉO */
.video-modal {
  display: none; 
  position: fixed;
  z-index: 99999;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
}

.video-modal-content video {
  width: 100%;
  height: 100%;
  border-radius: 8px; /* Bords légèrement arrondis sur la vidéo en grand */
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.video-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.video-modal-close:hover { color: #fdd200; }

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
  .u-section-5 .u-gallery-inner-1 {
    grid-template-columns: repeat(2, 1fr) !important; /* 2 colonnes sur tablette */
  }
}
@media (max-width: 575px) {
  .u-section-5 .u-gallery-inner-1 {
    grid-template-columns: repeat(1, 1fr) !important; /* 1 colonne sur smartphone */
  }
}