@property --v-progress {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 20%;
}

@property --v-color-b {
    syntax: "<color>";
    inherits: false;
    initial-value: rgba(0, 0, 0, 0.2);
}

@property --v-color-t {
    syntax: "<color>";
    inherits: false;
    initial-value: transparent;
}

b,
strong {
    font-weight: bold;
}

.vignette {
    position: absolute;
    /* bottom: 0; */
    width: 100%;
    background: linear-gradient(to top, var(--v-color-b), var(--v-color-t) var(--v-progress));
    height: 100vh;
    transition: opacity .4s, --v-progress 1s, --v-color-b 1s, --v-color-t 1s, backdrop-filter .5s;
    pointer-events: none;
    z-index: 2;

    &.full {
        --v-progress: 100%;
        --v-color-b: rgba(0, 0, 0, 0.2);
        --v-color-t: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(.2rem);
    }
}

body {
    margin: 0;

    font-family: "Quattrocento", serif;
    height: 100vh;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

canvas {
    display: block;
    opacity: 0;
    transition: opacity 1s;
    width: 100vw;
    height: 100vh;

    &.active {
        opacity: 1;
    }
}

.overlay {
    position: absolute;
    height: 100vh;
    width: 100vw;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 2;

    #logo-container {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: all .8s;

        #logo {
            max-width: 20rem;
        }

        &.active {
            opacity: 1;
        }
    }

    .mobile-touch-indicator {
        display: none;
        margin-top: auto;
        margin-bottom: 3rem;
        position: relative;
        height: 4rem;
        width: 100%;
        flex-shrink: 0;

        &::after {
            content: '';
            position: absolute;
            background: black;
            border-radius: 50%;
            width: 8px;
            height: 8px;
            left: calc(50% - 4px);
            top: 8px;
            box-shadow: 0 0 8px 4px rgba(71, 155, 156, 0.05);

            animation: 1.5s ease-in-out 2s infinite reverse scroll-indicator;
        }
    }

    #scroll-indicator-container {
        position: absolute;
        bottom: 10vh;
        opacity: 0;
        pointer-events: none;
        transition: all .8s;
        display: flex;
        flex-direction: column;
        align-items: center;

        &.active {
            opacity: .9;
        }

        span {
            translate: 0 -2.5rem;
            color: #479B9C;
        }

        #scroll-indicator {
            --indic_color: rgb(71, 155, 156);
            position: absolute;
            width: 40px;
            height: 60px;
            border: 4px solid var(--indic_color);
            border-radius: 24px;
            box-shadow: 0 0 32px 10px rgba(71, 155, 156, 0.05);

            &::after {
                content: '';
                position: absolute;
                background: var(--indic_color);
                border-radius: 50%;
                width: 8px;
                height: 8px;
                left: calc(32px / 2 - 4px);
                top: 8px;
                box-shadow: 0 0 8px 4px rgba(71, 155, 156, 0.05);

                animation: 1.5s ease-in-out 2s infinite scroll-indicator;
            }
        }
    }

    section {
        background-color: rgb(255 255 255 / 85%);
        /* background-color: rgb(255 255 255); */
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(.5rem);
        flex-direction: column;
        opacity: 0;
        transition: all .8s;
        display: none;
        position: absolute;
        border-radius: 4px;
        font-size: 1.1rem;
        padding: 2rem;
        width: 50vw;
        translate: 0 100vh;
        max-height: 82vh;
        overflow: auto;
        text-align: justify;
        /* background: linear-gradient(#f0c1b8, #d9e6c0); */

        &>button {
            display: none;
        }

        &#agence {
            .grid {
                margin-top: 1rem;
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                justify-content: center;
                gap: 1rem;
                transition: all .5s;

                img {
                    max-width: 12%;
                }
            }
        }

        video {
            border-radius: 4px;
            max-width: 80%;
        }

        p {
            margin: 1rem 0;
        }

        &.active {
            translate: 0 -2vh;
            opacity: 1;
            pointer-events: initial;

            h1::after {
                width: 120%;
            }
        }

        h1 {
            margin: 0;
            padding: 0;
            padding-bottom: 1rem;
            width: fit-content;
            position: relative;

            &::after {
                content: '';
                position: absolute;
                background: black;
                bottom: 0;
                left: -10%;
                width: 0%;
                height: 2px;
                transition: all 1s 1s cubic-bezier(.22, .61, .36, 1);
            }
        }

        /* img {
            width: 80%;
            place-self: center;
            border-radius: 8px;
        } */

        header {
            margin-bottom: 1rem;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        main {
            display: flex;
            gap: 4rem;

            &>div {
                flex: 1;

                /* img {
                    max-width: 100%;
                    max-height: 100%;
                    border-radius: 4px;
                } */
            }
        }
    }

    &>button:not(#nav) {
        display: none;
        opacity: 0;
        background: white;
        border: none;
        padding: 1rem 5rem;
        border-radius: 4px;
        font-size: 1.5rem;
        font-family: "Quattrocento", serif;
        font-weight: bold;
        transition: all .2s;
        box-shadow: 0px 0px 4px rgba(0, 0, 0, .1);
        align-self: end;

        &:hover {
            cursor: pointer;
            translate: 0 -5px;
        }

        /* &.active {
            display: flex;
            opacity: 1;
            pointer-events: all;
        } */
    }
}

