/* TD Archives Rencontres V2 - Styles pour toutes les pages avec nouvelles fonctionnalités */

/* === STYLES GÉNÉRAUX === */
.td-add-container,
.td-list-container,
.td-detail-container,
.td-converter-container {
    max-width: 100%;
    margin: 20px 0;
}

/* === PAGE D'AJOUT === */
.td-add-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.td-upload-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 30px;
}

.td-drop-zone {
    border: 3px dashed #007cba;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.td-drop-zone:hover,
.td-drop-zone.td-dragover {
    border-color: #005a87;
    background: #e8f4f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.1);
}

.td-drop-zone.td-uploading {
    pointer-events: none;
    opacity: 0.7;
    border-color: #999;
}

.td-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.td-drop-content .dashicons {
    font-size: 64px;
    line-height: 15px;
    color: #007cba;
}

.td-drop-content p {
    margin: 0;
    font-size: 18px;
    color: #646970;
    font-weight: 500;
}

.td-drop-content button {
    background: none;
    border: none;
    color: #007cba;
    text-decoration: underline;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
}

.td-drop-content button:hover {
    color: #005a87;
}

/* Barre de progression */
.td-upload-progress {
    margin-top: 30px;
    text-align: center;
}

.td-progress-bar {
    width: 100%;
    height: 24px;
    background: #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.td-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #005a87);
    width: 0%;
    transition: width 0.3s ease;
}

.td-progress-text {
    margin: 0;
    color: #646970;
    font-weight: 500;
}

/* Informations d'upload */
.td-upload-info {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
}

.td-upload-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 1.2em;
}

.td-upload-info ul {
    margin: 0 0 20px 0;
    padding-left: 20px;
}

.td-upload-info li {
    margin-bottom: 8px;
    color: #646970;
    line-height: 1.5;
}

/* Nouveau : Lien rapide vers le convertisseur */
.td-quick-link {
    background: #f0f6fc;
    border: 1px solid #0969da;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.td-quick-link h4 {
    margin: 0 0 8px 0;
    color: #0969da;
    font-size: 14px;
}

.td-quick-link p {
    margin: 0;
    color: #656d76;
    font-size: 13px;
}

/* === PAGE DE LISTE === */
.td-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
}

.td-empty-state p {
    font-size: 18px;
    color: #646970;
    margin-bottom: 20px;
}

.td-empty-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.td-file-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.td-file-card:hover,
.td-file-card.td-hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.td-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
}

.td-file-title {
    margin: 0;
    font-size: 1.3em;
    color: #23282d;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Nouveau : Styles pour le renommage de fichiers */
.td-filename-edit {
    font-size: 1.3em;
    font-weight: 600;
    border: 2px solid #007cba;
    border-radius: 4px;
    padding: 5px 8px;
    background: #fff;
    color: #23282d;
    min-width: 300px;
}

.td-filename-edit:focus {
    outline: none;
    border-color: #005a87;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.td-rename-btn {
    min-width: auto !important;
    padding: 6px 8px !important;
    margin-right: 8px;
}

.td-rename-btn .dashicons {
    font-size: 16px;
    line-height: 1;
}

.td-file-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.td-file-actions .button {
    font-size: 13px;
    padding: 6px 12px;
}

.td-file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 25px;
    background: #fafafa;
    font-size: 13px;
    color: #646970;
}

.td-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    text-align: center;
}

.td-meta-item strong {
    color: #23282d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.td-meta-item span {
    color: #646970;
    font-size: 14px;
    font-weight: 500;
}

/* === PAGE CONVERTISSEUR HTML → CSV === */
.td-converter-container {
    max-width: 1000px;
}

.td-converter-form {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.td-converter-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.td-converter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.td-converter-section h2 {
    margin: 0 0 20px 0;
    color: #23282d;
    font-size: 1.4em;
    font-weight: 600;
}

.td-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.td-form-group {
    margin-bottom: 20px;
}

.td-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.td-form-group input[type="text"],
.td-form-group input[type="date"],
.td-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.td-form-group textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
    line-height: 1.5;
}

.td-form-group input:focus,
.td-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.td-form-group small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.td-converter-actions {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.td-conversion-preview {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
}

.td-conversion-preview h3 {
    margin: 0 0 20px 0;
    color: #23282d;
    font-size: 1.2em;
}

.td-preview-stats {
    background: #f0f6fc;
    border: 1px solid #0969da;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #0969da;
    font-weight: 600;
}

.td-preview-table {
    font-size: 13px;
    border-collapse: collapse;
    width: 100%;
}

.td-preview-table th,
.td-preview-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.td-preview-table th {
    background: #f1f1f1;
    font-weight: 600;
    border-bottom: 2px solid #007cba;
}

.td-preview-note {
    margin: 15px 0 0 0;
    color: #6b7280;
    font-style: italic;
    text-align: center;
}

/* === PAGE DE DÉTAIL === */
.td-file-info {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.td-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.td-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.td-info-item strong {
    color: #23282d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.td-info-item span {
    color: #646970;
    font-size: 15px;
}

.td-info-item .button {
    margin-right: 8px;
    margin-bottom: 5px;
}

.td-csv-content {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
}

.td-csv-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #23282d;
    font-size: 1.3em;
}

.td-table-container {
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 70vh;
}

.td-csv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.td-csv-table th,
.td-csv-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    position: relative;
}

