/* Container global du carrousel */
.carousel-container {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background: #111;
}

/* Le carrousel lui-même (conteneur flex des images) */
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Chaque image dans le carrousel */
.carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    cursor: pointer;
    pointer-events: none;
}

.carousel-img.active {
    opacity: 1;
    pointer-events: auto;
}

/* Flèches de navigation */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

/* Points indicateurs (dots) */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--accent) !important;
    transform: scale(1.3);
}

/* ────────────────────────────────
   LIGHTBOX (plein écran)
──────────────────────────────── */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-image,
.lightbox-video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    position: absolute;
    z-index: 2010;
    transition: background 0.3s;
    padding: 10px 20px;
    border-radius: 8px;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent);
}

/* Counter (optionnel) */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    background: rgba(0,0,0,0.6);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Dark mode (optionnel mais cohérent avec ton thème) */
[data-theme="dark"] .carousel-container {
    background: #000;
}

[data-theme="dark"] .carousel-dot {
    background: rgba(255,255,255,0.3);
}

/* Mobile */
@media (max-width: 768px) {
    .carousel-container {
        height: 280px;
    }

    .carousel-prev, .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .lightbox-close, .lightbox-prev, .lightbox-next {
        font-size: 2rem;
        padding: 8px 16px;
    }
}