* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: auto;
}

/* Effets de particules comme sur la page principale */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(0, 255, 136, 0.2), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 204, 102, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(0, 77, 26, 0.3), transparent);
    background-repeat: repeat;
    background-size: 100px 100px;
    animation: sparkle 10s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.1;
    }
}

/* Conteneur principal */
.login-container {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bordure animée en haut */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #00cc66, #004d1a, #00ff88);
    background-size: 300% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -300% 0;
    }

    100% {
        background-position: 300% 0;
    }
}

/* Logo en haut du formulaire */
.logo-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-header .logo {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 204, 102, 0.3) 70%, rgba(0, 255, 136, 0.4) 100%);
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ff88;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 255, 136, 0.6);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
    display: inline-block;
    margin-bottom: 8px;
}

.logo-header .devise {
    font-size: 0.75rem;
    color: #cbd5e0;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Titre du formulaire */
.form-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: #f7fafc;
    text-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #cbd5e0;
    font-size: 0.9rem;
}

/* Champs de saisie */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(15, 15, 35, 0.8);
    color: #f7fafc;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(0, 255, 136, 0.1),
        0 0 15px rgba(0, 255, 136, 0.2);
    background: rgba(15, 15, 35, 0.9);
}

/* Conteneur checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00ff88;
    cursor: pointer;
}

.checkbox-container label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Bouton submit */
input[type="submit"] {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.8) 0%, rgba(0, 204, 102, 0.9) 100%);
    color: #0f0f23;
    padding: 14px;
    width: 100%;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="submit"]:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.9) 0%, rgba(0, 204, 102, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.4);
}

input[type="submit"]:active {
    transform: translateY(0);
}

/* Lien retour */
.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #cbd5e0;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

/* Messages d'erreur */
.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: -15px;
    margin-bottom: 15px;
    display: none;
}

.success-message {
    color: #00ff88;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 20px;
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 20px;
    }

    .login-container {
        padding: 30px 25px;
    }

    .form-title {
        font-size: 1.7rem;
    }
}