/**
 * Page de connexion (/connexion) : carte blanche centrée sur fond bleu IDL (photo
 * assombrie), logo, champs et bouton arrondis aux couleurs du site.
 * Remplace l'habillage d'Ultimate Dashboard.
 */

body.login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 20% 15%, rgba(0, 162, 105, 0.35), transparent 45%),
        linear-gradient(160deg, rgba(31, 93, 166, 0.88) 0%, rgba(18, 33, 59, 0.94) 75%),
        #12213B url("/wp-content/uploads/2024/10/abstract-luxury-gradient-blue-background-smooth-dark-blue-with-black-vignette-studio-banner-scaled.jpg") center / cover no-repeat fixed;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #12213B;
}

body.login #login {
    width: 100%;
    max-width: 420px;
    margin: 0;
    padding: 36px 36px 28px;
    border-radius: 24px;
    background: #FFFFFF;
    box-sizing: border-box;
    box-shadow: 0 30px 80px rgba(8, 20, 40, 0.45);
    animation: idl-login-in 0.35s ease-out;
}

@keyframes idl-login-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.login h1 a,
.login .wp-login-logo a {
    width: 100%;
    height: 64px;
    margin: 0 auto 28px;
    background: url("/wp-content/uploads/2024/10/logo_IDL_horizontal.png") center / contain no-repeat;
}

.login form,
.login #loginform,
.login #lostpasswordform,
.login #resetpassform,
.login #registerform {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.login label {
    margin-bottom: 6px;
    color: #12213B;
    font-size: 14px;
    font-weight: 600;
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    height: 52px;
    margin: 0 0 18px;
    padding: 0 16px;
    border: 2px solid #E3E8F0;
    border-radius: 14px;
    background: #F6F8FB;
    box-shadow: none;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: #00A269;
    outline: none;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(0, 162, 105, 0.18);
}

.login .wp-pwd {
    position: relative;
}

.login .button.wp-hide-pw {
    top: 1px;
    right: 4px;
    height: 50px;
    min-width: 44px;
    border: 0;
    background: transparent;
    color: #1F5DA6;
}

.login .button.wp-hide-pw:focus {
    border: 0;
    box-shadow: none;
}

.login .forgetmenot {
    float: none;
    margin: 0 0 18px;
}

.login .forgetmenot label {
    font-weight: 500;
}

.login input[type="checkbox"] {
    border-radius: 6px;
}

.login input[type="checkbox"]:checked {
    border-color: #00A269;
    background: #00A269;
}

.login input[type="checkbox"]:checked::before {
    filter: brightness(0) invert(1);
}

.login .submit,
.login p.submit {
    float: none;
    margin: 0;
    padding: 0;
}

.login .button-primary,
.wp-core-ui .button.button-primary {
    float: none;
    width: 100%;
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: #00A269;
    box-shadow: 0 10px 24px rgba(0, 162, 105, 0.3);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    line-height: 52px;
    text-shadow: none;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.login .button-primary:hover,
.login .button-primary:focus,
.wp-core-ui .button.button-primary:hover,
.wp-core-ui .button.button-primary:focus {
    background: #008556;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 133, 86, 0.35);
}

.login #login_error,
.login .message,
.login .success,
.login .notice {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 0;
    border-radius: 14px;
    background: #EAF2FB;
    box-shadow: none;
    color: #12213B;
    font-size: 14px;
}

.login #login_error,
.login .notice-error {
    background: #FDECEC;
}

.login .success,
.login .notice-success {
    background: #E6F6EF;
}

/* Liens sous la carte : « Mot de passe oublié », retour au site */
.login #nav,
.login #backtoblog {
    margin: 18px 0 0;
    padding: 0;
    text-align: center;
    font-size: 14px;
}

.login #backtoblog {
    margin-top: 8px;
}

.login #nav a,
.login #backtoblog a {
    color: #1F5DA6;
    font-weight: 600;
    text-decoration: none;
}

.login #nav a:hover,
.login #nav a:focus,
.login #backtoblog a:hover,
.login #backtoblog a:focus {
    color: #00A269;
}

/* Politique de confidentialité, en bas de la carte */
.login .privacy-policy-page-link {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #E3E8F0;
    text-align: center;
}

.login .privacy-policy-page-link a {
    color: #6B7A90;
    font-size: 13px;
}

.login .privacy-policy-page-link a:hover,
.login .privacy-policy-page-link a:focus {
    color: #00A269;
}

#login .language-switcher,
.login .language-switcher {
    display: none;
}

@media (max-width: 480px) {
    body.login {
        padding: 16px;
    }

    body.login #login {
        padding: 28px 20px 22px;
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.login #login {
        animation: none;
    }
}
