/* ============================================================
   Gestion des Congés — Feuille de style principale
   Palette : #1e3a5f (bleu marine), #f0f4f8 (fond), blanc
   ============================================================ */

/* ─── Variables ──────────────────────────────────────────────── */
:root {
  --primary:      #1e3a5f;
  --primary-dark: #162d4a;
  --primary-light:#2c5282;
  --success:      #16a34a;
  --danger:       #dc2626;
  --warning:      #d97706;
  --info:         #0284c7;
  --purple:       #7c3aed;
  --bg:           #f0f4f8;
  --surface:      #ffffff;
  --border:       #e2e8f0;
  --text:         #1a202c;
  --text-muted:   #718096;
  --sidebar-w:    240px;
  --radius:       8px;
  --shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --transition:   .2s ease;
}

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

html { font-size: 15px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout principal ───────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-icon { font-size: 1.5rem; }

.brand-name {
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.2;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
  font-size: .9rem;
}

.nav-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}

.nav-item.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-left-color: #63b3ed;
  font-weight: 600;
}

.nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.balance-widget {
  background: rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  text-align: center;
}

.balance-label { color: rgba(255,255,255,.7); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.balance-value { color: #fff; font-size: 1.5rem; font-weight: 700; }

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.user-name  { color: #fff; font-size: .875rem; font-weight: 600; }
.user-role  { color: rgba(255,255,255,.65); font-size: .75rem; }

.btn-logout {
  display: block;
  text-align: center;
  padding: 8px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  border-radius: var(--radius);
  font-size: .85rem;
  transition: background var(--transition);
  text-decoration: none;
}
.btn-logout:hover { background: rgba(220,38,38,.5); color: #fff; text-decoration: none; }

/* ─── Main content ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  width: 100%;
}

.page-header {
  margin-bottom: 20px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Top bar mobile */
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle  { cursor: pointer; font-size: 1.3rem; color: #fff; }
.topbar-title { font-weight: 600; font-size: .95rem; }
.topbar-logout { color: rgba(255,255,255,.8); font-size: 1.2rem; text-decoration: none; }

/* ─── Cartes ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.card--urgent { border-left: 4px solid var(--warning); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.card-link { font-size: .85rem; color: var(--primary); }

.card-body { padding: 20px; }

/* ─── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stats-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.stat-card--blue::before   { background: var(--info); }
.stat-card--green::before  { background: var(--success); }
.stat-card--orange::before { background: var(--warning); }
.stat-card--red::before    { background: var(--danger); }
.stat-card--purple::before { background: var(--purple); }

.stat-icon { font-size: 1.8rem; }

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stat-action {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: auto;
}

.stat-progress { margin-top: 8px; }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--info);
  border-radius: 3px;
  transition: width .5s ease;
}

.progress-label { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Boutons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; opacity: .9; }

.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }

.btn-success   { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-gcal {
  background: #fff;
  color: #1a73e8;
  border-color: #dadce0;
}
.btn-gcal:hover { background: #f8f9fa; }

.btn-block { width: 100%; justify-content: center; padding: 12px; }
.btn-sm    { padding: 5px 10px; font-size: .8rem; }

.btn-group { display: flex; gap: 4px; justify-content: center; }

.badge-count {
  background: var(--warning);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .75rem;
  font-weight: 700;
}

/* ─── Formulaires ────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group--end { display: flex; align-items: flex-end; gap: 8px; }
.form-group--narrow { max-width: 200px; }

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.required { color: var(--danger); }

.form-input {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}

.input-error { border-color: var(--danger) !important; }

.form-textarea { resize: vertical; min-height: 80px; }

.form-select { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; padding-right: 32px; }

.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 4px; display: block; }

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

.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }

.form-page { max-width: 700px; }

.form-card { max-width: 700px; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .form-input { flex: 1; padding-right: 40px; }
.input-icon, .input-unit {
  position: absolute; right: 10px;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: .9rem;
}

/* ─── Radio cards (type de congé) ────────────────────────────── */
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.radio-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.radio-card input[type=radio] {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.radio-card:hover { border-color: var(--primary); background: #f8fafc; }
.radio-card.selected { border-color: var(--primary); background: #eff6ff; }

.radio-label { font-weight: 600; font-size: .9rem; }
.radio-desc  { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Compteur jours ─────────────────────────────────────────── */
.days-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 600;
}

.days-icon { font-size: 1.2rem; }

.balance-check { font-size: .85rem; margin-left: auto; }
.balance-check--ok    { color: var(--success); }
.balance-check--error { color: var(--danger); }

/* ─── Info banner ────────────────────────────────────────────── */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: .875rem;
}

.info-icon { font-size: 1.3rem; }
.info-banner small { display: block; color: var(--text-muted); font-size: .8rem; margin-top: 2px; }

/* ─── Tableaux ───────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table--striped tbody tr:nth-child(even) { background: #fafafa; }
.table--hover tbody tr:hover { background: #f0f9ff; }
.table .row-inactive { opacity: .6; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-danger  { background: #fee2e2; color: #dc2626; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-info    { background: #dbeafe; color: #2563eb; }
.badge-blue    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: #f1f5f9; color: #475569; }

/* Type badges */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.type-payé         { background: #dbeafe; color: #1e40af; }
.type-maladie      { background: #fee2e2; color: #991b1b; }
.type-exceptionnel { background: #fef3c7; color: #92400e; }
.type-sans_solde   { background: #f1f5f9; color: #475569; }

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: .875rem;
  border-left: 4px solid;
}

.alert ul { margin: 6px 0 0 16px; }

.alert-success { background: #f0fdf4; border-color: var(--success); color: #166534; }
.alert-error   { background: #fef2f2; border-color: var(--danger);  color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--warning); color: #92400e; }
.alert-info    { background: #eff6ff; border-color: var(--info);    color: #1e40af; }

/* ─── Demande card (validation) ──────────────────────────────── */
.request-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.request-identity { display: flex; align-items: center; gap: 12px; }
.request-name  { font-size: 1.05rem; font-weight: 700; }
.request-meta  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.request-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item--full { grid-column: 1/-1; }

.detail-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }
.detail-value { font-size: .9rem; }

.request-gcal {
  padding: 4px 20px 12px;
}

.request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 20px;
  background: #fafafa;
  border-top: 1px solid var(--border);
}

.action-form { display: flex; flex-direction: column; gap: 8px; }

/* ─── Personnes / avatars ────────────────────────────────────── */
.person-list { list-style: none; }

.person-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.person-item:last-child { border-bottom: none; }

.person-info { flex: 1; }
.person-info strong { display: block; font-size: .875rem; }
.person-info small  { color: var(--text-muted); font-size: .78rem; }

.person-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.person-avatar--lg  { width: 44px; height: 44px; font-size: .95rem; }
.person-avatar--sm  { width: 28px; height: 28px; font-size: .7rem; }

.user-cell { display: flex; align-items: center; gap: 8px; }

/* ─── Quick actions ──────────────────────────────────────────── */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* ─── Dashboard grid ─────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ─── Empty states ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 20px 0;
  font-size: .9rem;
}

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

.empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ─── Filtres ────────────────────────────────────────────────── */
.filter-form { }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-row .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ─── Vue toggle ─────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ─── Onglets ────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-item {
  padding: 10px 20px;
  font-size: .875rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  text-decoration: none;
}

.tab-item:hover { color: var(--primary); text-decoration: none; }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ─── Tooltip ────────────────────────────────────────────────── */
.tooltip-wrap { position: relative; cursor: default; }

.tooltip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a202c;
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: .75rem;
  white-space: pre-wrap;
  max-width: 250px;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

.tooltip-wrap:hover .tooltip-text { display: block; }

.tooltip-icon { cursor: help; }

/* ─── Solde (page hr/users balance) ─────────────────────────── */
.balance-display {
  text-align: center;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.balance-number { font-size: 3rem; font-weight: 800; color: var(--primary); }
.balance-unit   { display: block; color: var(--text-muted); font-size: .9rem; }
.section-title  { font-size: 1rem; font-weight: 600; margin: 20px 0 12px; color: var(--primary); }

.balance-form { max-width: 600px; }

/* Toggle switch */
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .875rem; }

.toggle-switch {
  position: relative;
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 11px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.toggle-label input[type=checkbox]:checked + .toggle-switch { background: var(--success); }
.toggle-label input[type=checkbox]:checked + .toggle-switch::after { left: 20px; }
.toggle-label input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }

/* ─── Login ───────────────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo  { font-size: 3.5rem; display: block; margin-bottom: 8px; }
.login-title { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.login-subtitle { color: rgba(255,255,255,.75); font-size: .9rem; }

.login-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 28px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.login-card .btn-primary { margin-top: 8px; }

.login-footer { text-align: center; color: rgba(255,255,255,.5); font-size: .8rem; margin-top: 16px; }

/* ─── Calendrier JS ──────────────────────────────────────────── */
.cal-container {
  font-size: .875rem;
  user-select: none;
}

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

.cal-title { font-weight: 700; font-size: 1rem; color: var(--primary); }

.cal-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 10px;
  cursor: pointer;
  font-size: .85rem;
  transition: background var(--transition);
}

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

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day-header {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 2px;
  text-transform: uppercase;
}

.cal-day {
  min-height: 60px;
  border-radius: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid transparent;
  position: relative;
  transition: background var(--transition);
}

.cal-day--empty       { background: transparent; }
.cal-day--today       { background: #eff6ff; border-color: var(--info); }
.cal-day--weekend     { background: #fafafa; }
.cal-day--other-month { opacity: .4; }

.cal-day-num {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  text-align: right;
  line-height: 1;
  margin-bottom: 4px;
}

.cal-day--today .cal-day-num {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  float: right;
  font-size: .7rem;
}

/* Événements dans le calendrier */
.cal-event {
  display: block;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: .68rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.4;
}

.cal-event:hover { filter: brightness(1.1); }

/* Mini calendrier */
.cal-mini .cal-day  { min-height: 34px; }
.cal-mini .cal-event { display: block; width: 8px; height: 8px; border-radius: 50%; padding: 0; margin: 1px 2px; display: inline-block; }

/* Tooltip calendrier */
.cal-tooltip {
  position: fixed;
  background: #1a202c;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .78rem;
  z-index: 9999;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  max-width: 220px;
  line-height: 1.5;
}

/* ─── Légende calendrier ─────────────────────────────────────── */
.legend-card { margin-bottom: 20px; }
.legend-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.legend-items, .legend-types { display: flex; flex-wrap: wrap; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── Texte utilitaires ───────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-center  { text-align: center; }
.text-sm      { font-size: .8rem; }
.text-ellipsis { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

/* ─── Heures supplémentaires ─────────────────────────────────── */
.hours-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.hours-badge--pos {
  background: #dcfce7;
  color: #16a34a;
}

.hours-badge--neg {
  background: #fee2e2;
  color: #dc2626;
}

.two-col-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.form-input--sm {
  padding: 6px 10px;
  font-size: .85rem;
  height: auto;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: .78rem;
  color: var(--text-muted);
}

.stat-card--success { border-left: 4px solid var(--success); }
.stat-card--danger  { border-left: 4px solid var(--danger); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar-toggle-input:checked ~ .app-layout .sidebar {
    transform: translateX(0);
  }

  .topbar { display: flex; }

  .main-content { margin-left: 0; }

  .content-wrapper { padding: 16px; }

  .dashboard-grid  { grid-template-columns: 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .radio-group     { grid-template-columns: 1fr 1fr; }
  .request-actions { grid-template-columns: 1fr; }
  .stats-grid      { grid-template-columns: repeat(2, 1fr); }
  .filter-row      { flex-direction: column; }
  .filter-row .form-group { min-width: 100%; }
  .request-details { grid-template-columns: 1fr 1fr; }
  .two-col-layout  { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .radio-group { grid-template-columns: 1fr; }
  .quick-actions .btn { width: 100%; justify-content: center; }
}
