/* =============================================================================
   clients.css — CSS consolidé pour le module clients
   Lié dans base_admin.html
   Chaque section est scopée sous sa classe wrapper (.clients-XXX-page)
   afin d'éviter tout conflit avec les autres modules.
============================================================================= */


/* =============================================================================
   blacklist.html
============================================================================= */

.clients-blacklist-page .blacklist-header {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

.clients-blacklist-page .blacklist-card {
    border: 2px solid #dc3545;
    border-radius: 10px;
    background: white;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.clients-blacklist-page .blacklist-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.15);
}

.clients-blacklist-page .blacklist-card-header {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clients-blacklist-page .blacklist-card-body {
    padding: 20px;
}

.clients-blacklist-page .blacklist-card-footer {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clients-blacklist-page .blacklist-stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-top: 4px solid #dc3545;
    transition: all 0.3s ease;
}

.clients-blacklist-page .blacklist-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.clients-blacklist-page .blacklist-stat-icon {
    font-size: 2.5rem;
    color: #dc3545;
    margin-bottom: 15px;
}

.clients-blacklist-page .blacklist-stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #212529;
    line-height: 1;
    margin-bottom: 5px;
}

.clients-blacklist-page .blacklist-stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.clients-blacklist-page .blacklist-reason-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: 5px;
}

