/* ============================================
   TABLEAU ANALYSE AVANCÉE - Style professionnel
   ============================================ */

/* Désactiver les autres styles */
#advancedTable,
#advancedTable *,
#advancedTable::before,
#advancedTable::after,
#advancedTable *::before,
#advancedTable *::after {
    all: unset !important;
    display: revert !important;
    box-sizing: border-box !important;
}

/* Tableau analyse avancée */
#advancedTable {
    width: 100% !important;
    min-width: 1600px !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #D1D5DB !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#advancedTable thead {
    display: table-header-group !important;
    background-color: #F3F4F6 !important;
}

#advancedTable thead tr {
    display: table-row !important;
}

#advancedTable thead th {
    display: table-cell !important;
    padding: 12px 10px !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    background-color: #F3F4F6 !important;
    border: 1px solid #D1D5DB !important;
    color: #374151 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}

#advancedTable tbody {
    display: table-row-group !important;
}

#advancedTable tbody tr {
    display: table-row !important;
}

#advancedTable tbody td {
    display: table-cell !important;
    padding: 10px 10px !important;
    border: 1px solid #D1D5DB !important;
    vertical-align: middle !important;
    font-size: 13px !important;
    color: #1F2937 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#advancedTable tbody tr:hover {
    background-color: #F9FAFB !important;
}

/* Largeurs des colonnes */
#advancedTable th:nth-child(1),
#advancedTable td:nth-child(1) {
    min-width: 120px !important;
    width: auto !important;
    font-weight: 600 !important;
}

#advancedTable th:nth-child(2),
#advancedTable td:nth-child(2) {
    min-width: 80px !important;
    width: auto !important;
    text-align: center !important;
}

#advancedTable th:nth-child(3),
#advancedTable td:nth-child(3),
#advancedTable th:nth-child(4),
#advancedTable td:nth-child(4),
#advancedTable th:nth-child(5),
#advancedTable td:nth-child(5),
#advancedTable th:nth-child(6),
#advancedTable td:nth-child(6),
#advancedTable th:nth-child(7),
#advancedTable td:nth-child(7) {
    min-width: 100px !important;
    width: auto !important;
    text-align: center !important;
}

#advancedTable th:nth-child(8),
#advancedTable td:nth-child(8) {
    min-width: 200px !important;
    width: auto !important;
}

#advancedTable th:nth-child(9),
#advancedTable td:nth-child(9) {
    min-width: 120px !important;
    width: auto !important;
    text-align: center !important;
}

#advancedTable th:nth-child(10),
#advancedTable td:nth-child(10),
#advancedTable th:nth-child(11),
#advancedTable td:nth-child(11),
#advancedTable th:nth-child(12),
#advancedTable td:nth-child(12),
#advancedTable th:nth-child(13),
#advancedTable td:nth-child(13),
#advancedTable th:nth-child(14),
#advancedTable td:nth-child(14),
#advancedTable th:nth-child(15),
#advancedTable td:nth-child(15) {
    min-width: 100px !important;
    width: auto !important;
    text-align: center !important;
}

#advancedTable th:nth-child(16),
#advancedTable td:nth-child(16) {
    min-width: 100px !important;
    width: auto !important;
    text-align: center !important;
}

/* Mise en forme conditionnelle */
#advancedTable .cell-conditional[data-value] {
    font-weight: 600 !important;
}

/* TRS */
#advancedTable .cell-conditional[data-type="trs"][data-value] {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
}

#advancedTable .cell-conditional[data-type="trs"][data-value]:not([data-value=""]) {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #DC2626 !important;
}

/* Arrêts - Rouge si > 0 */
#advancedTable .cell-conditional[data-type="arrets"]:not([data-value="0"]) {
    color: #DC2626 !important;
    font-weight: 700 !important;
}

/* Container avec scroll horizontal */
.advanced-table-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 20px !important;
    box-sizing: border-box !important;
    position: relative !important;
}


