﻿/* Container centralisé sous forme de carte */
.login-card {
    max-width: 420px;
    margin: 40px auto;
    padding: 32px 28px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    /* Alignement des conteneurs et formulaires internes */
    .login-form,
    .recovery-form,
    .login-card form,
    .login-card table {
        width: 100%;
        margin: 0 auto;
    }

    /* Neutralisation de la structure table générée par ASP.NET (ChangePassword & Login) */
    .login-card table,
    .login-card tbody,
    .login-card tr,
    .login-card td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
        border: none;
        text-align: center;
    }

        /* Titres des formulaires et titres internes ASP.NET */
        .login-title,
        .login-card td[colspan="2"] {
            margin: 0 0 24px 0;
            font-size: 1.5rem;
            font-weight: 700;
            color: #0f172a;
            text-align: center;
        }

    /* Libellés internes ASP.NET (Ancien :, Nouveau :, etc.) */
    .login-card label,
    .login-card td {
        color: #475569;
        font-size: 0.9rem;
        font-weight: 500;
        text-align: center;
    }

/* Groupes de saisie personnalisés */
.input-group,
.password-group {
    position: relative;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

/* Style uniforme des champs texte standards */
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    height: 48px;
    margin: 6px 0 12px 0;
    padding: 10px 16px 10px 46px; /* Dégagement à gauche pour le cadenas/mail */
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

    .login-card input[type="text"]:focus,
    .login-card input[type="password"]:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

/* Icône Utilisateur / Mail */
.input-user {
    background-image: url('../Images/logo_Mail.png');
    background-position: 12px center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
}

/* Icône Mot de passe pour formulaires manuels */
.input-password-field {
    background-image: url('../Images/logo_Password.png');
    background-position: 12px center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
}

/* Icône Cadenas appliquée automatiquement sur les champs du composant ChangePassword */
.login-card input[id$="CurrentPassword"],
.login-card input[id$="NewPassword"],
.login-card input[id$="ConfirmNewPassword"] {
    background-image: url('../Images/logo_Password.png');
    background-position: 12px center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
}

/* Style unifié des boutons d'action (Login, ChangePassword, Recovery) */
.btn-login,
.recovery-form input[type="submit"],
.login-card input[type="submit"] {
    width: 100%;
    height: 46px;
    margin-top: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

    .btn-login:hover,
    .recovery-form input[type="submit"]:hover,
    .login-card input[type="submit"]:hover {
        background: linear-gradient(135deg, #1d4ed8, #1e40af);
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
        transform: translateY(-1px);
    }

/* Section Récupération de mot de passe */
.recovery-section {
    width: 100%;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

    .recovery-section h2,
    .recovery-section label,
    .recovery-section .recovery-form {
        text-align: center;
    }

.recovery-form input[type="text"] {
    padding: 10px 16px 10px 46px;
    background-image: url('../Images/logo_Mail.png');
    background-position: 12px center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
}

.info-label {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #2563eb;
    font-weight: 600;
}

/* Restriction de taille et positionnement de l'icône de visibilité */
.viewPassword {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: auto;
    max-width: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 2;
}

    .viewPassword:hover {
        opacity: 1;
    }

/* Logo affiché dans la carte de connexion */
.login-card-logo {
    width: 180px; /* Taille adaptée à la largeur de la carte (420px) */
    height: auto;
    margin-bottom: 12px; /* Espace entre le logo et le titre "Connexion" */
    display: block;
}