/* =========================================
   GALERIES PHOTOS
   ========================================= */

h2 {
    color: bisque;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 15px;
    font-family: 'Righteous', cursive;
}

/* Conteneur galerie */

.slideshow {
    position: relative;

    width: min(95%, 900px);

    aspect-ratio: 16 / 9;

    margin: 30px auto 60px auto;

    border: 2px solid white;
    border-radius: 20px;

    overflow: hidden;

    background: rgba(0, 0, 0, 0.5);

    box-shadow: 0 5px 20px rgba(0,0,0,.8);
}

/* Slides */

.slide {
    position: absolute;
    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;

    transition: opacity 1s ease;

    pointer-events: none;
}

.slide.active {
    opacity: 1;

    pointer-events: auto;

    cursor: zoom-in;

    animation: zoomMove 6s ease forwards;
}

/* Animation zoom */

@keyframes zoomMove {

    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

/* Variante animation */

.slide:nth-child(even).active {
    animation: zoomMoveAlt 6s ease forwards;
}

@keyframes zoomMoveAlt {

    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15) translate(20px, 10px);
    }
}

/* Contrôles */

.controls {
    position: absolute;

    top: 50%;
    left: 0;

    width: 100%;

    display: flex;
    justify-content: space-between;

    transform: translateY(-50%);

    z-index: 10;
}

.controls button {

    background: rgba(0,0,0,.5);

    color: white;

    border: none;

    padding: 12px 15px;

    cursor: pointer;

    font-size: 1.2rem;

    transition: .3s;
}

.controls button:hover {

    background: rgba(255,0,0,.8);
}

/* Pagination */

.dots {

    position: absolute;

    bottom: 15px;

    width: 100%;

    text-align: center;

    z-index: 10;
}

.dot {

    display: inline-block;

    width: 12px;
    height: 12px;

    margin: 0 4px;

    border-radius: 50%;

    background: white;

    opacity: .5;

    cursor: pointer;

    transition: .3s;
}

.dot.active {

    opacity: 1;

    transform: scale(1.2);
}

/* =========================================
   LIGHTBOX
   ========================================= */

#lightbox {

    position: fixed;

    inset: 0;

    display: none;

    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,.95);

    z-index: 9999;

    cursor: zoom-out;
}

#lightbox img {

    max-width: 95%;
    max-height: 95%;

    border-radius: 10px;

    box-shadow: 0 0 30px rgba(255,255,255,.2);
}

/* =========================================
   RESPONSIVE TABLETTE
   ========================================= */

@media screen and (max-width: 768px) {

    .slideshow {

        width: 95%;

        aspect-ratio: 4 / 3;

        margin: 20px auto 40px auto;
    }

    .controls button {

        font-size: 1rem;

        padding: 8px 10px;
    }

    .dot {

        width: 10px;
        height: 10px;
    }

    h2 {

        font-size: 1.3rem;

        margin-top: 30px;
    }
}

/* =========================================
   PETITS SMARTPHONES
   ========================================= */

@media screen and (max-width: 480px) {

    .slideshow {

        aspect-ratio: 1 / 1;
    }

    .controls button {

        padding: 6px 8px;

        font-size: 0.9rem;
    }

    h2 {

        font-size: 1.1rem;
    }
}