/* Améliorations de sécurité - Indicateurs de chargement */

/* Bouton désactivé avec spinner */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .fa-spinner {
    margin-right: 5px;
}

/* Overlay de chargement pour les formulaires */
.form-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 5px;
}

.form-loading-overlay .spinner {
    font-size: 2rem;
    color: #007bff;
}

/* Indicateur de chargement pour les champs de code */
.code-verification-loading {
    display: inline-block;
    margin-left: 10px;
}

/* Styles pour les messages de sécurité */
.security-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.security-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

/* Animation pour les boutons de chargement */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.btn-loading {
    animation: pulse 1.5s infinite;
}

/* Protection contre les clics rapides */
.no-double-click {
    pointer-events: none;
}

/* Indicateur visuel pour les requêtes en cours */
.ajax-loading {
    position: relative;
}

.ajax-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Styles pour les messages de validation */
.validation-message {
    font-size: 0.875rem;
    margin-top: 5px;
}

.validation-success {
    color: #28a745;
}

.validation-error {
    color: #dc3545;
}

.validation-warning {
    color: #ffc107;
} 