/* Page équipements — voir ../common/styles/dataTable.css pour le style du tableau */

/* Desktop : colonnes proportionnelles, tableau calé sur la largeur du conteneur */
#items-table {
    table-layout: fixed;
}

#items-table th:nth-child(1),
#items-table td:nth-child(1) { width: 13%; }

#items-table th:nth-child(2),
#items-table td:nth-child(2) { width: 9%; }

#items-table th:nth-child(3),
#items-table td:nth-child(3) { width: 6%; }

#items-table th:nth-child(4),
#items-table td:nth-child(4) { width: 6%; }

#items-table th:nth-child(5),
#items-table td:nth-child(5) { width: 9%; }

#items-table th:nth-child(6),
#items-table td:nth-child(6) { width: 10%; }

#items-table th:nth-child(7),
#items-table td:nth-child(7) { width: 12%; }

#items-table th:nth-child(8),
#items-table td:nth-child(8) { width: 12%; }

#items-table th:nth-child(9),
#items-table td:nth-child(9) { width: 23%; }

/* En-têtes : retour à la ligne aux espaces, pas au milieu des mots */
#items-table thead th {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    line-height: 1.35;
    vertical-align: bottom;
}

#items-table tbody td:last-child {
    white-space: normal;
    overflow-wrap: break-word;
}

/* Mobile : défilement horizontal comme scraps-table (pas de table-layout fixed) */
@media (max-width: 768px) {
    #items-table {
        table-layout: auto;
        width: max-content;
        min-width: 100%;
    }

    #items-table th,
    #items-table td {
        width: auto;
    }

    #items-table thead th {
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
        vertical-align: bottom;
    }

    #items-table tbody td {
        white-space: nowrap;
    }

    #items-table tbody td:last-child {
        white-space: normal;
        overflow-wrap: break-word;
        min-width: 160px;
        max-width: 220px;
    }

    #items-table th:nth-child(1),
    #items-table td:nth-child(1) { min-width: 96px; }

    #items-table th:nth-child(2),
    #items-table td:nth-child(2) { min-width: 72px; }

    #items-table th:nth-child(3),
    #items-table td:nth-child(3) { min-width: 44px; }

    #items-table th:nth-child(4),
    #items-table td:nth-child(4) { min-width: 44px; }

    #items-table th:nth-child(5),
    #items-table td:nth-child(5) { min-width: 56px; }

    #items-table th:nth-child(6),
    #items-table td:nth-child(6) { min-width: 80px; }

    #items-table th:nth-child(7),
    #items-table td:nth-child(7) { min-width: 92px; }

    #items-table th:nth-child(8),
    #items-table td:nth-child(8) { min-width: 92px; }

    #items-table th:last-child,
    #items-table td:last-child {
        min-width: 160px;
    }
}
