/* ================================================================
   CSS Rapprochement Bancaire — Niveau 2
   Fichier unique : styles externes + styles inline du HTML fusionnés
   ================================================================ */

/* ================================================================
   CSS Rapprochement Bancaire — Niveau 2
   PGI + BancAtous fusionnés en un seul fichier
   ================================================================ */

/* ── Couleurs niveau 2 ── */
.rb-topbar { background: #52b788; }
.rb-btn-validate { background: #52b788; color: #fff; }

/* ── Identité PGI (ardoise) ── */
.rb-panel-left .rb-panel-label {
    background: linear-gradient(90deg,#2c3545,#3a4556);
    color:#fff; border-bottom:none;
}
.rb-panel-right .rb-panel-label {
    background: linear-gradient(90deg,#00529b,#0073d0);
    color:#fff; border-bottom:none;
}
.rb-panel-left { border-right:4px solid #2c3545 !important; }
.pgi-app-header { background:linear-gradient(135deg,#2c3545,#3a4556) !important; }
.pgi-tool-btn.active { background:#eaedf2 !important;color:#2c3545 !important;border-color:#c8cdd8 !important; }
.pgi-pro-breadcrumb { background:#f5f6f8 !important;border-bottom-color:#d0d5dd !important; }
.breadcrumb-item.active { color:#2c3545 !important;font-weight:600; }
.pgi-table thead th { background:#3a4556 !important;color:#fff !important;font-size:12px;text-transform:uppercase;letter-spacing:.5px; }
.pgi-table .debit,.pgi-table .credit { color:inherit !important; }
.pgi-table tbody tr:nth-child(even):not(.pointed):not(.erreur-montant) td { background:#f8f9fb; }
td.col-solde { color:#2c3545;font-weight:700; }
td.col-solde-neg { background:#fff0f0;color:#b91c1c;font-weight:700; }
.pgi-total-row td { background:#2c3545 !important;color:#fff !important;font-weight:400; }
.pgi-total-row td.col-solde { color:#c8d8f8 !important; background:transparent !important; }
.pointed td { background:#e8eef8 !important; }

/* ── BancAtous compact ── */
#bankTableBody tr td { font-size:12px !important;padding:5px 8px !important; }
.operations-table th { font-size:11px !important;padding:6px 8px !important; }

/* ── Accordéon BancAtous ── */
.banc-group { border-bottom:1px solid #e8eef5; }
.banc-group-btn { display:flex;align-items:center;gap:10px;width:100%;padding:11px 14px;background:none;border:none;cursor:pointer;font-size:13.5px;color:#3a4a60;text-align:left; }
.banc-group-btn:hover { background:#f0f4fa;color:#00529b; }
.banc-group-btn.banc-open { background:#eaf2fb;color:#00529b;font-weight:600; }
.banc-chevron { margin-left:auto;flex-shrink:0;transition:transform .25s;stroke:#9aabbf; }
.banc-group-btn.banc-open .banc-chevron { transform:rotate(180deg);stroke:#00529b; }
.nav-menu-icon { width:20px;height:20px;flex-shrink:0;stroke:#6a7e90; }
.banc-sub { max-height:0;overflow:hidden;transition:max-height .3s ease;background:#fafcff; }
.banc-sub.open { max-height:200px; }
.banc-sub-item { display:block;padding:7px 14px 7px 44px;font-size:12.5px;color:#5a6a80;text-decoration:none; }
.banc-sub-item:hover { background:#eaf2fb;color:#00529b; }

/* ── Panneau justification ── */
.justif-panel { margin:12px 0 0;background:#f8f9fb;border:1px solid #d0d5dd;border-radius:8px;overflow:hidden;font-size:12px; }
.justif-hdr { display:flex;align-items:center;justify-content:space-between;padding:8px 14px;background:#2c3545;color:#fff;cursor:pointer;user-select:none; }
.justif-hdr span { font-weight:600;font-size:11.5px;letter-spacing:.5px;text-transform:uppercase; }
.add-op-note { font-size:11.5px;color:#7a8fa0;margin-bottom:10px;background:#f0f4fb;padding:7px 10px;border-radius:6px;border-left:3px solid #2c3545; }

/* ── Pgi info row ── */
.pgi-info-row { display:flex;justify-content:space-between;align-items:center;padding:5px 0;font-size:12.5px; }
.info-label { color:#7a8fa0; }
.info-value { color:#1a2b4a;font-weight:600; }
.badge-primary { background:#e8f0fb;color:#1e3c72;border-radius:6px;padding:1px 7px;font-size:12px; }

/* ── Responsive ── */
.table-container { overflow-x:auto;-webkit-overflow-scrolling:touch; }
.pgi-table { min-width:510px; }
.operations-table { min-width:420px; }
@media(max-width:1200px){.pgi-table th,.pgi-table td{font-size:12px;padding:5px 7px;}}
@media(max-width:900px){
    .rb-panels{flex-direction:column!important;height:auto!important;overflow:visible!important;}
    .rb-panel{max-height:55vh;}
    .rb-panel-content{max-height:calc(55vh - 36px);overflow-y:auto;}
    .rb-topbar-meta{display:none;}
    .rb-actionbar{padding:6px 12px;gap:6px;}
    .rb-btn{padding:5px 10px;font-size:12px;}
    .pgi-info-sidebar{display:none !important;}
}
@media(max-width:600px){
    .rb-topbar{flex-wrap:wrap;height:auto;padding:8px 12px;}
    .rb-btn span{display:none;}
    .rb-btn{padding:6px;min-width:34px;justify-content:center;}
    #_rb_chrono_wrap{top:auto !important;bottom:10px !important;right:10px !important;}
    #_rb_chrono{font-size:18px !important;}
}

/* ================================================================
   CSS PGI (css-banque-pgi-n2.css)
   ================================================================ */
/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #e8ebed;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bancatous-content {
    flex: 1;
    background: #f0f2f5;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    background: #4a6fa5;
    color: white;
    padding: 30px 40px;
    text-align: center;
    border-bottom: none;
}

.header h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 8px;
}

.header-info {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== ONGLETS ===== */
.tabs-container {
    display: flex;
    background: #ecf0f1;
    border-bottom: 2px solid #bdc3c7;
}

.tab-btn {
    flex: 1;
    padding: 16px 25px;
    border: none;
    background: #ecf0f1;
    color: #5d6d7e;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    border-right: 1px solid #bdc3c7;
}

.tab-btn:hover {
    background: #d5dce3;
}

.tab-btn.active {
    background: white;
    color: #2c3e50;
}

.tab-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* ===== PAGE D'ACCUEIL ===== */
.welcome-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    background: #e8ebed;
}

.welcome-content {
    max-width: 1200px;
    width: 100%;
}

.welcome-content h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 400;
    text-align: center;
}

.welcome-content > p {
    font-size: 15px;
    color: #5a6c7d;
    margin-bottom: 40px;
    text-align: center;
}

.welcome-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.welcome-card {
    background: white;
    padding: 0;
    border: 1px solid #d5dce3;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.welcome-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 100%;
    height: 120px;
    background: #4a6fa5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-icon svg {
    width: 60px;
    height: 60px;
    stroke-width: 1.5;
}

.welcome-card h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 20px 25px 10px 25px;
    font-weight: 600;
}

.welcome-card p {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0 25px 25px 25px;
}

/* ===== FOOTER ===== */
.footer {
    background: #f5f6f8;
    color: #8a9199;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    border-top: 1px solid #e0e3e6;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-weight: 400;
}

/* ===== CONTENEUR DE CONTENU ===== */
.content-container {
    position: relative;
    min-height: calc(100vh - 200px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== PANELS PLEINE LARGEUR ===== */
.pgi-panel-full,
.bank-panel-full {
    min-height: calc(100vh - 200px);
}

.pgi-panel-full {
    background: #e8ebed;
}

.bank-panel-full {
    background: #e8ebed;
}

/* ===== PANELS COMMUNS ===== */
.panel-header {
    padding: 18px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.solde-info {
    font-size: 14px;
    font-weight: 600;
}

.solde-info span {
    font-size: 16px;
    margin-left: 5px;
}

.panel-content {
    padding: 25px 30px;
}

/* ===== COLONNE PGI ===== */
.pgi-panel-full {
    background: #e8ebed;
}

.pgi-header {
    background: #4a6fa5;
}

.pgi-panel-full .panel-content {
    padding: 25px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-breadcrumb {
    background: white;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #5a6c7d;
    border: 1px solid #d5dce3;
    border-left: 3px solid #4a6fa5;
}

.pgi-breadcrumb span {
    margin: 0 5px;
}

.pgi-breadcrumb .active-breadcrumb {
    color: #2c3e50;
    font-weight: 600;
}

.pgi-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #d5dce3;
}

.pgi-table thead {
    background: #4a6fa5;
    color: white;
}

.pgi-table th,
.pgi-table td {
    padding: 3px 7px;
    text-align: left;
    border-bottom: 1px solid #d5dce3;
    white-space: nowrap;
}

.pgi-table th:nth-child(3),
.pgi-table td:nth-child(3) {
    white-space: normal;
    min-width: 120px;
}

.pgi-table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.pgi-table td {
    font-size: 12px;
    color: #2c3e50;
}

.pgi-table tbody tr:hover {
    background: #f8f9fa;
}

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

.pgi-table tbody tr.pointed {
    background: #d5f4e6 !important;
}

.pgi-table .amount {
    font-weight: 600;
    text-align: right;
}

.pgi-table .debit {
    color: #c0392b;
}

.pgi-table .credit {
    color: #27ae60;
}

/* ===== COLONNE BANQUE ===== */
.bank-panel-full {
    background: #e8ebed;
}

.bank-header {
    background: #4a6fa5;
}

.bank-logo-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bank-logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.bank-tagline {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
}

.bank-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #d5dce3;
}

.bank-section h3 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a6fa5;
}

.bank-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a6fa5;
}

.bank-section-header h3 {
    margin: 0;
    padding: 0;
    border: none;
}

.btn-filter {
    background: #f0f4fb;
    color: #2c3e50;
    border: 1px solid #c5d3e0;
    padding: 4px 10px;
    font-size: 11px;
}

.btn-filter:hover {
    background: #e2eaf5;
    border-color: #00529b;
    color: #00529b;
}

.btn-filter.active {
    background: #00529b;
    color: #fff;
    border-color: #00529b;
}

.btn-filter.active:hover {
    background: #003d75;
}

.bank-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #d5dce3;
}

.bank-table thead {
    background: #4a6fa5;
    color: white;
}

.bank-table th,
.bank-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #d5dce3;
}

.bank-table th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.bank-table td {
    font-size: 14px;
    color: #2c3e50;
}

.bank-table tbody tr:hover {
    background: #f8f9fa;
}

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

.bank-table tbody tr.pointed {
    background: #d5f4e6 !important;
}

.bank-table .amount {
    font-weight: 600;
    text-align: right;
}

.bank-table .amount.positive {
    color: #27ae60;
}

.bank-table .amount.negative {
    color: #c0392b;
}

/* ===== TABLE CONTAINER ===== */
.table-container {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #d5dce3;
}

.table-container::-webkit-scrollbar {
    width: 12px;
}

.table-container::-webkit-scrollbar-track {
    background: #ecf0f1;
}

.table-container::-webkit-scrollbar-thumb {
    background: #95a5a6;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #7f8c8d;
}

/* ===== CHECKBOXES ===== */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #27ae60;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: #4a6fa5;
    color: white;
}

.btn-primary:hover {
    background: #3d5c87;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-export {
    background: #f0f4fb;
    color: #2c3e50;
    border: 1px solid #c5d3e0;
}

.btn-export:hover {
    background: #e2eaf5;
    border-color: #00529b;
    color: #00529b;
}

/* ===== SPINNER ===== */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== FORMULAIRE AJOUT OPÉRATION ===== */
.add-operation-section {
    background: white;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid #d5dce3;
    border-left: 3px solid #4a6fa5;
}

.add-operation-section h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.flex-2 {
    flex: 2;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #34495e;
    font-weight: 600;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #4a6fa5;
}

select.form-control {
    cursor: pointer;
    background: white;
}

.btn-add {
    background: #f0f4fb;
    color: #2c3e50;
    border: 1px solid #c5d3e0;
    padding: 4px 10px;
    white-space: nowrap;
}

.btn-add:hover {
    background: #e2eaf5;
    border-color: #00529b;
    color: #00529b;
}

/* ===== ACTIONS BAR ===== */
.actions-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #d5dce3;
    margin-top: 20px;
}

.actions-bar .stats {
    margin-left: auto;
    color: #5d6d7e;
    font-size: 14px;
    font-weight: 600;
}

.stats-bar {
    padding-top: 15px;
    color: #5d6d7e;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid #d5dce3;
    margin-top: 15px;
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 3px;
    font-weight: 600;
    border: 1px solid;
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #d5f4e6;
    color: #27ae60;
    border-color: #27ae60;
}

.notification.error {
    background: #fadbd8;
    color: #e74c3c;
    border-color: #e74c3c;
}

.notification.info {
    background: #d6eaf8;
    color: #4a6fa5;
    border-color: #4a6fa5;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .tabs-container {
        display: none;
    }

    .tab-content {
        display: block !important;
    }

    #tab-banque {
        display: none !important;
    }

    .pgi-panel-full,
    .bank-panel-full {
        background: white;
    }

    .actions-bar {
        display: none;
    }

    .add-operation-section {
        display: none;
    }

    .table-container {
        max-height: none;
        overflow: visible;
    }

    input[type="checkbox"] {
        display: none;
    }

    .pgi-table tbody tr.pointed {
        background: #d4edda !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tabs-container {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid #bdc3c7;
        border-right: none;
    }

    .form-row {
        flex-direction: column;
    }

    .bank-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-filter {
        width: 100%;
    }
    
    .welcome-cards {
        grid-template-columns: 1fr;
    }
}

/* ===== BANCATOUS STYLES ===== */
.bancatous-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.bancatous-header {
    background: #00529b;
    padding: 7px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #ffcb05;
}

.bancatous-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bancatous-logo {
    width: 100px;
    height: 100px;
}

.bancatous-slogan {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.bancatous-date {
    color: white;
    font-size: 14px;
}

/* Navigation Bancatous */
.bancatous-nav {
    background: white;
    border-bottom: 1px solid #d5dce3;
}

.bancatous-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.bancatous-nav-links li {
    margin: 0;
}

.bancatous-tab {
    display: block;
    padding: 4px 14px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 11px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.bancatous-tab:hover {
    color: #00529b;
    background: #f8f9fa;
}

.bancatous-tab.active {
    color: #ffffff;
    background: #00529b;
    border-bottom-color: #003d75;
    font-weight: 600;
}

/* Content sections */
.bancatous-content {
    flex: 1;
    background: #f0f2f5;
    padding: 30px;
}

/* Consultation Panel */
.consultation-panel {
    max-width: 1200px;
    margin: 0 auto;
}

.consultation-header {
    background: white;
    padding: 20px 30px;
    border: 1px solid #d5dce3;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compte-info h2 {
    color: #00529b;
    font-size: 20px;
    margin: 0 0 5px 0;
}

.compte-iban {
    font-size: 14px;
    color: #5a6c7d;
    margin: 0;
}

.compte-iban span {
    font-weight: 600;
    color: #2c3e50;
}

.solde-display {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.solde-amount {
    font-size: 18px;
    color: #00529b;
}

.consultation-body {
    background: white;
    padding: 30px;
    border: 1px solid #d5dce3;
}

.operations-section {
    margin: 0;
}

.operations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00529b;
}

.operations-header h3 {
    color: #00529b;
    font-size: 18px;
    margin: 0;
}

.operations-buttons {
    display: flex;
    gap: 10px;
}

.operations-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #d5dce3;
}

.operations-table thead {
    background: #00529b;
    color: white;
}

.operations-table th,
.operations-table td {
    padding: 3px 7px;
    text-align: left;
    border-bottom: 1px solid #d5dce3;
    white-space: nowrap;
}

.operations-table th:nth-child(3),
.operations-table td:nth-child(3) {
    white-space: normal;
    min-width: 120px;
}

.operations-table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.operations-table td {
    font-size: 12px;
    color: #2c3e50;
}

.operations-table tbody tr:hover {
    background: #f8f9fa;
}

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

.operations-table tbody tr.pointed {
    background: #d5f4e6 !important;
}

.operations-table .amount {
    font-weight: 600;
    text-align: right;
}

.operations-table .amount.positive {
    color: #27ae60;
}

.operations-table .amount.negative {
    color: #c0392b;
}

/* Virement Panel */
.virement-container {
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    max-width: 100%;
    margin: 0;
}

.virement-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.virement-sidebar h3 {
    background: #00529b;
    color: white;
    margin: 0;
    padding: 15px;
    font-size: 16px;
}

.virement-sidebar ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border: 1px solid #d5dce3;
    border-top: none;
}

.virement-sidebar li {
    padding: 10px 15px;
    border-bottom: 1px solid #d5dce3;
}

.virement-sidebar li:last-child {
    border-bottom: none;
}

.virement-sidebar li a {
    text-decoration: none;
    color: #555;
    display: block;
    transition: color 0.2s;
}

.virement-sidebar li a:hover {
    color: #00529b;
}

.virement-sidebar li ul {
    padding: 5px 0 0 15px;
    border: none;
}

.virement-sidebar li ul li {
    padding: 8px 0;
    border-bottom: none;
}

.virement-main {
    flex: 1;
    max-width: 100%;
    min-width: 0;
}

.virement-notification {
    border: 1px solid #d5dce3;
    border-left: 3px solid #00529b;
    padding: 5px 8px;
    margin-bottom: 8px;
    background: #f8f9fc;
}

.virement-notification p {
    margin: 2px 0;
    font-size: 11px;
    color: #5a6c7d;
    line-height: 1.3;
}

.virement-notification-inline {
    border: 1px solid #d5dce3;
    border-left: 4px solid #00529b;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: #f8f9fc;
    font-size: 14px;
    color: #5a6c7d;
}

.required-star {
    color: #e74c3c;
    margin-left: 3px;
}

.form-section {
    border: 1px solid #d5dce3;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: white;
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #00529b;
    padding-bottom: 4px;
    border-bottom: 1px solid #d5dce3;
}

.info-text {
    font-size: 13px;
    color: #7a8599;
    margin-bottom: 15px;
}

.form-row {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.form-row label {
    width: 160px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 11px;
}

.form-row select,
.form-row input[type="text"],
.form-row input[type="number"] {
    flex: 1;
    padding: 3px 6px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 11px;
    transition: border 0.2s;
}

.form-row select:focus,
.form-row input:focus {
    outline: none;
    border-color: #00529b;
}

.amount-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.amount-input-wrapper input {
    flex: 1;
}

.currency-label {
    color: #5a6c7d;
    font-size: 11px;
}

.button-row {
    text-align: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #d5dce3;
}

.btn-hold {
    background: #f39c12;
    color: white;
    padding: 5px 12px;
    margin: 0 5px;
    font-size: 11px;
}

.btn-hold:hover {
    background: #e67e22;
}

.btn-validate {
    background: #00529b;
    color: white;
    padding: 5px 14px;
    margin: 0 5px;
    font-size: 11px;
}

.btn-validate:hover {
    background: #003d73;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
    padding: 5px 14px;
    margin: 0 5px;
    font-size: 11px;
}

.btn-cancel:hover {
    background: #c0392b;
}

/* Radio sections */
.radio-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.radio-group {
    flex: 1;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 4px;
}

.radio-group p {
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c3e50;
}

.radio-option {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
}

.radio-option label {
    cursor: pointer;
    width: auto;
    font-weight: normal;
}

/* Receipt styles */
.receipt-success {
    text-align: center;
    padding: 10px;
    background: white;
    border: 1px solid #d5dce3;
    margin-bottom: 8px;
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.success-circle {
    width: 40px;
    height: 40px;
    background: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-check {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.receipt-success h2 {
    color: #00529b;
    font-size: 14px;
    margin: 5px 0;
}

.receipt-success p {
    color: #5a6c7d;
    font-size: 11px;
    margin: 2px 0;
}

.receipt-details {
    background: white;
    border: 1px solid #d5dce3;
    padding: 10px;
}

.receipt-details h3 {
    color: #00529b;
    margin: 0 0 6px 0;
    font-size: 13px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.receipt-table th,
.receipt-table td {
    border: 1px solid #d5dce3;
    padding: 4px 8px;
    font-size: 11px;
    text-align: left;
}

.receipt-table th {
    background: #f5f6f8;
    width: 35%;
    font-weight: 600;
}

.print-button {
    display: block;
    margin: 20px auto 0;
    padding: 12px 30px;
}

@media print {
    body * {
        visibility: hidden;
    }

    #virementReceipt,
    #virementReceipt * {
        visibility: visible;
    }

    #virementReceipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .print-button {
        display: none;
    }
}

@media (max-width: 768px) {
    .bancatous-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .bancatous-logo-wrapper {
        flex-direction: column;
    }

    .consultation-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .compte-info {
        width: 100%;
    }

    .solde-display {
        width: 100%;
    }

    .operations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .operations-buttons {
        width: 100%;
        flex-direction: column;
    }

    .operations-buttons .btn {
        width: 100%;
    }

    .virement-container {
        flex-direction: column;
    }

    .virement-sidebar {
        width: 100%;
    }

    .virement-main {
        max-width: 100%;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row label {
        width: 100%;
        margin-bottom: 5px;
    }

    .form-row select,
    .form-row input {
        width: 100%;
    }

    .amount-input-wrapper {
        width: 100%;
    }

    .radio-section {
        flex-direction: column;
    }

    .button-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .button-row .btn {
        width: 100%;
        margin: 0;
    }
}

/* ===== ONGLETS CONSULTATION BANQUE ===== */
.consultation-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #d5dce3;
    margin-bottom: 20px;
}

.consult-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #5a6c7d;
    transition: all 0.2s;
}

.consult-tab:hover {
    color: #00529b;
    background: #f8f9fa;
}

.consult-tab.active {
    color: #00529b;
    border-bottom-color: #00529b;
    font-weight: 600;
}

/* ===== BARRE DE RECHERCHE ET FILTRES ===== */
.search-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #00529b;
}

.btn-filter-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.2s;
}

.btn-filter-icon:hover {
    border-color: #00529b;
    color: #00529b;
}

.view-buttons {
    display: flex;
    gap: 0;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    overflow: hidden;
}

.btn-view {
    padding: 10px 12px;
    background: white;
    border: none;
    border-right: 1px solid #d5dce3;
    cursor: pointer;
    color: #5a6c7d;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view:last-child {
    border-right: none;
}

.btn-view:hover {
    background: #f8f9fa;
    color: #00529b;
}

.btn-view.active {
    background: #00529b;
    color: white;
}

/* Responsive pour les nouveaux éléments Banque */
@media (max-width: 1024px) {
    .content-area {
        flex-direction: column;
    }
    
    .manage-panel {
        width: 100%;
        order: -1;
    }
    
    .manage-panel.collapsed {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .nav-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #d5dce3;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 10px 15px;
        min-width: 80px;
        text-align: center;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item.active {
        border-left: none;
        border-bottom-color: #00529b;
    }
    
    .nav-item span {
        font-size: 11px;
    }
    
    .consultation-tabs {
        flex-wrap: wrap;
    }

    .consult-tab {
        flex: 1;
        min-width: 100px;
    }

    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .btn-filter-icon {
        width: 100%;
        justify-content: center;
    }

    .view-buttons {
        width: 100%;
    }

    .btn-view {
        flex: 1;
    }
    
    .manage-panel {
        width: 100%;
    }
    
    .collapse-btn {
        display: none;
    }
}


/* ===== STYLE PGI LOGICIEL PROFESSIONNEL ===== */
.pgi-software {
    background: #f5f6fa;
}

.pgi-titlebar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 7px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pgi-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pgi-logo-square {
    width: 50px;
    height: 50px;
    background: white;
    color: #1e3c72;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.pgi-app-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pgi-main-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.pgi-sub-title {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

.pgi-session-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-size: 13px;
}

.pgi-date {
    opacity: 0.95;
}

/* Barre de menu PGI */
.pgi-menubar {
    background: #ffffff;
    border-bottom: 1px solid #d5dce3;
    display: flex;
    padding: 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.pgi-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    color: #5a6c7d;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.pgi-menu-item:hover {
    color: #1e3c72;
    background: #f8f9fa;
}

.pgi-menu-item.active {
    color: #1e3c72;
    border-bottom-color: #1e3c72;
    font-weight: 600;
}

.pgi-panel-full {
    margin: 0;
    border-radius: 0;
}

.pgi-panel-full .panel-content {
    padding: 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-header {
    background: #ffffff;
    border-bottom: 2px solid #e8ebed;
    padding: 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-breadcrumb {
    background: #f8f9fa;
    padding: 12px 80px;
    font-size: 13px;
    color: #5a6c7d;
    border-bottom: 1px solid #d5dce3;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-breadcrumb svg {
    color: #95a5a6;
}

.pgi-breadcrumb .active-breadcrumb {
    color: #1e3c72;
    font-weight: 600;
}

/* ===== SIDEBAR NAVIGATION BANQUE ===== */
.bancatous-main-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
    background: #f0f2f5;
}

.bancatous-sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid #d5dce3;
    flex-shrink: 0;
}

.bancatous-nav-menu {
    padding: 10px 0;
}

.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #5a6c7d;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-menu-item:hover {
    background: #f8f9fa;
    color: #00529b;
    border-left-color: #00529b;
}

.nav-menu-item.active {
    background: #00529b;
    color: #ffffff;
    border-left-color: #003d75;
    font-weight: 600;
}

.nav-menu-item.active .nav-menu-icon {
    stroke: #ffffff;
}

/* Niveau 3 : ligne avec erreur de montant (saisie incorrecte au compte 512) */
tr.erreur-montant td {
    background: #fff8e1;
}
tr.erreur-montant td:nth-child(5),
tr.erreur-montant td:nth-child(6) {
    color: #c0392b;
    font-weight: 700;
}

.nav-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}

.bancatous-content-area {
    flex: 1;
    padding: 0;
    min-width: 0;
}

/* Ajustements pour la navigation Bancatous avec sidebar */
.bancatous-nav {
    background: white;
    border-bottom: 1px solid #d5dce3;
}

/* Responsive pour sidebar */
@media (max-width: 768px) {
    .bancatous-main-wrapper {
        flex-direction: column;
    }
    
    .bancatous-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #d5dce3;
    }
    
    .bancatous-nav-menu {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .nav-menu-item {
        flex-direction: column;
        min-width: 80px;
        padding: 10px;
        text-align: center;
        gap: 6px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-menu-item:hover,
    .nav-menu-item.active {
        border-left: none;
        border-bottom-color: #00529b;
    }
    
    .nav-menu-item span {
        font-size: 11px;
    }
    
    .pgi-titlebar {
        padding: 12px 15px;
    }
    
    .pgi-main-title {
        font-size: 16px;
    }
    
    .pgi-sub-title {
        font-size: 11px;
    }
    
    .pgi-menubar {
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .pgi-menu-item {
        white-space: nowrap;
    }
    
    /* Réduire les marges PGI sur mobile */
    .pgi-panel-full .panel-content {
        padding: 20px 15px;
    }
    
    .pgi-header {
        padding: 20px 15px;
    }
    
    .pgi-breadcrumb {
        padding: 12px 15px;
    }
}

/* ===== SIDEBAR INFORMATIONS PGI ===== */
.pgi-content-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.pgi-info-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.pgi-main-content {
    flex: 1;
    min-width: 0;
}

.pgi-info-card {
    background: white;
    border: 1px solid #d5dce3;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pgi-info-title {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e3c72;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #1e3c72;
    padding-bottom: 8px;
}

.pgi-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.pgi-info-item:last-child {
    border-bottom: none;
}

.pgi-info-label {
    font-size: 13px;
    color: #5a6c7d;
    font-weight: 500;
}

.pgi-info-value {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
}

.pgi-solde-highlight {
    color: #1e3c72;
    font-size: 15px;
    font-weight: 700;
}

.pgi-action-btn {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    color: #2c3e50;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.pgi-action-btn:hover {
    background: #f8f9fa;
    border-color: #1e3c72;
    color: #1e3c72;
}

.pgi-action-btn:last-child {
    margin-bottom: 0;
}

.pgi-action-btn svg {
    flex-shrink: 0;
}

/* Responsive PGI sidebar */
@media (max-width: 1024px) {
    .pgi-content-wrapper {
        flex-direction: column;
    }
    
    .pgi-info-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .pgi-info-card {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .pgi-info-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ===== PGI PROFESSIONNEL - APPLICATION ===== */
.pgi-body {
    margin: 0;
    padding: 0;
    background: #e8edf2;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pgi-application {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== EN-TÊTE PROFESSIONNELLE ===== */
.pgi-app-header {
    background: linear-gradient(135deg, #1a2942 0%, #2d4a6e 100%);
    color: white;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1000;
}

.pgi-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pgi-app-icon {
    flex-shrink: 0;
}

.pgi-app-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pgi-app-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.pgi-app-version {
    font-size: 11px;
    opacity: 0.75;
}

.pgi-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.pgi-module-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.pgi-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pgi-user-badge,
.pgi-date-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

/* ===== BARRE D'OUTILS ===== */
.pgi-toolbar {
    background: white;
    border-bottom: 1px solid #d5dce3;
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pgi-toolbar-section {
    display: flex;
    gap: 5px;
}

.pgi-tool-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e8edf2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #2c3e50;
    transition: all 0.2s;
}

.pgi-tool-btn:hover {
    background: #f8f9fa;
    border-color: #2d4a6e;
    color: #2d4a6e;
}

.pgi-tool-btn.active {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
    border-color: #2d4a6e;
}

.pgi-tool-btn svg {
    flex-shrink: 0;
}

/* ===== FIL D'ARIANE PROFESSIONNEL ===== */
.pgi-pro-breadcrumb {
    background: white;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #5a6c7d;
    border-bottom: 1px solid #e8edf2;
}

.breadcrumb-item {
    color: #5a6c7d;
    transition: color 0.2s;
}

.breadcrumb-item.active {
    color: #2d4a6e;
    font-weight: 600;
}

.breadcrumb-arrow {
    color: #95a5a6;
}

/* ===== CONTENU PRINCIPAL ===== */
.pgi-pro-main {
    flex: 1;
    background: #e8edf2;
    padding: 20px 30px;
}

.pgi-panel-content {
    max-width: 1600px;
    margin: 0 auto;
}

/* ===== CARTES PROFESSIONNELLES ===== */
.pgi-pro-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e8edf2;
}

.pgi-card-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e8edf2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgi-card-header svg {
    color: #2d4a6e;
    flex-shrink: 0;
}

.pgi-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pgi-card-body {
    padding: 20px;
}

/* ===== LIGNES D'INFORMATION ===== */
.pgi-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.pgi-info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #5a6c7d;
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
}

/* ===== BADGES ===== */
.badge-primary {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.badge-secondary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

/* ===== STATISTIQUES ===== */
.pgi-card-stats .pgi-card-body {
    padding: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.stat-item:hover {
    background: #e8edf2;
    transform: translateX(4px);
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-debit .stat-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.stat-credit .stat-icon {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.stat-solde .stat-icon {
    background: linear-gradient(135deg, #2d4a6e 0%, #1a2942 100%);
    color: white;
}

.stat-item:not(.stat-debit):not(.stat-credit):not(.stat-solde) .stat-icon {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: #5a6c7d;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 700;
}

.stat-solde-value {
    font-size: 18px;
    color: #2d4a6e;
}

.stat-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #d5dce3 50%, transparent 100%);
    margin: 10px 0;
}

/* ===== BOUTONS PROFESSIONNELS ===== */
.pgi-pro-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.pgi-pro-btn:last-child {
    margin-bottom: 0;
}

.pgi-btn-primary {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(45, 74, 110, 0.3);
}

.pgi-btn-primary:hover {
    background: linear-gradient(135deg, #3a5a84 0%, #4a6a94 100%);
    box-shadow: 0 4px 12px rgba(45, 74, 110, 0.4);
    transform: translateY(-1px);
}

.pgi-btn-secondary {
    background: white;
    color: #2c3e50;
    border: 1.5px solid #d5dce3;
}

.pgi-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #2d4a6e;
    color: #2d4a6e;
}

/* ===== TABLEAU PROFESSIONNEL ===== */
.pgi-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pgi-table thead {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
}

.pgi-table th {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.pgi-table tbody tr {
    background: white;
    transition: all 0.2s;
}

.pgi-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.pgi-table tbody tr:hover {
    background: #e8f4f8;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(45, 74, 110, 0.15);
}

.pgi-table tbody tr.pointed {
    background: linear-gradient(90deg, #d5f4e6 0%, #e8f8f0 100%);
}

.pgi-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8edf2;
    font-size: 13px;
    color: #2c3e50;
}

/* ===== PIED DE PAGE PROFESSIONNEL ===== */
.pgi-pro-footer {
    background: linear-gradient(135deg, #1a2942 0%, #2d4a6e 100%);
    color: white;
    padding: 12px 30px;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    font-size: 12px;
}

.footer-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-separator {
    opacity: 0.5;
}

.footer-right {
    opacity: 0.9;
}

/* ===== RESPONSIVE PROFESSIONNEL ===== */
@media (max-width: 1024px) {
    .pgi-app-header {
        padding: 12px 20px;
    }
    
    .pgi-toolbar {
        padding: 8px 20px;
    }
    
    .pgi-pro-breadcrumb {
        padding: 12px 20px;
    }
    
    .pgi-pro-main {
        padding: 15px 20px;
    }
    
    .pgi-module-badge {
        display: none;
    }
}

@media (max-width: 768px) {
    .pgi-app-header {
        padding: 10px 15px;
    }
    
    .pgi-app-name {
        font-size: 14px;
    }
    
    .pgi-app-version {
        display: none;
    }
    
    .pgi-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .pgi-toolbar-section {
        width: 100%;
        overflow-x: auto;
    }
    
    .pgi-tool-btn span {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
}


/* ===== STYLES D'IMPRESSION PGI - CORRIGÉS ===== */
@media print {
    /* Configuration de la page */
    @page {
        size: A4 portrait;
        margin: 12mm 10mm;
    }
    
    /* Réinitialiser le body */
    body, 
    .pgi-body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    
    /* Masquer les éléments d'interface */
    .pgi-app-header,
    .pgi-toolbar,
    .pgi-pro-breadcrumb,
    .pgi-info-sidebar,
    .pgi-pro-footer,
    .actions-bar,
    .add-operation-form,
    #notification,
    button,
    .btn,
    .pgi-pro-btn,
    .pgi-action-btn,
    .pgi-breadcrumb {
        display: none !important;
    }
    
    /* Container principal */
    .pgi-application {
        display: block !important;
        background: white !important;
    }
    
    .pgi-pro-main {
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }
    
    .pgi-panel-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Wrapper de contenu */
    .pgi-content-wrapper {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .pgi-main-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    /* FORCER l'affichage du tableau */
    .table-container,
    .pgi-table,
    .pgi-table thead,
    .pgi-table tbody,
    .pgi-table tr,
    .pgi-table th,
    .pgi-table td {
        display: table !important;
    }
    
    .pgi-table {
        display: table !important;
    }
    
    .pgi-table thead,
    .pgi-table tbody {
        display: table-row-group !important;
    }
    
    .pgi-table tr {
        display: table-row !important;
    }
    
    .pgi-table th,
    .pgi-table td {
        display: table-cell !important;
    }
    
    /* En-tête du document imprimé */
    .pgi-panel-content::before {
        content: "PGI ENTREPRISE - EXTRAIT DE COMPTE";
        display: block;
        font-size: 18px;
        font-weight: bold;
        text-align: center;
        padding: 10px 0;
        margin-bottom: 8px;
        border-bottom: 3px solid #2d4a6e;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Sous-titre */
    .pgi-panel-content::after {
        content: "Compte 512 - Banque Bancatous";
        display: block;
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        padding: 5px 0;
        margin-bottom: 15px;
        color: #2d4a6e;
    }
    
    /* En-tête statistiques */
    .print-header-stats {
        display: block !important;
        background: #f8f9fa !important;
        padding: 12px !important;
        margin: 0 15px 15px !important;
        border: 2px solid #d5dce3 !important;
        border-radius: 6px !important;
        font-size: 11px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
    }
    
    .print-header-stats > div {
        display: flex !important;
        justify-content: space-around !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .print-header-stats strong {
        color: #2d4a6e !important;
        font-weight: 700 !important;
    }
    
    /* Container du tableau */
    .table-container {
        margin: 0 15px !important;
        padding: 0 !important;
        overflow: visible !important;
        page-break-inside: avoid;
    }
    
    /* Tableau optimisé */
    .pgi-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9px !important;
        box-shadow: none !important;
        border: 1px solid #2d4a6e !important;
    }
    
    /* En-tête du tableau */
    .pgi-table thead {
        background: #2d4a6e !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pgi-table th {
        padding: 8px 5px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        border: 1px solid #2d4a6e !important;
        text-align: left !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Cellules du tableau */
    .pgi-table td {
        padding: 6px 5px !important;
        font-size: 9px !important;
        border: 1px solid #999 !important;
        color: #000 !important;
    }
    
    /* Lignes du tableau */
    .pgi-table tbody tr {
        background: white !important;
        page-break-inside: avoid;
    }
    
    .pgi-table tbody tr:nth-child(even) {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pgi-table tbody tr.pointed {
        background: #d5f4e6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Largeurs de colonnes optimisées */
    .pgi-table th:nth-child(1), 
    .pgi-table td:nth-child(1) {
        width: 40px !important;
        text-align: center !important;
    }
    
    .pgi-table th:nth-child(2), 
    .pgi-table td:nth-child(2) {
        width: 75px !important;
    }
    
    .pgi-table th:nth-child(4), 
    .pgi-table td:nth-child(4) {
        width: 90px !important;
    }
    
    .pgi-table th:nth-child(5), 
    .pgi-table td:nth-child(5),
    .pgi-table th:nth-child(6), 
    .pgi-table td:nth-child(6) {
        width: 85px !important;
        text-align: right !important;
    }
    
    /* Checkbox */
    input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
        margin: 0 auto !important;
        display: inline-block !important;
        -webkit-appearance: checkbox !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Classes de montant */
    .amount.debit,
    .amount.credit {
        font-weight: 600 !important;
    }
    
    /* Footer du document */
    .pgi-panel-content .pgi-content-wrapper::after {
        content: "© CERPEG - PGI Entreprise v2024.1";
        display: block;
        font-size: 9px;
        text-align: center;
        padding: 12px 0 0 0;
        margin-top: 15px;
        border-top: 1px solid #ccc;
        color: #666;
        page-break-inside: avoid;
    }
    
    /* Éviter les sauts de page dans le tableau */
    table, thead, tbody, tr {
        page-break-inside: avoid !important;
    }
    
    /* Optimisation espace */
    * {
        box-sizing: border-box !important;
    }
    
    html, body {
        height: auto !important;
        overflow: visible !important;
    }
}

/* Styles pour le résumé statistiques */
.print-header-stats {
    display: none;
}

/* ===== FOOTER ADAPTATIF ===== */
body { display: flex; flex-direction: column; min-height: 100vh; }

.pgi-pro-footer {
    margin-top: auto;
    flex-shrink: 0;
}

.footer {
    margin-top: auto;
    flex-shrink: 0;
    text-align: center;
    padding: 12px 16px;
    background: #f5f8fc;
    border-top: 1px solid #dce4ef;
    font-size: 12px;
    color: #9aabbf;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        font-size: 11px;
    }
    .footer-right { display: none; }
    .pgi-pro-footer { padding: 10px 16px; }
}

@media (max-width: 480px) {
    .footer-content { font-size: 10px; }
    .footer-separator { display: none; }
    .footer-left { flex-direction: column; gap: 2px; }
}

/* ===== IMPRESSION DU SCORE ===== */
@media print {
    #scoreOverlay,
    #scoreOverlay * {
        /* Ne jamais masquer le panneau score en impression native
           — on utilise plutôt la fenêtre dédiée via imprimerScore() */
    }
    /* Si impression lancée depuis la page principale */
    body.print-score #scoreOverlay {
        position: static;
        background: none;
    }
    body.print-score #scoreOverlay > * {
        box-shadow: none;
        border-radius: 0;
    }
    body.print-score .score-footer-btns {
        display: none !important;
    }
}

/* ===== LIGNE ERREUR DE MONTANT (niveau 3) ===== */
tr.erreur-montant td {
    background: #fff8e1;
}
tr.erreur-montant td:nth-child(5),
tr.erreur-montant td:nth-child(6) {
    color: #c0392b;
    font-weight: 700;
}

/* ── PGI couleur verte pour distinguer de BancAtous ── */
.pgi-app-header {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%) !important;
}
.pgi-tool-btn.active {
    background: #e8f5ee !important;
    color: #1b4332 !important;
    border-color: #b7dfc8 !important;
}
.pgi-pro-breadcrumb {
    background: #f0f7f3 !important;
    border-bottom-color: #c7e8d4 !important;
}
.breadcrumb-item.active { color: #1b4332 !important; }
.pgi-table thead th {
    background: #2d6a4f !important;
    color: #fff !important;
    border-color: #1b4332 !important;
}
.pgi-table th:last-child {
    background: #1b4332 !important;
    color: #d8f3dc !important;
}
.pgi-table td.col-solde { color: #1a2b4a; font-weight: 700; }
.pgi-table td.col-solde-neg { background: #fff0f0; color: #c0392b; font-weight: 700; }
.pgi-total-row td {
    background: #1b4332 !important;
    color: #fff !important;
    font-weight: 400;
    font-size: 13px;
}
.pgi-total-row td.col-solde {
    background: #1b4332 !important;
    color: #d8f3dc !important;
}
.pointed { background: #e8f5ee !important; }


/* ================================================================
   CSS BancAtous (css-bancatous-n2.css)
   ================================================================ */
/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #e8ebed;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bancatous-content {
    flex: 1;
    background: #f0f2f5;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    background: #4a6fa5;
    color: white;
    padding: 30px 40px;
    text-align: center;
    border-bottom: none;
}

.header h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 8px;
}

.header-info {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== ONGLETS ===== */
.tabs-container {
    display: flex;
    background: #ecf0f1;
    border-bottom: 2px solid #bdc3c7;
}

.tab-btn {
    flex: 1;
    padding: 16px 25px;
    border: none;
    background: #ecf0f1;
    color: #5d6d7e;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    border-right: 1px solid #bdc3c7;
}

.tab-btn:hover {
    background: #d5dce3;
}

.tab-btn.active {
    background: white;
    color: #2c3e50;
}

.tab-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* ===== PAGE D'ACCUEIL ===== */
.welcome-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    background: #e8ebed;
}

.welcome-content {
    max-width: 1200px;
    width: 100%;
}

.welcome-content h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 400;
    text-align: center;
}

.welcome-content > p {
    font-size: 15px;
    color: #5a6c7d;
    margin-bottom: 40px;
    text-align: center;
}

.welcome-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.welcome-card {
    background: white;
    padding: 0;
    border: 1px solid #d5dce3;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.welcome-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 100%;
    height: 120px;
    background: #4a6fa5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-icon svg {
    width: 60px;
    height: 60px;
    stroke-width: 1.5;
}

.welcome-card h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 20px 25px 10px 25px;
    font-weight: 600;
}

.welcome-card p {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0 25px 25px 25px;
}

/* ===== FOOTER ===== */
.footer {
    background: #f5f6f8;
    color: #8a9199;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    border-top: 1px solid #e0e3e6;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-weight: 400;
}

/* ===== CONTENEUR DE CONTENU ===== */
.content-container {
    position: relative;
    min-height: calc(100vh - 200px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== PANELS PLEINE LARGEUR ===== */
.pgi-panel-full,
.bank-panel-full {
    min-height: calc(100vh - 200px);
}

.pgi-panel-full {
    background: #e8ebed;
}

.bank-panel-full {
    background: #e8ebed;
}

/* ===== PANELS COMMUNS ===== */
.panel-header {
    padding: 18px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.solde-info {
    font-size: 14px;
    font-weight: 600;
}

.solde-info span {
    font-size: 16px;
    margin-left: 5px;
}

.panel-content {
    padding: 25px 30px;
}

/* ===== COLONNE PGI ===== */
.pgi-panel-full {
    background: #e8ebed;
}

.pgi-header {
    background: #4a6fa5;
}

.pgi-panel-full .panel-content {
    padding: 25px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-breadcrumb {
    background: white;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #5a6c7d;
    border: 1px solid #d5dce3;
    border-left: 3px solid #4a6fa5;
}

.pgi-breadcrumb span {
    margin: 0 5px;
}

.pgi-breadcrumb .active-breadcrumb {
    color: #2c3e50;
    font-weight: 600;
}

.pgi-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #d5dce3;
}

.pgi-table thead {
    background: #4a6fa5;
    color: white;
}

.pgi-table th,
.pgi-table td {
    padding: 3px 7px;
    text-align: left;
    border-bottom: 1px solid #d5dce3;
    white-space: nowrap;
}

.pgi-table th:nth-child(3),
.pgi-table td:nth-child(3) {
    white-space: normal;
    min-width: 120px;
}

.pgi-table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.pgi-table td {
    font-size: 12px;
    color: #2c3e50;
}

.pgi-table tbody tr:hover {
    background: #f8f9fa;
}

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

.pgi-table tbody tr.pointed {
    background: #d5f4e6 !important;
}

.pgi-table .amount {
    font-weight: 600;
    text-align: right;
}

.pgi-table .debit {
    color: #c0392b;
}

.pgi-table .credit {
    color: #27ae60;
}

/* ===== COLONNE BANQUE ===== */
.bank-panel-full {
    background: #e8ebed;
}

.bank-header {
    background: #4a6fa5;
}

.bank-logo-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bank-logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.bank-tagline {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
}

.bank-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #d5dce3;
}

.bank-section h3 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a6fa5;
}

.bank-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a6fa5;
}

.bank-section-header h3 {
    margin: 0;
    padding: 0;
    border: none;
}

.btn-filter {
    background: #f0f4fb;
    color: #2c3e50;
    border: 1px solid #c5d3e0;
    padding: 4px 10px;
    font-size: 11px;
}

.btn-filter:hover {
    background: #e2eaf5;
    border-color: #00529b;
    color: #00529b;
}

.btn-filter.active {
    background: #00529b;
    color: #fff;
    border-color: #00529b;
}

.btn-filter.active:hover {
    background: #003d75;
}

.bank-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #d5dce3;
}

.bank-table thead {
    background: #4a6fa5;
    color: white;
}

.bank-table th,
.bank-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #d5dce3;
}

.bank-table th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.bank-table td {
    font-size: 14px;
    color: #2c3e50;
}

.bank-table tbody tr:hover {
    background: #f8f9fa;
}

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

.bank-table tbody tr.pointed {
    background: #d5f4e6 !important;
}

.bank-table .amount {
    font-weight: 600;
    text-align: right;
}

.bank-table .amount.positive {
    color: #27ae60;
}

.bank-table .amount.negative {
    color: #c0392b;
}

/* ===== TABLE CONTAINER ===== */
.table-container {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #d5dce3;
}

.table-container::-webkit-scrollbar {
    width: 12px;
}

.table-container::-webkit-scrollbar-track {
    background: #ecf0f1;
}

.table-container::-webkit-scrollbar-thumb {
    background: #95a5a6;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #7f8c8d;
}

/* ===== CHECKBOXES ===== */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #27ae60;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: #4a6fa5;
    color: white;
}

.btn-primary:hover {
    background: #3d5c87;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-export {
    background: #f0f4fb;
    color: #2c3e50;
    border: 1px solid #c5d3e0;
}

.btn-export:hover {
    background: #e2eaf5;
    border-color: #00529b;
    color: #00529b;
}

/* ===== SPINNER ===== */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== FORMULAIRE AJOUT OPÉRATION ===== */
.add-operation-section {
    background: white;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid #d5dce3;
    border-left: 3px solid #4a6fa5;
}

.add-operation-section h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.flex-2 {
    flex: 2;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #34495e;
    font-weight: 600;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #4a6fa5;
}

select.form-control {
    cursor: pointer;
    background: white;
}

.btn-add {
    background: #f0f4fb;
    color: #2c3e50;
    border: 1px solid #c5d3e0;
    padding: 4px 10px;
    white-space: nowrap;
}

.btn-add:hover {
    background: #e2eaf5;
    border-color: #00529b;
    color: #00529b;
}

/* ===== ACTIONS BAR ===== */
.actions-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #d5dce3;
    margin-top: 20px;
}

.actions-bar .stats {
    margin-left: auto;
    color: #5d6d7e;
    font-size: 14px;
    font-weight: 600;
}

.stats-bar {
    padding-top: 15px;
    color: #5d6d7e;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid #d5dce3;
    margin-top: 15px;
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 3px;
    font-weight: 600;
    border: 1px solid;
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #d5f4e6;
    color: #27ae60;
    border-color: #27ae60;
}

.notification.error {
    background: #fadbd8;
    color: #e74c3c;
    border-color: #e74c3c;
}

.notification.info {
    background: #d6eaf8;
    color: #4a6fa5;
    border-color: #4a6fa5;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .tabs-container {
        display: none;
    }

    .tab-content {
        display: block !important;
    }

    #tab-banque {
        display: none !important;
    }

    .pgi-panel-full,
    .bank-panel-full {
        background: white;
    }

    .actions-bar {
        display: none;
    }

    .add-operation-section {
        display: none;
    }

    .table-container {
        max-height: none;
        overflow: visible;
    }

    input[type="checkbox"] {
        display: none;
    }

    .pgi-table tbody tr.pointed {
        background: #d4edda !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tabs-container {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid #bdc3c7;
        border-right: none;
    }

    .form-row {
        flex-direction: column;
    }

    .bank-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-filter {
        width: 100%;
    }
    
    .welcome-cards {
        grid-template-columns: 1fr;
    }
}

/* ===== BANCATOUS STYLES ===== */
.bancatous-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.bancatous-header {
    background: #00529b;
    padding: 7px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #ffcb05;
}

.bancatous-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bancatous-logo {
    width: 100px;
    height: 100px;
}

.bancatous-slogan {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.bancatous-date {
    color: white;
    font-size: 14px;
}

/* Navigation Bancatous */
.bancatous-nav {
    background: white;
    border-bottom: 1px solid #d5dce3;
}

.bancatous-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.bancatous-nav-links li {
    margin: 0;
}

.bancatous-tab {
    display: block;
    padding: 4px 14px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 11px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.bancatous-tab:hover {
    color: #00529b;
    background: #f8f9fa;
}

.bancatous-tab.active {
    color: #ffffff;
    background: #00529b;
    border-bottom-color: #003d75;
    font-weight: 600;
}

/* Content sections */
.bancatous-content {
    flex: 1;
    background: #f0f2f5;
    padding: 30px;
}

/* Consultation Panel */
.consultation-panel {
    max-width: 1200px;
    margin: 0 auto;
}

.consultation-header {
    background: white;
    padding: 20px 30px;
    border: 1px solid #d5dce3;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compte-info h2 {
    color: #00529b;
    font-size: 20px;
    margin: 0 0 5px 0;
}

.compte-iban {
    font-size: 14px;
    color: #5a6c7d;
    margin: 0;
}

.compte-iban span {
    font-weight: 600;
    color: #2c3e50;
}

.solde-display {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.solde-amount {
    font-size: 18px;
    color: #00529b;
}

.consultation-body {
    background: white;
    padding: 30px;
    border: 1px solid #d5dce3;
}

.operations-section {
    margin: 0;
}

.operations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00529b;
}

.operations-header h3 {
    color: #00529b;
    font-size: 18px;
    margin: 0;
}

.operations-buttons {
    display: flex;
    gap: 10px;
}

.operations-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #d5dce3;
}

.operations-table thead {
    background: #00529b;
    color: white;
}

.operations-table th,
.operations-table td {
    padding: 3px 7px;
    text-align: left;
    border-bottom: 1px solid #d5dce3;
    white-space: nowrap;
}

.operations-table th:nth-child(3),
.operations-table td:nth-child(3) {
    white-space: normal;
    min-width: 120px;
}

.operations-table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.operations-table td {
    font-size: 12px;
    color: #2c3e50;
}

.operations-table tbody tr:hover {
    background: #f8f9fa;
}

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

.operations-table tbody tr.pointed {
    background: #d5f4e6 !important;
}

.operations-table .amount {
    font-weight: 600;
    text-align: right;
}

.operations-table .amount.positive {
    color: #27ae60;
}

.operations-table .amount.negative {
    color: #c0392b;
}

/* Virement Panel */
.virement-container {
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    max-width: 100%;
    margin: 0;
}

.virement-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.virement-sidebar h3 {
    background: #00529b;
    color: white;
    margin: 0;
    padding: 15px;
    font-size: 16px;
}

.virement-sidebar ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border: 1px solid #d5dce3;
    border-top: none;
}

.virement-sidebar li {
    padding: 10px 15px;
    border-bottom: 1px solid #d5dce3;
}

.virement-sidebar li:last-child {
    border-bottom: none;
}

.virement-sidebar li a {
    text-decoration: none;
    color: #555;
    display: block;
    transition: color 0.2s;
}

.virement-sidebar li a:hover {
    color: #00529b;
}

.virement-sidebar li ul {
    padding: 5px 0 0 15px;
    border: none;
}

.virement-sidebar li ul li {
    padding: 8px 0;
    border-bottom: none;
}

.virement-main {
    flex: 1;
    max-width: 100%;
    min-width: 0;
}

.virement-notification {
    border: 1px solid #d5dce3;
    border-left: 3px solid #00529b;
    padding: 5px 8px;
    margin-bottom: 8px;
    background: #f8f9fc;
}

.virement-notification p {
    margin: 2px 0;
    font-size: 11px;
    color: #5a6c7d;
    line-height: 1.3;
}

.virement-notification-inline {
    border: 1px solid #d5dce3;
    border-left: 4px solid #00529b;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: #f8f9fc;
    font-size: 14px;
    color: #5a6c7d;
}

.required-star {
    color: #e74c3c;
    margin-left: 3px;
}

.form-section {
    border: 1px solid #d5dce3;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: white;
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #00529b;
    padding-bottom: 4px;
    border-bottom: 1px solid #d5dce3;
}

.info-text {
    font-size: 13px;
    color: #7a8599;
    margin-bottom: 15px;
}

.form-row {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.form-row label {
    width: 160px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 11px;
}

.form-row select,
.form-row input[type="text"],
.form-row input[type="number"] {
    flex: 1;
    padding: 3px 6px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 11px;
    transition: border 0.2s;
}

.form-row select:focus,
.form-row input:focus {
    outline: none;
    border-color: #00529b;
}

.amount-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.amount-input-wrapper input {
    flex: 1;
}

.currency-label {
    color: #5a6c7d;
    font-size: 11px;
}

.button-row {
    text-align: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #d5dce3;
}

.btn-hold {
    background: #f39c12;
    color: white;
    padding: 5px 12px;
    margin: 0 5px;
    font-size: 11px;
}

.btn-hold:hover {
    background: #e67e22;
}

.btn-validate {
    background: #00529b;
    color: white;
    padding: 5px 14px;
    margin: 0 5px;
    font-size: 11px;
}

.btn-validate:hover {
    background: #003d73;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
    padding: 5px 14px;
    margin: 0 5px;
    font-size: 11px;
}

.btn-cancel:hover {
    background: #c0392b;
}

/* Radio sections */
.radio-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.radio-group {
    flex: 1;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 4px;
}

.radio-group p {
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c3e50;
}

.radio-option {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
}

.radio-option label {
    cursor: pointer;
    width: auto;
    font-weight: normal;
}

/* Receipt styles */
.receipt-success {
    text-align: center;
    padding: 10px;
    background: white;
    border: 1px solid #d5dce3;
    margin-bottom: 8px;
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.success-circle {
    width: 40px;
    height: 40px;
    background: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-check {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.receipt-success h2 {
    color: #00529b;
    font-size: 14px;
    margin: 5px 0;
}

.receipt-success p {
    color: #5a6c7d;
    font-size: 11px;
    margin: 2px 0;
}

.receipt-details {
    background: white;
    border: 1px solid #d5dce3;
    padding: 10px;
}

.receipt-details h3 {
    color: #00529b;
    margin: 0 0 6px 0;
    font-size: 13px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.receipt-table th,
.receipt-table td {
    border: 1px solid #d5dce3;
    padding: 4px 8px;
    font-size: 11px;
    text-align: left;
}

.receipt-table th {
    background: #f5f6f8;
    width: 35%;
    font-weight: 600;
}

.print-button {
    display: block;
    margin: 20px auto 0;
    padding: 12px 30px;
}

@media print {
    body * {
        visibility: hidden;
    }

    #virementReceipt,
    #virementReceipt * {
        visibility: visible;
    }

    #virementReceipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .print-button {
        display: none;
    }
}

@media (max-width: 768px) {
    .bancatous-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .bancatous-logo-wrapper {
        flex-direction: column;
    }

    .consultation-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .compte-info {
        width: 100%;
    }

    .solde-display {
        width: 100%;
    }

    .operations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .operations-buttons {
        width: 100%;
        flex-direction: column;
    }

    .operations-buttons .btn {
        width: 100%;
    }

    .virement-container {
        flex-direction: column;
    }

    .virement-sidebar {
        width: 100%;
    }

    .virement-main {
        max-width: 100%;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row label {
        width: 100%;
        margin-bottom: 5px;
    }

    .form-row select,
    .form-row input {
        width: 100%;
    }

    .amount-input-wrapper {
        width: 100%;
    }

    .radio-section {
        flex-direction: column;
    }

    .button-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .button-row .btn {
        width: 100%;
        margin: 0;
    }
}

/* ===== ONGLETS CONSULTATION BANQUE ===== */
.consultation-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #d5dce3;
    margin-bottom: 20px;
}

.consult-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #5a6c7d;
    transition: all 0.2s;
}

.consult-tab:hover {
    color: #00529b;
    background: #f8f9fa;
}

.consult-tab.active {
    color: #00529b;
    border-bottom-color: #00529b;
    font-weight: 600;
}

/* ===== BARRE DE RECHERCHE ET FILTRES ===== */
.search-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #00529b;
}

.btn-filter-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.2s;
}

.btn-filter-icon:hover {
    border-color: #00529b;
    color: #00529b;
}

.view-buttons {
    display: flex;
    gap: 0;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    overflow: hidden;
}

.btn-view {
    padding: 10px 12px;
    background: white;
    border: none;
    border-right: 1px solid #d5dce3;
    cursor: pointer;
    color: #5a6c7d;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view:last-child {
    border-right: none;
}

.btn-view:hover {
    background: #f8f9fa;
    color: #00529b;
}

.btn-view.active {
    background: #00529b;
    color: white;
}

/* Responsive pour les nouveaux éléments Banque */
@media (max-width: 1024px) {
    .content-area {
        flex-direction: column;
    }
    
    .manage-panel {
        width: 100%;
        order: -1;
    }
    
    .manage-panel.collapsed {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .nav-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #d5dce3;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 10px 15px;
        min-width: 80px;
        text-align: center;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item.active {
        border-left: none;
        border-bottom-color: #00529b;
    }
    
    .nav-item span {
        font-size: 11px;
    }
    
    .consultation-tabs {
        flex-wrap: wrap;
    }

    .consult-tab {
        flex: 1;
        min-width: 100px;
    }

    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .btn-filter-icon {
        width: 100%;
        justify-content: center;
    }

    .view-buttons {
        width: 100%;
    }

    .btn-view {
        flex: 1;
    }
    
    .manage-panel {
        width: 100%;
    }
    
    .collapse-btn {
        display: none;
    }
}


/* ===== STYLE PGI LOGICIEL PROFESSIONNEL ===== */
.pgi-software {
    background: #f5f6fa;
}

.pgi-titlebar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 7px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pgi-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pgi-logo-square {
    width: 50px;
    height: 50px;
    background: white;
    color: #1e3c72;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.pgi-app-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pgi-main-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.pgi-sub-title {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

.pgi-session-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-size: 13px;
}

.pgi-date {
    opacity: 0.95;
}

/* Barre de menu PGI */
.pgi-menubar {
    background: #ffffff;
    border-bottom: 1px solid #d5dce3;
    display: flex;
    padding: 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.pgi-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    color: #5a6c7d;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.pgi-menu-item:hover {
    color: #1e3c72;
    background: #f8f9fa;
}

.pgi-menu-item.active {
    color: #1e3c72;
    border-bottom-color: #1e3c72;
    font-weight: 600;
}

.pgi-panel-full {
    margin: 0;
    border-radius: 0;
}

.pgi-panel-full .panel-content {
    padding: 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-header {
    background: #ffffff;
    border-bottom: 2px solid #e8ebed;
    padding: 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-breadcrumb {
    background: #f8f9fa;
    padding: 12px 80px;
    font-size: 13px;
    color: #5a6c7d;
    border-bottom: 1px solid #d5dce3;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

.pgi-breadcrumb svg {
    color: #95a5a6;
}

.pgi-breadcrumb .active-breadcrumb {
    color: #1e3c72;
    font-weight: 600;
}

/* ===== SIDEBAR NAVIGATION BANQUE ===== */
.bancatous-main-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
    background: #f0f2f5;
}

.bancatous-sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid #d5dce3;
    flex-shrink: 0;
}

.bancatous-nav-menu {
    padding: 10px 0;
}

.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #5a6c7d;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-menu-item:hover {
    background: #f8f9fa;
    color: #00529b;
    border-left-color: #00529b;
}

.nav-menu-item.active {
    background: #00529b;
    color: #ffffff;
    border-left-color: #003d75;
    font-weight: 600;
}

.nav-menu-item.active .nav-menu-icon {
    stroke: #ffffff;
}

/* Niveau 3 : ligne avec erreur de montant (saisie incorrecte au compte 512) */
tr.erreur-montant td {
    background: #fff8e1;
}
tr.erreur-montant td:nth-child(5),
tr.erreur-montant td:nth-child(6) {
    color: #c0392b;
    font-weight: 700;
}

.nav-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}

.bancatous-content-area {
    flex: 1;
    padding: 0;
    min-width: 0;
}

/* Ajustements pour la navigation Bancatous avec sidebar */
.bancatous-nav {
    background: white;
    border-bottom: 1px solid #d5dce3;
}

/* Responsive pour sidebar */
@media (max-width: 768px) {
    .bancatous-main-wrapper {
        flex-direction: column;
    }
    
    .bancatous-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #d5dce3;
    }
    
    .bancatous-nav-menu {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .nav-menu-item {
        flex-direction: column;
        min-width: 80px;
        padding: 10px;
        text-align: center;
        gap: 6px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-menu-item:hover,
    .nav-menu-item.active {
        border-left: none;
        border-bottom-color: #00529b;
    }
    
    .nav-menu-item span {
        font-size: 11px;
    }
    
    .pgi-titlebar {
        padding: 12px 15px;
    }
    
    .pgi-main-title {
        font-size: 16px;
    }
    
    .pgi-sub-title {
        font-size: 11px;
    }
    
    .pgi-menubar {
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .pgi-menu-item {
        white-space: nowrap;
    }
    
    /* Réduire les marges PGI sur mobile */
    .pgi-panel-full .panel-content {
        padding: 20px 15px;
    }
    
    .pgi-header {
        padding: 20px 15px;
    }
    
    .pgi-breadcrumb {
        padding: 12px 15px;
    }
}

/* ===== SIDEBAR INFORMATIONS PGI ===== */
.pgi-content-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.pgi-info-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.pgi-main-content {
    flex: 1;
    min-width: 0;
}

.pgi-info-card {
    background: white;
    border: 1px solid #d5dce3;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pgi-info-title {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e3c72;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #1e3c72;
    padding-bottom: 8px;
}

.pgi-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.pgi-info-item:last-child {
    border-bottom: none;
}

.pgi-info-label {
    font-size: 13px;
    color: #5a6c7d;
    font-weight: 500;
}

.pgi-info-value {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
}

.pgi-solde-highlight {
    color: #1e3c72;
    font-size: 15px;
    font-weight: 700;
}

.pgi-action-btn {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    color: #2c3e50;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.pgi-action-btn:hover {
    background: #f8f9fa;
    border-color: #1e3c72;
    color: #1e3c72;
}

.pgi-action-btn:last-child {
    margin-bottom: 0;
}

.pgi-action-btn svg {
    flex-shrink: 0;
}

/* Responsive PGI sidebar */
@media (max-width: 1024px) {
    .pgi-content-wrapper {
        flex-direction: column;
    }
    
    .pgi-info-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .pgi-info-card {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .pgi-info-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ===== PGI PROFESSIONNEL - APPLICATION ===== */
.pgi-body {
    margin: 0;
    padding: 0;
    background: #e8edf2;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pgi-application {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== EN-TÊTE PROFESSIONNELLE ===== */
.pgi-app-header {
    background: linear-gradient(135deg, #1a2942 0%, #2d4a6e 100%);
    color: white;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1000;
}

.pgi-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pgi-app-icon {
    flex-shrink: 0;
}

.pgi-app-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pgi-app-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.pgi-app-version {
    font-size: 11px;
    opacity: 0.75;
}

.pgi-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.pgi-module-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.pgi-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pgi-user-badge,
.pgi-date-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

/* ===== BARRE D'OUTILS ===== */
.pgi-toolbar {
    background: white;
    border-bottom: 1px solid #d5dce3;
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pgi-toolbar-section {
    display: flex;
    gap: 5px;
}

.pgi-tool-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e8edf2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #2c3e50;
    transition: all 0.2s;
}

.pgi-tool-btn:hover {
    background: #f8f9fa;
    border-color: #2d4a6e;
    color: #2d4a6e;
}

.pgi-tool-btn.active {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
    border-color: #2d4a6e;
}

.pgi-tool-btn svg {
    flex-shrink: 0;
}

/* ===== FIL D'ARIANE PROFESSIONNEL ===== */
.pgi-pro-breadcrumb {
    background: white;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #5a6c7d;
    border-bottom: 1px solid #e8edf2;
}

.breadcrumb-item {
    color: #5a6c7d;
    transition: color 0.2s;
}

.breadcrumb-item.active {
    color: #2d4a6e;
    font-weight: 600;
}

.breadcrumb-arrow {
    color: #95a5a6;
}

/* ===== CONTENU PRINCIPAL ===== */
.pgi-pro-main {
    flex: 1;
    background: #e8edf2;
    padding: 20px 30px;
}

.pgi-panel-content {
    max-width: 1600px;
    margin: 0 auto;
}

/* ===== CARTES PROFESSIONNELLES ===== */
.pgi-pro-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e8edf2;
}

.pgi-card-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e8edf2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgi-card-header svg {
    color: #2d4a6e;
    flex-shrink: 0;
}

.pgi-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pgi-card-body {
    padding: 20px;
}

/* ===== LIGNES D'INFORMATION ===== */
.pgi-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.pgi-info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #5a6c7d;
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
}

/* ===== BADGES ===== */
.badge-primary {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.badge-secondary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

/* ===== STATISTIQUES ===== */
.pgi-card-stats .pgi-card-body {
    padding: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.stat-item:hover {
    background: #e8edf2;
    transform: translateX(4px);
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-debit .stat-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.stat-credit .stat-icon {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.stat-solde .stat-icon {
    background: linear-gradient(135deg, #2d4a6e 0%, #1a2942 100%);
    color: white;
}

.stat-item:not(.stat-debit):not(.stat-credit):not(.stat-solde) .stat-icon {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: #5a6c7d;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 700;
}

.stat-solde-value {
    font-size: 18px;
    color: #2d4a6e;
}

.stat-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #d5dce3 50%, transparent 100%);
    margin: 10px 0;
}

/* ===== BOUTONS PROFESSIONNELS ===== */
.pgi-pro-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.pgi-pro-btn:last-child {
    margin-bottom: 0;
}

.pgi-btn-primary {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(45, 74, 110, 0.3);
}

.pgi-btn-primary:hover {
    background: linear-gradient(135deg, #3a5a84 0%, #4a6a94 100%);
    box-shadow: 0 4px 12px rgba(45, 74, 110, 0.4);
    transform: translateY(-1px);
}

.pgi-btn-secondary {
    background: white;
    color: #2c3e50;
    border: 1.5px solid #d5dce3;
}

.pgi-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #2d4a6e;
    color: #2d4a6e;
}

/* ===== TABLEAU PROFESSIONNEL ===== */
.pgi-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pgi-table thead {
    background: linear-gradient(135deg, #2d4a6e 0%, #3a5a84 100%);
    color: white;
}

.pgi-table th {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.pgi-table tbody tr {
    background: white;
    transition: all 0.2s;
}

.pgi-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.pgi-table tbody tr:hover {
    background: #e8f4f8;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(45, 74, 110, 0.15);
}

.pgi-table tbody tr.pointed {
    background: linear-gradient(90deg, #d5f4e6 0%, #e8f8f0 100%);
}

.pgi-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8edf2;
    font-size: 13px;
    color: #2c3e50;
}

/* ===== PIED DE PAGE PROFESSIONNEL ===== */
.pgi-pro-footer {
    background: linear-gradient(135deg, #1a2942 0%, #2d4a6e 100%);
    color: white;
    padding: 12px 30px;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    font-size: 12px;
}

.footer-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-separator {
    opacity: 0.5;
}

.footer-right {
    opacity: 0.9;
}

/* ===== RESPONSIVE PROFESSIONNEL ===== */
@media (max-width: 1024px) {
    .pgi-app-header {
        padding: 12px 20px;
    }
    
    .pgi-toolbar {
        padding: 8px 20px;
    }
    
    .pgi-pro-breadcrumb {
        padding: 12px 20px;
    }
    
    .pgi-pro-main {
        padding: 15px 20px;
    }
    
    .pgi-module-badge {
        display: none;
    }
}

@media (max-width: 768px) {
    .pgi-app-header {
        padding: 10px 15px;
    }
    
    .pgi-app-name {
        font-size: 14px;
    }
    
    .pgi-app-version {
        display: none;
    }
    
    .pgi-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .pgi-toolbar-section {
        width: 100%;
        overflow-x: auto;
    }
    
    .pgi-tool-btn span {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
}


/* ===== STYLES D'IMPRESSION PGI - CORRIGÉS ===== */
@media print {
    /* Configuration de la page */
    @page {
        size: A4 portrait;
        margin: 12mm 10mm;
    }
    
    /* Réinitialiser le body */
    body, 
    .pgi-body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    
    /* Masquer les éléments d'interface */
    .pgi-app-header,
    .pgi-toolbar,
    .pgi-pro-breadcrumb,
    .pgi-info-sidebar,
    .pgi-pro-footer,
    .actions-bar,
    .add-operation-form,
    #notification,
    button,
    .btn,
    .pgi-pro-btn,
    .pgi-action-btn,
    .pgi-breadcrumb {
        display: none !important;
    }
    
    /* Container principal */
    .pgi-application {
        display: block !important;
        background: white !important;
    }
    
    .pgi-pro-main {
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }
    
    .pgi-panel-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Wrapper de contenu */
    .pgi-content-wrapper {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .pgi-main-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    /* FORCER l'affichage du tableau */
    .table-container,
    .pgi-table,
    .pgi-table thead,
    .pgi-table tbody,
    .pgi-table tr,
    .pgi-table th,
    .pgi-table td {
        display: table !important;
    }
    
    .pgi-table {
        display: table !important;
    }
    
    .pgi-table thead,
    .pgi-table tbody {
        display: table-row-group !important;
    }
    
    .pgi-table tr {
        display: table-row !important;
    }
    
    .pgi-table th,
    .pgi-table td {
        display: table-cell !important;
    }
    
    /* En-tête du document imprimé */
    .pgi-panel-content::before {
        content: "PGI ENTREPRISE - EXTRAIT DE COMPTE";
        display: block;
        font-size: 18px;
        font-weight: bold;
        text-align: center;
        padding: 10px 0;
        margin-bottom: 8px;
        border-bottom: 3px solid #2d4a6e;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Sous-titre */
    .pgi-panel-content::after {
        content: "Compte 512 - Banque Bancatous";
        display: block;
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        padding: 5px 0;
        margin-bottom: 15px;
        color: #2d4a6e;
    }
    
    /* En-tête statistiques */
    .print-header-stats {
        display: block !important;
        background: #f8f9fa !important;
        padding: 12px !important;
        margin: 0 15px 15px !important;
        border: 2px solid #d5dce3 !important;
        border-radius: 6px !important;
        font-size: 11px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
    }
    
    .print-header-stats > div {
        display: flex !important;
        justify-content: space-around !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .print-header-stats strong {
        color: #2d4a6e !important;
        font-weight: 700 !important;
    }
    
    /* Container du tableau */
    .table-container {
        margin: 0 15px !important;
        padding: 0 !important;
        overflow: visible !important;
        page-break-inside: avoid;
    }
    
    /* Tableau optimisé */
    .pgi-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9px !important;
        box-shadow: none !important;
        border: 1px solid #2d4a6e !important;
    }
    
    /* En-tête du tableau */
    .pgi-table thead {
        background: #2d4a6e !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pgi-table th {
        padding: 8px 5px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        border: 1px solid #2d4a6e !important;
        text-align: left !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Cellules du tableau */
    .pgi-table td {
        padding: 6px 5px !important;
        font-size: 9px !important;
        border: 1px solid #999 !important;
        color: #000 !important;
    }
    
    /* Lignes du tableau */
    .pgi-table tbody tr {
        background: white !important;
        page-break-inside: avoid;
    }
    
    .pgi-table tbody tr:nth-child(even) {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pgi-table tbody tr.pointed {
        background: #d5f4e6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Largeurs de colonnes optimisées */
    .pgi-table th:nth-child(1), 
    .pgi-table td:nth-child(1) {
        width: 40px !important;
        text-align: center !important;
    }
    
    .pgi-table th:nth-child(2), 
    .pgi-table td:nth-child(2) {
        width: 75px !important;
    }
    
    .pgi-table th:nth-child(4), 
    .pgi-table td:nth-child(4) {
        width: 90px !important;
    }
    
    .pgi-table th:nth-child(5), 
    .pgi-table td:nth-child(5),
    .pgi-table th:nth-child(6), 
    .pgi-table td:nth-child(6) {
        width: 85px !important;
        text-align: right !important;
    }
    
    /* Checkbox */
    input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
        margin: 0 auto !important;
        display: inline-block !important;
        -webkit-appearance: checkbox !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Classes de montant */
    .amount.debit,
    .amount.credit {
        font-weight: 600 !important;
    }
    
    /* Footer du document */
    .pgi-panel-content .pgi-content-wrapper::after {
        content: "© CERPEG - PGI Entreprise v2024.1";
        display: block;
        font-size: 9px;
        text-align: center;
        padding: 12px 0 0 0;
        margin-top: 15px;
        border-top: 1px solid #ccc;
        color: #666;
        page-break-inside: avoid;
    }
    
    /* Éviter les sauts de page dans le tableau */
    table, thead, tbody, tr {
        page-break-inside: avoid !important;
    }
    
    /* Optimisation espace */
    * {
        box-sizing: border-box !important;
    }
    
    html, body {
        height: auto !important;
        overflow: visible !important;
    }
}

/* Styles pour le résumé statistiques */
.print-header-stats {
    display: none;
}

/* ===== FOOTER ADAPTATIF ===== */
body { display: flex; flex-direction: column; min-height: 100vh; }

.pgi-pro-footer {
    margin-top: auto;
    flex-shrink: 0;
}

.footer {
    margin-top: auto;
    flex-shrink: 0;
    text-align: center;
    padding: 12px 16px;
    background: #f5f8fc;
    border-top: 1px solid #dce4ef;
    font-size: 12px;
    color: #9aabbf;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        font-size: 11px;
    }
    .footer-right { display: none; }
    .pgi-pro-footer { padding: 10px 16px; }
}

@media (max-width: 480px) {
    .footer-content { font-size: 10px; }
    .footer-separator { display: none; }
    .footer-left { flex-direction: column; gap: 2px; }
}

/* ===== IMPRESSION DU SCORE ===== */
@media print {
    #scoreOverlay,
    #scoreOverlay * {
        /* Ne jamais masquer le panneau score en impression native
           — on utilise plutôt la fenêtre dédiée via imprimerScore() */
    }
    /* Si impression lancée depuis la page principale */
    body.print-score #scoreOverlay {
        position: static;
        background: none;
    }
    body.print-score #scoreOverlay > * {
        box-shadow: none;
        border-radius: 0;
    }
    body.print-score .score-footer-btns {
        display: none !important;
    }
}

/* ===== LIGNE ERREUR DE MONTANT (niveau 3) ===== */
tr.erreur-montant td {
    background: #fff8e1;
}
tr.erreur-montant td:nth-child(5),
tr.erreur-montant td:nth-child(6) {
    color: #c0392b;
    font-weight: 700;
}


/* ================================================================
   RESPONSIVE — colonnes compactes selon largeur d'écran
   ================================================================ */

/* 15 pouces ~ 1366×768 → chaque panneau fait ~640px */
@media (max-width: 1440px) {
    .pgi-table th, .pgi-table td,
    .operations-table th, .operations-table td {
        font-size: 11.5px;
        padding: 4px 6px;
    }
}

/* Tablette / petit écran */
@media (max-width: 1024px) {
    .pgi-table th, .pgi-table td,
    .operations-table th, .operations-table td {
        font-size: 11px;
        padding: 4px 5px;
    }
    /* Masquer "Date op." BancAtous sur petit écran */
    .operations-table th:nth-child(5),
    .operations-table td:nth-child(5) {
        display: none;
    }
}

/* Panneaux empilés sur mobile */
@media (max-width: 900px) {
    .rb-panels { flex-direction: column !important; height: auto !important; overflow: visible !important; }
    .rb-panel { max-height: 60vh; }
    .rb-panel-content { max-height: calc(60vh - 36px); overflow-y: auto; }
    .rb-topbar-meta { display: none; }
    .rb-actionbar { padding: 6px 12px; gap: 6px; }
    .rb-btn { padding: 5px 10px; font-size: 12px; }
    .pgi-info-sidebar { display: none !important; }
    .pgi-main-content { width: 100% !important; }
    .pgi-table th, .pgi-table td,
    .operations-table th, .operations-table td {
        font-size: 11px;
        padding: 3px 5px;
    }
    /* Masquer Référence sur mobile */
    .pgi-table th:nth-child(4),
    .pgi-table td:nth-child(4),
    .operations-table th:nth-child(4),
    .operations-table td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 600px) {
    .rb-topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; }
    .rb-btn span { display: none; }
    .rb-btn { padding: 6px; min-width: 34px; justify-content: center; }
    #_rb_chrono_wrap { top: auto !important; bottom: 10px !important; right: 10px !important; }
    #_rb_chrono { font-size: 18px !important; }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }
    html, body {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    .rb-topbar,
    .rb-actionbar,
    .rb-btn-print,
    #btnImprimerScore,
    .rb-chrono-widget,
    #scoreOverlay {
        display: none !important;
    }
    .rb-wrapper {
        height: auto !important;
        overflow: visible !important;
    }
    .rb-panels {
        height: auto !important;
        overflow: visible !important;
        flex-direction: row !important;
        page-break-inside: avoid;
    }
    .rb-panel {
        overflow: visible !important;
        height: auto !important;
    }
    .rb-panel-content {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    .bancatous-main-wrapper,
    .bancatous-content-area {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    table {
        font-size: 9px !important;
        page-break-inside: avoid;
    }
    td, th {
        padding: 2px 4px !important;
    }
}


/* ================================================================
   STYLES COMPLÉMENTAIRES (extraits du HTML — rapprochement-n2.html)
   Certaines règles ci-dessous peuvent affiner ou surcharger ce qui précède.
   ================================================================ */

/* ── Layout fusionné ── */
        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        html,
        body {
            margin: 0;
            height: 100%;
            font-family: 'Segoe UI', Arial, sans-serif;
            background: #edf1f7;
        }

        /* Barre de niveau en haut */
        .rb-topbar {
            background: #e67e22;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            height: 44px;
            gap: 16px;
            flex-shrink: 0;
        }

        .rb-topbar-left {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 13px;
        }

        .rb-topbar-left strong {
            font-size: 14px;
            font-weight: 700;
        }

        .rb-topbar-meta {
            display: flex;
            gap: 16px;
            font-size: 12px;
            opacity: .85;
        }

        .rb-topbar-meta span {
            white-space: nowrap;
        }

        /* Barre d'actions */
        .rb-actionbar {
            background: #1a2b4a;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 20px;
            flex-shrink: 0;
            flex-wrap: wrap;
        }

        .rb-actionbar-label {
            font-size: 12px;
            color: rgba(255, 255, 255, .55);
            margin-right: 4px;
            white-space: nowrap;
        }

        .rb-btn {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 7px 16px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: opacity .15s, transform .1s;
            white-space: nowrap;
        }

        .rb-btn:hover {
            opacity: .88;
            transform: translateY(-1px);
        }

        .rb-btn-validate {
            background: #e67e22;
            color: #fff;
        }

        .rb-btn-print {
            background: rgba(255, 255, 255, .12);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, .25);
        }

        .rb-btn-pdf {
            background: rgba(255, 255, 255, .12);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, .25);
        }

        .rb-score-pill {
            margin-left: auto;
            background: rgba(255, 255, 255, .12);
            border: 1px solid rgba(255, 255, 255, .2);
            border-radius: 20px;
            padding: 4px 14px;
            font-size: 13px;
            font-weight: 700;
            color: #fff;
            display: none;
        }

        .rb-score-pill.visible {
            display: block;
        }

        /* ── Chrono inline dans la barre d'actions ── */
        #rb-action-chrono {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(0, 0, 0, .25);
            border: 1.5px solid rgba(255, 255, 255, .15);
            border-radius: 8px;
            padding: 5px 14px 5px 12px;
            font-family: inherit;
            transition: background .3s, border-color .3s;
        }

        #rb-action-chrono .ac-lbl {
            font-size: 9px;
            font-weight: 700;
            color: rgba(255, 255, 255, .45);
            text-transform: uppercase;
            letter-spacing: 1.2px;
            line-height: 1;
            white-space: nowrap;
        }

        #rb-chrono-digits {
            display: flex;
            align-items: baseline;
            gap: 3px;
        }

        #rb-action-time {
            font-size: 20px;
            font-weight: 800;
            color: #fff;
            letter-spacing: 2px;
            font-variant-numeric: tabular-nums;
            line-height: 1;
            transition: color .3s;
        }

        #rb-chrono-unit {
            font-size: 10px;
            font-weight: 700;
            color: rgba(255, 255, 255, .5);
            letter-spacing: .5px;
            text-transform: lowercase;
            line-height: 1;
        }

        #rb-action-time.warn {
            color: #ffb347;
        }

        #rb-action-time.crit {
            color: #ff5050;
            animation: _rb_pulse 1s infinite;
        }

        #rb-action-time.over {
            color: #ff3333;
        }

        #rb-action-chrono.chrono-over {
            background: rgba(180, 0, 0, .3);
            border-color: rgba(255, 60, 60, .5);
        }

        #rb-pen-badge {
            font-size: 9px;
            font-weight: 700;
            background: #c0392b;
            color: #fff;
            border-radius: 10px;
            padding: 2px 6px;
            display: none;
            white-space: nowrap;
        }

        /* Zone principale : deux panneaux côte à côte */
        .rb-panels {
            display: flex;
            gap: 0;
            flex: 1;
            overflow: hidden;
            min-height: 0;
        }

        .rb-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-width: 0;
        }

        .rb-panel-left {
            border-right: 3px solid #edf1f7;
        }

        .rb-panel-label {
            background: #fff;
            border-bottom: 2px solid #edf1f7;
            padding: 8px 16px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #8a9ab8;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .rb-panel-label svg {
            opacity: .6;
        }

        .rb-panel-content {
            flex: 1;
            overflow: auto;
            /* Chaque panneau scroll indépendamment */
        }

        /* Wrapper page */
        .rb-wrapper {
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        /* Masquer les éléments inutiles dans la page fusionnée */
        .pgi-application {
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .pgi-pro-footer {
            display: none !important;
        }

        /* Surcharge : le PGI prend toute la hauteur disponible dans son panneau */
        .pgi-pro-main {
            flex: 1;
            overflow-y: auto;
            padding: 12px 16px;
        }

        /* Le bandeau bancatous sans scroll externe */
        .bancatous-container {
            height: 100%;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .bancatous-main-wrapper {
            flex: 1;
            overflow: hidden;
        }

        .bancatous-content-area {
            overflow-y: auto;
            height: 100%;
            padding: 0 12px;
        }

        .footer {
            display: none !important;
        }

        /* ── Modal score ── */
        #scoreOverlay {
            font-family: 'Segoe UI', Arial, sans-serif;
        }

        @media (max-width: 900px) {
            .rb-panels {
                flex-direction: column;
            }

            .rb-panel-left {
                border-right: none;
                border-bottom: 3px solid #edf1f7;
            }

            .rb-topbar-meta {
                display: none;
            }
        }

        .rb-topbar {
            background: #52b788;
        }

        .rb-btn-validate {
            background: #52b788;
            color: #fff;
        }

        .rb-panel-left .rb-panel-label {
            background: linear-gradient(90deg, #2c3545, #3a4556);
            color: #fff;
            border-bottom: none;
        }

        .rb-panel-right .rb-panel-label {
            background: linear-gradient(90deg, #00529b, #0073d0);
            color: #fff;
            border-bottom: none;
        }

        .rb-panel-left {
            border-right: 4px solid #2c3545 !important;
        }

        .pgi-app-header {
            background: linear-gradient(135deg, #2c3545, #3a4556) !important;
        }

        .pgi-tool-btn.active {
            background: #eaedf2 !important;
            color: #2c3545 !important;
            border-color: #c8cdd8 !important;
        }

        .pgi-pro-breadcrumb {
            background: #f5f6f8 !important;
            border-bottom-color: #d0d5dd !important;
        }

        .breadcrumb-item.active {
            color: #2c3545 !important;
            font-weight: 600;
        }

        .pgi-table thead th {
            background: #3a4556 !important;
            color: #fff !important;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: .5px;
        }

        .pgi-table .debit,
        .pgi-table .credit {
            color: inherit !important;
        }

        .pgi-table tbody tr:nth-child(even):not(.pointed):not(.erreur-montant) td {
            background: #f8f9fb;
        }

        td.col-solde {
            background: #f0f4fb;
            color: #2c3545;
            font-weight: 700;
        }

        td.col-solde-neg {
            background: #fff0f0;
            color: #b91c1c;
            font-weight: 700;
        }

        .pgi-total-row td {
            background: #2c3545 !important;
            color: #fff !important;
            font-weight: 700;
        }

        .pointed td {
            background: #e8eef8 !important;
        }

        #bankTableBody tr td {
            font-size: 12px !important;
            padding: 5px 8px !important;
        }

        .operations-table th {
            font-size: 11px !important;
            padding: 6px 8px !important;
        }

        .banc-group {
            border-bottom: 1px solid #e8eef5;
        }

        .banc-group-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 11px 14px;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 13.5px;
            color: #3a4a60;
            text-align: left;
        }

        .banc-group-btn:hover {
            background: #f0f4fa;
            color: #00529b;
        }

        .banc-group-btn.banc-open {
            background: #eaf2fb;
            color: #00529b;
            font-weight: 600;
        }

        .banc-chevron {
            margin-left: auto;
            flex-shrink: 0;
            transition: transform .25s;
            stroke: #9aabbf;
        }

        .banc-group-btn.banc-open .banc-chevron {
            transform: rotate(180deg);
            stroke: #00529b;
        }

        .nav-menu-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            stroke: #6a7e90;
        }

        .banc-sub {
            max-height: 0;
            overflow: hidden;
            transition: max-height .3s ease;
            background: #fafcff;
        }

        .banc-sub.open {
            max-height: 200px;
        }

        .banc-sub-item {
            display: block;
            padding: 7px 14px 7px 44px;
            font-size: 12.5px;
            color: #5a6a80;
            text-decoration: none;
        }

        .banc-sub-item:hover {
            background: #eaf2fb;
            color: #00529b;
        }

        .justif-panel {
            margin: 12px 0 0;
            background: #fffbf4;
            border: 2px solid #e8a030;
            border-radius: 8px;
            overflow: hidden;
            font-size: 12px;
        }

        .justif-hdr {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 14px;
            background: linear-gradient(90deg, #7a3a08, #b86010);
            color: #ffd980;
            cursor: pointer;
            user-select: none;
        }

        .justif-hdr span {
            font-weight: 700;
            font-size: 11.5px;
            letter-spacing: .5px;
            text-transform: uppercase;
            color: #ffd980;
        }

        .add-op-note {
            font-size: 11.5px;
            color: #7a8fa0;
            margin-bottom: 10px;
            background: #f0f4fb;
            padding: 7px 10px;
            border-radius: 6px;
            border-left: 3px solid #2c3545;
        }

        .table-container {
            overflow-x: auto;
        }

        .pgi-table {
            min-width: 510px;
        }

        .operations-table {
            min-width: 420px;
        }

        @media(max-width:900px) {
            .rb-panels {
                flex-direction: column !important;
            }

            .rb-topbar-meta {
                display: none;
            }
        }

        @media(max-width:600px) {
            .rb-btn span {
                display: none;
            }

            .rb-btn {
                padding: 6px;
                min-width: 34px;
                justify-content: center;
            }
        }

        /* ── Fil d'Ariane PGI ── */
        .pgi-breadcrumb-bar {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 6px 16px;
            background: #f5f6f8;
            border-bottom: 1px solid #d0d5dd;
            font-size: 11.5px;
            color: #7a8fa0;
            flex-wrap: wrap;
            flex-shrink: 0;
        }

        .bc-item {
            color: #5a6a80;
        }

        .bc-sep {
            color: #b0bec5;
            font-size: 12px;
        }

        .bc-active {
            color: #2c3545;
            font-weight: 700;
        }

        .pgi-breadcrumb-bar svg {
            opacity: .5;
            flex-shrink: 0;
        }

        /* ── Sidebar 512 repliable via bouton Comptabilité ── */
        #pgiSidebar512 {
            transition: width .25s ease, opacity .2s ease, padding .2s;
            overflow: hidden;
        }

        #pgiSidebar512.collapsed {
            width: 0 !important;
            opacity: 0;
            padding: 0;
            overflow: hidden;
        }

        #btnComptabilite.sidebar-closed {
            background: #eaedf2;
            color: #6a7e90;
        }

        /* ═══════════════════════════════════════════════════════════
   BOÎTES DE DIALOGUE PERSONNALISÉES
   ═══════════════════════════════════════════════════════════ */
        #rb-modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(10, 20, 40, 0.55);
            z-index: 99999;
            align-items: center;
            justify-content: center;
            font-family: 'Segoe UI', Arial, sans-serif;
        }

        #rb-modal-overlay.open {
            display: flex;
        }

        #rb-modal-box {
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
            min-width: 320px;
            max-width: 440px;
            width: 90%;
            overflow: hidden;
            animation: rbModalIn .18s ease;
        }

        @keyframes rbModalIn {
            from {
                opacity: 0;
                transform: translateY(-14px) scale(.97);
            }

            to {
                opacity: 1;
                transform: none;
            }
        }

        #rb-modal-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 18px 12px;
            border-bottom: 1px solid #e8edf2;
        }

        #rb-modal-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        #rb-modal-title {
            font-size: 13.5px;
            font-weight: 700;
            color: #1a2b4a;
            flex: 1;
        }

        #rb-modal-body {
            padding: 14px 18px;
            font-size: 12.5px;
            color: #3a4a5c;
            line-height: 1.5;
            white-space: pre-line;
        }

        #rb-modal-footer {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            padding: 10px 18px 14px;
            border-top: 1px solid #f0f4f8;
        }

        .rb-modal-btn {
            padding: 6px 16px;
            border-radius: 5px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: opacity .15s;
        }

        .rb-modal-btn:hover {
            opacity: .85;
        }

        .rb-modal-btn-cancel {
            background: #f0f4fb;
            color: #5a6a80;
            border: 1px solid #c5d3e0;
        }

        .rb-modal-btn-confirm {
            background: #1a2b4a;
            color: #fff;
        }

        .rb-modal-btn-confirm.danger {
            background: #c0392b;
        }

        .rb-modal-btn-confirm.success {
            background: #27ae60;
        }

        .rb-modal-btn-confirm.info {
            background: #00529b;
        }

        /* Notification toast custom */
        #rb-toast {
            display: none;
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            background: #1a2b4a;
            color: #fff;
            font-size: 12px;
            padding: 9px 18px 9px 12px;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
            z-index: 99998;
            max-width: 480px;
            align-items: center;
            gap: 9px;
            opacity: 0;
            transition: opacity .2s, transform .2s;
            white-space: pre-line;
        }

        #rb-toast.open {
            display: flex;
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        #rb-toast-icon {
            flex-shrink: 0;
        }

        #rb-toast-msg {
            flex: 1;
            line-height: 1.45;
        }

        #rb-toast.success {
            border-left: 4px solid #27ae60;
        }

        #rb-toast.error {
            border-left: 4px solid #c0392b;
        }

        #rb-toast.info {
            border-left: 4px solid #00529b;
        }

        #rb-toast.warning {
            border-left: 4px solid #e67e22;
        }
