/* liste sous forme de tableau */

table.tbl_liste_cadre_externe {
    width:      auto;
    margin:     0;
    clear:      both;
    margin-top: .2em;
    border-spacing:  0;
    border-collapse: collapse;
    empty-cells:     show;
    border:     none;
}
tbody.tbl_main_liste > tr > td {
    padding: 0;
    border: none;
}

table.tbl_liste {
    width:      auto;
    margin:     auto;
    margin-top: .2em;
    clear:      both;
    border-spacing:  0;
    border:     none;
    /* border-collapse: collapse;  -- incompatible avec thead/sticky */
    border-collapse: separate;
}
table.tbl_liste_naturel {
    margin-left: 0;
}
table.tbl_liste_cadre_externe table.tbl_liste.tbl_liste {
    margin: 0;
}

table.tbl_liste_standard {
    width: 100%;
}
table.tbl_liste_naturel {
    width: auto;
}
table.tbl_liste_petit {
    margin-top: 1em;
}

table.tbl_liste > caption {
    font-weight: bold;
    font-size:   larger;
    margin:      .5em auto;
    text-align: left;
}
table.tbl_liste.tbl_liste_petit > caption {
    text-align: center;
}

.tbl_head_liste > tr {
    vertical-align: bottom;
    text-align:     center;
}
.tbl_head_liste > tr > th,
.tbl_body_liste > tr > th {
    font-family: var(--font-family-titre);
    font-weight: var(--font-weight-titre);
    font-size: var(--font-size-titre-table);
    background-color: var(--background-color-theme-dark);
    color: var(--color);
}
.tbl_head_liste > tr > th,
.tbl_body_liste > tr > th,
.tbl_body_liste > tr > td {
    border:   none;
    padding:  0.6em;
    margin:   0;
    resize:   none;
}
.tbl_head_liste > tr > th.groupe_colonnes,
.tbl_head_liste > tr > th.groupe_colonnes_debut,
.tbl_head_liste > tr > th.groupe_colonnes + th,
.tbl_head_liste > tr > th.groupe_colonnes_fin + th {
    border-left: thin solid var(--background-color);
}

tr.lgn_grp0 > td             , tr.lgn_grp0 > th              { border-bottom-style: none }
tr.lgn_grp  > td             , tr.lgn_grp  > th              { border-top-style: none    }
tr.lgn_grp0 > td.cell_grp    , tr.lgn_grp0 > th.cell_grp     { border-bottom-style: none }
tr.lgn_grp  > td.cell_grp    , tr.lgn_grp  > th.cell_grp     { border-top-style: none    }

/* regles concernant border: classe repetée pour augmenter la specificité (au minimum 0-2-1) */
col.col_narrow                    { width:   1%;  }
.tbl_liste_naturel col.col_narrow { width: auto;  }

/*
td.col_grp0.col_grp0            { border-right-style: none }
td.col_grp.col_grp              { border-left-style: none  }
tr.all_col_grp.all_col_grp > td             { border-left-style: none; border-right-style: none }
tr.all_col_grp.all_col_grp > td:first-child { border-left-style: solid }
tr.all_col_grp.all_col_grp > td:last-child  { border-right-style: solid }
 */

td.col_nowrap, th.col_nowrap    { white-space:  pre;       }
td.col_prewrap, th.col_prewrap  { white-space:  pre-wrap;  }
td.col_left  , th.col_left      { text-align:   left;      }
td.col_right , th.col_right     { text-align:   right;     }
td.col_center, th.col_center    { text-align:   center;    }

tbody.tbl_body_liste > tr                              { background-color: var(--background-color); }
tbody.tbl_body_liste > tr.lgn_evidence.lgn_incorrect   { background-color: var(--background-color-incorrect-evidence); }
tbody.tbl_body_liste > tr.lgn_ok                       { background-color: var(--background-color-ok); }
tbody.tbl_body_liste > tr.lgn_evidence                 { background-color: var(--background-color-evidence); }
tbody.tbl_body_liste > tr.lgn_incorrect                { background-color: var(--background-color-incorrect); }

tbody.tbl_body_liste.alterne > tr:nth-of-type(odd)                              { background-color: var(--background-color); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).lgn_evidence.lgn_incorrect   { background-color: var(--background-color-incorrect-evidence); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).lgn_ok                       { background-color: var(--background-color-ok); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).lgn_evidence                 { background-color: var(--background-color-evidence); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).lgn_incorrect                { background-color: var(--background-color-incorrect); }

