/* ========================================
   LISTE CLIENTS - STYLE HOMOGÈNE
======================================== */

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   EN-TÊTE BLEU (COMME CREER_CLIENT)
======================================== */

.page-header-blue {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    font-size: 3rem;
    background: rgba(255, 255, 255, 0.2);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.header-text h1 {
    margin: 0;
    font-size: 2rem;
    color: white;
    font-weight: 600;
}

.header-text p {
    margin: 5px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.btn-white {
    background: white;
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ========================================
   INFO BOX
======================================== */

.info-box {
    background: #e3f2fd;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.info-box p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
}

.info-box strong {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ========================================
   BARRE DE RECHERCHE
======================================== */

.search-container {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* ========================================
   ACTIONS
======================================== */

.actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-action {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.2rem;
    text-decoration: none;
}

.btn-primary {
    background: #4A90E2;
}

.btn-primary:hover {
    background: #4A90E2;
    transform: scale(1.1);
}

.btn-edit {
    background: #ffc107;
}

.btn-edit:hover {
    background: #e0a800;
    transform: scale(1.1);
}

.btn-vcard {
    background: #17a2b8;
}

.btn-vcard:hover {
    background: #138496;
    transform: scale(1.1);
}

.btn-export {
    background: #28a745;
}

.btn-export:hover {
    background: #218838;
    transform: scale(1.1);
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* ========================================
   TRI PAR COLONNE
======================================== */

.sort-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.sort-link:hover {
    opacity: 0.8;
}

/* ========================================
   MODAL
======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: #dc3545;
    font-size: 1.5rem;
}

.client-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.warning-text {
    color: #dc3545;
    font-weight: bold;
    margin: 15px 0;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-buttons .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
}

/* ========================================
   ÉTAT VIDE
======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ========================================
   FILTRE PAR ÉTAT - MODERNE ET COLORÉ
======================================== */
.filter-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.4s ease-in-out;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.filter-icon {
    font-size: 1.3rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    text-decoration: none;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.2s ease-in-out;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ✅ État actif */
.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .filter-buttons {
        flex-direction: column;
    }
    .filter-btn {
        width: 100%;
        text-align: center;
    }
}

/* Animation douce */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


.table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    overflow-x: hidden; /* Empêche le scroll horizontal */
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.clients-table thead {
    background: var(--primary-color);
    color: white;
}

.clients-table thead th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clients-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.clients-table tbody tr:hover {
    background: #f8f9fa;
}

.clients-table tbody td {
    padding: 12px 10px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* autorise le retour à la ligne */
    word-break: break-word; /* coupe les mots trop longs */
}

.clients-table tbody td:first-child {
    font-weight: bold;
    color: var(--primary-color);
}