/* ============================================
   Styles pour le panneau des documents
   ============================================ */

/* Onglets de documents */
.document-tabs-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.document-tab {
    padding: 8px 16px;
    border: none;
    background: #f8f9fa;
    color: #4a5568;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.document-tab:hover {
    background: #e6f0ff;
    color: var(--primary-color);
}

.document-tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Contenu du document */
.document-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.document-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.document-header h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.document-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.document-text {
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9em;
    color: var(--text-primary);
    max-width: 100%;
    overflow-wrap: break-word;
    padding: 16px;
    background: #fafbfc;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}

/* Barre de recherche */
.search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
}

.search-bar input {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9em;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    padding: 4px 8px;
    border: none;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1em;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

#search-results-count {
    font-size: 0.85em;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
}

/* Highlights de recherche */
.search-highlight {
    background-color: #fef08a;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-highlight.active {
    background-color: #fbbf24;
    box-shadow: 0 0 0 2px #f59e0b;
}

/* Responsive */
@media (max-width: 768px) {
    .document-tabs-list {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }
    
    .document-tab {
        font-size: 0.85em;
        padding: 6px 12px;
    }
    
    .document-content {
        padding: 12px;
    }
    
    .document-text {
        font-size: 0.85em;
    }
    
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-controls {
        justify-content: center;
    }
}