.clients-blacklist-page .reason-non_paiement   { background-color: #dc3545; color: white; }
.clients-blacklist-page .reason-incident_grave  { background-color: #fd7e14; color: white; }
.clients-blacklist-page .reason-document_faux   { background-color: #6f42c1; color: white; }
.clients-blacklist-page .reason-comportement    { background-color: #d63384; color: white; }
.clients-blacklist-page .reason-autre           { background-color: #6c757d; color: white; }

.clients-blacklist-page .blacklist-timeline {
    position: relative;
    padding-left: 30px;
}

.clients-blacklist-page .blacklist-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dc3545;
}

.clients-blacklist-page .blacklist-timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.clients-blacklist-page .blacklist-timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #dc3545;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #dc3545;
}

.clients-blacklist-page .blacklist-search-bar {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.clients-blacklist-page .suspension-type-badge {
    font-size: 0.8rem;
    padding: 4px 8px;
}

.clients-blacklist-page .suspension-permanent  { background-color: #212529; color: white; }
.clients-blacklist-page .suspension-temporary  { background-color: #fd7e14; color: white; }

.clients-blacklist-page .blacklist-action-btn {
    min-width: 120px;
    margin: 2px;
}

.clients-blacklist-page .empty-blacklist {
    border: 3px dashed #dee2e6;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    background-color: #f8f9fa;
}

.clients-blacklist-page .blacklist-filter-badge {
    cursor: pointer;
    transition: all 0.2s;
}

.clients-blacklist-page .blacklist-filter-badge:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.clients-blacklist-page .blacklist-details {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #dc3545;
}

.clients-blacklist-page .blacklist-history-card {
    border-left: 4px solid #6c757d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
}

.clients-blacklist-page .blacklist-history-card.restored { border-left-color: #198754; }
.clients-blacklist-page .blacklist-history-card.added    { border-left-color: #dc3545; }

.clients-blacklist-page .blacklist-modal .modal-header {
    background-color: #dc3545;
    color: white;
}

.clients-blacklist-page .export-btn-group .btn {
    border-radius: 5px;
}

@media (max-width: 768px) {
    .clients-blacklist-page .blacklist-stat-card {
        margin-bottom: 20px;
    }

    .clients-blacklist-page .blacklist-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .clients-blacklist-page .blacklist-action-btn {
        width: 100%;
        margin: 5px 0;
    }
}


/* =============================================================================
   detail.html
============================================================================= */

.clients-detail-page .client-header {
    background: linear-gradient(135deg, #6f42c1 0%, #0d6efd 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clients-detail-page .client-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.clients-detail-page .info-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #0d6efd;
    transition: all 0.3s ease;
}

.clients-detail-page .info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.clients-detail-page .info-card.danger  { border-left-color: #dc3545; }
.clients-detail-page .info-card.warning { border-left-color: #ffc107; }
.clients-detail-page .info-card.success { border-left-color: #198754; }
.clients-detail-page .info-card.info    { border-left-color: #0dcaf0; }

.clients-detail-page .info-card-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.clients-detail-page .info-card-title i {
    margin-right: 10px;
}

.clients-detail-page .info-item {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
}

.clients-detail-page .info-label {
    font-weight: 500;
    color: #6c757d;
    min-width: 150px;
}

.clients-detail-page .info-value {
    color: #212529;
    flex: 1;
}

.clients-detail-page .document-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.clients-detail-page .document-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.clients-detail-page .document-icon {
    font-size: 2rem;
    color: #6c757d;
}

.clients-detail-page .document-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.clients-detail-page .timeline {
    position: relative;
    padding-left: 30px;
}

.clients-detail-page .timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.clients-detail-page .timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.clients-detail-page .timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #0d6efd;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #0d6efd;
}

.clients-detail-page .timeline-item.warning::before {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px #ffc107;
}

.clients-detail-page .timeline-item.danger::before {
    background-color: #dc3545;
    box-shadow: 0 0 0 2px #dc3545;
}

.clients-detail-page .timeline-item.success::before {
    background-color: #198754;
    box-shadow: 0 0 0 2px #198754;
}

.clients-detail-page .stats-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.clients-detail-page .stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.clients-detail-page .stats-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.clients-detail-page .stats-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.clients-detail-page .stats-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.clients-detail-page .contact-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.clients-detail-page .contact-badge i {
    margin-right: 8px;
}

.clients-detail-page .nav-tabs-custom .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.clients-detail-page .nav-tabs-custom .nav-link:hover {
    color: #0d6efd;
    border-bottom-color: #dee2e6;
}

.clients-detail-page .nav-tabs-custom .nav-link.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
    background-color: transparent;
}

.clients-detail-page .note-card {
    border-left: 4px solid #0d6efd;
    margin-bottom: 15px;
}

.clients-detail-page .note-card.priority-high   { border-left-color: #dc3545; }
.clients-detail-page .note-card.priority-normal { border-left-color: #0d6efd; }
.clients-detail-page .note-card.priority-low    { border-left-color: #6c757d; }

.clients-detail-page .badge-client-type {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.clients-detail-page .action-button {
    min-width: 120px;
    margin: 2px;
}

.clients-detail-page .tab-content {
    padding-top: 20px;
}

.clients-detail-page .expired-document {
    opacity: 0.8;
    border-color: #dc3545 !important;
}

.clients-detail-page .expiring-soon {
    border-color: #ffc107 !important;
}

@media (max-width: 768px) {
    .clients-detail-page .client-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .clients-detail-page .info-item {
        flex-direction: column;
    }

    .clients-detail-page .info-label {
        min-width: auto;
        margin-bottom: 5px;
    }

    .clients-detail-page .nav-tabs-custom .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}


/* =============================================================================
   documents.html
============================================================================= */

.clients-documents-page .upload-area {
    border: 3px dashed #0d6efd;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.clients-documents-page .upload-area:hover,
.clients-documents-page .upload-area.dragover {
    background-color: #e7f1ff;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.clients-documents-page .upload-area.dragover {
    border-style: solid;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.2);
}

.clients-documents-page .upload-area i {
    font-size: 4rem;
    color: #0d6efd;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.clients-documents-page .upload-area:hover i {
    transform: scale(1.1);
}

.clients-documents-page .document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.clients-documents-page .document-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.clients-documents-page .document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.clients-documents-page .document-card.expired  { border-color: #dc3545; opacity: 0.8; }
.clients-documents-page .document-card.expiring { border-color: #ffc107; }
.clients-documents-page .document-card.verified { border-color: #198754; }

.clients-documents-page .document-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clients-documents-page .document-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
}

.clients-documents-page .icon-cni        { background-color: #0d6efd; }
.clients-documents-page .icon-passeport  { background-color: #6f42c1; }
.clients-documents-page .icon-permis     { background-color: #198754; }
.clients-documents-page .icon-domicile   { background-color: #fd7e14; }
.clients-documents-page .icon-contrat    { background-color: #6c757d; }
.clients-documents-page .icon-other      { background-color: #0dcaf0; }

.clients-documents-page .document-body {
    padding: 15px;
}

.clients-documents-page .document-preview {
    height: 200px;
    background-color: #f8f9fa;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.clients-documents-page .document-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.clients-documents-page .document-preview .file-placeholder {
    text-align: center;
    color: #6c757d;
}

.clients-documents-page .document-info {
    margin-bottom: 10px;
}

.clients-documents-page .document-info-item {
    display: flex;
    margin-bottom: 5px;
}

.clients-documents-page .document-info-label {
    font-weight: 500;
    color: #6c757d;
    min-width: 100px;
}

.clients-documents-page .document-info-value {
    color: #212529;
    flex: 1;
}

.clients-documents-page .document-actions {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
}

.clients-documents-page .status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.clients-documents-page .document-filters {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.clients-documents-page .progress-container {
    margin-top: 20px;
    display: none;
}

.clients-documents-page .upload-progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.clients-documents-page .upload-progress-bar {
    height: 100%;
    background-color: #0d6efd;
    width: 0%;
    transition: width 0.3s ease;
}

.clients-documents-page .file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
}

.clients-documents-page .file-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #6c757d;
}

.clients-documents-page .file-info {
    flex: 1;
}

.clients-documents-page .file-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.clients-documents-page .file-size {
    font-size: 0.8rem;
    color: #6c757d;
}

.clients-documents-page .document-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.clients-documents-page .document-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clients-documents-page .document-type-btn:hover,
.clients-documents-page .document-type-btn.active {
    border-color: #0d6efd;
    background-color: #e7f1ff;
    transform: translateY(-2px);
}

.clients-documents-page .document-type-btn i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.clients-documents-page .verification-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.clients-documents-page .document-preview-modal .modal-body {
    text-align: center;
    padding: 0;
}

.clients-documents-page .document-preview-modal img,
.clients-documents-page .document-preview-modal iframe {
    max-width: 100%;
    max-height: 70vh;
}

.clients-documents-page .qr-code-container {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.clients-documents-page .document-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.clients-documents-page .history-item {
    padding: 10px;
    border-left: 3px solid #0d6efd;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 0 5px 5px 0;
}

.clients-documents-page .history-item.verified { border-left-color: #198754; }
.clients-documents-page .history-item.rejected { border-left-color: #dc3545; }

@media (max-width: 768px) {
    .clients-documents-page .document-grid {
        grid-template-columns: 1fr;
    }

    .clients-documents-page .document-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clients-documents-page .upload-area {
        padding: 20px 10px;
    }

    .clients-documents-page .upload-area i {
        font-size: 3rem;
    }
}


/* =============================================================================
   historique.html
============================================================================= */

.clients-historique-page .history-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clients-historique-page .history-timeline {
    position: relative;
    padding: 20px 0;
}

.clients-historique-page .history-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #0d6efd, #6f42c1);
    transform: translateX(-50%);
    z-index: 1;
}

.clients-historique-page .timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
    padding-right: 30px;
    box-sizing: border-box;
}

.clients-historique-page .timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 30px;
    padding-left: 0;
}

.clients-historique-page .timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 30px;
    padding-right: 0;
}

.clients-historique-page .timeline-item:nth-child(odd)::before {
    content: '';
    position: absolute;
    right: -12px;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #0d6efd;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #0d6efd;
    z-index: 2;
}

.clients-historique-page .timeline-item:nth-child(even)::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #6f42c1;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #6f42c1;
    z-index: 2;
}

.clients-historique-page .timeline-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #0d6efd;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.clients-historique-page .timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clients-historique-page .timeline-item:nth-child(even) .timeline-card {
    border-left-color: #6f42c1;
}

.clients-historique-page .timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #0d6efd, #6f42c1);
}

.clients-historique-page .timeline-date {
    position: absolute;
    top: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    z-index: 3;
}

.clients-historique-page .timeline-item:nth-child(odd) .timeline-date {
    right: -100px;
    text-align: right;
}

.clients-historique-page .timeline-item:nth-child(even) .timeline-date {
    left: -100px;
    text-align: left;
}

.clients-historique-page .history-filter-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.clients-historique-page .stats-card-history {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-top: 4px solid #0d6efd;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.clients-historique-page .stats-card-history:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.clients-historique-page .stats-icon-history {
    font-size: 2.5rem;
    color: #0d6efd;
    margin-bottom: 15px;
}

.clients-historique-page .stats-number-history {
    font-size: 2.5rem;
    font-weight: bold;
    color: #212529;
    line-height: 1;
    margin-bottom: 5px;
}

.clients-historique-page .stats-label-history {
    color: #6c757d;
    font-size: 0.9rem;
}

.clients-historique-page .transaction-table {
    font-size: 0.9rem;
}

.clients-historique-page .transaction-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.clients-historique-page .amount-positive { color: #198754; font-weight: 600; }
.clients-historique-page .amount-negative { color: #dc3545; font-weight: 600; }

.clients-historique-page .timeline-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.clients-historique-page .activity-type-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.clients-historique-page .type-location  { background-color: #0d6efd; color: white; }
.clients-historique-page .type-paiement  { background-color: #198754; color: white; }
.clients-historique-page .type-facture   { background-color: #6f42c1; color: white; }
.clients-historique-page .type-incident  { background-color: #fd7e14; color: white; }
.clients-historique-page .type-note      { background-color: #6c757d; color: white; }
.clients-historique-page .type-document  { background-color: #0dcaf0; color: black; }

.clients-historique-page .timeline-vehicle {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border-radius: 20px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.clients-historique-page .timeline-vehicle i {
    margin-right: 8px;
    color: #0d6efd;
}

.clients-historique-page .empty-history {
    border: 3px dashed #dee2e6;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    background-color: #f8f9fa;
}

.clients-historique-page .chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.clients-historique-page .history-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.clients-historique-page .nav-tabs-history .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.clients-historique-page .nav-tabs-history .nav-link:hover {
    color: #0d6efd;
    border-bottom-color: #dee2e6;
}

.clients-historique-page .nav-tabs-history .nav-link.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
    background-color: transparent;
}

.clients-historique-page .export-history-btn {
    min-width: 120px;
    margin: 2px;
}

.clients-historique-page .history-details {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #0d6efd;
}

@media (max-width: 992px) {
    .clients-historique-page .history-timeline::before {
        left: 30px;
    }

    .clients-historique-page .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px !important;
        padding-right: 15px !important;
    }

    .clients-historique-page .timeline-item:nth-child(odd)::before,
    .clients-historique-page .timeline-item:nth-child(even)::before {
        left: 20px !important;
        right: auto !important;
    }

    .clients-historique-page .timeline-item:nth-child(odd) .timeline-date,
    .clients-historique-page .timeline-item:nth-child(even) .timeline-date {
        left: 60px !important;
        right: auto !important;
        text-align: left !important;
        top: -25px;
    }
}

@media (max-width: 768px) {
    .clients-historique-page .stats-card-history {
        margin-bottom: 15px;
    }

    .clients-historique-page .chart-container {
        margin-bottom: 20px;
    }
}


/* =============================================================================
   import.html
============================================================================= */

.clients-import-page .import-wizard {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.clients-import-page .wizard-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 20px 30px;
}

.clients-import-page .wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 30px 40px 20px;
    background-color: #f8f9fa;
}

.clients-import-page .wizard-steps::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 15%;
    right: 15%;
    height: 2px;
    background-color: #dee2e6;
    z-index: 1;
}

.clients-import-page .wizard-step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.clients-import-page .step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 10px;
    border: 4px solid #dee2e6;
    transition: all 0.3s ease;
}

.clients-import-page .wizard-step.active .step-circle {
    border-color: #0d6efd;
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.2);
}

.clients-import-page .wizard-step.completed .step-circle {
    border-color: #198754;
    background-color: #198754;
    color: white;
}

.clients-import-page .step-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
}

.clients-import-page .wizard-step.active .step-label    { color: #0d6efd; font-weight: 600; }
.clients-import-page .wizard-step.completed .step-label { color: #198754; }

.clients-import-page .wizard-content {
    padding: 30px;
    min-height: 400px;
}

.clients-import-page .wizard-footer {
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
}

.clients-import-page .upload-area {
    border: 3px dashed #0d6efd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.clients-import-page .upload-area:hover,
.clients-import-page .upload-area.dragover {
    background-color: #e7f1ff;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.clients-import-page .upload-area.dragover {
    border-style: solid;
    box-shadow: 0 0 30px rgba(13, 110, 253, 0.2);
}

.clients-import-page .upload-area i {
    font-size: 4rem;
    color: #0d6efd;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.clients-import-page .upload-area:hover i {
    transform: scale(1.1);
}

.clients-import-page .file-preview {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.clients-import-page .preview-table {
    font-size: 0.85rem;
}

.clients-import-page .preview-table th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.clients-import-page .preview-table td {
    vertical-align: middle;
}

.clients-import-page .mapping-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.clients-import-page .mapping-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.clients-import-page .mapping-row:last-child {
    border-bottom: none;
}

.clients-import-page .mapping-col-header {
    font-weight: 600;
    color: #495057;
    min-width: 150px;
}

.clients-import-page .mapping-col-data {
    flex: 1;
    padding: 0 15px;
}

.clients-import-page .mapping-col-field {
    min-width: 200px;
}

.clients-import-page .import-summary {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.clients-import-page .summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.clients-import-page .summary-stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.clients-import-page .summary-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.clients-import-page .summary-stat-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.clients-import-page .summary-stat-success { color: #198754; }
.clients-import-page .summary-stat-warning { color: #fd7e14; }
.clients-import-page .summary-stat-danger  { color: #dc3545; }

.clients-import-page .summary-stat-label {
    color: #6c757d;
    font-size: 0.85rem;
}

.clients-import-page .error-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    background-color: #fff;
}

.clients-import-page .error-item {
    padding: 8px 10px;
    margin-bottom: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
}

.clients-import-page .error-item:last-child {
    margin-bottom: 0;
}

.clients-import-page .error-line    { font-weight: 500; color: #dc3545; }
.clients-import-page .error-message { color: #6c757d; font-size: 0.9rem; }

.clients-import-page .import-options {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.clients-import-page .option-card {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clients-import-page .option-card:hover     { border-color: #0d6efd; background-color: #e7f1ff; }
.clients-import-page .option-card.selected  { border-color: #0d6efd; background-color: #e7f1ff; }
.clients-import-page .option-card.disabled  { opacity: 0.5; cursor: not-allowed; }

.clients-import-page .progress-container {
    margin: 20px 0;
    display: none;
}

.clients-import-page .import-progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.clients-import-page .import-progress-bar {
    height: 100%;
    background-color: #0d6efd;
    width: 0%;
    transition: width 0.3s ease;
}

.clients-import-page .template-card {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.clients-import-page .template-card:hover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
    transform: translateY(-2px);
}

.clients-import-page .template-card i {
    font-size: 3rem;
    color: #0d6efd;
    margin-bottom: 15px;
}

.clients-import-page .data-quality-indicator {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.clients-import-page .quality-high   { background-color: #d1e7dd; color: #0f5132; }
.clients-import-page .quality-medium { background-color: #fff3cd; color: #664d03; }
.clients-import-page .quality-low    { background-color: #f8d7da; color: #842029; }

.clients-import-page .sample-data {
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #495057;
    max-height: 100px;
    overflow-y: auto;
}

.clients-import-page .field-required::after { content: " *"; color: #dc3545; }
.clients-import-page .field-optional        { color: #6c757d; font-style: italic; }

.clients-import-page .detection-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .clients-import-page .wizard-steps {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .clients-import-page .wizard-steps::before {
        display: none;
    }

    .clients-import-page .mapping-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .clients-import-page .mapping-col-header,
    .clients-import-page .mapping-col-data,
    .clients-import-page .mapping-col-field {
        width: 100%;
    }

    .clients-import-page .summary-stats {
        grid-template-columns: 1fr;
    }
}


/* =============================================================================
   reporting.html
============================================================================= */

.clients-reporting-page .reporting-header {
    background: linear-gradient(135deg, #198754 0%, #0d6efd 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clients-reporting-page .kpi-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #0d6efd;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    height: 100%;
}

.clients-reporting-page .kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clients-reporting-page .kpi-card.primary { border-top-color: #0d6efd; }
.clients-reporting-page .kpi-card.success { border-top-color: #198754; }
.clients-reporting-page .kpi-card.warning { border-top-color: #fd7e14; }
.clients-reporting-page .kpi-card.danger  { border-top-color: #dc3545; }
.clients-reporting-page .kpi-card.info    { border-top-color: #0dcaf0; }
.clients-reporting-page .kpi-card.dark    { border-top-color: #212529; }

.clients-reporting-page .kpi-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.clients-reporting-page .kpi-primary .kpi-icon { color: #0d6efd; }
.clients-reporting-page .kpi-success .kpi-icon { color: #198754; }
.clients-reporting-page .kpi-warning .kpi-icon { color: #fd7e14; }
.clients-reporting-page .kpi-danger .kpi-icon  { color: #dc3545; }
.clients-reporting-page .kpi-info .kpi-icon    { color: #0dcaf0; }
.clients-reporting-page .kpi-dark .kpi-icon    { color: #212529; }

.clients-reporting-page .kpi-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.clients-reporting-page .kpi-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.clients-reporting-page .kpi-trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clients-reporting-page .trend-up      { color: #198754; }
.clients-reporting-page .trend-down    { color: #dc3545; }
.clients-reporting-page .trend-neutral { color: #6c757d; }

.clients-reporting-page .chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    height: 100%;
}

.clients-reporting-page .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.clients-reporting-page .chart-title {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.clients-reporting-page .chart-actions {
    display: flex;
    gap: 10px;
}

.clients-reporting-page .reporting-filter {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.clients-reporting-page .date-range-picker {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.clients-reporting-page .comparison-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #6f42c1;
}

.clients-reporting-page .metric-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.clients-reporting-page .metric-comparison:last-child {
    border-bottom: none;
}

.clients-reporting-page .metric-label {
    font-weight: 500;
    color: #495057;
}

.clients-reporting-page .metric-values {
    display: flex;
    gap: 20px;
    align-items: center;
}

.clients-reporting-page .metric-value {
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.clients-reporting-page .metric-difference {
    font-size: 0.85rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.clients-reporting-page .diff-positive { background-color: #d1e7dd; color: #0f5132; }
.clients-reporting-page .diff-negative { background-color: #f8d7da; color: #842029; }

.clients-reporting-page .top-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clients-reporting-page .top-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.clients-reporting-page .top-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.clients-reporting-page .top-item-rank  { font-weight: bold; color: #0d6efd; min-width: 30px; }
.clients-reporting-page .top-item-name  { flex: 1; margin: 0 15px; }
.clients-reporting-page .top-item-value { font-weight: 600; color: #198754; }

.clients-reporting-page .export-options {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.clients-reporting-page .report-type-card {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clients-reporting-page .report-type-card:hover,
.clients-reporting-page .report-type-card.selected {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.clients-reporting-page .report-type-icon {
    font-size: 2rem;
    color: #0d6efd;
    margin-bottom: 10px;
}

.clients-reporting-page .alert-card {
    border-left: 5px solid #fd7e14;
    background-color: #fff3cd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.clients-reporting-page .alert-card.warning { border-left-color: #fd7e14; background-color: #fff3cd; }
.clients-reporting-page .alert-card.danger  { border-left-color: #dc3545; background-color: #f8d7da; }
.clients-reporting-page .alert-card.info    { border-left-color: #0dcaf0; background-color: #cff4fc; }

.clients-reporting-page .insight-card {
    background: linear-gradient(135deg, #6f42c1 0%, #0d6efd 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.clients-reporting-page .insight-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.clients-reporting-page .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.clients-reporting-page .full-width-chart {
    grid-column: 1 / -1;
}

.clients-reporting-page .data-table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.clients-reporting-page .reporting-table {
    font-size: 0.9rem;
}

.clients-reporting-page .reporting-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.clients-reporting-page .table-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.clients-reporting-page .scheduled-reports {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.clients-reporting-page .schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

.clients-reporting-page .loading-indicator {
    text-align: center;
    padding: 40px;
}

.clients-reporting-page .loading-spinner {
    width: 3rem;
    height: 3rem;
}

.clients-reporting-page .no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.clients-reporting-page .no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .clients-reporting-page .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .clients-reporting-page .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .clients-reporting-page .chart-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .clients-reporting-page .metric-values {
        flex-direction: column;
        gap: 5px;
        align-items: flex-end;
    }

    .clients-reporting-page .kpi-number {
        font-size: 2rem;
    }
}
