@import url('/static/css/imports/fonts_googleapis.css');

/* =========================================
   VARIABLES GLOBALES GLASS/CYBER
   ========================================= */
:root {
    --eva-blue: #00e5ff;
    --eva-blue-glow: rgba(0, 229, 255, 0.4);
    --bg-dark: #0a0f16;
    
    /* Le secret du verre : fond ultra-transparent et bordure subtile */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --font-main: 'Inter', system-ui, sans-serif;
}

/* =========================================
   FOND & LUEURS (La magie opère ici)
   ========================================= */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: white;
}

.login-page {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center; /* Centré parfaitement sur PC */
    min-height: 100vh;
    overflow: hidden; /* Empêche les lueurs de créer un scroll */
    background: radial-gradient(circle at center, #131f2b 0%, #080c11 100%);
}

/* Les fameuses lueurs flottantes en arrière-plan */
.glow-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(0, 229, 255, 0.15); /* Lueure Cyan */
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: rgba(156, 39, 176, 0.15); /* Lueure Violette pour contraster */
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.2); }
}

/* =========================================
   LA CARTE EN VERRE (GLASS-CARD)
   ========================================= */
.login-container {
    position: relative;
    z-index: 10; /* Passe au-dessus des lueurs */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 380px;
}

.responsive-logo {
    width: 140px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(25px); /* Le flou extrême */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both; /* Arrive juste après le logo */
}

/* Ligne néon subtile en haut de la carte */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--eva-blue), transparent);
    opacity: 0.8;
}

.login-card h2 {
    margin: 0 0 30px 0;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #ffffff;
}

/* =========================================
   INPUTS CYBERNÉTIQUES
   ========================================= */
input {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.3); /* Fond sombre transparent */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input:focus {
    border-color: var(--eva-blue);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px var(--eva-blue-glow);
    transform: translateY(-2px);
}

/* =========================================
   BOUTON DE CONNEXION "PULSION"
   ========================================= */
button {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #00e5ff 0%, #007bb5 100%);
    box-shadow: 0 8px 25px var(--eva-blue-glow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 229, 255, 0.6);
    letter-spacing: 4px;
}

button:active {
    transform: scale(0.95);
}

/* Effet de scan lumineux (inchangé mais adapté aux nouvelles couleurs) */
button::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: 0.5s ease-out;
}

button:hover::after {
    left: 100%;
}

/* =========================================
   MESSAGES & UTILITAIRES
   ========================================= */
.error-msg {
    color: #ff5252;
    font-size: 0.85rem;
    margin-top: 15px;
    background: rgba(255, 82, 82, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 82, 82, 0.3);
    animation: fadeInUp 0.3s ease-out;
}

/* Spinner (Ajustement) */
#spinner {
    display: none;
    margin-right: 10px;
    vertical-align: middle;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* =========================================
   ANIMATION D'ENTRÉE
   ========================================= */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =========================================
   RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 768px) {
    .login-page {
        align-items: flex-start; /* Laisse de la place au clavier sur mobile */
        padding-top: 10vh; 
    }
    
    .login-card {
        padding: 30px 20px;
    }

    input {
        font-size: 16px !important; /* Empêche le zoom auto d'iOS au clic */
    }
}