/* Réinitialisation et styles globaux */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Conteneur de connexion */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 350px;
    max-width: 90%; /* S'assure que le cadre reste dans l'écran */
    transition: transform 0.3s ease;
}

.login-box:hover {
    transform: scale(1.05);
}

.login-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #fff;
}

/* Champs de saisie */
.input-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 16px;
}

.input-group input {
    width: calc(100% - 40px); /* Prend en compte l'icône et le padding */
    padding: 10px 10px 10px 35px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    outline: none;
    font-size: 1em;
    box-sizing: border-box; /* Gère bien les marges internes */
}

.input-group input::placeholder {
    color: #ccc;
}

/* Bouton */
.login-button {
    width: 100%;
    padding: 10px;
    border: none;
    background: linear-gradient(to right, #ff512f, #dd2476);
    color: #fff;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.login-button:hover {
    background: linear-gradient(to right, #dd2476, #ff512f);
    transform: translateY(-3px);
}

.error-message {
    color: #f00;
    margin-top: 10px;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-box {
        padding: 20px;
        width: 90%; /* S'adapte à la largeur de l'écran */
    }

    .login-title {
        font-size: 1.8em;
    }

    .input-group input {
        font-size: 0.9em;
        padding: 8px 8px 8px 30px; /* Réduit la taille pour écrans plus petits */
    }

    .login-button {
        font-size: 1em;
        padding: 8px;
    }
}
