/* ── FILTRES ──
   Spécificité renforcée (.pa-filters button.pa-filter-btn) pour l'emporter
   sur la règle globale du thème « .elementor-kit-6 button » qui stylise
   tous les <button> du site (fond doré plein, coins arrondis, etc.). */
.pa-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.pa-filters button.pa-filter-btn {
    padding: 9px 20px !important;
    border: 1px solid rgba(201, 168, 76, 0.3) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #f7f4ee !important;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pa-filters button.pa-filter-btn:hover {
    background: transparent !important;
    border-color: #c9a84c !important;
    color: #c9a84c !important;
}

.pa-filters button.pa-filter-btn.active {
    background: #c9a84c !important;
    color: #0b0f1a !important;
    border-color: #c9a84c !important;
}

/* ── GRILLE MASONRY (CSS Grid + JS) ── */
.pa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 8px; /* unité de mesure fine, le span réel est calculé en JS */
    gap: 20px;
}

/* ── ITEM ── */
.pa-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
    background-color: #111620;
    text-decoration: none;
    /* grid-row-end est injecté en inline-style par le JS selon la hauteur réelle de l'image */
}

.pa-item img {
    display: block;
    width: 100%;
    height: auto; /* conserve les proportions naturelles de l'image */
}

.pa-item--hidden {
    display: none;
}

/* ── OVERLAY ── */
.pa-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.75));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pa-item:hover .pa-item__overlay {
    opacity: 1;
}

/* ── INFO ── */
.pa-item__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    transform: translateY(8px);
    transition: transform 0.3s ease;
    z-index: 2;
}

.pa-item:hover .pa-item__info {
    transform: translateY(0);
}

.pa-item__tag {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 6px;
}

.pa-item__title {
    font-family: 'Cormorant', serif;
    font-size: 1.2rem;
    font-weight: 300;
    color: #f7f4ee;
    line-height: 1.3;
}

/* ── GRILLE FIXE PAGE D'ACCUEIL (mise en page d'origine, inchangée) ── */
.real-grid-custom {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 2px;
}
.real-card-custom {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: block;
  text-decoration: none;
  cursor: pointer; /* remplace le curseur "lien" par défaut, maintenant que ce n'est plus un <a> */
}
/* Placement EXPLICITE de chaque tuile (plutôt que de compter sur le
   placement automatique de CSS Grid via :first-child) : plus fiable,
   garantit toujours grande image à gauche + 4 petites à droite en 2x2,
   peu importe l'ordre exact du DOM ou d'éventuels styles concurrents. */
.pa-home-grid > .real-card-custom:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.pa-home-grid > .real-card-custom:nth-child(2) { grid-column: 2; grid-row: 1; }
.pa-home-grid > .real-card-custom:nth-child(3) { grid-column: 3; grid-row: 1; }
.pa-home-grid > .real-card-custom:nth-child(4) { grid-column: 2; grid-row: 2; }
.pa-home-grid > .real-card-custom:nth-child(5) { grid-column: 3; grid-row: 2; }
.real-card-custom::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.75));
}
.real-card-info-custom {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  transform: translateY(8px);
  transition: transform 0.3s;
}
.real-card-custom:hover .real-card-info-custom {
  transform: translateY(0);
}
.real-tag-custom {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #dbbf62;
  margin-bottom: 6px;
}
.real-card-info-custom h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 300;
  margin: 0;
}

/* ── LIGHTBOX (pop-up d'affichage image en grand) ── */
.pa-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 26, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 48px;
    z-index: 9999;
}

.pa-lightbox.pa-lightbox--open {
    display: flex;
}

.pa-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pa-lightbox__close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #f7f4ee;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.pa-lightbox__close:hover {
    color: #c9a84c;
}

.pa-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(247, 244, 238, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.3);
    color: #f7f4ee;
    font-size: 2.2rem;
    line-height: 1;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pa-lightbox__nav:hover {
    border-color: #c9a84c;
    color: #c9a84c;
    background: rgba(201, 168, 76, 0.08);
}

.pa-lightbox__nav--prev {
    left: 24px;
}

.pa-lightbox__nav--next {
    right: 24px;
}

.pa-lightbox__title {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cormorant', serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #f7f4ee;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Sur petit écran, les flèches passent au-dessus/en dessous de l'image pour ne pas la chevaucher */
@media (max-width: 700px) {
    .pa-lightbox {
        padding: 24px;
    }
    .pa-lightbox__nav {
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }
    .pa-lightbox__nav--prev {
        left: 8px;
    }
    .pa-lightbox__nav--next {
        right: 8px;
    }
}

/* ── BOUTON CHARGER PLUS ── */
.pa-load-more-wrap {
    text-align: center;
    margin-top: 48px;
}

.pa-load-more {
    padding: 14px 48px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    background: transparent;
    color: #c9a84c;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pa-load-more:hover {
    background: #c9a84c;
    color: #0b0f1a;
}

.pa-load-more.hidden {
    display: none;
}

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

@media (max-width: 600px) {
    .pa-grid {
        grid-template-columns: 1fr;
    }
}