/* Banque — styles PROPRES AU MODULE.
 * La charte (tokens, base, fenêtre, navigation, primitives) vient de
 * shared/charte.css, chargée avant ce fichier. Ne pas y redéfinir les tokens.
 */
/* KARBON-BOX Banque — Charte KARBON-BOX (alignée lm.fiscality.fr) */

a { color: var(--wiki-link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--wiki-link-hover); }
svg { display: inline-block; vertical-align: middle; }

/* ===== MEGA HEADER — charte LM (blanc épuré, sticky) ===== */
.kb-mega-header {
  background: var(--kb-surface);
  border-bottom: 1px solid var(--kb-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: sticky; top: 0; z-index: 100;
  color: var(--kb-text);
}
.mega-row {
  max-width: 1400px; margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; gap: 12px;
}
.mega-row-top {
  min-height: 48px;
  border-bottom: 1px solid var(--kb-border);
}
.mega-row-bottom {
  min-height: 44px;
  flex-wrap: wrap;
}
.mega-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.mega-right { display: flex; align-items: center; gap: 12px; }

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-img {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--kb-primary), var(--kb-primary-dark));
  color: white; display: grid; place-items: center;
  font-weight: 800; font-size: 16px;
}
.logo-text {
  font-size: 16px; font-weight: 800; color: var(--kb-text);
  letter-spacing: -0.3px; line-height: 1;
}
.logo-text small {
  display: block; font-size: 9px; color: var(--kb-muted);
  font-weight: 600; letter-spacing: 0.8px; margin-top: 2px;
}

.section-divider {
  color: var(--kb-muted); font-size: 22px; font-weight: 300;
}
.section-title {
  font-size: 17px; font-weight: 700; color: var(--kb-primary-dark);
}

.cross-nav { display: flex; gap: 4px; }
.cross-nav a {
  color: var(--kb-muted); font-size: 13px;
  padding: 6px 12px; border-radius: 5px;
  transition: all 0.12s; font-weight: 600;
}
.cross-nav a:hover {
  background: #f0f0f2;
  color: var(--kb-text);
  text-decoration: none;
}

.vsep {
  width: 1px; height: 22px; background: var(--kb-border);
}

.user-info {
  font-size: 13px; color: var(--kb-muted); font-weight: 600;
}
.user-info strong { color: var(--kb-text); font-weight: 700; }

/* ===== Sélecteur de cabinet (header top) ===== */
.cabinet-selector label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--kb-muted);
  font-weight: 600; cursor: pointer;
}
.cabinet-selector label svg { color: var(--kb-muted) !important; }
.cabinet-selector select {
  padding: 5px 10px; border: 1px solid var(--kb-border);
  border-radius: 5px; background: white; font-size: 13px;
  font-family: inherit; font-weight: 700; color: var(--kb-text);
  cursor: pointer; min-width: 140px;
  transition: all 0.12s;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  padding-right: 24px;
}
.cabinet-selector select option { color: var(--wiki-text); background: white; }
.cabinet-selector select:hover { border-color: var(--kb-primary); }
.cabinet-selector select:focus {
  outline: none; border-color: var(--kb-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.10);
}

.logout-link {
  color: var(--kb-danger); padding: 6px 8px;
  border-radius: 5px; text-decoration: none;
  display: inline-flex; align-items: center;
  transition: all 0.12s;
}
.logout-link svg { width: 16px; height: 16px; }
.logout-link:hover {
  background: #fdeceb;
  color: var(--kb-danger);
  text-decoration: none;
}

/* ===== MAIN ===== */
.columns {
  max-width: 1400px; margin: 0 auto;
  padding: 16px 20px;
}
.main-content { min-width: 0; }
.status-count { display: flex; gap: 6px; }

.toolbar-spacer { flex: 1; }

