/* ─── Bilan par service ──────────────────────────────────────────────── */

.bs-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  margin-top: var(--header-h);
}
.bs-toolbar label { font-size: 13px; color: var(--text-2); }
.bs-toolbar #bs-service { width: 240px; }

.bs-month-nav { display: flex; align-items: center; gap: 4px; }
.bs-month-nav #bs-month { width: 150px; }

.bs-toolbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.bs-hours-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none;
  margin-left: 16px;
}
.bs-hours-toggle input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }

.bs-body { padding: 16px 20px; }

.bs-table-wrap {
  overflow-x: auto; overflow-y: visible;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface);
}

.bs-table { border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.bs-table th, .bs-table td {
  border: 1px solid var(--border);
  padding: 4px 6px;
  text-align: center;
  vertical-align: top;
}

.bs-table thead th {
  background: var(--surface-2);
  font-weight: 600; color: var(--text-2);
  position: sticky; top: 0; z-index: 2;
}
.bs-table thead th.bs-th-day-name { font-size: 10px; color: var(--text-3); font-weight: 500; }
.bs-table thead th.bs-th-weekend { background: #eceff1; }
.bs-table thead th.bs-th-ferie   { background: #ffe0b2; }

.bs-table .bs-col-emp {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface);
  text-align: left; font-weight: 600; color: #1a237e;
  min-width: 170px; max-width: 220px;
  white-space: normal;
}
.bs-table thead th.bs-col-emp { z-index: 3; background: var(--surface-2); }

.bs-table td.bs-cell-weekend { background: #fafafa; }
.bs-table td.bs-cell-ferie   { background: #fff8e1; }

.bs-emp-name  { display: flex; align-items: center; gap: 6px; }
.bs-emp-hours { font-weight: 500; color: var(--text-2); font-size: 11px; white-space: nowrap; }

.bs-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; color: #fff;
  border-radius: 4px; padding: 1px 4px;
  margin: 1px 0;
  line-height: 1.4;
}
.bs-badge + .bs-badge { margin-top: 2px; }

/* Repos : pas de fond ni de contour, juste la couleur employé en police (distinct des tâches de travail) */
.bs-badge-repos {
  background: none;
  border-radius: 0;
  padding: 1px 2px;
  font-weight: 700;
}

.bs-cell-empty { color: var(--text-3); }

.bs-empty-msg { padding: 24px; text-align: center; color: var(--text-2); font-size: 13px; }

.bs-table tfoot td, .bs-table tfoot .bs-col-emp {
  background: var(--surface-2);
  font-weight: 700; color: #1a237e;
}
.bs-cell-total { font-size: 11px; }

.bs-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 10px 14px; font-size: 12px; color: var(--text-2);
  border-top: 1px solid var(--border);
}
.bs-legend-title { font-weight: 700; color: #1a237e; }
.bs-legend-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.bs-legend-code {
  display: inline-block; font-size: 10px; font-weight: 700; color: #fff;
  background: #607d8b; border-radius: 4px; padding: 1px 5px;
}

@media print {
  .page-header, .bs-toolbar-actions { display: none !important; }
  .bs-toolbar { margin-top: 0; }
  .bs-table-wrap { border: none; overflow: visible; }
  @page { size: A4 landscape; margin: 10mm; }
}
