/* Version: 31-05-2026-16-39 */
/* ===================== TABLES — Source de vérité hub : dupliquer les mêmes fichiers vers auth / register / portfolios ===================== */

.table-design,
.table-list,
.dataTables_wrapper {
    /* Colonnes texte : plafond serré + width:0 sur les cellules (voir tbody) pour coller au contenu */
    --arkt-table-cell-max: min(11rem, 32vw);
    /* Colonnes volontairement plus larges (ex. identifiant long) : classe .arkt-table-col--wide sur th/td */
    --arkt-table-cell-wide-max: min(18rem, 52vw);
    /* Colonne actions / édition : largeur minimale pour boutons + grilles */
    --arkt-table-actions-min: 13.5rem;
    --arkt-table-img-max: 120px;
    --arkt-table-pad-x: 10px;
    --arkt-table-pad-y: 9px;
}

@media screen and (max-width: 768px) {
    .table-design,
    .table-list,
    .dataTables_wrapper {
        --arkt-table-cell-max: min(9rem, 72vw);
        --arkt-table-cell-wide-max: min(15rem, 85vw);
        --arkt-table-actions-min: min(11.5rem, 88vw);
        --arkt-table-pad-x: 8px;
        --arkt-table-pad-y: 8px;
    }

    .table-design .table thead th .search.search-bar-inner,
    .table-list .table thead th .search.search-bar-inner,
    .dataTables_wrapper table.dataTable thead th .search.search-bar-inner {
        gap: 4px;
        padding: 4px 10px;
    }

    .table-design .table thead th .search.search-bar-inner svg,
    .table-list .table thead th .search.search-bar-inner svg,
    .dataTables_wrapper table.dataTable thead th .search.search-bar-inner svg {
        width: 11px;
        height: 11px;
    }
}

/* Base Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 5vh;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/*
 * Cellules « texte » : plafond + coupure.
 * width: 0 (table-layout auto) pousse les colonnes vers la largeur minimale du contenu,
 * sans les étirer jusqu’au plafond quand le texte est court.
 */