@keyframes scroll-indicator {
    /* 0% {
        top: 8px;
        opacity: 0;
    } */

    5% {
        top: 8px;
        opacity: 1;
    }

    80% {
        top: 32px;
        opacity: 0;
    }

    81% {
        top: 8px;
        opacity: 0;
    }
}

.overlay>nav {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    position: absolute;
    font-size: 1.5rem;
    color: gray;
    pointer-events: all;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    z-index: 10;

    ul {
        margin: 0;
        list-style: none;
        gap: 4rem;
        border-radius: 4px;
        background: rgba(255, 255, 255, 80%);
        backdrop-filter: blur(4px);
        padding: .5rem 4rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    }

    li {
        transition: all .2s;
        position: relative;

        a {
            text-decoration: none;
            color: inherit;

            svg {
                display: block;
                margin-bottom: 2px;
                border-bottom: 1px solid transparent;
                transition: all .2s;
            }
        }

        &:first-of-type {
            height: 33px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        &:hover {
            color: black;
            cursor: pointer;
        }

        &::before {
            content: "\2919";
            text-decoration: none;
            position: absolute;
            translate: -2rem 0;
            opacity: 0;
            top: 0;
            transition: all .3s;
            pointer-events: none;
        }

        &::after {
            content: "\291A";
            text-decoration: none;
            position: absolute;
            right: 0;
            translate: 2rem 0;
            opacity: 0;
            top: 0;
            transition: all .3s;
            pointer-events: none;
        }

        &.active {
            color: black;
            text-decoration: underline;
            position: relative;

            svg {
                border-bottom: 1px solid black;
            }

            &::before {
                opacity: .8;
                translate: -1.5rem 0;
            }

            &::after {
                opacity: .8;
                translate: 1.5rem 0;
            }
        }
    }
}

button#nav {
    display: none;
    background: rgba(255, 255, 255, 80%);
    border: 1px solid rgba(0, 0, 0, 30%);
    border-radius: 4px;
    backdrop-filter: blur(4px);
    padding: .5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    justify-content: center;
    align-items: center;
    pointer-events: all;
    z-index: 11;

    svg.lucide-x {
        display: none;
    }
}

