/**
 * AIC PRO v5.0 - AI Assistant Styles
 * Styles pour l'interface de l'assistant IA
 */

/* === Configuration Status === */
.ai-config-status {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.alert i {
    font-size: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #00C853 0%, #00E676 100%);
    color: white;
    border: 2px solid #00E676;
}

.alert-error {
    background: linear-gradient(135deg, #D32F2F 0%, #F44336 100%);
    color: white;
    border: 2px solid #FF5252;
}

.alert strong {
    margin-right: 0.5rem;
}

.model-info {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.config-link {
    color: white;
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* === Upload Zone === */
.upload-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.upload-header {
    text-align: center;
    margin-bottom: 2rem;
}

.upload-header h3 {
    color: #1a237e;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.upload-header p {
    color: #666;
    font-size: 1rem;
}

.upload-dropzone {
    border: 3px dashed #3f51b5;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8eaf6 100%);
}

.upload-dropzone:hover {
    border-color: #1976d2;
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    transform: translateY(-2px);
}

.upload-dropzone.dragover {
    border-color: #00c853;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    transform: scale(1.02);
}

.dropzone-content i {
    color: #3f51b5;
    margin-bottom: 1rem;
}

.dropzone-content h4 {
    color: #1a237e;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.dropzone-content p {
    color: #666;
    margin-bottom: 0.25rem;
}

.dropzone-content .formats {
    font-size: 0.875rem;
    color: #999;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3f51b5 0%, #1976d2 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #757575 0%, #616161 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(117, 117, 117, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

/* === Files Queue === */
.files-queue {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.queue-header h4 {
    color: #1a237e;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.queue-actions {
    display: flex;
    gap: 0.75rem;
}

.queue-stats {
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8eaf6 100%);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #c5cae9;
}

.stat-item i {
    color: #3f51b5;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Queue List === */
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.queue-item:hover {
    background: #eeeeee;
}

.queue-item.processing {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ff9800;
}

.queue-item.completed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4caf50;
}

.queue-item.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
}

.file-icon {
    flex-shrink: 0;
}

.file-icon i {
    font-size: 2rem;
    color: #3f51b5;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: #212121;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.875rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #e0e0e0;
    color: #616161;
}

.status-badge.processing {
    background: #ff9800;
    color: white;
}

.status-badge.completed {
    background: #4caf50;
    color: white;
}

.status-badge.error {
    background: #f44336;
    color: white;
}

.file-progress {
    flex-shrink: 0;
    width: 100px;
}

.mini-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.mini-progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, #3f51b5 0%, #1976d2 100%);
    transition: width 0.3s ease;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    color: #757575;
    font-size: 1.25rem;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    color: #d32f2f;
    transform: scale(1.1);
}

/* === Processing Options === */
.processing-options {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.processing-options h4 {
    color: #1a237e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f5f7ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #e8eaf6;
}

.option-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-item select {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #c5cae9;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
}

/* === Processing Dashboard === */
.processing-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.processing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.processing-header h3 {
    color: #1a237e;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.overall-progress {
    margin-bottom: 2rem;
}

.progress-stats {
    margin-bottom: 1rem;
    text-align: center;
}

.stats-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: #424242;
}

.stats-inline strong {
    color: #1a237e;
    font-size: 1.5rem;
}

.separator {
    color: #bdbdbd;
}

.error-count {
    color: #f44336;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3f51b5 0%, #1976d2 50%, #00c853 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(63, 81, 181, 0.4);
}

.progress-time {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: #666;
}

.current-file {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.current-file-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #e65100;
    font-size: 1.1rem;
}

/* === Files Status List === */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.file-status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
}

.file-status-item.processing {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.file-status-item.completed {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.file-status-item.error {
    background: #ffebee;
    border-left-color: #f44336;
}

.status-icon {
    font-size: 1.5rem;
}

.file-status-item.pending .status-icon { color: #9e9e9e; }
.file-status-item.processing .status-icon { color: #ff9800; }
.file-status-item.completed .status-icon { color: #4caf50; }
.file-status-item.error .status-icon { color: #f44336; }

.file-status-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confidence-badge {
    background: linear-gradient(135deg, #3f51b5 0%, #1976d2 100%);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* === Results Summary === */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.results-header h3 {
    color: #00c853;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.stat-card.success {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
}

.stat-card.primary {
    background: linear-gradient(135deg, #3f51b5 0%, #1976d2 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%);
}

.stat-card.error {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
}

.duration-info {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.results-details h4 {
    color: #1a237e;
    margin-bottom: 1rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid;
}

.result-item.success {
    background: #e8f5e9;
    border-color: #4caf50;
}

.result-item.error {
    background: #ffebee;
    border-color: #f44336;
}

.result-icon i {
    font-size: 1.75rem;
}

.result-item.success .result-icon i {
    color: #4caf50;
}

.result-item.error .result-icon i {
    color: #f44336;
}

.result-info {
    flex: 1;
}

.result-filename {
    font-weight: 600;
    color: #212121;
    margin-bottom: 0.25rem;
}

.result-meta {
    font-size: 0.875rem;
    color: #666;
}

.result-error {
    font-size: 0.875rem;
    color: #d32f2f;
    font-weight: 500;
}

.btn-small {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #3f51b5 0%, #1976d2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(63, 81, 181, 0.3);
}

/* === Badge NEW === */
.badge-new {
    background: linear-gradient(135deg, #ff5722 0%, #ff6f00 100%);
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .stats-grid,
    .stats-cards,
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .queue-header,
    .processing-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .queue-actions,
    .results-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .queue-actions button,
    .results-actions button {
        width: 100%;
    }
    
    .queue-item {
        flex-wrap: wrap;
    }
    
    .file-progress {
        width: 100%;
    }
}