.table-design .table tbody td,
.table-list .table tbody td,
.dataTables_wrapper table.dataTable tbody td {
    width: 0;
    max-width: var(--arkt-table-cell-max, min(11rem, 32vw));
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Cellules badge + bouton (état, etc.) : pas de width:0 / césure agressive */
.table-design .table tbody td.manage-td-inline,
.table-list .table tbody td.manage-td-inline,
.dataTables_wrapper table.dataTable tbody td.manage-td-inline {
    width: auto;
    max-width: none;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.table-design .table tbody td.manage-td-inline--start,
.table-list .table tbody td.manage-td-inline--start,
.dataTables_wrapper table.dataTable tbody td.manage-td-inline--start {
    white-space: normal;
}

/*
 * Listes / DataTables : largeur = contenu (pas de colonnes étirées inutilement).
 * Si le tableau dépasse le bloc → scroll horizontal sur .table-design (sans DataTables) ou sur .dataTables_wrapper > .row.dt-content.
 */
.table-design .table,
.table-list .table,
.dataTables_wrapper table.table,
.dataTables_wrapper table.dataTable {
    table-layout: auto;
    /* !important : au-dessus des largeurs inline éventuelles de DataTables */
    width: max-content !important;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.table-design .table th,
.table-design .table td,
.table-list .table th,
.table-list .table td,
.dataTables_wrapper table.dataTable th,
.dataTables_wrapper table.dataTable td {
    padding: var(--arkt-table-pad-y, 9px) var(--arkt-table-pad-x, 10px);
}

.table-design .table thead th,
.table-list .table thead th,
.dataTables_wrapper table.dataTable thead th {
    white-space: normal;
    line-height: 1.25;
}

/* Titres : largeur pilotée par le contenu (cf. tbody td width:0) */
.table-design .table thead tr:first-child th,
.table-list .table thead tr:first-child th,
.dataTables_wrapper table.dataTable thead tr:first-child th {
    width: 0;
    max-width: var(--arkt-table-cell-max, min(11rem, 32vw));
}

/* Ligne de filtres : cellules compactes ; colonnes avec filtre alignées sur la 1re ligne + plafond (--arkt-table-cell-max) */
.table-design .table thead tr:not(:first-child) th,
.table-list .table thead tr:not(:first-child) th,
.dataTables_wrapper table.dataTable thead tr:not(:first-child) th {
    padding-top: 4px;
    padding-bottom: 6px;
    vertical-align: middle;
    width: auto;
    max-width: none;
}

.table-design .table thead tr:not(:first-child) th:has(.search.search-bar-inner):not(:last-child),
.table-list .table thead tr:not(:first-child) th:has(.search.search-bar-inner):not(:last-child),
.dataTables_wrapper table.dataTable thead tr:not(:first-child) th:has(.search.search-bar-inner):not(:last-child) {
    width: 0;
    max-width: var(--arkt-table-cell-max, min(11rem, 32vw));
}

.table-design .table thead tr:not(:first-child) th:has(.search.search-bar-inner).arkt-table-col--wide:not(:last-child),
.table-list .table thead tr:not(:first-child) th:has(.search.search-bar-inner).arkt-table-col--wide:not(:last-child),
.dataTables_wrapper table.dataTable thead tr:not(:first-child) th:has(.search.search-bar-inner).arkt-table-col--wide:not(:last-child) {
    max-width: var(--arkt-table-cell-wide-max, min(18rem, 52vw));
}

.table-design .table th.arkt-table-col--wide,
.table-design .table td.arkt-table-col--wide,
.table-list .table th.arkt-table-col--wide,
.table-list .table td.arkt-table-col--wide,
.dataTables_wrapper table.dataTable th.arkt-table-col--wide,
.dataTables_wrapper table.dataTable td.arkt-table-col--wide {
    width: auto;
    max-width: var(--arkt-table-cell-wide-max, min(18rem, 52vw));
}

/* Colonnes avec libellés (.label) : largeur au contenu des pastilles (évite chevauchement avec la colonne suivante). Détection par :has sur tbody ; colonnes 15+ : classe .arkt-table-col--labels sur th/td. */
.table-design .table:has(tbody td:nth-child(1) .label) thead tr:first-child th:nth-child(1),
.table-list .table:has(tbody td:nth-child(1) .label) thead tr:first-child th:nth-child(1),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(1) .label) thead tr:first-child th:nth-child(1),
.table-design .table:has(tbody td:nth-child(2) .label) thead tr:first-child th:nth-child(2),
.table-list .table:has(tbody td:nth-child(2) .label) thead tr:first-child th:nth-child(2),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(2) .label) thead tr:first-child th:nth-child(2),
.table-design .table:has(tbody td:nth-child(3) .label) thead tr:first-child th:nth-child(3),
.table-list .table:has(tbody td:nth-child(3) .label) thead tr:first-child th:nth-child(3),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(3) .label) thead tr:first-child th:nth-child(3),
.table-design .table:has(tbody td:nth-child(4) .label) thead tr:first-child th:nth-child(4),
.table-list .table:has(tbody td:nth-child(4) .label) thead tr:first-child th:nth-child(4),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(4) .label) thead tr:first-child th:nth-child(4),
.table-design .table:has(tbody td:nth-child(5) .label) thead tr:first-child th:nth-child(5),
.table-list .table:has(tbody td:nth-child(5) .label) thead tr:first-child th:nth-child(5),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(5) .label) thead tr:first-child th:nth-child(5),
.table-design .table:has(tbody td:nth-child(6) .label) thead tr:first-child th:nth-child(6),
.table-list .table:has(tbody td:nth-child(6) .label) thead tr:first-child th:nth-child(6),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(6) .label) thead tr:first-child th:nth-child(6),
.table-design .table:has(tbody td:nth-child(7) .label) thead tr:first-child th:nth-child(7),
.table-list .table:has(tbody td:nth-child(7) .label) thead tr:first-child th:nth-child(7),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(7) .label) thead tr:first-child th:nth-child(7),
.table-design .table:has(tbody td:nth-child(8) .label) thead tr:first-child th:nth-child(8),
.table-list .table:has(tbody td:nth-child(8) .label) thead tr:first-child th:nth-child(8),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(8) .label) thead tr:first-child th:nth-child(8),
.table-design .table:has(tbody td:nth-child(9) .label) thead tr:first-child th:nth-child(9),
.table-list .table:has(tbody td:nth-child(9) .label) thead tr:first-child th:nth-child(9),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(9) .label) thead tr:first-child th:nth-child(9),
.table-design .table:has(tbody td:nth-child(10) .label) thead tr:first-child th:nth-child(10),
.table-list .table:has(tbody td:nth-child(10) .label) thead tr:first-child th:nth-child(10),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(10) .label) thead tr:first-child th:nth-child(10),
.table-design .table:has(tbody td:nth-child(11) .label) thead tr:first-child th:nth-child(11),
.table-list .table:has(tbody td:nth-child(11) .label) thead tr:first-child th:nth-child(11),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(11) .label) thead tr:first-child th:nth-child(11),
.table-design .table:has(tbody td:nth-child(12) .label) thead tr:first-child th:nth-child(12),
.table-list .table:has(tbody td:nth-child(12) .label) thead tr:first-child th:nth-child(12),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(12) .label) thead tr:first-child th:nth-child(12),
.table-design .table:has(tbody td:nth-child(13) .label) thead tr:first-child th:nth-child(13),
.table-list .table:has(tbody td:nth-child(13) .label) thead tr:first-child th:nth-child(13),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(13) .label) thead tr:first-child th:nth-child(13),
.table-design .table:has(tbody td:nth-child(14) .label) thead tr:first-child th:nth-child(14),
.table-list .table:has(tbody td:nth-child(14) .label) thead tr:first-child th:nth-child(14),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(14) .label) thead tr:first-child th:nth-child(14),
.table-design .table:has(tbody td:nth-child(1) .label) thead tr:not(:first-child) th:nth-child(1),
.table-list .table:has(tbody td:nth-child(1) .label) thead tr:not(:first-child) th:nth-child(1),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(1) .label) thead tr:not(:first-child) th:nth-child(1),
.table-design .table:has(tbody td:nth-child(2) .label) thead tr:not(:first-child) th:nth-child(2),
.table-list .table:has(tbody td:nth-child(2) .label) thead tr:not(:first-child) th:nth-child(2),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(2) .label) thead tr:not(:first-child) th:nth-child(2),
.table-design .table:has(tbody td:nth-child(3) .label) thead tr:not(:first-child) th:nth-child(3),
.table-list .table:has(tbody td:nth-child(3) .label) thead tr:not(:first-child) th:nth-child(3),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(3) .label) thead tr:not(:first-child) th:nth-child(3),
.table-design .table:has(tbody td:nth-child(4) .label) thead tr:not(:first-child) th:nth-child(4),
.table-list .table:has(tbody td:nth-child(4) .label) thead tr:not(:first-child) th:nth-child(4),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(4) .label) thead tr:not(:first-child) th:nth-child(4),
.table-design .table:has(tbody td:nth-child(5) .label) thead tr:not(:first-child) th:nth-child(5),
.table-list .table:has(tbody td:nth-child(5) .label) thead tr:not(:first-child) th:nth-child(5),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(5) .label) thead tr:not(:first-child) th:nth-child(5),
.table-design .table:has(tbody td:nth-child(6) .label) thead tr:not(:first-child) th:nth-child(6),
.table-list .table:has(tbody td:nth-child(6) .label) thead tr:not(:first-child) th:nth-child(6),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(6) .label) thead tr:not(:first-child) th:nth-child(6),
.table-design .table:has(tbody td:nth-child(7) .label) thead tr:not(:first-child) th:nth-child(7),
.table-list .table:has(tbody td:nth-child(7) .label) thead tr:not(:first-child) th:nth-child(7),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(7) .label) thead tr:not(:first-child) th:nth-child(7),
.table-design .table:has(tbody td:nth-child(8) .label) thead tr:not(:first-child) th:nth-child(8),
.table-list .table:has(tbody td:nth-child(8) .label) thead tr:not(:first-child) th:nth-child(8),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(8) .label) thead tr:not(:first-child) th:nth-child(8),
.table-design .table:has(tbody td:nth-child(9) .label) thead tr:not(:first-child) th:nth-child(9),
.table-list .table:has(tbody td:nth-child(9) .label) thead tr:not(:first-child) th:nth-child(9),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(9) .label) thead tr:not(:first-child) th:nth-child(9),
.table-design .table:has(tbody td:nth-child(10) .label) thead tr:not(:first-child) th:nth-child(10),
.table-list .table:has(tbody td:nth-child(10) .label) thead tr:not(:first-child) th:nth-child(10),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(10) .label) thead tr:not(:first-child) th:nth-child(10),
.table-design .table:has(tbody td:nth-child(11) .label) thead tr:not(:first-child) th:nth-child(11),
.table-list .table:has(tbody td:nth-child(11) .label) thead tr:not(:first-child) th:nth-child(11),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(11) .label) thead tr:not(:first-child) th:nth-child(11),
.table-design .table:has(tbody td:nth-child(12) .label) thead tr:not(:first-child) th:nth-child(12),
.table-list .table:has(tbody td:nth-child(12) .label) thead tr:not(:first-child) th:nth-child(12),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(12) .label) thead tr:not(:first-child) th:nth-child(12),
.table-design .table:has(tbody td:nth-child(13) .label) thead tr:not(:first-child) th:nth-child(13),
.table-list .table:has(tbody td:nth-child(13) .label) thead tr:not(:first-child) th:nth-child(13),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(13) .label) thead tr:not(:first-child) th:nth-child(13),
.table-design .table:has(tbody td:nth-child(14) .label) thead tr:not(:first-child) th:nth-child(14),
.table-list .table:has(tbody td:nth-child(14) .label) thead tr:not(:first-child) th:nth-child(14),
.dataTables_wrapper table.dataTable:has(tbody td:nth-child(14) .label) thead tr:not(:first-child) th:nth-child(14),
.table-design .table tbody td:has(.label),
.table-list .table tbody td:has(.label),
.dataTables_wrapper table.dataTable tbody td:has(.label) {
    width: auto;
    max-width: none;
    min-width: min-content;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
}

