/* ─── Récapitulatif détaillé ─────────────────────────────────────────── */

.rc-toolbar {
  flex-wrap: wrap;
  gap: 8px 10px;
}

.rc-toggles {
  display: flex; align-items: center; gap: 4px 14px;
  flex-wrap: wrap; margin-left: 12px;
}

/* ─── Zone de défilement principale ─────────────────────────────────── */
/* La toolbar est sticky ; le contenu table défile librement en dessous  */
.bs-body {
  height: calc(100vh - var(--header-h) - 52px); /* 52px = hauteur toolbar */
  overflow: auto;
  padding: 0 0 40px; /* marge basse pour que le total général reste visible */
}

.bs-body .bs-table-wrap {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  min-width: max-content; /* force le scroll horizontal si besoin */
}

/* ─── Table ─────────────────────────────────────────────────────────── */
.rc-table {
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
  width: 100%;
}

.rc-table th,
.rc-table td {
  border: 1px solid var(--border);
  padding: 4px 7px;
  vertical-align: middle;
}

/* En-tête global sticky */
.rc-table thead th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text-2);
  position: sticky;
  top: 0;
  z-index: 4;
  text-align: center;
  white-space: nowrap;
}

/* ─── Colonnes spéciales ─────────────────────────────────────────────── */
.rc-col-date {
  min-width: 100px;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
}
.rc-table thead th.rc-col-date { z-index: 5; background: var(--surface-2); }

.rc-col-desc {
  min-width: 200px;
  max-width: 300px;
  white-space: normal;
  text-align: left !important;
}

.rc-col-svc {
  min-width: 110px;
  max-width: 160px;
  white-space: normal;
  font-size: 11px;
  color: #1565c0;
  font-weight: 500;
}

.rc-col-motif {
  min-width: 120px;
  max-width: 180px;
  white-space: normal;
  font-size: 11px;
  color: var(--text-2);
}

.rc-col-nuit  { color: #5c6bc0; }
.rc-col-sun   { color: #c62828; }
.rc-col-hol   { color: #e65100; }
.rc-col-mal   { color: #6a1b9a; }
.rc-col-at    { color: #bf360c; }

/* ─── Cellules numériques ────────────────────────────────────────────── */
.rc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 58px;
}
.rc-pos { color: #2e7d32; }
.rc-neg { color: #c62828; }

/* ─── Lignes données ─────────────────────────────────────────────────── */
.rc-data-row td { background: var(--surface); }
.rc-data-row:hover td { background: #f5f7ff; }

.rc-row-sunday td {
  background: #fde8e8 !important;
}
.rc-row-ferie td {
  background: #fff8e1 !important;
}
.rc-row-sunday-ferie td {
  background: #fde8e8 !important;
}

/* Alerte dimanche+férié */
.rc-alert-sf {
  display: inline-block;
  margin-left: 4px;
  color: #e65100;
  font-size: 11px;
  cursor: default;
}

/* ─── En-tête employé ────────────────────────────────────────────────── */
.rc-emp-header td {
  background: #1a237e !important;
  color: #fff;
  font-size: 13px;
  padding: 7px 10px;
  border-color: #1a237e;
}

.rc-emp-toggle {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  opacity: .8;
  transition: transform .15s;
  user-select: none;
}

.rc-emp-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid rgba(255,255,255,.4);
}

.rc-emp-service {
  font-size: 11px;
  font-weight: 400;
  opacity: .75;
  margin-left: 10px;
}

/* ─── Bilan employé ──────────────────────────────────────────────────── */
.rc-emp-bilan td {
  background: #e8eaf6 !important;
  font-weight: 600;
  color: #1a237e;
  font-size: 11.5px;
  border-top: 2px solid #9fa8da;
}

.rc-bilan-label {
  text-align: left !important;
  min-width: 300px;
  white-space: normal;
}

.rc-bilan-num {
  background: #e8eaf6;
}

.rc-sf-note {
  font-weight: 400;
  font-size: 11px;
  color: #e65100;
  margin-left: 8px;
}

/* ─── Total général ──────────────────────────────────────────────────── */
.rc-grand-total td {
  background: #1a237e !important;
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  border-top: 3px solid #0d47a1;
}

.rc-grand-total .rc-num { color: #fff; }
.rc-grand-total .rc-pos { color: #a5d6a7; }
.rc-grand-total .rc-neg { color: #ef9a9a; }
.rc-grand-total .rc-col-nuit { color: #c5cae9; }
.rc-grand-total .rc-col-sun  { color: #ef9a9a; }
.rc-grand-total .rc-col-hol  { color: #ffcc80; }
.rc-grand-total .rc-col-mal  { color: #ce93d8; }
.rc-grand-total .rc-col-at   { color: #ffab91; }

/* Libellé férié inline dans la colonne date */
.rc-ferie-label {
  display: block;
  font-size: 10px;
  color: #e65100;
  font-style: italic;
  white-space: normal;
  line-height: 1.3;
}

/* ─── Impression ─────────────────────────────────────────────────────── */
@media print {
  .rc-toolbar, .page-header-right { display: none !important; }
  .bs-table-wrap { border: none !important; }
  .rc-emp-header td { background: #1a237e !important; -webkit-print-color-adjust: exact; }
  .rc-emp-bilan  td { background: #e8eaf6 !important; -webkit-print-color-adjust: exact; }
  .rc-grand-total td { background: #1a237e !important; -webkit-print-color-adjust: exact; }
  .rc-row-sunday td  { background: #fde8e8 !important; -webkit-print-color-adjust: exact; }
  .rc-row-ferie  td  { background: #fff8e1 !important; -webkit-print-color-adjust: exact; }
}