#realisations {
    width: 50vw;

    main {
        display: flex;
        flex-direction: column;

        nav {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 48px;
            margin-top: 1rem;

            button {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                font-family: 'Quattrocento';
                background: none;
                border: none;
                position: relative;
                transition: all .2s;

                &:hover {
                    cursor: pointer;

                    img,
                    h3 {
                        opacity: 1;
                    }
                }

                &.active {

                    img,
                    h3 {
                        opacity: 1;
                    }

                    h3 {
                        text-decoration: underline;
                    }
                }

                &:not(:first-of-type)::before {
                    content: '';
                    background: black;
                    width: 8px;
                    height: 8px;
                    border-radius: 100%;
                    position: absolute;
                    top: calc(50% - 12px);
                    bottom: 0;
                    left: -32px;
                    opacity: 1;
                }

                img {
                    height: 64px;
                    width: 64px;
                    opacity: .3;
                    transition: all .2s;
                }

                h3 {
                    opacity: .5;
                    transition: all .2s;
                }
            }
        }

        .content {
            display: none;
            gap: 2rem;
            opacity: 0;
            transition: all 1s 1s;
            justify-content: space-between;

            &.active {
                display: flex;
                opacity: 1;
                transition: all 1s 1s;
            }

            .text {
                /* flex: 1; */

                a {
                    font-size: 1.1rem;
                    color: black;
                    /* font-weight: bold; */

                    &:visited {
                        color: black;
                    }
                }
            }

            .slider {
                display: flex;
                justify-content: center;
                align-items: center;
                /* flex: 2; */
                max-width: 50%;
                gap: 2rem;

                .left button,
                .right button {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    padding: .5rem;
                    border-radius: 10px;
                    background: #FFF;
                    box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
                    transition: all .2s;
                    border: none;
                    margin-bottom: 2rem;

                    &:hover {
                        cursor: pointer;
                        box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.5);
                    }
                }

                .center {
                    /* flex: 1; */
                    width: 400px;

                    .images {
                        /* width: 100%; */
                        height: 400px;
                        position: relative;
                        overflow: hidden;
                        border-radius: 4px;

                        .indicators {
                            position: absolute;
                            bottom: 1rem;
                            left: 0;
                            right: 0;
                            display: flex;
                            gap: .5rem;
                            justify-content: center;
                            align-items: center;
                            z-index: 5;

                            .dot {
                                width: 16px;
                                height: 16px;
                                background: #F3F3F3;
                                opacity: .4;
                                transition: all .2s;
                                border-radius: 50%;

                                &.active {
                                    opacity: 1;
                                }
                            }
                        }

                        &::after {
                            content: '';
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100%;
                            background: linear-gradient(transparent 80%, rgba(0, 0, 0, .4));
                            z-index: 4;
                        }

                        img {
                            max-width: 100%;
                            height: 100%;
                            width: 100%;
                            object-fit: cover;
                            position: absolute;

                            &.active {
                                z-index: 3;
                            }
                        }
                    }

                    .descriptions {
                        p {
                            display: none;
                            text-align: center;
                            justify-content: center;
                            align-items: center;
                            width: 100%;
                            font-size: 1.1rem;

                            a:visited {
                                color: black;
                            }

                            &.active {
                                display: flex;
                            }
                        }
                    }
                }
            }
        }
    }
}

#contact {
    main {
        justify-content: center;
    }

    .wpcf7 {
        width: 60%;
        display: flex;
        justify-content: center;

        form:not([submitting]) .wpcf7-spinner {
            display: none;
        }

        form {
            width: 100%;
        }

        p {
            width: 100%;

            input,
            textarea {
                width: 100%;
                border-radius: 4px;
                border: 1px solid grey;
                font-size: 1.1rem;
            }

            input[type="submit"] {
                font-family: "Quattrocento";
                font-size: 1.2rem;
                padding: .25rem;
                background: white;
                border: 1px solid grey;
            }

            &:last-of-type {
                display: flex;
                justify-content: center;
                flex-direction: column;
                align-items: center;
            }
        }
    }
}

