/* css/login_styles.css */

/* --- Styles Généraux --- */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- En-tête (Header) CORRIGÉ --- */
.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Espace les éléments enfants */
    padding: 10px 20px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.header-left-content {
    display: flex; /* Aligne le logo et le titre */
    align-items: center;
    gap: 15px; /* Espace entre le logo et le titre */
}

.login-header img {
    height: 60px;
}

.header-title {
    font-size: 1.5em;
    color: #333;
    font-weight: bold;
    margin: 0; /* Supprime la marge par défaut du h1 */
}

/* --- Contenu Principal --- */
.content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
}

/* --- Formulaire de Connexion --- */
.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 2em;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

#heading {
    text-align: center;
    margin: 0 0 0.5em 0;
    color: #333333;
    font-size: 1.6em;
    font-weight: bold;
}

.field {
    display: flex;
    align-items: center;
    gap: 0.75em;
    border-radius: 8px;
    padding: 0.8em;
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.input-icon {
    height: 1.3em;
    width: 1.3em;
    fill: #555555;
    flex-shrink: 0;
}

.input-field {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    color: #333333;
    font-size: 1em;
}

.input-field::placeholder {
    color: #6c757d;
}

.field.error {
    border-color: #d9534f;
    background-color: #fdf2f2;
}

.form .btn {
    display: flex;
    margin-top: 10px;
}

.form .button1 {
    padding: 0.75em;
    border-radius: 6px;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
    font-weight: 500;
    background-color: #3d405b;
    color: #ffffff;
    flex-grow: 1;
}

.form .button1:hover {
    background-color: #2c2e40;
    transform: translateY(-2px);
}

.form .button1:disabled {
    background-color: #9fa1b1;
    cursor: not-allowed;
    transform: none;
}

/* --- Messages d'erreur et de succès --- */
.error-message-box {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0.75rem 1rem;
    margin-bottom: 5px;
    border-radius: 8px;
    background-color: rgba(217, 83, 79, 0.1);
    border: 1px solid rgba(217, 83, 79, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.error-message-box.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.error-message-box .error-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-message-box .error-icon {
    color: #d9534f;
    flex-shrink: 0;
}

.error-message-box .error-text {
    color: #b94a48;
    font-weight: 500;
    font-size: 0.9em;
}

.error-message-box .error-close-btn {
    background: transparent;
    border: 1px solid rgba(217, 83, 79, 0.3);
    border-radius: 6px;
    color: #d9534f;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.error-message-box .error-close-btn:hover {
    opacity: 1;
    background-color: rgba(217, 83, 79, 0.1);
}

.success-message-box {
    padding: 0.75rem 1rem;
    margin-bottom: 5px;
    border-radius: 8px;
    background-color: rgba(92, 184, 92, 0.1);
    border: 1px solid rgba(92, 184, 92, 0.4);
    color: #3c763d;
    font-weight: 500;
    font-size: 0.9em;
    text-align: center;
}