/* ==============================================================
   GESTIVA · Feuilles de temps (Timesheets)
   Conforme macros.css & design system
   ============================================================== */

.ts-week-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ts-week-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ts-week-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--txt, #0f172a);
  margin-left: 8px;
}

.ts-view-switch {
  display: flex;
  background: var(--bg-surface, #f1f5f9);
  padding: 3px;
  border-radius: 6px;
  gap: 2px;
}

.ts-switch-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--txt-muted, #64748b);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ts-switch-btn:hover {
  color: var(--txt, #0f172a);
}

.ts-switch-btn.active {
  background: var(--bg-card, #ffffff);
  color: var(--primary, #2563eb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Grille matricielle */
.ts-grid-table th.th-day {
  text-align: center;
  min-width: 65px;
  font-size: 11.5px;
  font-weight: 600;
}

.ts-grid-table th.th-day.is-today {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  border-bottom: 2px solid var(--primary, #2563eb);
}

.ts-grid-table th.th-total {
  background: var(--bg-surface, #f8fafc);
  font-weight: 700;
}

.ts-grid-table th.th-cost {
  background: var(--bg-surface, #f8fafc);
  font-weight: 700;
  color: var(--primary, #2563eb);
}

.ts-grid-table td.cell-day {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt, #0f172a);
  padding: 8px 6px;
}

.ts-grid-table td.cell-day.has-hours {
  background: rgba(37, 99, 235, 0.04);
  color: var(--primary, #2563eb);
}

.ts-grid-table td.cell-day.is-today {
  border-left: 1px dashed rgba(37, 99, 235, 0.3);
  border-right: 1px dashed rgba(37, 99, 235, 0.3);
}

.ts-grid-table tfoot tr {
  background: var(--bg-surface, #f8fafc);
  border-top: 2px solid var(--border, #cbd5e1);
  font-weight: 700;
}

.ts-grid-table tfoot td {
  padding: 12px 10px;
  font-size: 13px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .ts-week-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}