tbody.tbl_body_liste.alterne > tr:nth-of-type(even)                             { background-color: var(--background-color-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).lgn_evidence.lgn_incorrect  { background-color: var(--background-color-incorrect-evidence-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).lgn_ok                      { background-color: var(--background-color-ok-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).lgn_evidence                { background-color: var(--background-color-evidence-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).lgn_incorrect               { background-color: var(--background-color-incorrect-alt); }

tbody.tbl_body_liste > tr:hover > td                   { background-color: var(--background-color-hover); }

tbody.tbl_body_liste > tr.priorite1                   { background-color: var(--background-color-priorite-1); }
tbody.tbl_body_liste > tr.priorite2                   { background-color: var(--background-color-priorite-2); }
tbody.tbl_body_liste > tr.priorite3                   { background-color: var(--background-color-priorite-3); }
tbody.tbl_body_liste > tr.priorite4                   { background-color: var(--background-color-priorite-4); }
tbody.tbl_body_liste > tr.priorite5                   { background-color: var(--background-color-priorite-5); }

tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).priorite1  { background-color: var(--background-color-priorite-1); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).priorite2  { background-color: var(--background-color-priorite-2); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).priorite3  { background-color: var(--background-color-priorite-3); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).priorite4  { background-color: var(--background-color-priorite-4); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(odd).priorite5  { background-color: var(--background-color-priorite-5); }

tbody.tbl_body_liste.alterne > tr:nth-of-type(even).priorite1 { background-color:var(--background-color-priorite-1-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).priorite2 { background-color:var(--background-color-priorite-2-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).priorite3 { background-color:var(--background-color-priorite-3-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).priorite4 { background-color:var(--background-color-priorite-4-alt); }
tbody.tbl_body_liste.alterne > tr:nth-of-type(even).priorite5 { background-color:var(--background-color-priorite-5-alt); }

tbody.tbl_body_liste > tr.separation,
tbody.tbl_body_liste > tr.separation_top {
    border-top: thin solid var(--color-ultralight);
}
tbody.tbl_body_liste > tr.separation_bottom {
    border-bottom: thin solid var(--color-ultralight);
}

tbody.tbl_body_liste > tr.lgn_masquee,
tbody.tbl_body_liste > tr.lgn_masquee_btn .icone:not(.liste_details_toggle_button) {
    display: none;
}
tbody.tbl_body_liste > tr.lgn_masquee_btn .liste_details_toggle_button {
    transform: rotate(180deg);
}
tbody.tbl_body_liste > tr.lgn_masquee_btn td {
    border-bottom: 1px dashed var(--color-light);
}

tbody.tbl_body_liste > tr.valign_top {
    vertical-align: top;
}

.tbl_liste_nav {
    clear: both;
    margin: 0.2em;
    text-align: center;
}
.tbl_liste_nav_all_left {
    text-align: left;
}
.tbl_liste_nav_left {
    float: left;
}
.tbl_liste_nav_right {
    float: right;
}
.tbl_liste_nav_left,
.tbl_liste_nav_right,
.tbl_liste_nav_main {
    white-space: pre;
}

tbody.tbl_suppl_liste > tr > td {
    border-top: var(--border-theme);
    border-right: none;
    border-bottom: none;
    border-left: none;
}

.tbl_liste_complement {
    color: var(--color-colored);
}

tr.lgn_suppression > td,
tr.lgn_suppression > td a,
tr.lgn_suppression > th,
tr.lgn_inactif > td:not(.no_lgn_inactif),
tr.lgn_inactif > td:not(.no_lgn_inactif) a,
tr.lgn_inactif > th:not(.no_lgn_inactif) {
    font-style: oblique;
    text-decoration: line-through;
    color: var(--color-light);
}


/* contourne un bogue de Safari (OS X 10.7+), où la barre de defilement masque le dernier icone à droite */
#liste_details_wrapper[data-extra-padding-right=on]  > .tbl_liste > tbody > tr > td:last-child,
#liste_details_wrapper[data-extra-padding-right=on]  > * > .tbl_liste > tbody > tr > td:last-child {
    padding-right: 16px;
}

/* en-têtes fixes */
@supports (position: sticky) {
    .tbl_head_liste.sticky {
        position: sticky;
        top: 0;
        z-index: 1;
    }
    .tbl_head_liste.thead_over_tbody {
        /* box-shadow: 0 0 10px var(--background-color-backdrop); # ne fonctionne pas avec Safari */
        filter: drop-shadow(0 0 10px var(--background-color-backdrop));
        clip-path: polygon(0 0, 100% 0, 100% 300%, 0 300%); /* coupe l'ombre sauf en bas */
    }
    @supports (scroll-margin-top: 0px) {
        .tbl_head_liste.sticky:is(header.sticky ~ *, header.sticky ~ *   *) {
            top: var(--scroll-margin-top-after-header-sticky);
        }
    }
}