.table-design .table th.arkt-table-col--labels,
.table-design .table td.arkt-table-col--labels,
.table-list .table th.arkt-table-col--labels,
.table-list .table td.arkt-table-col--labels,
.dataTables_wrapper table.dataTable th.arkt-table-col--labels,
.dataTables_wrapper table.dataTable td.arkt-table-col--labels {
    width: auto;
    max-width: none;
    min-width: min-content;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
}


/* Colonne actions explicite (optionnel dans le HTML) : pas de plafond, largeur mini confortable */
.table-design .table th.arkt-table-col--actions,
.table-design .table td.arkt-table-col--actions,
.table-list .table th.arkt-table-col--actions,
.table-list .table td.arkt-table-col--actions,
.dataTables_wrapper table.dataTable th.arkt-table-col--actions,
.dataTables_wrapper table.dataTable td.arkt-table-col--actions {
    width: auto;
    max-width: none;
    min-width: var(--arkt-table-actions-min, 13.5rem);
}

.table-design .table td img,
.table-list .table td img,
.dataTables_wrapper table.dataTable td img {
    width: auto;
    max-width: min(100%, var(--arkt-table-img-max, 120px));
    height: auto;
}

/* —— Scrollport (une seule zone de défilement horizontal) —— */
/* Marges négatives Bootstrap sur .row : sinon largeur de scroll > contenu réel (bande blanche à droite) */
.table-design.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
}

