/* Tableaux admin : conteneur, cellules, badges, boutons d'action, pagination, tri, menu de conversion. */

    .table-container {
        background: var(--card-bg);
        border-radius: calc(16px * var(--radius-scale));
        border: 1px solid var(--border);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        position: relative;
        overflow: visible;
    }

    table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        text-align: left;
    }

    th {
        background: var(--bg-main);
        padding: 1rem 1.5rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-bottom: 1px solid var(--border);
    }

    tr:first-child th:first-child {
        border-top-left-radius: calc(15px * var(--radius-scale));
    }

    tr:first-child th:last-child {
        border-top-right-radius: calc(15px * var(--radius-scale));
    }

    tr:last-child td:first-child {
        border-bottom-left-radius: calc(15px * var(--radius-scale));
    }

    tr:last-child td:last-child {
        border-bottom-right-radius: calc(15px * var(--radius-scale));
    }

    td {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        color: var(--text-main);
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

    tr:last-child td {
        border-bottom: none;
    }

    tr:hover {
        background: rgba(var(--primary-rgb), 0.02);
        position: relative;
        z-index: 5;
    }

    .badge {
        padding: 0.25rem 0.75rem;
        border-radius: calc(12px * var(--radius-scale));
        font-size: 0.75rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .badge-admin { background: rgba(var(--primary-rgb), 0.15); color: var(--primary); border: 1px solid rgba(var(--primary-rgb), 0.2); }
    .badge-user { background: var(--bg-main); color: var(--text-muted); }
    .badge-purple { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); }
    .badge-gold { background: rgba(var(--warning-rgb), 0.1); color: var(--warning); }
    .badge-danger { background: rgba(var(--danger-rgb), 0.1); color: var(--danger); }
    .badge-warning { background: rgba(var(--warning-rgb), 0.1); color: var(--warning); }

    .btn-add-new {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0.6rem 1.2rem;
        height: 42px;
        border-radius: calc(10px * var(--radius-scale));
        background: var(--primary);
        color: #ffffff !important;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none !important;
        border: none;
        box-shadow: none !important;
        transition: background 0.2s ease;
        cursor: pointer;
        white-space: nowrap;
    }
    .btn-add-new:hover {
        background: var(--primary-dark);
        box-shadow: none !important;
        color: #ffffff !important;
    }

    .btn-primary {
        background: var(--primary) !important;
        color: white !important;
        border: 1px solid var(--primary) !important;
        box-shadow: none !important;
    }
    .btn-primary:hover {
        background: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        box-shadow: none !important;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        border-radius: calc(8px * var(--radius-scale));
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        border: 1px solid var(--border);
        transition: all 0.2s;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: var(--bg-main);
        color: var(--text-main);
    }

    /* Table Thumbnail & Image Styling */
    .comic-thumb,
    .series-thumb,
    .game-thumb,
    .pack-thumb,
    .sequence-thumb,
    .tcg-thumb,
    .character-thumb,
    .poll-thumb,
    td img {
        width: 50px;
        height: 50px;
        max-width: 50px;
        max-height: 50px;
        object-fit: cover;
        border-radius: calc(8px * var(--radius-scale));
        border: 1px solid var(--border);
        display: inline-block;
        vertical-align: middle;
    }
    
    .banner-preview {
        width: 120px;
        height: 40px;
        object-fit: cover;
        border-radius: calc(8px * var(--radius-scale));
        border: 1px solid var(--border);
    }

    .thumb-placeholder {
        width: 50px;
        height: 50px;
        background: var(--bg-main);
        border-radius: calc(8px * var(--radius-scale));
        border: 1px solid var(--border);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
    }

    /* User Table Avatar & Name Alignment */
    .user-cell {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        vertical-align: middle;
    }
    .user-avatar {
        width: 36px !important;
        height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
        border-radius: calc(50% * var(--radius-scale)) !important;
        object-fit: cover;
        border: 1px solid var(--border);
        flex-shrink: 0;
    }
    .user-name {
        font-weight: 600;
        color: var(--text-main);
        line-height: 1.2;
    }

    /* Coherent & Sober Action Buttons */
    .btn-action-custom,
    .btn-action-icon,
    .btn-action-pill,
    .btn-action,
    .btn-action-edit,
    .btn-action-view,
    .btn-action-delete,
    .btn-action-convert,
    .btn-action-secondary,
    .btn-action-danger,
    .btn-action-success,
    .btn-delete,
    .btn-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 34px;
        border-radius: calc(10px * var(--radius-scale));
        background: var(--bg-main) !important;
        border: 1px solid var(--border) !important;
        color: var(--text-main) !important;
        text-decoration: none;
        transition: all 0.2s;
        cursor: pointer;
        font-size: 0.85rem;
        box-shadow: none !important;
    }

    .btn-action-icon, .btn-action, .btn-action-edit, .btn-action-view, .btn-action-delete, .btn-action-convert {
        width: 34px;
    }

    .btn-action-pill, .btn-action-custom {
        gap: 6px;
        padding: 0.4rem 0.85rem;
        font-size: 0.82rem;
        font-weight: 600;
    }

    /* Hover States - Clean & Subtle */
    .btn-action-custom:hover,
    .btn-action-icon:hover,
    .btn-action-pill:hover,
    .btn-action:hover,
    .btn-action-edit:hover,
    .btn-action-view:hover,
    .btn-action-convert:hover,
    .btn-action-secondary:hover,
    .btn-action-success:hover,
    .btn-toggle:hover {
        border-color: var(--primary) !important;
        color: var(--primary) !important;
        background: rgba(var(--primary-rgb), 0.08) !important;
        transform: translateY(-1px);
    }

    .btn-action-delete:hover,
    .btn-action-danger:hover,
    .btn-delete:hover {
        border-color: var(--danger) !important;
        color: var(--danger) !important;
        background: rgba(var(--danger-rgb), 0.08) !important;
        transform: translateY(-1px);
    }

    /* Stat Badge Links in Tables */
    .stat-badge,
    a.stat-badge,
    a.stat-badge:visited,
    td a.stat-badge,
    td a.stat-badge:visited {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--text-main) !important;
        text-decoration: none !important;
        margin-right: 8px;
        transition: opacity 0.2s;
    }
    .stat-badge:hover,
    a.stat-badge:hover,
    td a.stat-badge:hover {
        opacity: 0.8;
        color: var(--text-main) !important;
        text-decoration: none !important;
    }
    .stat-badge i { color: var(--text-muted) !important; }

    /* Pagination Styling */
    .pagination {
        display: flex;
        gap: 8px;
        list-style: none;
        padding: 0;
        margin: 0;
        justify-content: center;
        align-items: center;
    }

    /* Largeurs de colonnes standard - modifie ici pour tout impacter d'un coup */
    .col-check { width: 40px; text-align: center; }
    .col-thumb { width: 80px; }
    .col-actions { width: 120px; }
    .col-actions-right { width: 120px; text-align: right; }

    .table-header-actions, .actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
        width: 100%;
    }

    .pagination li span, .pagination li a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        border-radius: calc(10px * var(--radius-scale));
        background: var(--bg-main);
        border: 1px solid var(--border);
        color: var(--text-main);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        transition: all 0.2s;
    }

    .pagination li a:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: rgba(var(--primary-rgb), 0.05);
    }

    .pagination li.active span {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    }

    .pagination li.disabled span {
        opacity: 0.3;
        cursor: not-allowed;
        background: transparent;
    }

    nav[role="navigation"] {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    nav[role="navigation"] p {
        font-size: 0.85rem;
        color: var(--text-muted);
    }

    /* Sorting Arrows */
    .sort-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: inherit;
        text-decoration: none;
        transition: all 0.2s;
        cursor: pointer;
    }
    .sort-link:hover {
        color: var(--primary);
    }
    .sort-icon {
        font-size: 0.7rem;
        opacity: 0.3;
        transition: all 0.2s;
    }
    .sort-icon.active {
        opacity: 1;
        color: var(--primary);
    }

    /* Conversion Menu */
    .conversion-container {
        position: relative;
        display: inline-block;
    }
    .conversion-menu {
        display: none;
        position: absolute;
        right: 0;
        top: 100%;
        background: #18181b;
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: calc(8px * var(--radius-scale));
        padding: 8px;
        z-index: 9999;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
        min-width: 150px;
        margin-top: 8px;
    }
    /* Bridge the gap to prevent hover loss */
    .conversion-menu::before {
        content: '';
        position: absolute;
        top: -10px;
        left: 0;
        right: 0;
        height: 10px;
    }
    .conversion-container:hover .conversion-menu {
        display: block;
    }
    .conversion-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 8px 12px;
        background: none;
        border: none;
        color: #f4f4f5;
        font-size: 0.75rem;
        text-align: left;
        cursor: pointer;
        border-radius: calc(4px * var(--radius-scale));
        transition: background 0.2s;
    }
    .conversion-btn:hover {
        background: rgba(255,255,255,0.05);
        color: var(--primary);
    }
