* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
}

/* Fond avec image */
.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background.png') center/cover no-repeat;
    z-index: -1;
}

/* Bulle de connexion avec bordure blanche */
.login-bubble {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(10px); 
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(255, 255, 255, 0.6);
    width: 400px;
    max-width: 90%;
    border: 2px solid #ffffff;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Titre "Connexion" en blanc */
.login-bubble h2 {
    text-align: center;
    margin-bottom: 35px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #ffffff;
}

/* Message d'erreur */
.error-message {
    color: #ff4444;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    min-height: 20px;
}

/* Groupes d'inputs */
.input-group {
    position: relative;
    margin-bottom: 30px;
}

/* Zones de texte en noir avec texte blanc */
.input-group input {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid #333333;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    color: #ffffff;
}

/* Label flottant */
.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666666;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 5px;
}

/* Label monte quand input focus OU quand il y a du texte */
.input-group input:focus + label,
.input-group input:valid + label {
    top: -10px;
    transform: translateY(0);
    font-size: 12px;
    color: #ffffff;
    background: #000;
    border: 1px solid #fff;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Bordure blanche au focus */
.input-group input:focus {
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); /* Même lueur blanche */
    outline: none;
}

/* Bouton blanc avec texte noir */
.login-btn {
    width: 100%;
    padding: 15px;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    color: #000000;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    background: #f0f0f0;
}

.login-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 500px) {
    .login-bubble {
        width: 90%;
        padding: 40px 30px;
    }
    
    .login-bubble h2 {
        font-size: 24px;
    }
    
    .input-group input {
        font-size: 16px; /* Empêche le zoom sur mobile */
    }
    
    .input-group label {
        font-size: 16px;
    }
}
