/* ============================================================
   Pointeuse — Design System
   ============================================================ */

/* ---- 1. CSS Variables / Themes ---- */
:root,
[data-theme="dark"] {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-tertiary: #1a1a35;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.04);

  --text-primary: #eaeaf0;
  --text-secondary: #8888a8;
  --text-muted: #55557a;

  --accent-primary: #7c6fff;
  --accent-primary-rgb: 124, 111, 255;
  --accent-secondary: #a78bfa;

  --color-entry: #00d68f;
  --color-entry-rgb: 0, 214, 143;
  --color-pause: #ffaa00;
  --color-pause-rgb: 255, 170, 0;
  --color-exit: #ff6b6b;
  --color-exit-rgb: 255, 107, 107;

  --color-positive: #00d68f;
  --color-negative: #ff6b6b;

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 20px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 50%;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(var(--accent-primary-rgb), 0.15);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 72px;
  --header-height: 56px;
}

[data-theme="light"] {
  --bg-primary: #f0f0f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8e8f0;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-card: rgba(0, 0, 0, 0.07);
  --border-subtle: rgba(0, 0, 0, 0.04);

  --text-primary: #1a1a2e;
  --text-secondary: #666680;
  --text-muted: #9999aa;

  --accent-primary: #5b52e0;
  --accent-primary-rgb: 91, 82, 224;
  --accent-secondary: #7c6fff;

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.06);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(var(--accent-primary-rgb), 0.1);
}

/* ---- 2. Reset / Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

/* ---- 3. Layout ---- */

/* Header */
#app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#header-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 8px;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
  line-height: 1;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Save Button */
.save-btn {
  position: relative;
}

.save-btn:active .save-icon {
  transform: scale(0.85);
}

.save-icon {
  transition: transform var(--transition-fast);
}

/* Export Reminder Banner */
.export-reminder {
  text-align: center;
  padding: 8px 16px;
  background: rgba(var(--color-pause-rgb), 0.12);
  border-bottom: 1px solid rgba(var(--color-pause-rgb), 0.2);
  color: var(--color-pause);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 99;
  transition: all var(--transition-normal);
  animation: slideDown 0.4s ease;
}

.export-reminder:hover {
  background: rgba(var(--color-pause-rgb), 0.2);
}

.export-reminder.hidden {
  display: none;
}

/* Save Status Indicator */
.save-status {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 3px 0;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 98;
  letter-spacing: 0.02em;
}

.save-status.save-ok {
  color: var(--color-positive);
  background: rgba(var(--color-entry-rgb), 0.06);
}

.save-status.save-warning {
  color: var(--color-pause);
  background: rgba(var(--color-pause-rgb), 0.06);
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Main Content */
#app-content {
  padding-top: var(--header-height);
  padding-bottom: var(--nav-height);
  min-height: 100dvh;
}

/* Views */
.view {
  display: none;
  padding: 16px;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeIn var(--transition-normal) ease;
}

.view.active {
  display: block;
}

.view-enter {
  animation: slideIn var(--transition-normal) ease;
}

.view-exit {
  animation: fadeOut 0.15s ease;
}

/* Bottom Navigation */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  color: var(--text-muted);
  position: relative;
}

.nav-btn .nav-icon {
  font-size: 1.4rem;
  transition: transform var(--transition-fast);
}

.nav-btn .nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-btn.active {
  color: var(--accent-primary);
}

.nav-btn.active .nav-icon {
  transform: scale(1.15);
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 0 0 3px 3px;
}

.nav-btn:active .nav-icon {
  transform: scale(0.9);
}

/* ---- 4. Glass Card Component ---- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-card);
}

/* ---- 5. Clock View ---- */

.clock-date {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
  margin-top: 12px;
}

.clock-time {
  text-align: center;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

/* Timer */
.timer-container {
  text-align: center;
  margin-bottom: 20px;
  transition: all var(--transition-normal);
}

.timer-container.hidden {
  display: none;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius-xl);
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timer-container.active .timer-badge {
  background: rgba(var(--color-entry-rgb), 0.12);
  color: var(--color-entry);
  border: 1px solid rgba(var(--color-entry-rgb), 0.2);
}

.timer-container.on-pause .timer-badge {
  background: rgba(var(--color-pause-rgb), 0.12);
  color: var(--color-pause);
  border: 1px solid rgba(var(--color-pause-rgb), 0.2);
  animation: pausePulse 2s ease-in-out infinite;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}

.tl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.tl-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) var(--radius-sm) var(--radius-sm);
}

