/* ============================================
   Styles pour le panneau des détails
   ============================================ */

/* Container principal */
.code-details-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* En-tête du code */
.code-details-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.code-details-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.code-details-title h3 {
    font-size: 1.5em;
    margin: 0;
}

.code-details-type {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.code-details-label {
    font-size: 1.05em;
    font-weight: 500;
}

/* Sections */
.details-section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.details-section h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

/* Raisonnement */
.reasoning-content {
    background: #f8f9fa;
    padding: 12px;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
}

/* Liste des preuves */
.evidence-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evidence-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.evidence-item:hover {
    background: #e6f0ff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.evidence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85em;
}

.evidence-number {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.evidence-document {
    color: var(--text-secondary);
}

.evidence-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
    font-style: italic;
}

.evidence-context {
    color: var(--text-secondary);
    font-size: 0.85em;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.no-evidence {
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px;
    text-align: center;
}

/* Placeholder */
.placeholder-text {
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Boutons d'action */
.actions-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions-buttons .btn {
    flex: 1;
    min-width: 120px;
}

/* État vide */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* Responsive */
@media (max-width: 768px) {
    .code-details-header {
        padding: 16px;
    }
    
    .code-details-title h3 {
        font-size: 1.2em;
    }
    
    .details-section {
        padding: 12px;
    }
    
    .actions-buttons {
        flex-direction: column;
    }
    
    .actions-buttons .btn {
        width: 100%;
    }
}

/* Faits cliniques */
.clinical-facts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clinical-facts-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.category-header {
    color: var(--primary-color);
    font-size: 1em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.facts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fact-item {
    background: white;
    border-left: 3px solid #667eea;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.fact-item:hover {
    background: #e6f0ff;
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.fact-text {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.fact-confidence {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

.fact-source {
    color: var(--text-secondary);
    font-size: 0.8em;
    margin-top: 4px;
}

.no-facts {
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px;
    text-align: center;
}
