/* ─── ALISRAEL PRIVATE FINANCE — Cockpit dossiers ──────────────────────────── */
/* Tous les sélecteurs sont préfixés .ck- pour éviter tout conflit avec style.css */

/* ── Layout page cockpit ─────────────────────────────────────────────────────── */
.page-cockpit {
  background-color: var(--cream, #F9F6F1);
  min-height: 100vh;
}

.ck-main {
  padding: 2.5rem 0 4rem;
}

.ck-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.ck-page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--navy, #0A1628);
  margin: 0 0 0.25rem;
  line-height: 1.15;
}

.ck-page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted, #68707d);
  margin: 0;
}

/* ── Bouton principal ────────────────────────────────────────────────────────── */
.ck-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--gold, #C9A96E);
  color: var(--navy, #0A1628);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.18s, transform 0.12s;
  white-space: nowrap;
}

.ck-btn-primary:hover {
  background-color: var(--gold-light, #DFC090);
  transform: translateY(-1px);
}

/* ── Bouton ghost (import) ───────────────────────────────────────────────────── */
.ck-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  white-space: nowrap;
}
.ck-btn-ghost:hover {
  border-color: rgba(201, 169, 110, 0.55);
  color: #C9A96E;
}

/* ── En-tête actions ─────────────────────────────────────────────────────────── */
.ck-page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

/* ── Cartes statistiques ─────────────────────────────────────────────────────── */
/* ── Tableau de pilotage — grille widgets ────────────────────────────────────── */
.ck-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ── Widgets de pilotage ─────────────────────────────────────────────────────── */
.ck-widget {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(10, 22, 40, 0.08);
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.ck-widget:hover { box-shadow: 0 3px 12px rgba(10, 22, 40, 0.1); }

/* ── En-tête widget ──────────────────────────────────────────────────────────── */
.ck-widget-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
  border-left: 3px solid transparent;
}

