/**
 * Styles pour la gestion des utilisateurs (contrôles, tableau, filtres)
 */

/* Contrôles utilisateurs - prennent toute la largeur du panneau */
.users-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.filter-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 400;
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.filter-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.users-stats {
    background: rgba(34, 197, 94, 0.15);
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
    width: 150px;
    text-align: center;
    flex-shrink: 0;
}

/* Layout de gestion des utilisateurs - simplifié */
.users-table-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    width: 100%;
    max-width: 100%;
}

/* Tableau des utilisateurs */
.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
    max-width: 100%;
}

.users-table th {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.users-table th:first-child {
    width: 15%;
    text-align: center;
}

.users-table th:nth-child(2) { /* Nom */
    width: 35%;
}

.users-table th:nth-child(3) { /* Prénom */
    width: 30%;
}

.users-table th:nth-child(4) { /* Type */
    width: 20%;
}

.users-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-table td:first-child {
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    background: rgba(139, 92, 246, 0.3);
    font-size: 1rem;
    border-radius: 6px;
}

.users-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.users-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.users-table tbody tr.selected {
    background: rgba(255, 140, 0, 0.35);
    border-left: 5px solid rgba(255, 140, 0, 1);
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.6), 0 2px 8px rgba(255, 140, 0, 0.3);
}

.users-table tbody tr.selected:hover {
    background: rgba(255, 140, 0, 0.45);
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.8), 0 2px 12px rgba(255, 140, 0, 0.4);
}

/* Ligne "aucun résultat" - non interactive */
.users-table tbody tr.no-results-row {
    cursor: default;
    background: rgba(255, 255, 255, 0.02);
}

.users-table tbody tr.no-results-row:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: none;
    box-shadow: none;
}

.users-table tbody tr.no-results-row td {
    color: var(--text-secondary);
    font-style: italic;
    border-bottom: none;
}

/* Responsive pour les utilisateurs */
@media (max-width: 1024px) {
    .users-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .users-table {
        font-size: 0.8rem;
    }

    .users-table th,
    .users-table td {
        padding: 12px 8px;
    }

    .action-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}