.year-selector {
  display: flex; align-items: center; gap: 4px;
}
.year-selector label {
  font-size: 12px; color: var(--kb-muted); font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.year-selector select {
  padding: 5px 10px; border: 1px solid var(--kb-border);
  border-radius: 5px; background: white; font-size: 13px;
  font-weight: 700; font-family: inherit; cursor: pointer;
  min-width: 70px; color: var(--kb-text);
  transition: all 0.12s;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  padding-right: 24px;
}
.year-selector select option { color: var(--wiki-text); background: white; }
.year-selector select:hover { border-color: var(--kb-primary); }
.year-selector select:focus {
  outline: none; border-color: var(--kb-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.10);
}
.year-nav {
  width: 28px; height: 28px;
  background: white; border: 1px solid var(--kb-border);
  border-radius: 5px; cursor: pointer;
  color: var(--kb-muted);
  display: grid; place-items: center;
  transition: all 0.12s; padding: 0;
}
.year-nav svg { width: 14px; height: 14px; }
.year-nav:hover:not(:disabled) {
  background: var(--kb-primary-light);
  border-color: var(--kb-primary); color: var(--kb-primary-dark);
}
.year-nav:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-relance {
  background: white; color: var(--kb-text);
  padding: 6px 12px; border: 1px solid var(--kb-border);
  border-radius: 6px;
  font-weight: 600; font-size: 13px; cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.btn-relance svg { width: 15px; height: 15px; color: var(--kb-muted); }
.btn-relance:hover {
  background: #fbfbfc;
  color: var(--kb-primary); border-color: var(--kb-primary);
}
.btn-relance:hover svg { color: var(--kb-primary); }
.btn-relance:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-create {
  background: var(--kb-primary);
  color: white;
  padding: 7px 16px; border: none;
  border-radius: 6px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.btn-create svg { width: 14px; height: 14px; }
.btn-create:hover {
  background: var(--kb-primary-dark);
  color: white; text-decoration: none;
}

/* ===== DataTables controls ===== */
.dt-controls {
  display: flex; justify-content: space-between; align-items: center;
  margin: 10px 0; font-size: 13px;
}
.dt-length label { color: #575757; }
.dt-length select {
  padding: 4px 10px; border: 1px solid var(--indigo-200);
  border-radius: 5px; background: rgba(255,255,255,0.8); font-size: 13px;
  margin: 0 4px; cursor: pointer; font-family: inherit;
  transition: all 0.12s;
}
.dt-length select:hover { border-color: var(--indigo-400); }
.dt-length select:focus {
  outline: none; border-color: var(--indigo-600);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.18);
}
.dt-filter input {
  padding: 7px 12px; border: 1px solid var(--indigo-200);
  border-radius: 5px; font-size: 13px; width: 260px;
  background: rgba(255,255,255,0.8); font-family: inherit;
  transition: all 0.12s;
}
.dt-filter input:focus {
  outline: none; border-color: var(--indigo-600);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.18);
  background: white;
}

/* ===== TABLE ===== */
.table-wrap {
  border: 1px solid #e2e2e6;
  overflow: auto;
  max-height: calc(100vh - 250px);
  position: relative;
}
table.bank {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #333;
}
table.bank thead th {
  background: linear-gradient(135deg, #0a84ff 0%, #0060df 100%);
  color: white;
  text-align: center;
  font-weight: 700;
  padding: 10px 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  vertical-align: middle;
  font-size: 12px;
  white-space: nowrap;
  position: sticky; top: 0; z-index: 3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}
table.bank thead th:last-child { border-right: none; }
table.bank thead th.date-column {
  padding: 7px 0 0 0;
  text-transform: none; letter-spacing: 0;
  font-size: 13px; font-weight: 700;
}
table.bank .suivi {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
  table-layout: fixed;
}
table.bank .suivi td {
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 0;
  font-size: 11px;
  font-weight: 800;             /* extra-bold pour bien voir */
  color: #ffffff;
  text-align: center;
  background: rgba(0, 0, 0, 0.15); /* fond plus sombre pour contraste max */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.3px;
}

table.bank tbody td {
  padding: 6px 8px;
  border-right: 1px solid var(--wiki-border-light);
  border-bottom: 1px solid var(--wiki-border-light);
  vertical-align: middle;
}
table.bank tbody td:last-child { border-right: none; }
table.bank tbody tr.odd { background: var(--wiki-bg-faint); }
table.bank tbody tr.even { background: white; }
table.bank tbody tr:hover { background: var(--wiki-hover-row); }
table.bank tbody tr:hover td { transition: background-color 0.08s; }
table.bank td.sorting_1 { font-weight: 700; color: var(--wiki-text); }

/* Sticky 1ère colonne (N°) — combinateur ENFANT DIRECT (>) obligatoire :
   sinon la règle attrape aussi la 1ère cellule des sous-tableaux de mois
   (colonne Janvier) et lui met un fond blanc par-dessus sa couleur de statut. */
table.bank > thead > tr > th:first-child,
table.bank > tbody > tr > td:first-child {
  position: sticky; left: 0; z-index: 2;
  background: white;
}
table.bank > thead > tr > th:first-child { background: linear-gradient(135deg, #0a84ff 0%, #0060df 100%); z-index: 4; }
table.bank > tbody > tr.odd > td:first-child { background: var(--wiki-bg-faint); }
table.bank > tbody > tr:hover > td:first-child { background: var(--wiki-hover-row); }

/* Sticky dernière colonne (Actions) — même exigence : enfant direct uniquement,
   sinon la dernière cellule des sous-tableaux (dernier mois) hérite du fond blanc + ombre. */
table.bank > thead > tr > th:last-child,
table.bank > tbody > tr > td:last-child {
  position: sticky; right: 0; z-index: 2;
  background: white;
  min-width: 110px;
  border-left: 2px solid var(--wiki-border);
  box-shadow: -3px 0 4px -2px rgba(0,0,0,0.08);
}
table.bank > thead > tr > th:last-child { background: linear-gradient(135deg, #0a84ff 0%, #0060df 100%); z-index: 4; }
table.bank > tbody > tr.odd > td:last-child { background: var(--wiki-bg-faint); }
table.bank > tbody > tr:hover > td:last-child { background: var(--wiki-hover-row); }

table.bank .bank-name {
  font-size: 12px; line-height: 1.4;
  min-width: 230px; max-width: 280px;
  white-space: nowrap;
}
table.bank .bank-name strong {
  display: block; font-weight: 600; color: var(--wiki-text);
  overflow: hidden; text-overflow: ellipsis;
  max-width: 260px;
}
table.bank .bank-name small.iban-line {
  display: block; color: #777;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  font-size: 11px; letter-spacing: 0.3px;
  margin-top: 2px;
  white-space: nowrap;        /* IBAN sur 1 ligne, jamais coupé */
  overflow: visible;
}

/* OCR / Cheque cell (legacy) */
td.ocr, td.cheque { padding: 4px !important; text-align: center; width: 32px; }
td.ocr > div, td.cheque > div {
  width: 22px; height: 22px;
  border-radius: 2px;
  margin: 0 auto;
}
td.ocr .green, td.cheque .green { background: var(--wiki-status-green); }
td.ocr .red, td.cheque .red { background: var(--wiki-status-red); }
td.ocr .gray, td.cheque .gray { background: var(--wiki-status-gray); }
td.ocr .blue, td.cheque .blue { background: var(--wiki-status-blue); }
td.ocr .orange, td.cheque .orange { background: var(--wiki-status-orange); }

/* EBICS + Chèque (nouvelles colonnes) */
th.ebics-h, th.cheque-h { width: 56px; min-width: 56px; padding: 9px 4px !important; }
td.ebics-c, td.cheque-c {
  width: 56px; min-width: 56px;
  text-align: center; padding: 6px 4px !important;
}
td.ebics-c .dot, td.cheque-c .dot {
  display: inline-block; width: 18px; height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  cursor: help;
}
.dot.gray   { background: linear-gradient(135deg, #d4d5da, #a1a1a6); }
.dot.green  { background: linear-gradient(135deg, #4ade80, #1a9d54); }
.dot.red    { background: linear-gradient(135deg, #f87171, #d70015); }
.dot.blue   { background: linear-gradient(135deg, #9dc9ff, #0a84ff); }
.dot.orange { background: linear-gradient(135deg, #fb923c, #c77700); }

/* Date columns (months sub-grid) — couleurs Wikitoria */
td.date-column { padding: 0 !important; }
td.date-column table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;      /* MÊME logique que .suivi : colonnes égales */
}
td.date-column td {
  /* PAS de width = auto-distribution équitable comme .suivi */
  height: 28px;
  border: 1px solid var(--wiki-border-light) !important;
  padding: 0 !important;
  text-align: center;
  cursor: pointer;
  font-size: 9px;
  color: #555;
  position: relative;
  transition: all 0.1s;
}
td.date-column td:hover {
  filter: brightness(0.9);
  outline: 2px solid var(--wiki-text);
  outline-offset: -2px;
  z-index: 1;
}
td.date-column td.closed  { background: var(--wiki-status-green);  color: white; }
td.date-column td.opened  { background: var(--wiki-status-orange); color: white; }
td.date-column td.pending { background: var(--wiki-status-blue);   color: white; }
td.date-column td.default { background: var(--wiki-status-red);    color: white; }
/* Alias couleur (statuts backend green/orange/blue/red) — cf. bank_v2.js */
td.date-column td.green   { background: var(--wiki-status-green);  color: white; }
td.date-column td.orange  { background: var(--wiki-status-orange); color: white; }
td.date-column td.blue    { background: var(--wiki-status-blue);   color: white; }
td.date-column td.red     { background: var(--wiki-status-red);    color: white; }
td.date-column td.empty   { background: var(--wiki-bg-alt); }
/* Date dans la cellule (rouge = relance, orange = réception) */
td.date-column td .cell-date {
  font-size: 8px; font-weight: 700; line-height: 1;
  color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,0.35);
  white-space: nowrap;
}
td.date-column .badge {
  position: absolute; top: 1px; right: 1px;
  background: rgba(0,0,0,0.45); color: white;
  font-size: 8px; padding: 0 3px; border-radius: 2px;
  font-weight: 600;
}

/* Actions column — style Wikitoria avec SVG stroke icons */
td.action { padding: 4px !important; }
.actions { display: flex; gap: 3px; justify-content: center; }
.actions button {
  width: 28px; height: 28px;
  border: 1px solid var(--wiki-border-light);
  background: white;
  border-radius: 3px;
  cursor: pointer;
  color: var(--wiki-text-muted);
  display: grid; place-items: center;
  transition: all 0.12s ease;
  padding: 0;
}
.actions button svg {
  width: 17px; height: 17px;
  display: block;
}
.actions button:hover {
  background: var(--kb-primary);
  border-color: var(--kb-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(30, 64, 175, 0.32);
}
.actions button.disabled { opacity: 0.4; cursor: not-allowed; }
.actions button.disabled:hover { background: white; color: var(--wiki-text-muted); transform: none; box-shadow: none; }

/* DataTables footer */
.dt-info { font-size: 13px; color: #575757; }
.dt-paginate {
  display: flex; gap: 4px; justify-content: flex-end;
}
.dt-paginate a {
  padding: 6px 11px;
  border: 1px solid var(--indigo-200);
  background: rgba(255, 255, 255, 0.7);
  color: var(--wiki-text);
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
}
.dt-paginate a:hover {
  background: var(--indigo-50);
  border-color: var(--indigo-400);
  color: var(--indigo-700);
  text-decoration: none;
}
.dt-paginate a.current {
  background: linear-gradient(135deg, #0a84ff 0%, #0060df 100%);
  color: white; border-color: #0060df;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.35);
}
.dt-paginate a.current:hover {
  background: linear-gradient(135deg, #0060df 0%, #172554 100%);
  color: white;
}
.dt-paginate a.disabled { opacity: 0.4; cursor: not-allowed; }
.dt-paginate a.disabled:hover { background: rgba(255,255,255,0.7); border-color: var(--indigo-200); color: var(--wiki-text); }

/* Footer */
.page-footer {
  background: #2f2f2f; color: #adadad;
  padding: 24px 0; margin-top: 40px;
  font-size: 12px;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-inner ul { display: flex; gap: 16px; list-style: none; }
.footer-inner a { color: #adadad; }
.footer-inner a:hover { color: white; }

/* Loading */
.kb-loading {
  text-align: center; padding: 60px 20px;
  color: #777; font-size: 14px;
}

/* Toast */
#kb-toast {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.kb-toast {
  background: #333; color: white;
  padding: 12px 18px; border-radius: 4px;
  font-size: 13px; max-width: 380px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: opacity 0.3s;
}
.kb-toast.ok { background: #4caf50; }
.kb-toast.err { background: #d32f2f; }

/* Cell menu */
#kb-cell-menu {
  position: fixed; z-index: 9000;
  background: white;
  border: 1px solid #c2c2c2;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 4px 0;
  min-width: 220px;
  font-size: 13px;
}
#kb-cell-menu .menu-header {
  padding: 8px 12px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  font-size: 11px; color: #575757;
}
#kb-cell-menu .menu-header strong { color: #333; }
#kb-cell-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  background: white; border: none;
  text-align: left; cursor: pointer;
  font-size: 13px; font-family: inherit; color: #333;
}
#kb-cell-menu button:hover { background: #f5f5f5; }
#kb-cell-menu button .swatch {
  width: 12px; height: 12px; border-radius: 2px;
}

/* Compteurs de statut — sémantique Banque (forme dans shared/charte.css) */
.status-count .default  { background: var(--kb-st-neutral-bg); color: var(--kb-st-neutral); }
.status-count .opened   { background: var(--kb-st-warn-bg);    color: var(--kb-st-warn); }
.status-count .pending  { background: var(--kb-st-info-bg);    color: var(--kb-st-info); }
.status-count .closed   { background: var(--kb-st-ok-bg);      color: var(--kb-st-ok); }
.status-count .manquant { background: var(--kb-st-danger-bg);  color: var(--kb-st-danger); }

/* Badge « déclaré » : compte connu (référentiel RIB dossier_rib) sans relevé OFX importé */
.kb-declared-badge {
  display: inline-block; font-size: 9px; font-weight: 700; line-height: 1;
  padding: 2px 5px; margin-left: 4px; border-radius: 8px; vertical-align: middle;
  background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; text-transform: uppercase;
  letter-spacing: .3px;
}

/* ===== Modale Historique relances / réceptions ===== */
#kb-hist-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 10000;
}
.kb-hist-modal {
  background: #fff; border-radius: 12px; width: min(820px, 94vw);
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3); overflow: hidden;
}
.kb-hist-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); color: #fff;
}
.kb-hist-head strong { font-size: 15px; }
.kb-hist-sub { font-size: 12px; opacity: .85; margin-top: 3px; font-family: 'SF Mono', Consolas, monospace; }
.kb-hist-close {
  background: rgba(255,255,255,0.15); color: #fff; border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 7px; font-size: 15px; line-height: 1;
}
.kb-hist-close:hover { background: rgba(255,255,255,0.3); }
.kb-hist-body { overflow-y: auto; padding: 0; }
.kb-hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kb-hist-table thead th {
  position: sticky; top: 0; background: #f7f8fa; text-align: left;
  padding: 9px 14px; font-weight: 600; color: #444; border-bottom: 1px solid #e5e7eb;
}
.kb-hist-table tbody td { padding: 9px 14px; border-bottom: 1px solid #f2f3f5; vertical-align: middle; }
.kb-hist-table tbody tr:hover { background: #fafbfc; }
.hist-type {
  display: inline-block; color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.hist-auto { color: #6d28d9; font-weight: 600; }
.hist-user { color: #0369a1; font-weight: 600; }
.kb-hist-foot { padding: 10px 20px; border-top: 1px solid #eee; font-size: 12px; color: #888; }

/* ===== Colonne CHÈQUE : badge compteur ===== */
.cheque-c .dot { position: relative; }
.cheque-c .cheque-badge {
  position: absolute; top: -6px; right: -6px;
  background: #1e40af; color: #fff; font-size: 9px; font-weight: 700;
  min-width: 14px; height: 14px; line-height: 14px; text-align: center;
  border-radius: 7px; padding: 0 3px; border: 1px solid #fff;
}
.ebics-c, .cheque-c { cursor: context-menu; }

/* ===== Modale chéquiers : formulaire de création ===== */
.kb-cheq-form { padding: 14px 18px; background: #f7f8fa; border-bottom: 1px solid #eee; }
.kb-cheq-title { font-size: 12px; font-weight: 700; color: #444; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .3px; }
.kb-cheq-fields { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.kb-cheq-fields label { display: flex; flex-direction: column; font-size: 11px; color: #666; font-weight: 600; gap: 3px; }
.kb-cheq-fields label.kb-cheq-note { flex: 1; min-width: 160px; }
.kb-cheq-fields input {
  padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px;
  font-family: inherit; min-width: 120px;
}
.kb-cheq-fields input:focus { outline: none; border-color: #1e40af; box-shadow: 0 0 0 3px rgba(30,64,175,.12); }
.kb-cheq-addbtn {
  padding: 8px 16px; background: #1e40af; color: #fff; border: none; border-radius: 6px;
  font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.kb-cheq-addbtn:hover { background: #1e3a8a; }
.kb-cheq-del { background: none; border: none; cursor: pointer; font-size: 14px; opacity: .6; }
.kb-cheq-del:hover { opacity: 1; }

/* ── Barre de complétude de l'exercice ── */
.kb-completeness { margin: 4px 0 12px; }
.kb-compl-label { font-size: 12.5px; color: #3a3a3c; margin-bottom: 4px; }
.kb-compl-track { position: relative; height: 8px; border-radius: 5px; background: #eceef1; overflow: hidden; display: flex; }
.kb-compl-fill-ok   { background: #1a9d54; height: 100%; }
.kb-compl-fill-recv { background: #f4a72066; height: 100%; }

/* ── Filtre « à relancer » actif ── */
#kb-filter-relance.active { background: #d70015; color: #fff; border-color: #d70015; }

/* ── Icônes de statut (accessibilité daltonisme) sur les cellules mois ── */
td.green::after  { content: '✓'; }
td.blue::after   { content: '≠'; }
td.green::after, td.blue::after {
  position: absolute; top: 1px; right: 3px; font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,.85); pointer-events: none;
}
.date-column td { position: relative; }
