/**
 * 🤖 ANIMATIONS VALIDATION IA CLAUDE OPUS 4.1
 * Animations modernes pour validation documents
 */

/* ====== CONTENEUR PRINCIPAL ====== */
.ai-validation-container {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== CERVEAU IA ====== */
.ai-loader-wrapper {
    margin-bottom: 1rem;
}

.ai-brain {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    font-size: 36px;
    animation: brainFloat 2s ease-in-out infinite;
}

@keyframes brainFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.ai-brain-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: pulse 1.5s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ====== ÉTAPES ====== */
.ai-steps {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.ai-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.ai-step.active {
    opacity: 1;
    transform: scale(1.1);
}

.ai-step.completed {
    opacity: 0.7;
}

.ai-step-icon {
    font-size: 24px;
}

.ai-step-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ====== MESSAGE ====== */
.ai-message {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.ai-message-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.ai-message-text {
    font-size: 14px;
    opacity: 0.95;
}

/* ====== BARRE PROGRESSION ====== */
.ai-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    animation: progressFill 2s ease-in-out infinite;
}

@keyframes progressFill {
    0% { width: 10%; opacity: 0.6; }
    50% { width: 70%; opacity: 1; }
    100% { width: 10%; opacity: 0.6; }
}

/* ====== SUCCÈS ====== */
.ai-validation-success {
    padding: 1.5rem;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 12px;
    color: white;
    animation: fadeIn 0.3s ease-out;
}

.ai-success-icon {
    margin-bottom: 0.8rem;
}

.checkmark {
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

.checkmark-circle {
    stroke: white;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.ai-success-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.ai-success-badges {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    animation: badgePop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.ai-badge-primary { animation-delay: 0.1s; }
.ai-badge-success { animation-delay: 0.2s; }

@keyframes badgePop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ai-badge-icon {
    font-size: 16px;
}

.ai-success-message {
    margin-top: 1rem;
    font-size: 13px;
    opacity: 0.9;
}

/* ====== ERREUR ====== */
.ai-validation-error {
    padding: 1.5rem;
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border-radius: 12px;
    color: white;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.ai-error-icon {
    margin-bottom: 0.8rem;
}

.crossmark {
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

.crossmark-circle {
    stroke: white;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.crossmark-cross {
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.ai-error-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.ai-error-reason {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin: 0.8rem 0;
    font-size: 14px;
}

.ai-error-actions {
    margin-top: 1rem;
}

/* ====== SUCCÈS COMPACT ====== */
.ai-success-compact {
    padding: 0.8rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}

.ai-success-compact-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ai-success-compact-icon {
    font-size: 18px;
}

.ai-success-compact-title {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    color: #155724;
}

.ai-success-compact-badges {
    display: flex;
    gap: 0.3rem;
}

.ai-badge-mini {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(40, 167, 69, 0.2);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #155724;
}

.ai-success-compact-details {
    font-size: 12px;
    color: #155724;
    line-height: 1.6;
    padding-left: 1.5rem;
}

.ai-success-compact-details strong {
    color: #0c3d1a;
}

.ai-success-compact-details small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.8;
    font-style: italic;
}

/* ====== ERREUR COMPACTE ====== */
.ai-error-compact {
    padding: 0.8rem;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.ai-error-compact-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ai-error-compact-icon {
    font-size: 18px;
}

.ai-error-compact-title {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    color: #721c24;
}

.ai-error-compact-retry {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ai-error-compact-retry:hover {
    background: #c82333;
    transform: scale(1.1);
}

.ai-error-compact-details {
    font-size: 12px;
    color: #721c24;
    line-height: 1.6;
    padding-left: 1.5rem;
}

.ai-error-compact-details strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 13px;
}

.ai-error-compact-details em {
    color: #856404;
    font-style: italic;
}

.ai-error-compact-details small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .ai-steps {
        flex-wrap: wrap;
    }
    
    .ai-step {
        flex: 0 0 40%;
        margin-bottom: 0.8rem;
    }
    
    .ai-success-badges {
        flex-direction: column;
    }
    
    .ai-success-compact,
    .ai-error-compact {
        padding: 0.6rem;
    }
    
    .ai-success-compact-title,
    .ai-error-compact-title {
        font-size: 13px;
    }
    
    .ai-success-compact-details,
    .ai-error-compact-details {
        font-size: 11px;
    }
    
    .ai-badge-mini {
        font-size: 10px;
        padding: 0.1rem 0.4rem;
    }
}