@media (max-width: 1921px) {
    #realisations {
        width: 80vw;

        main {
            gap: 0px;

            .slider {
                .center {
                    width: 300px !important;
                }

                .images {
                    height: 300px !important;
                }
            }
        }
    }

    .overlay #scroll-indicator-container {
        bottom: 12vh;
    }
}

@media (max-width: 1500px) {
    .overlay>nav {
        font-size: 1rem;

        ul {
            gap: 2rem;
        }

        li:first-of-type {
            height: 1.2rem;

            svg {
                height: 1.2rem;
            }
        }
    }

    .overlay section {
        font-size: 1rem;
        padding: 1.5rem;
        width: 62vw;

        h1 {
            font-size: 2.1rem;
        }
    }

    #realisations {
        nav {
            img {
                width: 2rem !important;
                height: 2rem !important;
            }

            h3 {
                font-size: 1rem;
            }
        }

        .slider {
            .images {
                height: 150px !important;
            }
        }
    }

    #contact form {
        p {
            padding: 0;
            margin: .5rem 0;
        }

        textarea {
            max-height: 100px;
        }
    }
}

@media (max-width: 600px) {
    .overlay .mobile-touch-indicator {
        display: block;
    }

    .vignette {
        display: none;
    }

    .overlay section video {
        max-width: 100%;
    }

    .overlay #logo-container #logo {
        max-width: 60vw;
    }

    #scroll-indicator-container {
        #scroll-indicator {
            border: none !important;
            box-shadow: none !important;

            &::after {
                animation-direction: reverse !important;
            }
        }
    }

    button#nav {
        display: flex;
    }

    #contact .wpcf7 {
        width: 100%;
    }

    .overlay {
        padding: 0;
        overflow: hidden;

        section {
            width: 100%;
            height: 100%;
            max-height: 100vh;
            overflow: scroll;
            padding: 1rem;

            iframe {
                width: 100%;
                border-radius: 4px;
            }

            &#agence .grid img {
                max-width: 40%;
            }

            &#agence,
            &#realisations {
                padding-bottom: 4rem;
            }

            button {
                padding-top: 1rem;
                display: flex;
                border: none;
                background: none;

                justify-content: center;
                align-items: center;
            }

            &.active {
                translate: 0 0;

                h1::after {
                    width: 100%;
                    left: 0;
                }
            }

            header {
                margin-top: 24px;
                text-align: left;
                justify-content: start;

                h1 {
                    font-size: 1.5rem;
                    padding-right: 2.5rem;
                }
            }

            main {
                flex-direction: column;
                gap: 1rem;
            }
        }

        #realisations {
            width: 100%;
            height: 100%;
            max-height: 100vh;
            overflow: scroll;
            padding: 1rem;
        }
    }

    .overlay>nav {
        opacity: 0;
        inset: 0;
        pointer-events: none;
        transition: all .3s;

        ul {
            flex-direction: column;
            gap: 3rem;
            padding: 2rem 4rem;
        }

        &.active {
            opacity: 1;
            pointer-events: all;
            background: rgba(255, 255, 255, 60%);

            &+button#nav {
                svg.lucide-x {
                    display: block;
                }

                svg.lucide-menu {
                    display: none;
                }
            }
        }
    }

    #realisations {
        main {
            nav {
                flex-direction: column;
                gap: 0;

                button {
                    flex-direction: row;
                    justify-content: start;
                    width: 65%;
                    gap: 1rem;
                    padding: 0;

                    img {
                        width: 2rem;
                        object-fit: contain;
                    }

                    &::before {
                        display: none;
                    }
                }
            }

            .content {
                flex-direction: column;

                .slider {
                    max-width: none;

                    .left,
                    .right {
                        display: none;
                    }
                }
            }
        }
    }
}

/* WORDPRESS */

.floating-menu {
    display: none !important;
}

#wpadminbar {
    display: none !important;
}

html {
    margin-top: 0 !important;
}