@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/*
  Styles modernes et "classe" pour la page de connexion.
  Layout : Flexbox pour la responsivité.
*/

/* Variables de couleur de l'application */
:root {
    --ae-primary: #0d4d8c; /* Bleu foncé du logo */
    --ae-accent: #d9581b;  /* Orange du logo */
    --app-bg: #f0f2f5;
    --text-dark: #1c1e21;
    --text-light: #606770;
    --border-color: #dddfe2;
}

/* Animation d'entrée subtile */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background: linear-gradient(to bottom, #f0f2f5, #e9ebee); /* Dégradé de fond très subtil */
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    position: relative; /* Contexte de positionnement pour les formes */
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

/* Conteneur principal qui gère la disposition */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Permet aux éléments de passer à la ligne sur mobile */
    max-width: 1000px;
    width: 100%;
    padding: 20px;
    gap: 4rem;
}

/* Partie gauche : Logo et Slogan */
.login-intro {
    flex: 1;
    min-width: 320px;
    max-width: 500px;
    padding-right: 32px;
    animation: fadeInUp 0.8s ease-out;
}

.login-logo {
    width: 160px;
    margin-bottom: 1rem;
    /* mix-blend-mode: darken; */ /* Supprimé pour afficher le logo tel quel, sans effet de mélange */
}

.login-brand-title {
    font-size: 2.8rem; /* Titre encore plus impactant */
    font-weight: 700; /* Plus gras */
    color: var(--ae-primary); /* Couleur bleue de votre marque */
    margin-bottom: 0;
    letter-spacing: -0.5px; /* Resserre légèrement les lettres pour un look premium */
}

.login-welcome-text {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-dark);
}

/* Partie droite : Formulaire */
.login-form-container {
    flex: 1;
    min-width: 380px;
    max-width: 420px;
    animation: fadeInUp 0.8s ease-out 0.2s; /* Arrive avec un léger décalage */
    animation-fill-mode: both; /* Garde l'état final de l'animation */
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08); /* Ombre plus douce et diffuse */
    background-color: #fff;
}

.card-body {
    padding: 1.5rem;
}

/* Style des champs de formulaire */
.form-control {
    border-radius: 6px;
    padding: 15px;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease-in-out; /* Transition sur toutes les propriétés */
}

/* Surcharge du style de focus global pour cette page */
.form-control:focus {
    background-color: #fafafa;
    border-color: var(--ae-accent);
    box-shadow: 0 0 0 3px rgba(217, 88, 27, 0.15);
}

/* Bouton principal "Se connecter" */
.btn-primary {
    background: linear-gradient(45deg, #d9581b, #e87a3d) !important; /* Dégradé subtil */
    border-color: var(--ae-accent) !important;
    font-size: 1.25rem;
    padding: 12px 16px;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    transform: translateY(-2px); /* Effet de soulèvement */
    box-shadow: 0 4px 12px rgba(217, 88, 27, 0.3);
}

/* Bouton secondaire "Créer un nouveau compte" (style outline) */
.btn-success { /* On garde la classe mais on change le style */
    background-color: transparent !important;
    border: 2px solid var(--ae-primary) !important;
    color: var(--ae-primary) !important;
    font-size: 1.1rem;
    padding: 10px 16px;
    transition: all 0.2s ease-in-out;
}

.btn-success:hover {
    background-color: var(--ae-primary) !important;
    color: #fff !important;
}

/* Lien "Mot de passe oublié ?" */
.forgot-password-link {
    color: var(--text-light);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--ae-primary);
}

/* --- MEDIA QUERY POUR LES PETITS ÉCRANS --- */
@media (max-width: 991.98px) {
    .login-container {
        flex-direction: column; /* Empile les éléments verticalement */
        justify-content: center;
        gap: 2rem;
    }
    .login-intro {
        text-align: center; /* Centre le logo et le slogan */
        padding-right: 0;
        flex-basis: auto;
    }
}

/* --- STYLE POUR LE BACKGROUND FLOTTANT --- */

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place le conteneur en arrière-plan */
    overflow: hidden;
}

.shape {
    position: absolute;
    display: block;
    list-style: none;
    background: rgba(13, 77, 140, 0.15); /* Formes avec la couleur primaire, très transparentes */
    animation: float-up 25s linear infinite;
    bottom: -150px; /* Commence en dehors de l'écran */
}

/* Tailles, positions et délais d'animation variés pour chaque forme */
.shape:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.shape:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.shape:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.shape:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.shape:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.shape:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.shape:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.shape:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.shape:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.shape:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; }

/* Animation des formes flottantes */
@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg); /* Monte jusqu'en haut de l'écran */
        opacity: 0;
        border-radius: 50%; /* Devient un cercle à la fin */
    }
}

/* Ajustement pour que le contenu principal soit au-dessus du fond */
.login-container {
    position: relative;
    z-index: 1;
}