/* Clients Page - Style harmonisé avec les réservations */

/* Pagination Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 0.5rem;
    color: var(--text-secondary);
    font-weight: bold;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Preview table styles for import modal */
.preview-table {
    max-height: 200px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 1rem;
}

.preview-table table {
    width: 100%;
    border-collapse: collapse;
}

.preview-table th,
.preview-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-align: left;
}

.preview-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
}

.preview-table td {
    color: var(--text-secondary);
}

.preview-info {
    padding: 0.5rem;
    background: var(--bg-card);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    border-top: 1px solid var(--border-color);
}

.clients-page {
    padding: 2rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100%;
    overflow: auto;
}

/* Header comme réservations */
.clients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.clients-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.clients-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.clients-count {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.clients-filter {
    display: flex;
    gap: 0.5rem;
}

.filter-chip {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.filter-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Bouton principal */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

/* Recherche comme réservations */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(103, 80, 164, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Table comme réservations */
.clients-table-container {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.clients-table th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.clients-table th:hover {
    background: var(--bg-hover);
}

.clients-table th.sortable {
    position: relative;
}

.sort-indicator {
    margin-left: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.clients-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.clients-table tr:hover {
    background: var(--bg-hover);
}

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

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.actif {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-badge.vip {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.nouveau {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.inactif {
    background: #fafafa;
    color: #757575;
}

/* Actions */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.action-btn.edit:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-btn.delete:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

/* Pagination comme réservations */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Labels */
.client-labels {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.label-chip {
    padding: 0.2rem 0.5rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .clients-page {
        padding: 1rem;
    }
    
    .clients-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .clients-filter {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .clients-table {
        font-size: 0.9rem;
    }
    
    .clients-table th,
    .clients-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Loading state */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    margin: 1rem 0;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}