/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body.login {
    display: flex;
    height: 100vh;
    background: #101627;
}

/* ===============================
   PARTIE GAUCHE (IMAGE)
================================ */

.login-left {
    flex: 1;
    background: #FFFFFF;
    display: flex;
    justify-content: left;
    align-items: center;
    overflow: hidden;
}

.login-left img {
    width: 100%;
    max-width: 100%;
    max-height: 120%;
    margin-bottom: -10%;
    object-fit: cover;
}

/* ===============================
   PARTIE DROITE (FORM)
================================ */

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 180px;
}

.login-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Titre */
.login-form h2 {
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #FFFFFF;
    margin-bottom: 10px;
}

/* Champs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 14px;
    color: #666;
}

input {
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #FFFFFF;
    color: #FFFFFF;
    background: transparent;
    font-size: 16px;
    outline: none;
    transition: border-bottom 0.2s ease;
}

input:focus {
    border-bottom: 2px solid #FFFFFF;
}

/* Bouton */
button {
    margin-top: 10px;
    padding: 14px;
    background: #192134;
    border: none;
    color: #FFFFFF;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #273149;
}

/* Message erreur */
.error-message {
    padding: 12px;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}


/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 900px) {
    body.login {
        flex-direction: column;
        height: auto; 
        min-height: 100vh;
    }

    .login-left {
        flex: none;
        width: 100%;
        height: 40vh; /* Ajuste la hauteur de l'image sur mobile */
    }

    .login-left img {
        /* On réinitialise les marges du desktop pour un meilleur rendu mobile */
        margin-bottom: 0; 
        max-height: 100%;
        object-position: center; /* Centre bien l'image */
    }

    .login-right {
        flex: none;
        width: 100%;
        height: 60vh;
        /* C'est ici la clé : on réduit drastiquement le padding pour les petits écrans */
        padding: 40px 20px; 
    }

    .login-form {
        max-width: 100%;
        /* On centre verticalement si l'écran est un peu plus haut */
        margin: auto 0; 
    }
}

/* Optionnel : Ajustements pour les très petits téléphones */
@media (max-width: 480px) {
    .login-left {
        height: 35vh; /* Laisse un peu plus de place au formulaire */
    }

    .login-right {
        height: 65vh;
        padding: 30px 15px;
    }

    .login-form h2 {
        font-size: 26px; /* Réduit légèrement la taille du titre */
    }
}