.tl-item:last-child {
  border-radius: var(--radius-sm) var(--radius-sm) var(--radius-md) var(--radius-md);
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.tl-dot.filled {
  border-color: transparent;
}

#tl-entree .tl-dot.filled {
  background: var(--color-entry);
  box-shadow: 0 0 8px rgba(var(--color-entry-rgb), 0.5);
}

#tl-pause .tl-dot.filled {
  background: var(--color-pause);
  box-shadow: 0 0 8px rgba(var(--color-pause-rgb), 0.5);
}

#tl-sortie .tl-dot.filled {
  background: var(--color-exit);
  box-shadow: 0 0 8px rgba(var(--color-exit-rgb), 0.5);
}

.tl-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 52px;
}

.tl-time {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  margin-left: auto;
}

.tl-item:not(.active) .tl-time {
  color: var(--text-muted);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.action-btn-circle {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  position: relative;
}

.action-btn-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

/* Entry button */
#btn-entree .action-btn-circle {
  background: rgba(var(--color-entry-rgb), 0.12);
  border: 2px solid rgba(var(--color-entry-rgb), 0.3);
  color: var(--color-entry);
}

#btn-entree.active .action-btn-circle {
  background: rgba(var(--color-entry-rgb), 0.2);
  border-color: var(--color-entry);
  box-shadow: 0 0 20px rgba(var(--color-entry-rgb), 0.3);
}

/* Pause button */
#btn-pause .action-btn-circle {
  background: rgba(var(--color-pause-rgb), 0.12);
  border: 2px solid rgba(var(--color-pause-rgb), 0.3);
  color: var(--color-pause);
}

#btn-pause.active .action-btn-circle {
  background: rgba(var(--color-pause-rgb), 0.2);
  border-color: var(--color-pause);
  box-shadow: 0 0 20px rgba(var(--color-pause-rgb), 0.3);
}

/* Exit button */
#btn-sortie .action-btn-circle {
  background: rgba(var(--color-exit-rgb), 0.12);
  border: 2px solid rgba(var(--color-exit-rgb), 0.3);
  color: var(--color-exit);
}

#btn-sortie.active .action-btn-circle {
  background: rgba(var(--color-exit-rgb), 0.2);
  border-color: var(--color-exit);
  box-shadow: 0 0 20px rgba(var(--color-exit-rgb), 0.3);
}

/* Disabled state */
.action-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Pulse animation for next expected action */
.action-btn.pulse .action-btn-circle {
  animation: actionPulse 2.5s ease-in-out infinite;
}

.action-btn:active:not(.disabled) .action-btn-circle {
  transform: scale(0.9);
}

.action-btn .action-btn-icon {
  font-size: 1.5rem;
}

/* Day Summary */
#day-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.summary-work, .summary-delta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.summary-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-value {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.summary-value.positive { color: var(--color-positive); }
.summary-value.negative { color: var(--color-negative); }

.summary-divider {
  width: 1px;
  height: 36px;
  background: var(--border-card);
}

.summary-idle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
}

/* Pause Alert */
.pause-alert {
  text-align: center;
  padding: 10px 16px;
  background: rgba(var(--color-exit-rgb), 0.1);
  border: 1px solid rgba(var(--color-exit-rgb), 0.2);
  border-radius: var(--radius-md);
  color: var(--color-exit);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  animation: alertPulse 1.5s ease-in-out infinite;
}

.pause-alert.hidden { display: none; }

/* Tags */
.tag-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tag-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-option:hover {
  background: var(--bg-card-hover);
}

.tag-option.selected {
  background: rgba(var(--accent-primary-rgb), 0.12);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
  color: var(--accent-primary);
}

/* Note Section */
.note-section {
  margin-bottom: 16px;
}

.note-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 0;
  width: 100%;
}

.note-toggle-arrow {
  transition: transform var(--transition-fast);
  font-size: 0.7rem;
}

.note-section.expanded .note-toggle-arrow {
  transform: rotate(180deg);
}

.note-input-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.note-section.expanded .note-input-wrapper {
  max-height: 120px;
}

.note-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: none;
  height: 80px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.note-textarea:focus {
  border-color: var(--accent-primary);
}

.note-textarea::placeholder {
  color: var(--text-muted);
}

/* ---- 6. Calendar View ---- */

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  margin-top: 8px;
}

.cal-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.cal-nav-btn:hover {
  background: var(--bg-card-hover);
}

