/* Ngrams Top 10 Table - Styles */
.ngrams-top10-table-container,
.schema-table-container {
    max-width: 100%;
    margin: 0 auto;
    overflow: auto;
    max-height: calc(100vh - 200px);
}

.ngrams-error {
    padding: 16px;
    background: #fee;
    color: #c33;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.ngrams-top10-table,
.schema-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    min-width: 800px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.ngrams-top10-table thead,
.schema-table thead {
    background: #f8fafc;
}

.ngrams-top10-table th,
.schema-table th {
    padding: 16px 8px;
    text-align: center;
    font-weight: 600;
    color: #000;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
}

.terms-column,
.schemas-column {
    background: #fff !important;
    color: #7B7DFE !important;
    text-align: left !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    min-width: 200px;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 12;
    position: relative;
}

.competitor-column {
    min-width: 120px;
    max-width: 140px;
}

/* Harmoniser les largeurs de colonnes pour le tableau Schema avec le tableau Tableau */
.schema-table .competitor-column {
    width: auto;
    min-width: 120px;
    max-width: none;
}

#tableau_concurrence th:not(:first-child) {
    min-width: 120px;
    width: auto;
}

.competitor-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.competitor-favicon {
  
    width: 16px; 
    height: 16px;
    border-radius: 4px;
}

.competitor-domain {
    font-weight: 600;
    font-size: 10px;
    word-break: break-all;
    color: #2d3748;
    display: none;
}

.competitor-domain.show {
    display: block;
}

.table-toggle-domain {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table-toggle-domain-btn {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 11px;
    color: #666;
    transition: all 0.2s ease;
    font-weight: 500;
}

.table-toggle-domain-btn:hover {
    background: #f8fafc;
    border-color: #7B7DFE;
    color: #7B7DFE;
}

.table-toggle-domain-btn.active {
    background: #7B7DFE;
    border-color: #7B7DFE;
    color: white;
}

.table-toggle-domain-btn i {
    font-size: 11px;
}

.ngrams-top10-table tbody tr,
.schema-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.ngrams-top10-table tbody tr:hover,
.schema-table tbody tr:hover {
    background: #f7fafc;
}

.term-row:hover .term-cell,
.schema-row:hover .schema-cell {
    background: #7B7DFE;
    color: white;
}

.term-cell,
.schema-cell {
    background: #f8fafc;
    font-weight: 600;
    color: #000;
    text-align: left;
    padding: 12px 16px;
    position: sticky;
    left: 0;
    z-index: 6;
    border-right: 2px solid #e2e8f0;
    font-size: 10px;
}

.ngrams-top10-table tbody tr:hover .term-cell,
.schema-table tbody tr:hover .schema-cell {
    background: #7B7DFE;
    color: white;
}

.occurrence-cell,
.schema-presence-cell {
    text-align: center;
    padding: 12px 8px;
    font-weight: 400;
    font-size: 14px;
    color: #000;
    vertical-align: middle;
    transition: opacity 0.2s ease;
}

.occurrence-cell:hover,
.schema-presence-cell:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .ngrams-top10-table-container {
        padding: 16px;
    }
    
    .terms-column {
        min-width: 150px;
    }
    
    .competitor-column {
        min-width: 100px;
    }
    
    .competitor-domain {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .ngrams-top10-table {
        font-size: 12px;
    }
    
    .ngrams-top10-table th,
    .ngrams-top10-table td {
        padding: 8px 4px;
    }
    
    .terms-column {
        min-width: 120px;
        padding-left: 12px !important;
    }
    
    .term-cell {
        padding-left: 12px;
    }
    
    .occurrence-cell {
        font-size: 12px;
    }
}

/* Tableau généré par transformerEnTableau */
#tableau_concurrence {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

#tableau_concurrence thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

#tableau_concurrence th {
    padding: 16px 8px;
    text-align: center;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

#tableau_concurrence th:first-child {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 12;
    background: #f8fafc;
}

#tableau_concurrence tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

#tableau_concurrence tbody tr:hover {
    background: #f7fafc;
}

#tableau_concurrence td {
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
}

#tableau_concurrence td:first-child {
    position: sticky;
    left: 0;
    z-index: 6;
    background: #f8fafc;
    border-right: 2px solid #e2e8f0;
    font-weight: 600;
}

#tableau_concurrence tbody tr:hover td:first-child {
    background: #7B7DFE;
    color: white;
}

#display_concurrents_tableau {
    overflow: auto;
    max-height: calc(100vh - 200px);
}