/*
 * Cadre glass : .table-design et .dataTables_wrapper.
 * Avec DataTables, le scroll horizontal est sur .row.dt-content (entre .dt-top-bar et .dt-bottom-bar), pas sur .table-design.
 */
.table-design,
.dataTables_wrapper {
    z-index: 15;
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: var(--arktefakt-bg-surface);
    border: var(--arktefakt-glass-border);
    backdrop-filter: var(--arktefakt-glass-blur);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur);
}

.table-design:not(:has(.dataTables_wrapper)) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}

.table-design:has(.dataTables_wrapper),
.dataTables_wrapper {
    overflow-x: visible;
}

.table-design .dataTables_wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.dataTables_wrapper > .row.dt-content {
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}

.tab .table-design {
    border: 1px solid transparent;
    box-shadow: none;
}

.table-list .col-sm-12,
.table-list .col-12,
.table-list.col-sm-12,
.table-list.col-12 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* Pas de second overflow-x ici : évite double barre / scroll étendu à vide */
}

/* Table Cells */
.table th,
.table td {
    vertical-align: middle;
    text-align: left;
}

/* Padding par défaut (formulaires, tableaux hors .table-design / .table-list) */
.table th {
    padding: 14px 22px;
    font-weight: bold;
}

.table td {
    padding: 16px 22px;
    transition: background 0.15s ease;
}

table tr td {
    padding: 16px 18px;
    transition: background 0.15s ease;
}

table tr th {
    padding: 14px 18px;
    text-align: left;
}

.table thead input {
    margin-bottom: 15px;
}

