.views-element-container.contextual-region {
  width: 100vw; 
  position: relative;
  left: 50%;
  margin-left: -50vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  padding-left: 0 !important;
}

.masonry-layout-project {
  width: 100%;
}

.masonry-layout-project .view-content {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.masonry-layout-project .views-row {
  width: 25%; 
  padding: 0px;
  box-sizing: border-box;
  display: inline-block; 
  vertical-align: bottom;
}

.masonry-layout-project .views-row img {
  width: 100% !important;
  height: auto !important;
  display: block;
  left: 0px;
  top: 0px;
}

.pager {
  width: 100%;
  clear: both;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* Positionnement pour l'overlay */
.masonry-layout-project .shuffle-inner {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

/* Le voile noir (Overlay) */
.masonry-layout-project .shuffle-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
}

/* LE TITRE H2 (Remplace le ::after) */
.masonry-layout-project .shuffle-inner h2,
.masonry-layout-project .shuffle-inner h2 a {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  margin: 0;
  padding: 0;
  color: #ffffff !important; /* Force la couleur blanche même si c'est un lien */
  text-decoration: none !important;
  text-align: center;
  font-size: 1.1rem;
  text-transform: uppercase;
  font-weight: bold;
  opacity: 0;
  z-index: 20; /* On monte au dessus de l'overlay (10) */
  pointer-events: none;
  transition: all 0.4s ease;
  transform: translate(-50%, -40%);
}

/* Affichage au survol */
.masonry-layout-project .views-row:hover .shuffle-inner::before {
  opacity: 1;
}

/* Animation du H2 au survol */
.masonry-layout-project .views-row:hover .shuffle-inner h2 {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Animation de l'image */
.masonry-layout-project .views-row img {
  transition: transform 0.8s ease !important;
}

.masonry-layout-project .views-row:hover img {
  transform: scale(1.1) !important;
}

.masonry-layout-project .field--name-field-media-image {
  display: none;
}