/* ===============================
   GALERIE RÉALISATIONS – MOSAÏQUE
   =============================== */

/* Wrapper */
.galerie-realisations-wrapper {
    margin: 3rem 0;
}

/* Accroche */
.accroche-galerie {
    margin: 0 auto 3rem;
    font-size: 2rem;
    line-height: 1.8;
    color: var(--color-dark-grey);
    background: var(--bg-soft-gradient);
    border-left: 4px solid var(--color-primary-brown);
    border-radius: 8px;
    padding: 2rem 2.5rem;
    box-shadow: var(--soft-box-shadow);
    position: relative;
}

.accroche-galerie::before {
    content: "\f6c0";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 7rem;
    color: var(--color-primary-brown);
    opacity: 0.2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.accroche-galerie p {
    position: relative;
    z-index: 1;
    margin: 0 !important;
}

/* ===============================
   GRILLE MOSAÏQUE (CSS Columns)
   =============================== */
.galerie-grid {
    column-count: 4;
    column-gap: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .galerie-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .galerie-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .galerie-grid {
        column-count: 1;
    }
}

/* Carte image */
.galerie-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    position: relative;
    /* pour overlay */
}

/* Image */
.galerie-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Hover effet léger */
.galerie-item:hover img {
    transform: scale(1.02);
}

.galerie-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

/* ===============================
   Légende overlay limitée à l'image
   =============================== */
.galerie-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* maintenant limitée à la largeur de l'image */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* overlay ne bloque pas le clic */
}

.galerie-item:hover .galerie-item-overlay {
    opacity: 1;
}

.galerie-item-legende {
    color: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ===============================
   MODALE (INCHANGÉE)
   =============================== */
.galerie-modale {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.galerie-modale.active {
    display: flex;
}

.modale-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.modale-content img {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
    border-radius: 4px;
}

.modale-legende {
    color: var(--color-white) !important;
    margin-top: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

/* ------------------------------
   BOUTONS MODALE RÉDUITS
   ------------------------------ */
.modale-close {
    position: absolute;
    top: 10px;
    /* haut à droite */
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 20px;
    /* croix légèrement plus grande */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.3s ease, color 0.3s ease;
}

.modale-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Flèches */
.modale-nav {
    position: absolute;
    top: 50%;
    /* centré verticalement */
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 15px;
    /* icône flèche réduite */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.3s ease, color 0.3s ease;
}

.modale-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modale-prev {
    left: 10px;
}

.modale-next {
    right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .modale-close {
        top: 8px;
        right: 12px;
        width: 25px;
        height: 25px;
        font-size: 16px;
    }

    .modale-nav {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .modale-prev {
        left: 8px;
    }

    .modale-next {
        right: 8px;
    }
}

/* Aucun contenu */
.no-content {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-style: italic;
}