.td-csv-table th {
    background: #f1f1f1;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #007cba;
}

.td-csv-table tbody tr:hover {
    background: #f9f9f9;
}

.td-csv-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.td-csv-table tbody tr:nth-child(even):hover {
    background: #f5f5f5;
}

.td-empty-content {
    text-align: center;
    padding: 40px;
    color: #646970;
    font-size: 16px;
}

/* === PAGE D'OPTIONS === */
.td-options-container {
    max-width: 800px;
    margin: 20px 0;
}

.td-option-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.td-option-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 1.3em;
}

.td-option-section .description {
    margin-bottom: 20px;
    color: #646970;
    line-height: 1.5;
}

.td-columns-help {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.td-columns-help h4 {
    margin-bottom: 10px;
    color: #23282d;
}

.td-detected-columns {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.td-columns-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.td-column-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #bbdefb;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.td-column-tag:hover {
    background: #1565c0;
    color: #fff;
    transform: translateY(-1px);
}

.td-column-tag.td-tag-added {
    background: #4caf50;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.td-column-tag.td-tag-selected {
    background: #ff9800;
    color: #fff;
    border-color: #f57c00;
}

/* === PAGINATION === */
.td-pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination-wrapper {
    display: inline-block;
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #007cba;
    background: #fff;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.pagination .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* === STYLES SPÉCIFIQUES AUX RENCONTRES SCIENTIFIQUES === */

/* Statistiques d'inscription */
.td-summary-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.td-hidden-columns-notice {
    background: #f0f6fc;
    border: 1px solid #0969da;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.td-hidden-columns-notice p {
    margin: 0;
    color: #0969da;
    font-size: 14px;
}

.td-hidden-columns-notice strong {
    color: #0969da;
}

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

.td-stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.td-stat-item strong {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.td-stat-item span {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badges pour les statuts */
.td-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.td-badge.td-valid {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.td-badge.td-invalid {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.td-badge.td-yes {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.td-badge.td-no {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.td-badge.td-status-inscrit {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.td-badge.td-status-attente {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.td-badge.td-status-refuse {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Classes spécifiques aux colonnes */
.td-col-name {
    font-weight: 600;
    min-width: 120px;
    background: #fafafa;
}

.td-col-email {
    min-width: 200px;
}

.td-col-email a {
    color: #007cba;
    text-decoration: none;
}

.td-col-email a:hover {
    text-decoration: underline;
}

.td-col-date {
    min-width: 140px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.td-col-status {
    min-width: 100px;
    text-align: center;
}

.td-col-valid {
    min-width: 100px;
    text-align: center;
}

.td-col-affiliation {
    min-width: 200px;
    font-weight: 500;
}

.td-col-event {
    min-width: 150px;
    font-weight: 500;
    color: #374151;
}

.td-col-location {
    min-width: 120px;
    color: #6b7280;
}

/* Classes pour les lignes selon le statut */
.td-row-inscrit {
    background: rgba(209, 250, 229, 0.3);
}

.td-row-attente {
    background: rgba(254, 243, 199, 0.3);
}

.td-row-refuse {
    background: rgba(254, 226, 226, 0.3);
}

/* === RECHERCHE ET TRI (V2 Enhanced) === */

/* Barre de recherche et contrôles */
.td-search-controls {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.td-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.td-search-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.td-search-field {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.td-search-field:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.td-search-btn, .td-clear-search {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.td-clear-search {
    background: #f1f1f1;
    color: #666;
    border: 1px solid #ddd;
}

.td-clear-search:hover {
    background: #e0e0e0;
    color: #333;
}

.td-sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.td-sort-group label {
    font-weight: 600;
    margin: 0;
    color: #374151;
    font-size: 14px;
}

.td-sort-select, .td-order-select {
    padding: 8px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.td-sort-select:focus, .td-order-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Résultats de recherche */
.td-search-results {
    margin: 15px 0;
    padding: 12px 16px;
    background: #f0f9ff;
    border: 1px solid #0073aa;
    border-radius: 6px;
    color: #0073aa;
    animation: slideIn 0.3s ease-out;
}

.td-search-results strong {
    font-weight: 600;
}

/* Badge de date d'événement */
.td-event-date-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2271b1, #1e40af);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(34, 113, 177, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Améliorations pour les cartes de fichiers */
.td-file-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.td-filename-display {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* États vides améliorés pour recherche */
.td-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 20px 0;
}

.td-empty-state p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.td-empty-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Pagination avec paramètres de recherche */
.td-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination-wrapper .pagination li {
    margin: 0;
}

.pagination-wrapper .pagination a,
.pagination-wrapper .pagination span {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #0073aa;
    transition: all 0.2s ease;
}

.pagination-wrapper .pagination .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.pagination-wrapper .pagination a:hover {
    background: #f0f9ff;
    border-color: #0073aa;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1000px) {
    .td-add-container,
    .td-list-container,
    .td-detail-container,
    .td-converter-container {
        margin: 10px;
    }
    
    /* Page d'ajout responsive */
    .td-add-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .td-upload-section {
        padding: 20px;
    }
    
    .td-drop-zone {
        padding: 40px 20px;
        min-height: 150px;
    }
    
    .td-drop-content .dashicons {
        font-size: 48px;
    }
    
    .td-drop-content p {
        font-size: 16px;
    }
    
    .td-drop-content button {
        font-size: 16px;
    }
    
    /* Page convertisseur responsive */
    .td-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .td-converter-form {
        padding: 20px;
    }
    
    .td-converter-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .td-converter-actions .button {
        width: 100%;
        text-align: center;
    }
    
    /* Page de liste responsive */
    .td-file-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 15px 20px;
    }
    
    .td-file-title {
        font-size: 1.1em;
        text-align: center;
        justify-content: center;
    }
    
    .td-filename-edit {
        min-width: 250px;
        font-size: 1.1em;
    }
    
    .td-file-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .td-file-actions .button {
        flex: 1;
        min-width: 80px;
        text-align: center;
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .td-rename-btn {
        flex: 0 0 auto !important;
        min-width: 40px !important;
    }
    
    .td-file-meta {
        flex-direction: column;
        gap: 12px;
        padding: 15px 20px;
    }
    
    .td-meta-item {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .td-meta-item strong {
        font-size: 12px;
    }
    
    .td-empty-actions {
        flex-direction: column;
        align-items: center;
    }
    
    /* Page de détail responsive */
    .td-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .td-file-info,
    .td-csv-content {
        padding: 20px;
    }
    
    .td-table-container {
        max-height: 50vh;
    }
    
    .td-csv-table {
        font-size: 12px;
    }
    
    .td-csv-table th,
    .td-csv-table td {
        padding: 8px 10px;
    }
    
    /* Statistiques responsive */
    .td-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .td-stat-item {
        padding: 12px;
    }
    
    .td-stat-item strong {
        font-size: 20px;
    }
    
    .td-stat-item span {
        font-size: 11px;
    }
    
    .td-summary-stats {
        padding: 20px;
    }
    
    .td-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    /* Options responsive */
    .td-options-container {
        margin: 10px;
    }
    
    .td-option-section {
        padding: 20px;
    }
    
    .td-detected-columns {
        max-height: 150px;
    }
    
    .td-column-tag {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    /* Pagination responsive */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* Responsive pour les nouveaux éléments */
    .td-search-controls {
        padding: 15px;
        margin: 15px 0;
    }
    
    .td-search-form {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .td-search-group, .td-sort-group {
        flex-direction: column;
        align-items: stretch;
        min-width: auto;
    }
    
    .td-sort-group {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .td-search-field {
        margin-bottom: 10px;
    }
    
    .td-file-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .td-event-date-badge {
        margin-left: 0;
        margin-top: 5px;
        align-self: flex-start;
    }
    
    .td-empty-actions {
        flex-direction: column;
    }
    
    .td-search-btn, .td-clear-search {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .td-file-actions {
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    .td-file-actions .button {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .td-sort-select, .td-order-select {
        font-size: 13px;
        padding: 6px 8px;
    }
    
    .td-search-field {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.notice {
    animation: fadeIn 0.3s ease;
}

.td-file-card {
    animation: slideIn 0.3s ease;
}

.td-tag-added {
    animation: pulse 0.5s ease;
}

/* === ÉTATS DES ÉLÉMENTS === */
.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-link-delete:hover {
    color: #d63638;
}

/* Loading state */
.td-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.td-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007cba;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === ACCESSIBILITÉ === */
.button:focus,
.td-drop-zone:focus,
.td-form-group input:focus,
.td-form-group textarea:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Indicateur de tri actif */
.td-sort-select option:checked {
    background: #0073aa;
    color: white;
}

/* === SCROLLBAR PERSONNALISÉE === */
.td-table-container::-webkit-scrollbar,
.td-detected-columns::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.td-table-container::-webkit-scrollbar-track,
.td-detected-columns::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.td-table-container::-webkit-scrollbar-thumb,
.td-detected-columns::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.td-table-container::-webkit-scrollbar-thumb:hover,
.td-detected-columns::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
