/* Masquer les titres de page et supprimer l'espace associé */
.page .entry-title,
.page .entry-header {
  display: none;
  margin: 0 !important;
  padding: 0 !important;
}

/* Forcer une image plein écran (alignfull) à bien s'étirer */
.wp-block-image.alignfull {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .galerie-mobile-fix {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espace entre les images */
  }

  .galerie-mobile-fix > .wp-block-column {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .galerie-mobile-fix img {
    width: 100%;
    height: auto;
    display: block;
  }
}

/* Masquer complètement la barre de navigation du thème */
.site-header,
.main-navigation,
.nav-primary {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Supprimer les éventuels blancs laissés */
body {
  margin-top: 0 !important;
}

/* Conteneur du bloc */
.image-hover-texte {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Image normale */
.image-hover-texte img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.4s ease;
}

/* Texte caché au départ */
.image-hover-texte p,
.image-hover-texte h2,
.image-hover-texte .wp-block-heading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  text-align: center;
  padding: 1rem;
}

/* Fond noir au hover */
.image-hover-texte::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

/* Effet au survol */
.image-hover-texte:hover::before {
  opacity: 0.8;
}

.image-hover-texte:hover img {
  opacity: 0.2;
}

.image-hover-texte:hover p,
.image-hover-texte:hover h2,
.image-hover-texte:hover .wp-block-heading {
  opacity: 1;
}