#cal-today {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.1);
  border-color: rgba(var(--accent-primary-rgb), 0.2);
}

.cal-month-year {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Calendar Grid */
#cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 16px;
}

.cal-header-cell {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  gap: 2px;
  min-height: 44px;
}

.cal-cell:not(.cal-empty):not(.cal-future):hover {
  background: var(--bg-card-hover);
  transform: scale(1.05);
}

.cal-cell:active:not(.cal-empty):not(.cal-future) {
  transform: scale(0.95);
}

.cal-empty { cursor: default; }
.cal-future { opacity: 0.3; cursor: default; }

.cal-day-num {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
}

.cal-indicator {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1;
}

.cal-holiday-label,
.cal-note-icon,
.cal-tag-icon {
  position: absolute;
  font-size: 0.5rem;
  line-height: 1;
}

.cal-holiday-label { top: 2px; right: 3px; }
.cal-note-icon { bottom: 2px; right: 3px; }
.cal-tag-icon { bottom: 2px; left: 3px; }

/* Calendar Today */
.cal-today {
  border: 2px solid var(--accent-primary) !important;
  box-shadow: 0 0 12px rgba(var(--accent-primary-rgb), 0.2);
}

.cal-today .cal-day-num {
  color: var(--accent-primary);
  font-weight: 800;
}

/* Calendar Color Coding */
.cal-color-complete { background: rgba(var(--color-entry-rgb), 0.12); }
.cal-color-complete .cal-day-num { color: var(--color-entry); }

.cal-color-partial { background: rgba(var(--color-pause-rgb), 0.1); }
.cal-color-partial .cal-day-num { color: var(--color-pause); }

.cal-color-missing { background: rgba(var(--color-exit-rgb), 0.08); }
.cal-color-missing .cal-day-num { color: var(--color-exit); }

