@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: 100%;
    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;
    max-height: 100vh;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

canvas {
    opacity: 0;
    transition: all 1s;

    &.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;
        }
    }

    section {
        background-color: rgb(255 255 255 / 90%);
        /* background-color: rgb(255 255 255); */
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(1rem);
        flex-direction: column;
        opacity: 0;
        transition: all .8s;
        display: none;
        position: absolute;
        border-radius: 4px;
        font-size: 1.3rem;
        padding: 2rem;
        width: 50vw;
        translate: 0 100vh;
        max-height: 80vh;
        overflow: scroll;
        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: 20%;
                }
            }
        }

        iframe {
            border-radius: 4px;
        }

        p {
            margin: 1rem 0;
        }

        &.active {
            translate: 0 0;
            opacity: 1;
            pointer-events: initial;

            h1::after {
                width: 120%;
            }
        }

        h1 {
            margin: 0;
            padding: 0;
            padding-bottom: 1.5rem;
            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: 1.5rem;
            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;
        } */
    }
}

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;

    svg.lucide-x {
        display: none;
    }
}

#realisations {
    div {
        display: flex;
        flex-direction: column;
        align-items: center;

        img {
            /* width: 50%; */
            height: 200px;
            width: 200px;
        }

        h3 {
            font-weight: bold;
            font-size: revert-rule;
        }

        a {
            margin-top: auto;
        }
    }
}

#contact {
    main {
        justify-content: center;
    }

    .wpcf7 {
        width: 60%;
        display: flex;
        justify-content: center;

        form:not([submitting]) .wpcf7-spinner {
            display: none;
        }

        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: 600px) {
    button#nav {
        display: flex;
    }

    #contact .wpcf7 {
        width: 100%;
    }

    .overlay {
        padding: 0;

        section {
            width: 100%;
            height: 100%;
            max-height: 100vh;
            overflow: scroll;
            padding: 1rem;

            iframe {
                width: 100%;
                border-radius: 4px;
            }

            &#agence .grid img {
                max-width: 100%;
            }

            button {
                padding-top: 1rem;
                display: flex;
                border: none;
                background: none;

                justify-content: center;
                align-items: center;
            }

            &.active {
                h1::after {
                    width: 100%;
                    left: 0;
                }
            }

            header {
                text-align: left;
            }

            main {
                flex-direction: column;
                gap: 1rem;
            }
        }
    }

    nav {
        opacity: 0;
        inset: 0;
        pointer-events: none;
        transition: all .3s;

        ul {
            flex-direction: column;
        }

        &.active {
            opacity: 1;
            pointer-events: all;
            background: rgba(255, 255, 255, 60%);

            &+button#nav {
                svg.lucide-x {
                    display: block;
                }

                svg.lucide-menu {
                    display: none;
                }
            }
        }
    }
}

/* WORDPRESS */

.floating-menu {
    display: none !important;
}

#wpadminbar {
    display: none !important;
}

html {
    margin-top: 0 !important;
}