/* Header galerie */
.galerie-header {
    text-align: center;
    margin-bottom: 30px;
}

.galerie-header h1 {
    font-family: Cabin, sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.galerie-count {
    display: inline-block;
    font-size: 13px;
    color: #fff;
    background-color: #7c5cbf;
    padding: 4px 14px;
    border-radius: 20px;
    margin: 8px 0 0;
    letter-spacing: 0.5px;
}

/* ===== Grille images ===== */
.galerie-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

/* Masquer tout enfant direct qui n'est pas .galerie-item */
.galerie-grid > :not(.galerie-item) {
    display: none !important;
}

.galerie-grid > .galerie-item {
    width: 100%;
}

@media (min-width: 576px) {
    .galerie-grid > .galerie-item {
        width: calc(50% - 12px);
    }
}

@media (min-width: 992px) {
    .galerie-grid > .galerie-item {
        width: calc(33.333% - 16px);
    }
}

/* Item galerie */
.galerie-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform .3s ease, box-shadow .3s ease;
}

.galerie-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Image wrap */
.galerie-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #eee;
}

.galerie-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .4s ease;
}

.galerie-item:hover .galerie-img-wrap img {
    transform: scale(1.08);
}

/* Overlay au survol */
.galerie-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
}

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

.galerie-zoom {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transform: scale(0.7);
    transition: transform .3s ease;
}

.galerie-item:hover .galerie-zoom {
    transform: scale(1);
}

/* Info sous l'image */
.galerie-info {
    padding: 14px 16px;
}

.galerie-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px;
    line-height: 1.3;
}

.galerie-desc {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.5;
}

/* ===== Grille vidéos ===== */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.video-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform .3s ease, box-shadow .3s ease;
}

.video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 12px 16px;
}

.video-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0;
}

/* ===== Pagination ===== */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.pagination .page-item .page-link {
    border-radius: 8px;
    color: #555;
    border: 1px solid #ddd;
    padding: 8px 14px;
    transition: all .2s ease;
}

.pagination .page-item .page-link:hover {
    background-color: #7c5cbf;
    border-color: #7c5cbf;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background-color: #7c5cbf;
    border-color: #7c5cbf;
    color: #fff;
}

/* ===== Lightbox2 - réduire la taille de l'image ===== */
.lb-outerContainer {
    max-width: 80vw !important;
    max-height: 80vh !important;
}

/* .lb-image {
    max-width: 80vw !important;
    max-height: 80vh !important;
} */
.lb-image {
    max-width: 80vw !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* ===== Overlay legacy (à retirer si plus utilisé) ===== */
#imageOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#closeOverlay {
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 28px;
}

#overlayImage {
    max-width: 90%;
    max-height: 90vh;
    display: block;
}

/* ===== Vitrinemedia image containers ===== */
.image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.image-container .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.image-container:hover .card-img-top {
    transform: scale(1.05);
}