/* Filtres par colonne : pas de marge parasite sur l’input (alignement avec l’icône) */
.table thead .search.search-bar-inner input,
.dataTables_wrapper table.dataTable thead .search.search-bar-inner input {
    margin-bottom: 0 !important;
}

/*
 * Filtres par colonne (thead) : même design que #table-show_filter label (recherche principale DataTables),
 * en version réduite (padding, typo, icône). Voir bloc « Search/Filter » plus bas.
 */
.table-design .table thead th .search.search-bar-inner,
.table-list .table thead th .search.search-bar-inner,
.dataTables_wrapper table.dataTable thead th .search.search-bar-inner {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 5px 12px;
    margin: 0;
    min-height: 0;
    background: var(--arktefakt-bg-element, transparent);
    border: 2px solid var(--arktefakt-border-main);
    border-radius: var(--portfolios-border-radius-xl, 50px);
    backdrop-filter: var(--arktefakt-glass-blur-sm);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur-sm);
    transition: 0.2s linear;
}

.table-design .table thead th .search.search-bar-inner svg,
.table-list .table thead th .search.search-bar-inner svg,
.dataTables_wrapper table.dataTable thead th .search.search-bar-inner svg {
    margin-right: 0;
    flex-shrink: 0;
    align-self: center;
    width: 12px;
    height: 12px;
    stroke: var(--arktefakt-text-main);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.4;
    transition: opacity 0.2s linear;
}

.table-design .table thead th .search.search-bar-inner:focus-within svg,
.table-list .table thead th .search.search-bar-inner:focus-within svg,
.dataTables_wrapper table.dataTable thead th .search.search-bar-inner:focus-within svg {
    opacity: 0.7;
}

/* Champ : même traitement que .search-input global, taille abaissée */
.table-design .table thead th .search.search-bar-inner input,
.table-list .table thead th .search.search-bar-inner input,
.dataTables_wrapper table.dataTable thead th .search.search-bar-inner input {
    flex: 1;
    font-size: 12px !important;
    line-height: 1.3 !important;
    padding: 1px 4px !important;
    min-height: 0;
    background: transparent !important;
    border: none !important;
    outline: none;
    color: var(--arktefakt-text-main) !important;
    font-family: inherit !important;
    box-shadow: none !important;
    box-sizing: border-box;
    margin: 0 !important;
    min-width: 0;
}

.table-design .table thead th .search.search-bar-inner input::placeholder,
.table-list .table thead th .search.search-bar-inner input::placeholder,
.dataTables_wrapper table.dataTable thead th .search.search-bar-inner input::placeholder {
    color: var(--arktefakt-text-main);
    opacity: 0.38;
}

table td input {
    margin: 0;
}

table td img {
    width: 150px;
    max-width: 100%;
    border-radius: var(--portfolios-border-radius-m, 8px);
    object-fit: cover;
}

table tr td .picturecolor {
    width: 100%;
    height: 50px;
    border-radius: var(--portfolios-border-radius-m, 8px);
}

table ul {
    grid-gap: 5px!important;
}

table .search-input {
    border: 0px!important;
}

/* Border Radius */
.border-radius .table th:first-child {
    border-radius: var(--portfolios-border-radius-l, 12px) 0 0 var(--portfolios-border-radius-l, 12px);
}

.border-radius .table th:last-child {
    border-radius: 0 var(--portfolios-border-radius-l, 12px) var(--portfolios-border-radius-l, 12px) 0;
}

/* First/last row cells radius */
.border-radius tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--portfolios-border-radius-l, 12px);
}
.border-radius tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--portfolios-border-radius-l, 12px) 0;
}

/* Links in Tables */
table a {
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    color: var(--arktefakt-text-main);
    font-weight: bold;
    transition: border-color 0.18s ease, color 0.18s ease;
}

table a::after {
    content: "⤴";
    margin-left: 4px;
    font-size: 0.85em;
    opacity: 0.6;
}

table .arkt-btn::after,
table .btn::after {
    display: none;
}


#table-show,
#table-show_wrapper,
#table-agenda,
#table-agenda_wrapper,
#table-invitations,
#table-invitations_wrapper,
.dataTables_wrapper {
  width: 100% !important;
}

#table-show_filter input,
#table-agenda_filter input,
.table input {
  border: var(--arktefakt-glass-border-luminous);
}

.table .arkt-btn svg {
  fill: var(--arktefakt-text-inverse);
}

