/* =========================================================
   LOGIN PAGE
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body.member-login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: #202427;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #e5e7e9;
}


/* =========================================================
   CARTE
========================================================= */

.login-card {
    width: min(900px, 100%);

    min-height: 498px;

    display: grid;

    grid-template-columns: 42% 58%;

    overflow: hidden;

    border: 1px solid #465058;

    border-radius: 18px;

    background: #202427;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);
}


/* =========================================================
   GAUCHE
========================================================= */

.login-left {
    position: relative;

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    padding: 44px 48px;

    overflow: hidden;

    background:
        linear-gradient(145deg,
            #39afd1 0%,
            #43a9ad 48%,
            #79ca3b 100%);
}


/* =========================================================
   LOGO
========================================================= */

.login-logo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    animation: logoAppear 0.8s ease-out both;
}

.login-logo img {
    display: block;
    width: 200px;
    height: 200px;
    padding: 12px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.20);

    animation: logoFloat 3s ease-in-out infinite;
}


/* Apparition */

@keyframes logoAppear {

    from {
        opacity: 0;

        transform:
            translateY(-18px) scale(0.85);
    }

    to {
        opacity: 1;

        transform:
            translateY(0) scale(1);
    }
}


/* Flottement */

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}


/* =========================================================
   TEXTE GAUCHE
========================================================= */

.login-left-content {
    max-width: 300px;
}

.login-left-content h1 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1.12;
    font-weight: 700;
}

.login-left-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    line-height: 1.65;
}


/* =========================================================
   DROITE
========================================================= */

.login-right {
    display: flex;

    align-items: center;
    justify-content: center;

    background: #202427;
}

.login-form-container {
    width: 100%;
    max-width: 430px;
    padding: 42px;
}


/* =========================================================
   TITRE
========================================================= */

.login-heading {
    margin-bottom: 30px;

    text-align: center;
}

.login-heading h2 {
    margin: 0 0 7px;

    color: #e5e7e9;

    font-size: 1.7rem;

    line-height: 1.2;

    font-weight: 700;
}

.login-heading p {
    margin: 0;

    color: #9da4aa;

    font-size: 0.78rem;
}


/* =========================================================
   FORM
========================================================= */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;

    margin-bottom: 8px;

    color: #d9dcdf;

    font-size: 0.76rem;

    font-weight: 600;
}

.input-box {
    display: flex;

    align-items: center;

    height: 38px;

    border: 1px solid #465058;

    border-radius: 6px;

    background: #202427;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-box:focus-within {
    border-color: #3eacd0;

    box-shadow:
        0 0 0 2px rgba(62, 172, 208, 0.10);
}

.input-icon {
    width: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    height: 100%;

    padding: 0 12px 0 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: #e5e7e9;

    font-size: 0.82rem;
}

.form-input::placeholder {
    color: #a8adb2;
}


/* =========================================================
   ERREURS
========================================================= */

.field-error {
    margin-top: 7px;

    color: #ff7d88;

    font-size: 0.74rem;
}


/* =========================================================
   REMEMBER ME
========================================================= */

.remember-me {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 2px;

    color: #c8cdd1;

    font-size: 0.78rem;

    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: #318ee8;

    cursor: pointer;
}


/* =========================================================
   BOUTON
========================================================= */

.submit-wrapper {
    margin-top: 26px;
}

.login-submit {
    width: 100%;

    height: 46px;

    border: 0;

    border-radius: 7px;

    background: #3eacd0;

    color: #ffffff;

    font-size: 0.95rem;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.login-submit:hover {
    background: #49b9dc;

    transform: translateY(-1px);

    box-shadow:
        0 8px 20px rgba(62, 172, 208, 0.22);
}

.login-submit:active {
    transform: translateY(0);
}


/* =========================================================
   MESSAGES
========================================================= */

.login-messages {
    margin-bottom: 18px;
}

.login-alert {
    padding: 9px 12px;

    border-radius: 6px;

    font-size: 0.76rem;
}

.login-alert-danger,
.login-alert-error {
    border: 1px solid #dc5963;

    background: rgba(220, 89, 99, 0.10);

    color: #ff8992;
}

.login-alert-success {
    border: 1px solid #4caf82;

    background: rgba(76, 175, 130, 0.10);

    color: #75d5a5;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {

    body.member-login-page {
        padding: 12px;

        align-items: flex-start;
    }

    .login-card {
        grid-template-columns: 1fr;

        margin: 12px 0;

        min-height: auto;
    }

    .login-left {
        min-height: 280px;

        padding: 30px;
    }

    .login-left-content h1 {
        font-size: 1.65rem;
    }

    .login-form-container {
        padding: 36px 24px;
    }
}


/* =========================================================
   ACCESSIBILITÉ
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .login-logo,
    .login-logo img {
        animation: none;
    }
}