/* css/dl_recognition.css - Styles pour le module Deep Learning */

/* ===== Boutons et indicateurs ===== */
.btn-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-dl-analyze {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
}

#dlStatusIndicator .badge {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== Modal d'analyse ===== */
#dlAnalysisModal .modal-dialog {
    max-width: 1200px;
}

#dlAnalysisModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#dlAnalysisModal .modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

/* Zone de chargement */
#dlAnalysisLoading {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#dlAnalysisLoading .spinner-grow {
    width: 3rem;
    height: 3rem;
}

#dlAnalysisLoading .progress {
    width: 60%;
    margin: 0 auto;
}

/* ===== Carte d'identité ===== */
.confidence-meter {
    margin-top: 1rem;
}

.confidence-meter .progress {
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.confidence-meter .progress-bar {
    font-weight: bold;
    transition: width 0.6s ease;
}

.feature-badges .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin: 0.2rem;
}

/* ===== Données extraites ===== */
.data-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.data-field:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.field-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.attack-info {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

/* ===== Score d'authenticité circulaire ===== */
.circular-progress {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    position: relative;
}

.circular-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circular-progress circle {
    transition: stroke-dashoffset 1s ease-in-out, stroke 0.3s;
}

.progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
}

/* ===== Vérifications d'authenticité ===== */
.auth-check-item {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.auth-check-item .badge {
    min-width: 50px;
    text-align: center;
}

/* ===== Graphique de condition ===== */
#dlConditionChart {
    max-height: 300px;
    margin: 1rem 0;
}

/* ===== Caractéristiques spéciales ===== */
.special-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    font-size: 0.9rem;
}

.feature-icon {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

/* ===== Cartes colorées selon l'authenticité ===== */
#dlAuthenticityCard.border-success {
    border-color: #28a745 !important;
    border-width: 2px;
}

#dlAuthenticityCard.border-danger {
    border-color: #dc3545 !important;
    border-width: 2px;
    background: rgba(220, 53, 69, 0.05);
}

/* ===== Animations ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#dlAnalysisResults > * {
    animation: slideIn 0.5s ease-out forwards;
}

#dlAnalysisResults .card:nth-child(1) { animation-delay: 0.1s; }
#dlAnalysisResults .card:nth-child(2) { animation-delay: 0.2s; }
#dlAnalysisResults .card:nth-child(3) { animation-delay: 0.3s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #dlAnalysisModal .modal-dialog {
        max-width: 100%;
        margin: 0.5rem;
    }
    
    .circular-progress {
        width: 120px;
        height: 120px;
    }
    
    .progress-value {
        font-size: 1.5rem;
    }
    
    .data-field {
        font-size: 0.9rem;
    }
    
    .field-icon {
        font-size: 1.2rem;
        width: 30px;
    }
}

/* ===== Mode sombre ===== */
@media (prefers-color-scheme: dark) {
    #dlAnalysisModal .modal-content {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    #dlAnalysisModal .card {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    #dlAnalysisModal .card-header {
        background: #333;
        border-color: #444;
    }
    
    .data-field,
    .auth-check-item,
    .special-feature-item {
        background: #2a2a2a;
    }
    
    .data-field:hover {
        background: #333;
    }
    
    #dlAnalysisModal .text-muted {
        color: #aaa !important;
    }
    
    #dlAnalysisModal .alert {
        background: #2a2a2a;
        border-color: #444;
    }
    
    #dlAnalysisModal .alert-warning {
        color: #ffc107;
        border-color: #ffc107;
    }
    
    #dlAnalysisModal .alert-danger {
        color: #dc3545;
        border-color: #dc3545;
    }
    
    #dlAnalysisModal .alert-success {
        color: #28a745;
        border-color: #28a745;
    }
}

/* ===== Badges de confiance détaillés ===== */
.confidence-breakdown {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.confidence-item {
    background: #f8f9fa;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.confidence-item .icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.confidence-item .icon.high { background: #28a745; }
.confidence-item .icon.medium { background: #ffc107; }
.confidence-item .icon.low { background: #dc3545; }

/* ===== Tooltips personnalisés ===== */
.dl-tooltip {
    position: relative;
    cursor: help;
}

.dl-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

/* ===== État de chargement élégant ===== */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Effets visuels premium ===== */
.premium-glow {
    box-shadow: 
        0 0 20px rgba(102, 126, 234, 0.3),
        0 0 40px rgba(102, 126, 234, 0.2),
        0 0 60px rgba(102, 126, 234, 0.1);
}

.holographic-effect {
    background: linear-gradient(45deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #8b00ff);
    background-size: 400% 400%;
    animation: holographic 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes holographic {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}