.table .arkt-btn:hover svg {
  fill: var(--arktefakt-text-inverse-hover);
}

.pagination .page-link, div.dataTables_wrapper div.dataTables_length select {
  background: var(--arktefakt-bg-element);
  border: 0px;
  transition: 0.2s linear;
}

div.dataTables_wrapper div.dataTables_length select {
  border: var(--arktefakt-glass-border-luminous);
}

.pagination .page-item.active .page-link, .pagination .page-link:hover {
  background: var(--arktefakt-bg-element-hover);
}

/* Form Elements in Tables */
form table .input-selection label {
    padding: 20px;
}

form table .input-selection svg {
    margin-top: 0;
}

form table .input-selection li {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
}

/* ===================== DATATABLES — wrapper, gouttières, filtres ===================== */

/* Toutes les .row directes sous DataTables : marges négatives Bootstrap = bande blanche en scroll horizontal */
.dataTables_wrapper > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
}

.dataTables_wrapper > .row > .col-12 {
    overflow-x: visible;
}

/* IDs listés : gouttières colonnes à plat (comportement historique) */
#table-show_wrapper .row,
#table-agenda_wrapper .row,
#table-invitations_wrapper .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex;
    flex-wrap: wrap;
}

#table-show_wrapper [class*="col-"],
#table-agenda_wrapper [class*="col-"],
#table-invitations_wrapper [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    min-width: 0;
}

.border-radius #table-show_wrapper > :first-child,
.border-radius #table-agenda_wrapper > :first-child,
.border-radius #table-invitations_wrapper > :first-child {
    border-radius: var(--portfolios-border-radius-l, 14px) var(--portfolios-border-radius-l, 14px) 0 0;
}

.border-radius #table-show_wrapper > :last-child,
.border-radius #table-agenda_wrapper > :last-child,
.border-radius #table-invitations_wrapper > :last-child {
    border-radius: 0 0 var(--portfolios-border-radius-l, 14px) var(--portfolios-border-radius-l, 14px);
}

#table-show th:last-child,
#table-show td:last-child,
#table-agenda th:last-child,
#table-agenda td:last-child,
#table-invitations th:last-child,
#table-invitations td:last-child {
    white-space: nowrap;
    vertical-align: middle;
}

/* Dernière colonne (actions) : pas de plafond + largeur mini pour boutons / libellés */
.table-design #table-show th:last-child,
.table-design #table-agenda th:last-child,
.table-design #table-invitations th:last-child,
.table-list #table-show th:last-child,
.table-list #table-agenda th:last-child,
.table-list #table-invitations th:last-child,
.table-design #table-show td:last-child,
.table-design #table-agenda td:last-child,
.table-design #table-invitations td:last-child,
.table-list #table-show td:last-child,
.table-list #table-agenda td:last-child,
.table-list #table-invitations td:last-child {
    width: auto;
    max-width: none;
    white-space: normal;
    min-width: var(--arkt-table-actions-min, 13.5rem);
}

/* grid.css met overflow:hidden sur .arkt-btn / a : rogne les icônes dans cellules étroites */
.table td .arkt-btn,
table td .arkt-btn {
    overflow: visible;
    flex-shrink: 0;
}

/*
 * Grilles d’actions dans les cellules : colonnes au contenu (max-content), pas de 1fr / minmax(0,…)
 * qui écrasent les boutons quand la cellule est étroite.
 */
table td ul.grid-two {
    grid-template-columns: repeat(2, max-content);
    width: max-content;
    max-width: none;
    box-sizing: border-box;
}

table td ul.grid-three {
    grid-template-columns: repeat(3, max-content);
    width: max-content;
    max-width: none;
    box-sizing: border-box;
}

table td ul.grid-four {
    grid-template-columns: repeat(4, max-content);
    width: max-content;
    max-width: none;
    box-sizing: border-box;
}

table td ul.grid-five {
    grid-template-columns: repeat(5, max-content);
    width: max-content;
    max-width: none;
    box-sizing: border-box;
}

/*
 * Filet de sécurité : tout DataTable dans le hub (classe .dataTable ajoutée par DataTables).
 * Couvre les pages listées en #table-show / #table-agenda / #table-invitations et tout nouvel id.
 */
