/**
 * Style moderne pour la page de connexion CEIL
 * Couleurs: Bleu (#0056b3, #007bff), Blanc (#ffffff), Jaune (#ffc107)
 */

/* Arrière-plan avec dégradé doux */
.page-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #0056b3 0%, #007bff 50%, #4a90e2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    position: relative;
    overflow: hidden;
}

/* Effet de cercles décoratifs en arrière-plan */
.page-bg::before,
.page-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 0;
}

.page-bg::before {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
}

.page-bg::after {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    background: rgba(255, 193, 7, 0.08);
}

/* Container du contenu */
.content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Carte du formulaire - Épurée et moderne */
.form-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px 40px;
    position: relative;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Titre du formulaire */
.form-container h2 {
    color: #0056b3;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    padding-bottom: 15px;
}

.form-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    border-radius: 2px;
}

.form-container h2 i {
    color: #007bff;
}

/* Styles des champs de formulaire */
.form-container .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: #2c3e50;
    margin-bottom: 20px;
}

.form-container .form-control:focus {
    border-color: #007bff;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    outline: none;
}

.form-container .form-control::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

/* Bouton principal */
.form-container .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.form-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 86, 179, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
}

.form-container .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

/* Effet de brillance au survol du bouton */
.form-container .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.form-container .btn-primary:hover::before {
    left: 100%;
}

/* Alerts - Messages d'erreur/succès */
.form-container .alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container .alert-danger {
    background: linear-gradient(135deg, #ffe0e0 0%, #ffecec 100%);
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.form-container .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #e7f5ea 100%);
    color: #27ae60;
    border-left: 4px solid #28a745;
}

.form-container .alert i {
    margin-right: 8px;
}

/* Captcha - Zone de sécurité */
.captcha-wrapper {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.captcha-box {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid #007bff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 12px;
    color: #0056b3;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Google reCAPTCHA centré */
.form-container .g-recaptcha {
    display: inline-block;
}

/* Liens en bas du formulaire */
.form-container .form-text {
    color: #7f8c8d;
    font-size: 14px;
}

.form-container .form-text a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.form-container .form-text a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.form-container .form-text .mx-2 {
    color: #bdc3c7;
}

/* Animation de chargement du formulaire */
.form-container form {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

/* Responsive Design */
@media (max-width: 576px) {
    .form-container {
        padding: 40px 25px;
        border-radius: 16px;
    }
    
    .form-container h2 {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .page-bg {
        padding: 60px 15px 30px;
    }
    
    .captcha-box {
        font-size: 26px;
        letter-spacing: 8px;
        padding: 15px;
    }
    
    .form-container .form-control {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* Amélioration des focus states pour l'accessibilité */
.form-container .form-control:focus-visible,
.form-container .btn-primary:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

/* Style pour les icônes dans les inputs */
.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.input-icon .form-control {
    padding-left: 45px;
}

/* Animation d'apparition des éléments */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-container .form-control:nth-child(1) {
    animation: slideIn 0.4s ease-out 0.1s both;
}

.form-container .form-control:nth-child(2) {
    animation: slideIn 0.4s ease-out 0.2s both;
}

/* Message de bienvenue pour utilisateur inscrit */
.form-container .alert-success strong {
    font-weight: 700;
}
