
/* Galerie originale conservée — même logique que le site actuel :
   grille 3 colonnes pleine largeur, légendes au survol, ratio Instagram sur mobile. */
.cb-original-gallery-shell .grid-container {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin: auto;
    z-index: 9;
}

.cb-original-gallery-shell .grid-item figure {
    margin: 0;
    position: relative;
}

.cb-original-gallery-shell figcaption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    font-size: 1.1em;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    margin-top: 10px;
    font-weight: bold;
    line-height: 1.35;
    max-height: calc(100% - 10px);
    overflow: auto;
    text-shadow: 0 2px 8px rgba(0,0,0,.45);
}

.cb-original-gallery-shell .grid-item:hover figcaption,
.cb-original-gallery-shell .grid-item:focus-within figcaption {
    opacity: 1;
}

.cb-original-gallery-shell .grid-item {
    justify-content: center;
    align-items: center;
    z-index: 8;
}

.cb-original-gallery-shell .grid-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

@media (max-width: 768px) {
    .cb-original-gallery-shell .grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
        z-index: 9;
    }

    .cb-original-gallery-shell .grid-item figure {
        position: relative;
        width: 100%;
        height: auto;
        padding-top: 125%;
        overflow: hidden;
    }

    .cb-original-gallery-shell .grid-item img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    .cb-original-gallery-shell figcaption {
        font-size: 12px;
        padding: 7px;
        margin-top: 0;
    }
}