#main-arktefakt-hub .dataTables_wrapper table.dataTable th:last-child,
#main-arktefakt-hub .dataTables_wrapper table.dataTable td:last-child {
    width: auto;
    vertical-align: middle;
    max-width: none;
    white-space: normal;
    min-width: var(--arkt-table-actions-min, 13.5rem);
}

/* Search/Filter */
#table-show_filter,
#table-agenda_filter {
    margin-bottom: 20px;
}

#table-show_filter label,
#table-agenda_filter label {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Écrase les classes Bootstrap .form-control .form-control-sm injectées par DataTables */
#table-show_filter input.form-control,
#table-show_filter input,
#table-agenda_filter input.form-control,
#table-agenda_filter input,
.search-input,
.search input {
    flex: 1;
    padding: 2px 5px!important;
    background: transparent !important;
    border: none;
    outline: none;
    color: var(--arktefakt-text-main) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    box-shadow: none !important;
    box-sizing: border-box;
    margin: 0 !important;
    min-width: 0;
}

#table-show_filter input.form-control::placeholder,
#table-show_filter input::placeholder,
#table-agenda_filter input.form-control::placeholder,
#table-agenda_filter input::placeholder,
.search-input::placeholder,
.search input::placeholder {
    color: var(--arktefakt-text-main);
    opacity: 0.38;
}

#table-show_filter label,
#table-agenda_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--arktefakt-bg-element, transparent);
    border: 2px solid var(--arktefakt-border-main);
    border-radius: var(--portfolios-border-radius-xl, 50px);
    backdrop-filter: var(--arktefakt-glass-blur-sm);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur-sm);
    transition: 0.2s linear;
    width: 100%;
    box-sizing: border-box;
}

/* Icons (SVG) styling */
#table-show_filter label svg,
#table-agenda_filter label svg,
.search svg {
    margin-right: 5px;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: var(--arktefakt-text-main);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.4;
    transition: opacity 0.2s linear;
}

#table-show_filter label:focus-within svg,
#table-agenda_filter label:focus-within svg,
.search:focus-within svg {
    opacity: 0.7;
}

/* Length Select */
#table-show_length,
#table-agenda_length {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.dataTables_length {
    margin-bottom: 1rem;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    font-family: inherit;
    font-size: 14px;
    color: var(--arktefakt-text-secondary, #666);
    gap: 6px;
}

.dataTables_length select {
    margin: 0 6px;
    padding: 7px 12px;
    border-radius: var(--portfolios-border-radius-m, 8px);
    border: var(--arktefakt-glass-border);
    background: var(--arktefakt-bg-element);
    backdrop-filter: var(--arktefakt-glass-blur-sm);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur-sm);
    color: var(--arktefakt-text-main, #222);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border 0.18s ease;
}

.dataTables_length select:focus {
    border: var(--arktefakt-glass-border-luminous);
}

/* ===================== DATATABLES LAYOUT ===================== */

.dt-top-bar.limited-with.padding-left.padding-right {
    padding: 10px 0 8px;
}

.dt-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0 6px;
}

.dt-bottom-bar > div {
    display: flex;
    justify-content: center;
}

.dt-bottom-bar .dataTables_length {
    order: 1;
    margin-bottom: 0;
}

.dt-bottom-bar .dataTables_info {
    order: 2;
    flex: initial;
    text-align: center;
    padding: 0 15px !important;
    margin: 0 !important;
}

.dt-bottom-bar .dataTables_length,
.dt-bottom-bar .dataTables_paginate {
    padding: 0 !important;
    margin: 0 !important;
}

.dt-bottom-bar .dataTables_paginate {
    order: 3;
}

/* Comportement quand l'espace manque (mobile ou fenetre réduite) */
@media screen and (max-width: 900px) {
    .dt-bottom-bar {
        flex-direction: column;
        gap: 15px;
    }
}

/* ===================== BOOTSTRAP TABLE ===================== */

.fixed-table-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}

.bootstrap-table .fixed-table-toolbar .columns-right {
    display: none;
}

.bootstrap-table .fixed-table-toolbar .columns label {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    gap: 8px;
    cursor: pointer;
}

.bootstrap-table .fixed-table-pagination::after {
    margin-bottom: 5vh;
}

/* Dropdown */
.dropdown-item {
    cursor: pointer;
    padding: 10px 18px;
    border-radius: var(--portfolios-border-radius-m, 8px);
    transition: background 0.15s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--arktefakt-bg-cta-hover);
    color: var(--arktefakt-text-inverse);
}