.ck-widget--urgent  .ck-widget-header { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.04); }
.ck-widget--warning .ck-widget-header { border-left-color: #f97316; background: rgba(249, 115, 22, 0.04); }
.ck-widget--gold    .ck-widget-header { border-left-color: var(--gold, #C9A96E); background: rgba(201, 169, 110, 0.05); }
.ck-widget--green   .ck-widget-header { border-left-color: #16a34a; background: rgba(34, 197, 94, 0.04); }
.ck-widget--navy    .ck-widget-header { border-left-color: var(--navy, #0A1628); background: rgba(10, 22, 40, 0.03); }
.ck-widget--neutral .ck-widget-header { border-left-color: rgba(10, 22, 40, 0.12); }

.ck-widget-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.ck-widget--urgent  .ck-widget-icon { color: #ef4444; }
.ck-widget--warning .ck-widget-icon { color: #f97316; }
.ck-widget--gold    .ck-widget-icon { color: var(--gold, #C9A96E); }
.ck-widget--green   .ck-widget-icon { color: #16a34a; }
.ck-widget--navy    .ck-widget-icon { color: var(--navy, #0A1628); }
.ck-widget--neutral .ck-widget-icon { color: rgba(10, 22, 40, 0.3); }

.ck-widget-title {
  flex: 1;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--navy, #0A1628);
  line-height: 1.3;
}

.ck-widget-count {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy, #0A1628);
  line-height: 1;
}
.ck-widget-count--zero { color: rgba(10, 22, 40, 0.18); }

/* ── Corps widget ────────────────────────────────────────────────────────────── */
.ck-widget-body {
  padding: 0.6rem 0.875rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ck-widget-empty {
  font-size: 0.75rem;
  color: rgba(10, 22, 40, 0.28);
  font-style: italic;
  margin: 0.25rem 0;
}

.ck-widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ck-widget-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.3rem 0.4rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.1s;
}
.ck-widget-item:hover { background: rgba(10, 22, 40, 0.04); }

.ck-widget-client {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy, #0A1628);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ck-widget-lbl {
  font-size: 0.7rem;
  color: var(--text-muted, #68707d);
  white-space: nowrap;
  flex-shrink: 0;
}

.ck-widget-amount {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--navy, #0A1628);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Coloration urgence des labels inline */
.ck-widget-item--urgent .ck-widget-lbl  { color: #ef4444; font-weight: 700; }
.ck-widget-item--proche .ck-widget-lbl  { color: #f97316; font-weight: 600; }
.ck-widget-item--ok     .ck-widget-lbl  { color: #16a34a; }

.ck-widget-all {
  margin-top: 0.5rem;
  background: none;
  border: none;
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--gold, #C9A96E);
  letter-spacing: 0.03em;
  cursor: pointer;
  text-align: right;
  padding: 0.2rem 0.4rem;
  align-self: flex-end;
}
.ck-widget-all:hover { text-decoration: underline; }

/* ── Tableau ─────────────────────────────────────────────────────────────────── */
.ck-table-wrap {
  background: var(--navy-card, #111F38);
  border: 1px solid var(--navy-border, #1A2F50);
  border-radius: 10px;
  overflow: hidden;
}

.ck-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}

/* Largeurs colonnes (8 cols — total 100%) */
.ck-table .ck-th:nth-child(1) { width: 16%; }  /* Client */
.ck-table .ck-th:nth-child(2) { width: 8%; }   /* Projet */
.ck-table .ck-th:nth-child(3) { width: 12%; }  /* Banque */
.ck-table .ck-th:nth-child(4) { width: 9%; }   /* Progression */
.ck-table .ck-th:nth-child(5) { width: 18%; }  /* Statut OP */
.ck-table .ck-th:nth-child(6) { width: 13%; }  /* Déblocage */
.ck-table .ck-th:nth-child(7) { width: 12%; }  /* Dernière interaction */
.ck-table .ck-th:nth-child(8) { width: 12%; }  /* Actions */

.ck-thead {
  background: var(--navy, #0A1628);
}

.ck-th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-muted, #8B7240);
  white-space: nowrap;
  border-bottom: 1px solid var(--navy-border, #1A2F50);
  user-select: none;
}

.ck-th--sortable {
  cursor: pointer;
}
.ck-th--sortable:hover {
  color: #C9A96E;
  background: rgba(201, 169, 110, 0.05);
}
.ck-th--sorted {
  color: #C9A96E;
}
.ck-sort-icon {
  font-size: 0.6rem;
  opacity: 0.45;
  margin-left: 0.2rem;
  vertical-align: middle;
}
.ck-th--sortable:hover .ck-sort-icon,
.ck-th--sorted .ck-sort-icon { opacity: 1; }

.ck-row {
  border-bottom: 1px solid rgba(26, 47, 80, 0.7);
  transition: background-color 0.14s;
}

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

.ck-row:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.ck-td {
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.82);
  vertical-align: middle;
}

.ck-td--client strong {
  color: #fff;
  font-weight: 600;
}

.ck-td--action {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ck-td--date {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  white-space: nowrap;
}

.ck-td--actions {
  white-space: nowrap;
}

.ck-td--progress {
  overflow: hidden;
}

.ck-td--client {
  overflow: hidden;
}

.ck-td--client strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ck-empty {
  padding: 3rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.875rem;
}

/* ── Badge statut opérationnel (tableau) ────────────────────────────────────── */
.ck-etape-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 2px 7px;
  border-radius: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.ck-etape-badge--urgent  { background: rgba(239, 68, 68, 0.14);  color: #f87171; }
.ck-etape-badge--warning { background: rgba(249, 115, 22, 0.14); color: #fb923c; }
.ck-etape-badge--gold    { background: rgba(201, 169, 110, 0.14); color: #C9A96E; }
.ck-etape-badge--green   { background: rgba(34, 197, 94, 0.12);  color: #4ade80; }
.ck-etape-badge--navy    { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }
.ck-etape-badge--neutral { background: rgba(255, 255, 255, 0.06); color: rgba(255,255,255,0.35); }

/* ── Badges statut ───────────────────────────────────────────────────────────── */
.ck-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ck-status--en-cours {
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold, #C9A96E);
  border: 1px solid rgba(201, 169, 110, 0.3);
}

.ck-status--attente-client {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.ck-status--attente-banque {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.ck-status--finalise {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.22);
}

/* ── Barre de progression ────────────────────────────────────────────────────── */
.ck-progress-wrap {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.ck-progress-bar {
  height: 100%;
  background: var(--gold-muted, #8B7240);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.ck-progress-bar.ck-progress--mid  { background: var(--gold, #C9A96E); }
.ck-progress-bar.ck-progress--done { background: #4ade80; }

.ck-progress-pct {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

/* ── Boutons icônes ──────────────────────────────────────────────────────────── */
.ck-btn-icon {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 5px 7px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  margin-right: 4px;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
  vertical-align: middle;
}

.ck-btn-icon:hover {
  color: var(--gold, #C9A96E);
  border-color: rgba(201, 169, 110, 0.35);
  background-color: rgba(201, 169, 110, 0.07);
}

/* ── Modale ──────────────────────────────────────────────────────────────────── */
.ck-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ck-modal-overlay.ck-hidden {
  display: none;
}

.ck-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.ck-modal-box {
  position: relative;
  z-index: 1;
  background: var(--navy-card, #111F38);
  border: 1px solid var(--navy-border, #1A2F50);
  border-radius: 12px;
  width: 480px;
  max-width: calc(100vw - 2rem);
  padding: 2rem;
}

.ck-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--navy-border, #1A2F50);
}

.ck-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.ck-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.ck-modal-close:hover {
  color: #fff;
}

.ck-modal-body {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  line-height: 1.65;
  text-align: center;
  padding: 1.5rem 0;
}

.ck-modal-body p {
  margin: 0 0 0.5rem;
}

.ck-modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.25rem;
  background: rgba(201, 169, 110, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold, #C9A96E);
}

/* ── Nav badge cockpit ───────────────────────────────────────────────────────── */
.nav-badge--cockpit {
  background-color: rgba(201, 169, 110, 0.1);
  color: var(--gold, #C9A96E);
  border: 1px solid rgba(201, 169, 110, 0.25);
}

/* ── Formulaire modal ────────────────────────────────────────────────────────── */
.ck-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ck-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .ck-form-row { grid-template-columns: 1fr; }
}

.ck-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.ck-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ck-required {
  color: #fb923c;
}

.ck-form-input,
.ck-form-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 0.55rem 0.75rem;
  color: #fff;
  font-size: 0.8125rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.ck-form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.ck-form-input:focus,
.ck-form-select:focus {
  border-color: var(--gold, #C9A96E);
  background: rgba(255, 255, 255, 0.08);
}

.ck-form-select option {
  background: #111F38;
  color: #fff;
}

.ck-field-error {
  border-color: #fb923c !important;
}

.ck-form-error {
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 5px;
  padding: 0.5rem 0.75rem;
  color: #fb923c;
  font-size: 0.8rem;
}

/* ── Footer modal ────────────────────────────────────────────────────────────── */
.ck-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--navy-border, #1A2F50);
}

.ck-btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.ck-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* ── Panneau latéral (drawer) ────────────────────────────────────────────────── */
.ck-sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  visibility: hidden;
}

.ck-sheet--open {
  pointer-events: auto;
  visibility: visible;
}

.ck-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ck-sheet--open .ck-sheet-backdrop {
  opacity: 1;
}

.ck-sheet-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 100vw;
  background: var(--navy-card, #111F38);
  border-left: 1px solid var(--navy-border, #1A2F50);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ck-sheet--open .ck-sheet-panel {
  transform: translateX(0);
}

.ck-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.375rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--navy-border, #1A2F50);
  flex-shrink: 0;
}

.ck-sheet-header-content {
  flex: 1;
  min-width: 0;
}

.ck-sh-client {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ck-sh-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.ck-sh-sep { color: rgba(255, 255, 255, 0.2); }

.ck-sheet-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.125rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
  line-height: 1;
}

.ck-sheet-close:hover { color: #fff; }

.ck-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Section progression (dans fiche) ──────────────────────────────────────── */
.ck-sh-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.4);
}

.ck-sh-progress-pct {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--gold, #C9A96E);
}

.ck-sh-progress-bar-wrap {
  height: 7px;
}

/* ── Section info (dans fiche) ───────────────────────────────────────────────── */
.ck-sh-info-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ck-sh-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}

.ck-sh-info-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.ck-sh-info-val {
  color: rgba(255, 255, 255, 0.65);
  text-align: right;
}

.ck-sh-info-link {
  color: rgba(201, 169, 110, 0.85);
  text-decoration: none;
}
.ck-sh-info-link:hover { color: #C9A96E; text-decoration: underline; }

/* ── Corps checklists ────────────────────────────────────────────────────────── */
.ck-sh-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ck-sh-demo-note {
  background: rgba(201, 169, 110, 0.07);
  border: 1px solid rgba(201, 169, 110, 0.18);
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  color: rgba(201, 169, 110, 0.75);
  font-size: 0.78rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

/* ── Blocs checklist ─────────────────────────────────────────────────────────── */
.ck-cl-block {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.ck-cl-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.875rem;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ck-cl-block-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.ck-cl-count {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold-muted, #8B7240);
}

.ck-cl-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}

.ck-cl-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.ck-cl-item:last-child { border-bottom: none; }

.ck-cl-item:has(.ck-cl-checkbox:checked) {
  background: rgba(201, 169, 110, 0.04);
}

.ck-cl-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  transition: background-color 0.12s;
}

.ck-cl-label:hover { background: rgba(255, 255, 255, 0.03); }

/* ── Case à cocher personnalisée ─────────────────────────────────────────────── */
.ck-cl-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.ck-cl-mark {
  width: 16px;
  min-width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  position: relative;
  transition: border-color 0.15s, background-color 0.15s;
}

.ck-cl-checkbox:checked ~ .ck-cl-mark {
  background: var(--gold, #C9A96E);
  border-color: var(--gold, #C9A96E);
}

.ck-cl-checkbox:checked ~ .ck-cl-mark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: 2px solid #0A1628;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.ck-cl-checkbox:disabled ~ .ck-cl-mark {
  opacity: 0.35;
}

.ck-cl-label:has(.ck-cl-checkbox:disabled) {
  cursor: default;
}

.ck-cl-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
  transition: color 0.15s;
}

.ck-cl-checkbox:checked ~ .ck-cl-text {
  color: rgba(255, 255, 255, 0.28);
  text-decoration: line-through;
}

/* ── Variante bouton icône — suppression ─────────────────────────────────────── */
.ck-btn-icon--delete:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background-color: rgba(248, 113, 113, 0.07);
}

/* ── Bouton danger ───────────────────────────────────────────────────────────── */
.ck-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #c0151e;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
}

.ck-btn-danger:hover {
  background: #a01018;
  transform: translateY(-1px);
}

/* ── Modale petite (confirmation) ────────────────────────────────────────────── */
.ck-modal-box--sm {
  width: 380px;
}

.ck-confirm-body {
  padding: 1.5rem 0 1rem;
  text-align: center;
}

.ck-confirm-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: rgba(248, 113, 113, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f87171;
}

.ck-confirm-msg {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  padding: 0 0.5rem;
}

/* ── Responsive tableau ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ck-table-wrap { overflow-x: auto; }
  .ck-page-header { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   JOURNAL DE SUIVI — module ck-jn-
   ═══════════════════════════════════════════════════════════════════════════════ */

.ck-sh-journal-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.125rem;
}

.ck-jn-root {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* ── En-tête du module ───────────────────────────────────────────────────────── */
.ck-jn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ck-jn-title {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.ck-jn-icon { font-size: 0.875rem; }

.ck-jn-count {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold-muted, #8B7240);
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.2);
  padding: 2px 9px;
  border-radius: 10px;
}

/* ── Recherche ───────────────────────────────────────────────────────────────── */
.ck-jn-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 0.45rem 0.75rem;
  color: #fff;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.ck-jn-search::placeholder { color: rgba(255, 255, 255, 0.2); }
.ck-jn-search:focus { border-color: var(--gold-muted, #8B7240); }

/* ── Zone de saisie ─────────────────────────────────────────────────────────── */
.ck-jn-compose {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ck-jn-textarea {
  width: 100%;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.625rem 0.75rem;
  color: #fff;
  font-size: 0.8125rem;
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, background-color 0.15s;
}

.ck-jn-textarea::placeholder { color: rgba(255, 255, 255, 0.2); }
.ck-jn-textarea:focus {
  border-color: var(--gold, #C9A96E);
  background: rgba(255, 255, 255, 0.06);
}

.ck-jn-btn-add {
  align-self: flex-end;
  background: var(--gold, #C9A96E);
  color: var(--navy, #0A1628);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.5rem 1.125rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s, transform 0.1s;
}

.ck-jn-btn-add:hover   { background: var(--gold-light, #DFC090); transform: translateY(-1px); }
.ck-jn-btn-add:active  { transform: scale(0.98); }
.ck-jn-btn-add:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Liste de notes ─────────────────────────────────────────────────────────── */
.ck-jn-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ck-jn-empty {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  padding: 1.25rem 0;
  margin: 0;
  font-style: italic;
}

/* ── Carte de note ──────────────────────────────────────────────────────────── */
.ck-jn-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  transition: border-color 0.15s;
}

.ck-jn-card:hover { border-color: rgba(255, 255, 255, 0.13); }

/* Notes épinglées : fond légèrement doré/chaud */
.ck-jn-card--pinned {
  background: rgba(250, 196, 60, 0.06);
  border-color: rgba(250, 196, 60, 0.22);
}

.ck-jn-card--editing,
.ck-jn-card--confirm {
  border-color: rgba(201, 169, 110, 0.35);
}

.ck-jn-card-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.ck-jn-date {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
}

.ck-jn-author {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.22);
}

.ck-jn-edited {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.2);
  font-style: italic;
}

.ck-jn-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 0.625rem;
  word-break: break-word;
}

.ck-jn-card-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.ck-jn-action {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 7px;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.28);
  transition: background-color 0.13s, border-color 0.13s, color 0.13s;
}

.ck-jn-action:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.65);
}

.ck-jn-action--del:hover {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
  color: #f87171;
}

.ck-jn-action--pin-active { color: #fbbf24; }

/* ── Édition inline ─────────────────────────────────────────────────────────── */
.ck-jn-edit-area {
  width: 100%;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 169, 110, 0.4);
  border-radius: 5px;
  padding: 0.5rem 0.625rem;
  color: #fff;
  font-size: 0.8125rem;
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}

.ck-jn-edit-area:focus { border-color: var(--gold, #C9A96E); }

.ck-jn-edit-actions {
  display: flex;
  gap: 0.5rem;
}

.ck-jn-btn-confirm {
  background: var(--gold, #C9A96E);
  color: var(--navy, #0A1628);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 0.875rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s;
}

.ck-jn-btn-confirm:hover { background: var(--gold-light, #DFC090); }

.ck-jn-btn-delete-confirm {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 0.875rem;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s;
}

.ck-jn-btn-delete-confirm:hover { background: rgba(248, 113, 113, 0.22); }

.ck-jn-btn-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}

.ck-jn-btn-cancel:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.25);
}

.ck-jn-confirm-msg {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.625rem;
  line-height: 1.45;
}

/* ── Supabase non configuré ─────────────────────────────────────────────────── */
.ck-jn-not-configured {
  background: rgba(251, 146, 60, 0.06);
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 7px;
  padding: 0.875rem 1rem;
  color: rgba(251, 146, 60, 0.75);
  font-size: 0.8rem;
  line-height: 1.6;
}

.ck-jn-not-configured p { margin: 0 0 0.25rem; }
.ck-jn-not-configured p:last-child { margin: 0; }

.ck-jn-not-configured code {
  background: rgba(251, 146, 60, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.8rem;
}

/* ── Déblocage fonds — badge tableau ────────────────────────────────────────── */
.ck-td--deblocage {
  white-space: nowrap;
}

.ck-dbl-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.ck-dbl-badge--none {
  background: rgba(100, 116, 139, 0.08);
  color: #94a3b8;
  font-weight: 500;
}

.ck-dbl-badge--urgent {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.ck-dbl-badge--proche {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.ck-dbl-badge--ok {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ── Déblocage fonds — panneau résumé ───────────────────────────────────────── */
.ck-dbl-panel {
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-radius: 10px;
  padding: 1.125rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.05);
}

.ck-dbl-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.ck-dbl-panel-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy, #0A1628);
  letter-spacing: 0.01em;
}

.ck-dbl-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ck-dbl-counter {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ck-dbl-counter--urgent {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.ck-dbl-counter--proche {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.ck-dbl-counter--ok {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.ck-dbl-top {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.ck-dbl-top-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
}

.ck-dbl-top-row--urgent { background: rgba(239, 68, 68, 0.05); border-left: 3px solid #ef4444; }
.ck-dbl-top-row--proche { background: rgba(249, 115, 22, 0.05); border-left: 3px solid #f97316; }
.ck-dbl-top-row--ok     { background: rgba(34, 197, 94, 0.05); border-left: 3px solid #16a34a; }

.ck-dbl-top-client {
  font-weight: 600;
  color: var(--navy, #0A1628);
  flex: 1;
}

.ck-dbl-top-date {
  color: var(--text-muted, #68707d);
  font-size: 0.775rem;
}

.ck-dbl-top-amount {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--navy, #0A1628);
}

/* ── Statut opérationnel — section fiche ────────────────────────────────────── */
.ck-sh-ops-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ck-ops-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold, #C9A96E);
  margin-bottom: 0.875rem;
}

.ck-ops-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.4rem;
}

.ck-ops-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.55rem 2rem 0.55rem 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8125rem;
  font-family: inherit;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.ck-ops-select:focus {
  outline: none;
  border-color: var(--gold, #C9A96E);
}

.ck-ops-select option {
  background: #0A1628;
  color: rgba(255, 255, 255, 0.9);
}

.ck-ops-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-top: 0.625rem;
  letter-spacing: 0.02em;
}

.ck-ops-badge--urgent  { background: rgba(239, 68, 68, 0.12);  color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.ck-ops-badge--warning { background: rgba(249, 115, 22, 0.12); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.ck-ops-badge--gold    { background: rgba(201, 169, 110, 0.12); color: var(--gold, #C9A96E); border: 1px solid rgba(201, 169, 110, 0.3); }
.ck-ops-badge--green   { background: rgba(74, 222, 128, 0.1);  color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.25); }
.ck-ops-badge--navy    { background: rgba(96, 165, 250, 0.1);  color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.25); }
.ck-ops-badge--neutral { background: rgba(255, 255, 255, 0.06); color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.1); }

.ck-ops-feedback {
  font-size: 0.75rem;
  color: #4ade80;
  margin-top: 0.5rem;
}

.ck-ops-feedback.ck-hidden { display: none; }

/* ── Financement / Déblocage — section fiche ────────────────────────────────── */
.ck-sh-financement-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ck-fin-section {}

.ck-fin-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold, #C9A96E);
  margin-bottom: 1rem;
}

.ck-fin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.ck-fin-group {}

.ck-fin-group--full {
  grid-column: 1 / -1;
}

.ck-fin-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.375rem;
}

.ck-fin-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8125rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.ck-fin-input:focus {
  outline: none;
  border-color: var(--gold, #C9A96E);
}

.ck-fin-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
}

.ck-fin-save {
  background: var(--gold, #C9A96E);
  color: var(--navy, #0A1628);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1.125rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.ck-fin-save:hover { opacity: 0.88; }

.ck-fin-feedback {
  margin-top: 0.6rem;
  font-size: 0.775rem;
  color: #4ade80;
}

.ck-fin-feedback.ck-hidden { display: none; }

/* ══════════════════════════════════════════════════════════════════════════════
   IMPORT INTELLIGENT
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Modale large ─────────────────────────────────────────────────────────────── */
.ck-modal-box--import {
  max-width: 900px;
  width: 96%;
}

/* ── Étape 1 : zone de saisie ─────────────────────────────────────────────────── */
.ck-import-hint {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.875rem;
  line-height: 1.55;
}
.ck-import-hint strong { color: #C9A96E; }

.ck-import-format {
  font-family: 'Courier New', monospace;
  font-size: 0.7625rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(201, 169, 110, 0.4);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: pre-wrap;
  margin: 0 0 0.875rem;
  line-height: 1.6;
}

.ck-import-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}
.ck-import-prompt-label {
  font-size: 0.7375rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ck-import-copy-btn {
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(201, 169, 110, 0.35);
  color: #C9A96E;
  border-radius: 3px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}
.ck-import-copy-btn:hover { background: rgba(201, 169, 110, 0.1); }

.ck-import-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  padding: 0.75rem 0.875rem;
  resize: vertical;
  transition: border-color 0.18s;
}
.ck-import-textarea:focus {
  outline: none;
  border-color: rgba(201, 169, 110, 0.5);
}
.ck-import-textarea::placeholder { color: rgba(255, 255, 255, 0.2); }

/* ── Étape 2 : aperçu ──────────────────────────────────────────────────────────── */
.ck-import-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.ck-import-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: #C9A96E;
  letter-spacing: 0.02em;
}
.ck-import-back {
  font-size: 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: color 0.15s;
}
.ck-import-back:hover { color: rgba(255, 255, 255, 0.75); }

/* ── Tableau aperçu ────────────────────────────────────────────────────────────── */
.ck-import-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.ck-imp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.775rem;
}

.ck-imp-th {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.5rem 0.6rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ck-imp-th--sm   { width: 72px; }
.ck-imp-th--note { width: 200px; }
.ck-imp-th--act  { width: 90px; }

.ck-imp-td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

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

.ck-imp-row--dup { background: rgba(249, 115, 22, 0.055); }

.ck-imp-input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.775rem;
  font-family: inherit;
  padding: 0.25rem 0.35rem;
  transition: border-color 0.15s, background 0.15s;
  min-width: 80px;
}
.ck-imp-input:focus {
  outline: none;
  border-color: rgba(201, 169, 110, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.ck-imp-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.775rem;
  font-family: inherit;
  padding: 0.25rem 0.3rem;
  cursor: pointer;
}
.ck-imp-select:focus { outline: none; border-color: rgba(201, 169, 110, 0.45); }

.ck-imp-note-cell {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.38);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  max-width: 200px;
  text-overflow: ellipsis;
  cursor: help;
}

.ck-imp-empty { opacity: 0.3; font-style: normal; }

.ck-imp-td--act {
  white-space: nowrap;
  text-align: right;
}
.ck-imp-dup-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.ck-imp-del {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 3px;
  line-height: 1;
  transition: color 0.15s;
  vertical-align: middle;
}
.ck-imp-del:hover { color: #f87171; }

/* ── Notice doublons ───────────────────────────────────────────────────────────── */
.ck-import-dup-notice {
  font-size: 0.775rem;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 5px;
  padding: 0.6rem 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.5;
}
.ck-import-dup-notice.ck-hidden { display: none; }

/* ── Toast succès ──────────────────────────────────────────────────────────────── */
.ck-import-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: rgba(10, 22, 40, 0.97);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #4ade80;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
}
.ck-import-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════════
   BARRE DE FILTRES
   ══════════════════════════════════════════════════════════════════════════════ */

.ck-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.875rem;
  background: rgba(10, 22, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
}

/* Recherche */
.ck-ft-search-wrap {
  position: relative;
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 240px;
}
.ck-ft-search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.ck-ft-search {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.7875rem;
  font-family: inherit;
  padding: 0.35rem 0.6rem 0.35rem 2rem;
  transition: border-color 0.15s;
}
.ck-ft-search:focus { outline: none; border-color: rgba(201, 169, 110, 0.45); }
.ck-ft-search::placeholder { color: rgba(255, 255, 255, 0.22); }

/* Selects */
.ck-ft-sel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.7625rem;
  font-family: inherit;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.ck-ft-sel:focus { outline: none; border-color: rgba(201, 169, 110, 0.45); }

/* Checkbox urgents */
.ck-ft-urgent-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.ck-ft-urgent-cb { cursor: pointer; accent-color: #f87171; }
.ck-ft-urgent-label:has(:checked) { color: #f87171; }

/* Bouton réinitialiser */
.ck-ft-reset {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
  font-family: inherit;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.ck-ft-reset:hover { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.3); }

/* Compteur résultats */
.ck-ft-count {
  font-size: 0.72rem;
  color: #C9A96E;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: auto;
}

/* ══════════════════════════════════════════════════════════════════════════════
   DOCUMENTS — fiche client
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Section dans la fiche (entre Financement et Checklist) ──────────────────── */
.ck-sh-documents-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ck-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.ck-doc-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold, #C9A96E);
}

.ck-doc-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid rgba(201, 169, 110, 0.35);
  color: var(--gold, #C9A96E);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.ck-doc-add-btn:hover {
  background: rgba(201, 169, 110, 0.1);
  border-color: rgba(201, 169, 110, 0.55);
}

/* ── État de chargement / état vide ───────────────────────────────────────────── */
.ck-doc-loading,
.ck-doc-empty {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  padding: 1.25rem 0;
  margin: 0;
  font-style: italic;
}

/* ── Liste des documents ──────────────────────────────────────────────────────── */
.ck-doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ck-doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  transition: border-color 0.15s;
}

.ck-doc-item:hover { border-color: rgba(255, 255, 255, 0.13); }

.ck-doc-item-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 169, 110, 0.1);
  border-radius: 6px;
  color: var(--gold, #C9A96E);
}

.ck-doc-item-info {
  flex: 1;
  min-width: 0;
}

.ck-doc-item-name {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ck-doc-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ck-doc-item-date {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Badge type de document (une seule teinte, cohérente avec les autres badges dorés) */
.ck-doc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.675rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  background: rgba(201, 169, 110, 0.12);
  color: var(--gold, #C9A96E);
  border: 1px solid rgba(201, 169, 110, 0.3);
  white-space: nowrap;
}

.ck-doc-item-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.ck-doc-btn-open,
.ck-doc-btn-delete {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 7px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.4);
  transition: background-color 0.13s, border-color 0.13s, color 0.13s;
}

.ck-doc-btn-open:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.ck-doc-btn-delete:hover {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
  color: #f87171;
}

/* ── Modale "Ajouter un document" ─────────────────────────────────────────────── */
.ck-doc-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  text-align: center;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 1.75rem 1rem;
  margin: 1rem 0;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.ck-doc-dropzone:hover {
  border-color: rgba(201, 169, 110, 0.4);
  background: rgba(201, 169, 110, 0.04);
}

/* État actif pendant un glisser-déposer (appliqué dynamiquement plus tard) */
.ck-doc-dropzone--dragover {
  border-color: var(--gold, #C9A96E);
  background: rgba(201, 169, 110, 0.08);
}

.ck-doc-dropzone-icon {
  color: rgba(255, 255, 255, 0.3);
}

.ck-doc-dropzone--dragover .ck-doc-dropzone-icon { color: var(--gold, #C9A96E); }

.ck-doc-dropzone-text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

.ck-doc-dropzone-link {
  color: var(--gold, #C9A96E);
  text-decoration: underline;
  text-decoration-color: rgba(201, 169, 110, 0.4);
}

/* Fichier(s) sélectionné(s), affiché(s) sous la dropzone */
.ck-doc-selected-file {
  font-size: 0.775rem;
  color: rgba(255, 255, 255, 0.6);
  margin: -0.25rem 0 0.5rem;
  text-align: center;
}

/* La modale d'upload doit s'afficher au-dessus du panneau latéral (z-index
   1100) puisqu'elle s'ouvre désormais depuis la fiche client déjà ouverte. */
#ck-modal-documents {
  z-index: 1200;
}

/* ── États désactivés génériques (upload en cours) ────────────────────────────── */
.ck-form-select:disabled,
.ck-form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ck-btn-primary:disabled,
.ck-btn-secondary:disabled,
.ck-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ck-modal-close:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ck-doc-dropzone--busy {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Alerte de doublon (non bloquante) ────────────────────────────────────────── */
.ck-doc-dup-warning {
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 6px;
  padding: 0.75rem 0.875rem;
  margin: 0.75rem 0;
}

.ck-doc-dup-msg {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 0.625rem;
  line-height: 1.5;
}

.ck-doc-dup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
}

/* ── Confirmation de suppression inline (carte → mode confirm) ───────────────── */
.ck-doc-item--confirm {
  flex-direction: column;
  align-items: stretch;
  border-color: rgba(248, 113, 113, 0.3);
}

.ck-doc-confirm-msg {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 0.625rem;
}

.ck-doc-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
}