.cal-color-exceptional { background: rgba(100, 149, 237, 0.15); }
.cal-color-exceptional .cal-day-num { color: #6495ed; }

.cal-color-holiday { background: rgba(var(--accent-primary-rgb), 0.08); }
.cal-color-holiday .cal-day-num { color: var(--accent-secondary); }

.cal-color-repos { background: rgba(56, 189, 248, 0.12); }
.cal-color-repos .cal-day-num { color: #38bdf8; }

.cal-color-conge { background: rgba(251, 146, 60, 0.12); }
.cal-color-conge .cal-day-num { color: #fb923c; }

.cal-color-weekend { background: transparent; }
.cal-color-weekend .cal-day-num { color: var(--text-muted); }

.cal-color-future { background: transparent; }
.cal-color-default { background: transparent; }

/* Week Summaries */
#cal-week-summaries {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.week-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.ws-label {
  font-weight: 700;
  color: var(--accent-primary);
  min-width: 28px;
}

.ws-total {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.ws-days {
  color: var(--text-secondary);
  font-weight: 500;
}

.ws-delta {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---- 7. History View ---- */

.hist-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  margin-top: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hist-filters::-webkit-scrollbar { display: none; }

.hist-filter-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.hist-filter-btn:hover {
  background: var(--bg-card-hover);
}

.hist-filter-btn.active {
  background: rgba(var(--accent-primary-rgb), 0.15);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
  color: var(--accent-primary);
}

.hist-secondary-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.hist-tag-select {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.hist-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hist-custom-range {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.hist-custom-range.hidden { display: none; }

.hist-custom-range input {
  flex: 1;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
}

.hist-custom-range input:focus {
  border-color: var(--accent-primary);
}

/* History List */
.hist-week-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(var(--accent-primary-rgb), 0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.hw-label {
  font-weight: 700;
  color: var(--accent-primary);
}

.hw-total {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.hw-delta {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hist-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.hist-entry:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.hist-entry:active {
  transform: scale(0.99);
}

.he-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.he-day-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.he-day-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.he-month {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.he-times {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.he-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.he-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 36px;
}

.he-value {
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.he-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.he-total {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.he-delta {
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.he-tag {
  font-size: 0.65rem;
}

.he-note-indicator {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.55rem;
}

.hist-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.hist-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

/* Export Buttons */
.hist-actions {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  margin-bottom: 8px;
}

.hist-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.hist-action-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.hist-action-btn.primary {
  background: rgba(var(--accent-primary-rgb), 0.1);
  border-color: rgba(var(--accent-primary-rgb), 0.2);
  color: var(--accent-primary);
}

.hist-action-btn.primary:hover {
  background: rgba(var(--accent-primary-rgb), 0.2);
}

/* ---- 8. Stats View ---- */

.stats-section {
  margin-bottom: 16px;
}

/* Stats Week Navigation */
.stats-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stats-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.stats-nav-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
}

.stats-nav-btn:disabled {
  cursor: default;
}

.stats-nav-today {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.1);
}

.stats-week-label {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card {
  margin-bottom: 16px;
}

.stat-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Ring Progress */
.ring-progress-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.ring-progress {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border-card);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke: var(--ring-color, var(--accent-primary));
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
  filter: drop-shadow(0 0 6px var(--ring-color, var(--accent-primary)));
}

.ring-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ring-value {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ring-target {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-delta {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Week Bars */
.week-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.week-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-bar-row.today {
  background: rgba(var(--accent-primary-rgb), 0.06);
  margin: 0 -12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.wb-day {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 28px;
}

.wb-bar-container {
  flex: 1;
  height: 16px;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.wb-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.wb-bar-target {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.bar-complete {
  background: linear-gradient(90deg, var(--accent-primary), var(--color-entry));
}

.bar-partial {
  background: linear-gradient(90deg, var(--color-pause), #ff8c00);
}

.bar-active {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  animation: barPulse 2s ease-in-out infinite;
}

.bar-holiday {
  background: rgba(var(--accent-primary-rgb), 0.2);
}

.bar-repos {
  background: rgba(56, 189, 248, 0.25);
}

.bar-conge {
  background: rgba(251, 146, 60, 0.25);
}

.bar-default { background: var(--border-card); }

.wb-time {
  font-size: 0.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  min-width: 42px;
  text-align: right;
}

.wb-delta {
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}

/* Month Stats Grid */
.month-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ms-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.ms-value {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.ms-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

/* Month Chart */
.chart-container {
  margin-top: 8px;
}

.chart-container canvas {
  width: 100%;
  border-radius: var(--radius-md);
}

/* ---- 9. Modal ---- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

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

.modal-content {
  width: 100%;
  max-width: 500px;
  max-height: 85dvh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-card);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close-btn {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-holiday {
  padding: 8px 14px;
  background: rgba(var(--accent-primary-rgb), 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--accent-secondary);
  margin-bottom: 16px;
}

.modal-holiday.hidden { display: none; }
#modal-time-fields.hidden { display: none; }

.modal-form-group {
  margin-bottom: 14px;
}

.modal-form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-form-row {
  display: flex;
  gap: 8px;
}

.modal-form-row > * {
  flex: 1;
}

.modal-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color var(--transition-fast);
}

.modal-input:focus {
  border-color: var(--accent-primary);
}

.modal-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: none;
  height: 80px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.modal-textarea:focus {
  border-color: var(--accent-primary);
}

/* Modal Tags */
.modal-tags {
  display: flex;
  gap: 8px;
}

.modal-tag-btn {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.modal-tag-btn.selected {
  background: rgba(var(--accent-primary-rgb), 0.12);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
  color: var(--accent-primary);
}

/* Boutons absence modale */
.modal-absence-btns {
  display: flex;
  gap: 8px;
}

.modal-absence-btn {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.modal-absence-btn[data-absence="repos"].selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.modal-absence-btn[data-absence="conge"].selected {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.35);
  color: #fb923c;
}

.mp-absence {
  color: var(--text-primary);
  font-size: 1rem;
}

/* Lignes absence dans l'historique */
.hist-entry-absence {
  background: var(--bg-card);
}

.he-absence-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.he-absence-icon {
  font-size: 1.4rem;
}

.he-absence-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Modal Preview */
.modal-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.mp-work {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mp-delta {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.modal-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-btn-save {
  background: var(--accent-primary);
  color: white;
}

.modal-btn-save:hover {
  filter: brightness(1.1);
}

.modal-btn-delete {
  background: rgba(var(--color-exit-rgb), 0.1);
  color: var(--color-exit);
  flex: 0.4;
}

.modal-btn-delete:hover {
  background: rgba(var(--color-exit-rgb), 0.2);
}

/* ---- 10. Toast ---- */

#toast-container {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-12px);
  transition: all var(--transition-normal);
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: rgba(var(--color-entry-rgb), 0.15);
  border: 1px solid rgba(var(--color-entry-rgb), 0.25);
  color: var(--color-entry);
}

.toast-warning {
  background: rgba(var(--color-pause-rgb), 0.15);
  border: 1px solid rgba(var(--color-pause-rgb), 0.25);
  color: var(--color-pause);
}

.toast-error {
  background: rgba(var(--color-exit-rgb), 0.15);
  border: 1px solid rgba(var(--color-exit-rgb), 0.25);
  color: var(--color-exit);
}

.toast-info {
  background: rgba(var(--accent-primary-rgb), 0.15);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
  color: var(--accent-secondary);
}

/* ---- 11. Common Utility Classes ---- */

.positive { color: var(--color-positive); }
.negative { color: var(--color-negative); }
.hidden { display: none !important; }

/* ---- 12. Animations ---- */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes actionPulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@keyframes pausePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes alertPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes barPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ---- 13. Responsive ---- */

@media (min-width: 600px) {
  .view {
    padding: 24px;
  }

  .cal-cell {
    min-height: 52px;
  }

  .action-btn-circle {
    width: 76px;
    height: 76px;
  }

  .modal-content {
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
  }

  .modal-overlay {
    align-items: center;
  }
}

@media (min-width: 900px) {
  .view {
    max-width: 540px;
  }
}

/* =====================================================
   Clock Sessions List
   ===================================================== */

.clock-sessions {
  padding: 10px 16px;
  margin-bottom: 16px;
  min-height: 52px;
}

.sessions-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 10px 0;
}

.clock-session {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-card);
  font-size: 0.86rem;
}

.clock-session:last-child { border-bottom: none; }

.clock-session.session-active { color: var(--color-entry); }

.cs-num {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
}

.cs-debut, .cs-fin {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cs-arrow { color: var(--text-muted); font-size: 0.75rem; }

.session-en-cours { font-style: italic; opacity: 0.7; }

.cs-tags { margin-left: auto; font-size: 0.9rem; }

.cs-duration {
  font-size: 0.76rem;
  color: var(--text-secondary);
  min-width: 38px;
  text-align: right;
}

/* Badge +1j pour les heures dépassant minuit */
.next-day-badge {
  font-size: 0.62rem;
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
  border-radius: 3px;
  padding: 1px 3px;
  vertical-align: middle;
  font-weight: 600;
}

/* =====================================================
   Modal Sessions
   ===================================================== */

.modal-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-session-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.msi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.msi-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.msi-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.msi-remove:hover {
  color: var(--color-exit);
  background: rgba(var(--color-exit-rgb), 0.1);
}

.msi-times {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.msi-time-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msi-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.msi-nextday-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  cursor: pointer;
  user-select: none;
}

.msi-bottom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.msi-tags { display: flex; gap: 5px; flex-wrap: wrap; }

.msi-tag-btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.msi-tag-btn.selected {
  background: rgba(var(--accent-primary-rgb), 0.12);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
  color: var(--text-primary);
}

.msi-astreinte-btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.msi-astreinte-btn.active {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.45);
  color: #eab308;
  font-weight: 600;
}

.modal-add-session-btn {
  width: 100%;
  padding: 9px;
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 2px;
}

.modal-add-session-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-style: solid;
}

/* Historique : sessions compactes */
.he-sessions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  min-width: 0;
}

.he-session-item {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.he-fin { font-variant-numeric: tabular-nums; }

/* =====================================================
   Astreinte Toggle (vue pointeuse)
   ===================================================== */

.astreinte-toggle {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.astreinte-btn {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
}

.astreinte-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.astreinte-btn.active {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.45);
  color: #eab308;
  font-weight: 600;
}

/* Astreinte toggle dans la modale */
.modal-astreinte-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.modal-astreinte-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-astreinte-btn.active {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.45);
  color: #eab308;
  font-weight: 600;
}

/* =====================================================
   Solde Global d'Heures
   ===================================================== */

.gb-card {
  text-align: center;
}

.gb-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 14px 0 10px;
}

.gb-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.gb-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gb-detail {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.gb-detail-sep {
  color: var(--text-muted);
}

.gb-edit-section {
  border-top: 1px solid var(--border-card);
  padding-top: 12px;
}

.gb-edit-btn {
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gb-edit-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.gb-edit-form {
  margin-top: 12px;
}

.gb-edit-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.gb-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.gb-input {
  width: 110px;
  padding: 8px 12px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  text-align: center;
  font-family: inherit;
}

.gb-input:focus {
  outline: none;
  border-color: rgba(var(--accent-primary-rgb), 0.5);
}

.gb-save-btn {
  padding: 8px 18px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}

.gb-save-btn:hover {
  opacity: 0.85;
}
