* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.conteneur-connexion {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===== Moitié Gauche ===== */
.moitie-gauche {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.moitie-gauche::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: deplacer 20s linear infinite;
}

@keyframes deplacer {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.contenu-gauche {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    animation: apparition 0.8s ease-out;
}

@keyframes apparition {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 80px;
    margin-bottom: 30px;
    animation: flottage 3s ease-in-out infinite;
}

@keyframes flottage {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.contenu-gauche h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.contenu-gauche p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.decoration {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 auto;
    border-radius: 2px;
}

/* ===== Moitié Droite ===== */
.moitie-droite {
    flex: 1;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.formulaire-conteneur {
    width: 100%;
    max-width: 400px;
}

.formulaire-conteneur h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 30px;
    font-weight: 700;
}

/* ===== Groupes de Formulaire ===== */
.groupe-formulaire {
    margin-bottom: 25px;
}

.etiquette {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.groupe-entree {
    position: relative;
    display: flex;
    align-items: center;
}

.icone-entree {
    position: absolute;
    left: 15px;
    color: #667eea;
    font-size: 18px;
    z-index: 2;
}

.entree-texte {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.entree-texte:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.entree-texte::placeholder {
    color: #aaa;
}

.toggle-mdp {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #667eea;
    font-size: 18px;
    z-index: 3;
}

.toggle-mdp:hover {
    color: #764ba2;
}

/* ===== Groupe Souvenir ===== */
.groupe-souvenir {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 8px;
}

.groupe-souvenir input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.groupe-souvenir label {
    cursor: pointer;
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ===== Message d'Erreur ===== */
.alerte {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: glissement 0.3s ease;
}

@keyframes glissement {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alerte-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.d-none {
    display: none;
}

/* ===== Bouton Connexion ===== */
.bouton-connexion {
    width: 100%;
    padding: 12px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bouton-connexion:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.bouton-connexion:active {
    transform: translateY(0);
}

/* ===== Lien Pied ===== */
.lien-pied {
    text-align: center;
    margin-top: 20px;
}

.lien-pied a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.lien-pied a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .conteneur-connexion {
        flex-direction: column;
    }

    .moitie-gauche {
        min-height: 200px;
        flex: 0 0 auto;
    }

    .moitie-droite {
        flex: 1;
        padding: 30px 20px;
    }

    .contenu-gauche h1 {
        font-size: 32px;
    }

    .logo {
        font-size: 60px;
    }

    .formulaire-conteneur h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .entree-texte,
    .bouton-connexion {
        font-size: 14px;
        padding: 10px 35px;
    }

    .contenu-gauche p {
        font-size: 14px;
    }

    .formulaire-conteneur {
        padding: 0 10px;
    }
}
