.ademi-table {
    table-layout: fixed;
}

    .ademi-table th,
    .ademi-table td {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.ademi-table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 1rem;
}

.ademi-table-scroll {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: auto;
}

.ademi-table-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.ademi-table-search-group {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

.ademi-table-search {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
}

.ademi-table-search__btn {
    border: 1px solid #ced4da;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
}

.ademi-table {
    width: 100%;
    border-collapse: collapse;
}

    .ademi-table th {
        text-align: left;
        padding: 0.75rem 1rem;
        background-color: #f8f9fa;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #495057;
        border-bottom: 2px solid #e9ecef;
        position: sticky;
        top: 0;
        z-index: 1;
    }

        .ademi-table th.ademi-table__sortable {
            cursor: pointer;
            user-select: none;
        }

 .ademi-sort-icon {
     display: inline-flex;
     flex-direction: column;
     justify-content: center;
     gap: 2px;
     margin-left: 0.4rem;
     vertical-align: middle;
    
}


 .ademi-sort-icon__up,
 .ademi-sort-icon__down {
     width: 0;
     height: 0;
     border-left: 4px solid transparent;
     border-right: 4px solid transparent;
    
}


 .ademi-sort-icon__up {
     border-bottom: 5px solid #ced4da;
    
}

    
     .ademi-sort-icon__up.active {
         border-bottom-color: var(--ademi-accent);
        
    }


 .ademi-sort-icon__down {
     border-top: 5px solid #ced4da;
    
}

    
     .ademi-sort-icon__down.active {
        border-top-color: var(--ademi-accent);
    }

.ademi-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f5;
}

.ademi-table tbody tr:nth-child(even) {
    background-color: #f8f9fb;
}

.ademi-table tbody tr:hover {
    background-color: #eef4f8;
}

.ademi-table__primary-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--ademi-accent);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s ease;
}

    .ademi-table__primary-link:hover {
        background-color: var(--ademi-accent-soft);
        text-decoration-color: currentColor;
    }

.ademi-table__empty {
    text-align: center;
    padding: 2rem;
    color: #868e96;
}

.ademi-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #495057;
}

    .ademi-table-footer__btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

.ademi-page-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ademi-pagination {
    display: flex;
    align-items: center;
    gap: 3px;
}

.ademi-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: var(--ademi-card-bg);
    color: #3B3F48;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

    .ademi-pagination__btn:hover:not(:disabled) {
        background-color: var(--ademi-accent-soft);
        border-color: var(--ademi-accent);
        color: var(--ademi-accent);
    }

    .ademi-pagination__btn.current {
        background-color: var(--ademi-accent);
        border-color: var(--ademi-accent);
        color: #fff;
        font-weight: 600;
    }

.ademi-pagination__btn--nav {
    color: var(--ademi-accent);
    font-weight: 500;
    padding: 0 10px;
}

    .ademi-pagination__btn--nav:hover:not(:disabled) {
        background-color: var(--ademi-accent);
        color: #fff;
    }

.ademi-pagination__btn:disabled {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: default;
}

.ademi-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    color: #6c757d;
    font-size: 0.8rem;
}

.ademi-table-footer__page-size {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--ademi-text-muted);
}

.ademi-table-footer__page-size-select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.ademi-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ademi-pagination__btn {
    white-space: nowrap;
}

/* Responsive tablettes sous 1024px */
@media (max-width: 1024px) {
    .ademi-table-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .ademi-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ademi-table {
        table-layout: auto;
        width: max-content;
        min-width: 100%;
    }

        .ademi-table th,
        .ademi-table td {
            min-width: 120px;
        }

            .ademi-table th:first-child,
            .ademi-table td:first-child {
                min-width: 70px;
                position: sticky;
                left: 0;
                z-index: 2;
            }

            .ademi-table th:first-child {
                z-index: 3;
                background-color: #f8f9fa;
            }

            .ademi-table td:first-child {
                background-color: #fff;
            }

        .ademi-table tbody tr:nth-child(even) td:first-child {
            background-color: #f8f9fb;
        }

        .ademi-table tbody tr:hover td:first-child {
            background-color: #eef4f8;
        }
}
