.carousel {
    position: relative;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    touch-action: pan-y;
}

.slides {
    display: flex;
    transition: transform .4s ease-in-out;
    will-change: transform;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

/* Flèches */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    background: transparent;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
}

.arrow.left {
    left: 15px;
}

.arrow.right {
    right: 15px;
}

/* Dots */
.dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dots button {
    width: 12px;
    height: 12px;
    margin: 5px;
    border-radius: 50%;
    border: none;
    background: grey;
    cursor: pointer;
}

.dots button.active {
    background: white;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: hidden;
    touch-action: none;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    background: none;
    color: white;
    border: none;
    cursor: pointer;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    background: none;
    color: white;
    border: none;
    cursor: pointer;
}

.lightbox-arrow.left {
    left: 30px;
    z-index: 2;
}

.lightbox-arrow.right {
    right: 30px;
    z-index: 2;
}

html.lightbox-open,
body.lightbox-open {
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

@media (prefers-reduced-motion: reduce) {
    .slides {
        transition: none;
    }
}

@media (max-width: 991px) {
    .arrow.left {
        left: 10px;
    }

    .arrow.right {
        right: 10px;
    }
}

@media (max-width: 767px) {
    .dots button {
        width: 10px;
        height: 10px;
    }

    .arrow.left {
        left: 5px;
    }

    .arrow.right {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .dots button {
        margin: 3px;
    }

    .arrow.left {
        left: 0;
    }

    .arrow.right {
        right: 0;
    }

    .lightbox-arrow {
        font-size: 2rem;
    }
}