/* Grille Masonry */
.wpc-dramagraphie-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Item de la galerie */
.dramagraphie-item {
  position: absolute;
  overflow: hidden;
  cursor: pointer;
  width: calc(25% - 12px); /* 4 colonnes par défaut (iPad Pro et desktop) */
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Animation au chargement */
.dramagraphie-item.loaded {
  opacity: 1;
  transform: scale(1);
}

/* iPad Pro (1024px et plus) - 4 colonnes */
@media (min-width: 1024px) {
  .dramagraphie-item {
    width: calc(25% - 12px); /* 4 colonnes */
  }
}

/* iPad mini (768px à 1023px) - 3 colonnes */
@media (min-width: 768px) and (max-width: 1023px) {
  .dramagraphie-item {
    width: calc(33.333% - 10px); /* 3 colonnes */
  }
}

/* Smartphone (moins de 768px) - 1 colonne */
@media (max-width: 767px) {
  .dramagraphie-item {
    width: 100%; /* 1 colonne */
  }
}

.dramagraphie-item a {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

/* Wrapper de l'image */
.dramagraphie-image-wrapper {
  position: relative;
  width: 100%;
  background: #000;
}

.dramagraphie-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

/* OVERLAY - TOUTE LA HAUTEUR */
.dramagraphie-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
  padding: 30px 20px;
}

.dramagraphie-item:hover .dramagraphie-overlay,
.dramagraphie-item:focus-within .dramagraphie-overlay {
  opacity: 1;
}

/* CONTENEUR TITRE ET ANNÉE */
.dramagraphie-overlay-content {
  position: relative;
  width: 100%;
  text-align: center;
}

/* SÉPARATEURS DÉCORATIFS - Haut et bas du conteneur */
.dramagraphie-overlay-content::before,
.dramagraphie-overlay-content::after {
  content: "";
  display: block;
  width: 80%;
  height: 0;
  border-style: dotted;
  border-width: 1px 0px 1px 0px;
  border-color: #ffffff;
  margin: 0 auto;
}

.dramagraphie-overlay-content::before {
  margin-bottom: 15px;
}

.dramagraphie-overlay-content::after {
  margin-top: 15px;
}

/* TITRE EN MAJUSCULES */
.dramagraphie-title {
  margin: 0;
  padding: 0 10px;
  text-align: center;
  font-family: "Montserrat", Sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ANNÉE */
.dramagraphie-year {
  display: block;
  text-align: center;
  font-family: "Montserrat", Sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 1px;
  color: #ffffff;
  margin-top: 15px;
}

/* RESPONSIVE */
@media (max-width: 767px) {
  /* Masquer complètement l'overlay (titre/année) sur mobile */
  .dramagraphie-overlay {
    display: none;
  }
}

/* ACCESSIBILITÉ */
.dramagraphie-item a:focus {
  outline: 2px solid #fff;
  outline-offset: -2px;
}
