html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body {
    --background-width: min(40%, 848px);
    --project-button-primary-background: #f5a243;
    --project-button-primary-background-hover: #ffc145;
    --project-button-primary-color: var(--project-white);
    --project-button-primary-color-hover: var(--project-white);

font-family: var(--project-font-family, var(--pico-font-family));
    display: flex;
    flex-direction: column;

    > .background {
        display: block;
        height: 139px;
        width: 100%;
        background-color: var(--pico-primary);
        /** todo : C'est pas une image libre de droit ! A remplacer dès qu'on aura une image définitive (ou la licence pour cette image) */
        background-image: url("../img/login/login-background-5a95e23aea5740ecf232ca2eaa814e52.png");
        background-size: cover;
        background-position: 0 25%;
        background-repeat: no-repeat;
    }

    > main {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: calc(100vw - 15px);

        > header {
            display: flex;
            flex-direction: row-reverse;
            padding: 0 5% 0 0;
            width: 100%;
            margin-bottom: 2rem;

            .welcome-block {
                display: flex;
                flex-direction: row;
                height: 78px;
                justify-content: center;
                align-items: center;
                gap: 28px;

                p {
                    margin: unset;
                    text-align: end;
                    font-size: 18px;
                    font-weight: bold;
                }

                .user-initials {
                    align-content: center;
                    text-align: center;
                    width: 78px;
                    height: 78px;
                    background-color: var(--portailpro-menu-background);
                    border-radius: 50%;
                    font-size: 31px;
                    font-weight: bold;
                    color: var(--portailpro-menu-color)
                }
            }

            a {
                color: var(--project-footer-note-color);
                text-decoration: none;
            }
        }

        > .content {
            width: 100%;
            margin: auto;
            padding: 0 5%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 40px;
        }

        .login-logo {
            width: 200px;
            height: auto;
            align-self: center;
        }

        form {
            min-width: 80%;
            display: flex;
            flex-direction: column;
            gap: 20px;
            --pico-spacing: 0;
            h1 {
                font-weight: 900;
                text-align: center;
            }
            label {
                color: var(--project-headings-color);
                font-weight: bold;
            }
            a {
                color: #f19f38;
                text-decoration: none;
                text-align: right;
            }
        }

        footer {
            display: flex;
            width: 100%;
            justify-content: space-between;
            margin-top: auto;
            padding: 3rem 2rem 1rem 2rem;
            color: var(--project-footer-note-color);
            background: none;

            a, p {
                color: inherit;
                text-decoration: none;
            }
        }
    }

    /* Pour gérer la barre de debug de symfony */
    > .sf-toolbar {
        position: absolute;
    }
}

@media (width >= 1024px) {
    body {
        flex-direction: row;

        > .background {
            display: block;
            position: fixed;
            top: 0;
            left: 0;
            --background-width: min(40%, 848px);
            width: var(--background-width);
            height: 100%;
            background-position: 0;


            &::before {
                content: '';
                position: absolute;
                left: 0;
                bottom: 0;
                width: 100%;
                height: 100%;
                background-image: url(../../images/logo-front.png);
                background-repeat: no-repeat;
                background-position: left 80px bottom 60px;
            }
        }

        > main {
            margin-left: var(--background-width);

            header {
                margin-bottom: 0;
            }

            .content {
                max-width: 750px;
                margin-top: 2rem;
                align-items: center;

                form {
                    min-width: unset;
                    max-width: 400px;
                    width: 100%;
                }
            }

            form {
                min-width: 600px;
            }
        }
    }
}
