/* ----- BODY & BACKGROUND ----- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    /* Dégradé coloré et animé (violet -> rose -> turquoise) */
    background: linear-gradient(45deg, #8e2de2, #fbc2eb, #81ecec);
    background-size: 400% 400%;
    /* Anim. en 6s pour voir les transitions plus facilement */
    animation: backgroundFlow 6s ease infinite;
}

/* Animation du background (défilement fluide du dégradé) */
@keyframes backgroundFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ----- Conteneur principal ----- */
.login-container {
    background: transparent !important; /* Pour voir le body animé */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ----- Carte (effet glass + animations) ----- */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 25px 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #333;
    position: relative;

    /* Animations : fadeIn + légère oscillation "flottement" */
    animation: fadeIn 0.8s ease-out, floatUpDown 3s ease-in-out infinite alternate;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flottement de haut en bas */
@keyframes floatUpDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

/* Glow + zoom au survol de la carte */
.login-card:hover {
    box-shadow: 
        0 0 15px 8px rgba(255, 255, 255, 0.25),
        0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ----- Titre ----- */
.login-title {
    font-size: 2rem;
    text-align: center;
    color: #4e1361; /* Violet soutenu */
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}

/* ----- Form Group (une seule colonne) ----- */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

/* ----- Inputs ----- */
.form-control {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    border-color: #d741a7; 
    outline: none;
    box-shadow: 0 0 6px rgba(215, 65, 167, 0.3);
}

/* ----- Input group (champ + bouton œil) ----- */
.input-group {
    display: flex;
    align-items: center;
    position: relative;
}
.input-group .form-control {
    border-radius: 6px 0 0 6px;
}
.input-group button.togglePassword {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    border-radius: 0 6px 6px 0;
    padding: 0 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.input-group button.togglePassword:hover {
    background: rgba(255, 255, 255, 0.9);
}
.togglePassword i {
    font-size: 1rem;
}

/* ----- Bouton principal ----- */
.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #8e2de2, #4a00e0); /* Violet intense */
    border: none;
    border-radius: 6px;
    text-align: center;
    margin-top: 10px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 0, 224, 0.3);
}

/* ----- Alertes Bootstrap (optionnel) ----- */
.alert {
    font-weight: 600;
    text-align: center;
}
