@import url(https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap);

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Montserrat", sans-serif;
    font-size: 1em;
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
.end {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom,
            #f8d30f 0%,
            #f8d30f 15%,
            /* Jaune pur sur 40% */
            #e6d914 30%,
            /* Transition rapide */
            #b7c51b 80%,
            #93c21c 100%);
}

.title {
    width: 100vw;
    height: 100vh;
}
.title img {
    position: relative;
    width: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.end-img {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
}

.end-img img {
    width: 100%;
    border-radius: 50%;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
}

.first {
    height: 100vh;
}

.scroll-container {
    height: 2000vh;
    position: relative;
}

.image-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    pointer-events: none;
}

.image-container {
    position: relative;
    width: 440px;
    height: 520px;
    perspective: 1000px;
    left: 15%;
}

.image-box {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.image-visible {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.image-rechange {
    width: 100%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}


.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    /* SUPPRIMÉ: will-change: transform; */
}

overlay-front {
    pointer-events: none;
}

.overlay-back {
    pointer-events: auto;
}

.overlay-right {
    transform-origin: right center;
    transform: rotateY(0deg);
}

.overlay-left {
    transform-origin: left center;
    transform: rotateY(0deg);
}

.overlay-front,
.overlay-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
}

.overlay-front {
    background-color: rgba(0, 0, 0, 0.95);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.overlay-back {
    background-color: rgba(255, 255, 255, 1);
    transform: rotateY(180deg);
    width: 100%;
    text-align: center;
}

.overlay-content {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.overlay p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ddd;
    max-width: 90%;
    margin-bottom: 10px;
}

.overlay-back a,
.rechange-item a {
    text-decoration: none;
    color: #be1526;
}

.overlay-back a:hover,
.rechange-item a:hover {
    text-decoration: none;
    color: #22427c;
}

.image-left img {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-60%, -95%)
}

.image-right img {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-45%, -95%)
}

.credits {
    position: fixed;
    bottom: 15px;
    left: 15px;
    font-size: 12px;
    color: rgb(250 250 250 / .9);
    background: rgb(10 25 45 / .4);
    padding: 5px 10px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    z-index: 10;
    opacity: .8;
    transition: opacity 0.3s
}

.credits:hover {
    opacity: 1
}

.informations p {
    color: black;
    width: 440px;
    backface-visibility: hidden;
    -webkit-font-smooth: antialiased;
    -moz-osx-font-smooth: grayscale;
}

.informations {
    position: absolute;
    bottom: 20px;
    padding: 15px;
}

.smartphone {
    display: none;
}

.scroll-container {
    display: block;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .image-container {
        width: 300px;
        height: 380px;
    }

    .informations p {
        width: 300px;
    }

    .image-left img,
    .image-right img {

        display: none;
    }
}

@media (max-width: 800px) {
    .smartphone {
        display: block;
    }

    .scroll-container {
        display: none;
    }

    .end-img {

        width: 70vw;
        height: 70vw;
    }
}

@media (max-width: 768px) {
    .image-container {
        width: 200px;
        height: 280px;
    }

    .informations p {
        width: 200px;
    }

    @media (max-width: 500px) {
        .image-container {
            width: 150px;
            height: 230px;
        }

        .informations p {
            width: 130px;
            font-size: 12px;

        }

        .image-container {

            left: 50px;
        }

    }