

.datatable-scroll-container {
    overflow: auto;
    max-width: 100%;
    max-height: 90vh;
}
.dt-scroll-head{
    display: none;
}
.dt-scroll-footInner{
    display: none;
}
.table{
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
    height: 50vh;
    overflow: hidden;

    thead tr{
        background-color: var(--text-color) !important;
        position: sticky;
        top: 0;
        z-index: 15;
        .dt-column-title{
            color: var(--bg-color) !important;
        }
    }

    th:not(:first-child, :last-child){
        border-left: 1px solid var(--bg-color);
        border-right: 1px solid var(--bg-color);
    }

    td, th{
        position: relative;
        padding: 15px 5px;
        text-align: center;
    }

    tbody td{
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    }

    .action-area{
        display: flex;
        gap: 10px;
    }
    .action-btn{
        padding: 10px;
        font-size: 0.8em;
        background-color: var(--text-color);
        *{color: var(--light-color);}
        border-radius: var(--radius);
        border: none;
        &:hover{ background-color: var(--bg-btn);}
    }
}

/* On fait nous même nos flèches de filtre */

table.dataTable thead {
    .dt-column-header{
        display: flex;
        justify-content: space-between;
        padding: 0 5px;
        gap: 20px;
    }
    th:not(.dt-orderable-asc.dt-orderable-desc){
        .dt-column-header{
            align-items: center;
            justify-content: center;
            gap: 0;
        }
        .dt-column-order {width: 0}
    }
    th.dt-orderable-asc.dt-orderable-desc {
        &, & * {
            cursor: pointer !important;
        }
        .dt-column-order::after {
            content: "↕ filtrer";
            font-size: .8em;
            color: #aaa;
            position: relative;
            text-wrap: nowrap;
            white-space: nowrap;
        }

        &[aria-sort="ascending"] .dt-column-order::after {
            content: "⇡ ASC.";
        }
        &[aria-sort="descending"] .dt-column-order:after {
            content: "⇣ DESC.";
        }
        &:hover::after {
            color: var(--text-color);
        }
    }

}

/* Nombre à afficher et Input de recherche */

.dt-layout-row:first-of-type{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap-reverse;
    column-gap: 30px;
    row-gap: 20px;
    padding: 10px;
    margin-bottom: 5vh;
    border-radius: var(--radius);

    & input, & select{
        padding: 5px ;
        min-width: 100px;
    }
}

.dt-length label{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.dt-search{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;

    label{
        text-wrap: nowrap;
    }
}

/* Navigation de bas de tableau */

.dt-layout-row:has(.dt-info) {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap-reverse;
    gap: 20px;
    margin: 20px 0 ;
}

.dt-paging nav{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    button{
        background: var(--text-color);
        color: var(--bg-btn);
        border: none;
        padding: 0 10px;
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 1rem;

        &:not(.disabled):hover{
            filter: hue-rotate(90deg); !important;
        }

        &.disabled {
            opacity: .2;
        }

        &.current{
            background: var(--bg-btn) !important;
            color: var(--text-color);

            &:hover{
                filter: hue-rotate(90deg); !important;
            }
        }
    }
}