.dropdown-toggle {
    padding: 10px 18px;
    border: var(--arktefakt-glass-border);
    border-radius: var(--portfolios-border-radius-m, 10px);
    background: var(--arktefakt-bg-element);
    backdrop-filter: var(--arktefakt-glass-blur-sm);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur-sm);
    color: var(--arktefakt-text-main, #222);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border 0.18s ease, box-shadow 0.18s ease;
}

.dropdown-toggle:hover {
    border: var(--arktefakt-glass-border-luminous);
    background: var(--arktefakt-bg-cta-hover);
    color: var(--arktefakt-text-inverse);
}

.btn-group .dropdown-menu {
    display: none;
    transform: translate3d(0px, 51px, 0px)!important;
    margin-top: 8px;
    border-radius: var(--portfolios-border-radius-l, 14px);
    border: var(--arktefakt-glass-border);
    padding: 6px;
    background: var(--arktefakt-bg-surface);
    backdrop-filter: var(--arktefakt-glass-blur);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur);
}

.btn-group .show {
    display: block;
}

.page-list .dropdown-item {
    margin: 2px 0;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 400;
    border-radius: var(--portfolios-border-radius-m, 8px);
}

/* ===================== PAGINATION ===================== */

.pagination, .pagination-detail {
    display: flex;
    flex: 1;
    padding: 14px 18px;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--arktefakt-text-secondary, #888);
}

.pagination a {
    text-decoration: none;
}

.dataTables_paginate {
    display: flex;
    justify-content: center;
    font-family: inherit;
    padding: 10px 0 4px;
}

.dataTables_paginate .pagination {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    align-items: center;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    text-decoration: none;
    border-radius: var(--portfolios-border-radius-xl, 50px);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

/* ===================== THEME COLORS ===================== */

#table-show_wrapper,
#table-agenda_wrapper,
#table-invitations_wrapper {
    padding-top: 15px;
    padding-bottom: 15px;
}

#table-show_wrapper .row,
#table-agenda_wrapper .row,
#table-invitations_wrapper .row {
    background-color: var(--tab-bg-row);
}

table tr th {
    background-color: var(--tab-bg-th);
}

.table td {
    border-bottom: var(--arktefakt-glass-border-luminous)!important;
}

.pagination .page-link {
    background: var(--arktefakt-bg-element);
    border: var(--arktefakt-glass-border);
    backdrop-filter: var(--arktefakt-glass-blur-sm);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur-sm);
    color: var(--arktefakt-text-main, #333);
    transition: background 0.18s ease, color 0.18s ease, border 0.18s ease;
}

.pagination .page-item.active .page-link {
    background: var(--arktefakt-color-primary, #c4adf5);
    border-color: var(--arktefakt-color-primary, #c4adf5);
    color: #fff;
    backdrop-filter: none;
}

.pagination .page-link:hover:not(.active) {
    background: var(--arktefakt-bg-cta-hover);
    border: var(--arktefakt-glass-border-luminous);
    color: var(--arktefakt-text-inverse);
}
/* ===================== TABLE ROWS ===================== */

/* Alternance des lignes — glassmorphisme */
tbody tr:nth-child(even) > td {
    background: var(--arktefakt-bg-surface);
    border-bottom: var(--arktefakt-glass-border-luminous);
}
tbody tr:nth-child(odd) > td {
    background: var(--arktefakt-bg-surface-secondary);
    border-bottom: var(--arktefakt-glass-border-luminous);
}

/* Hover sur les lignes */
tbody tr:hover > td {
    transition: background 0.18s ease;
}

/* ===================== TABLE HEADERS ===================== */

.table th, table tr th {
    color: var(--arktefakt-text-main);
    text-transform: uppercase;
    white-space: nowrap;
}

/*
 * En-têtes sticky : uniquement la 1re ligne (titres).
 * Si toute la ligne 2 (filtres par colonne) est aussi sticky avec top:0, elle se retrouve
 * sous la ligne 1 et la ligne de recherche « disparaît » visuellement.
 */
thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 3;
    backdrop-filter: var(--arktefakt-glass-blur);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur);
}

thead tr:not(:first-child) th {
    position: relative;
    z-index: 2;
    backdrop-filter: var(--arktefakt-glass-blur);
    -webkit-backdrop-filter: var(--arktefakt-glass-blur);
}