/* ═════════════════════════════════════════════════════════════════
   🎨 LOKALIST DASHBOARD — Styles partagés
   ═════════════════════════════════════════════════════════════════
   Charger via : <link rel="stylesheet" href="/shared/styles.css">
   Doit être inclus AVANT tout style spécifique à une page.
   ═════════════════════════════════════════════════════════════════ */

:root {
  --primary: #1D9E75;
  --primary-dark: #0F6E56;
  --primary-light: #E1F5EE;
  --accent: #EF9F27;
  --accent-light: #FAEEDA;
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --surface2: #F3F4F6;
  --border: #E5E7EB;
  --text: #1A1A2E;
  --muted: #6B7280;
  --error: #E24B4A;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

/* === Sélecteur commune admin === */
.commune-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}
.commune-selector:hover { border-color: var(--primary); background: var(--primary-light); }
.commune-selector .label { display: flex; align-items: center; gap: 6px; }
.commune-selector .arrow { color: var(--muted); transition: transform 0.2s; }
.commune-selector.open .arrow { transform: rotate(180deg); }
.commune-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 240px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 1000;
  padding: 6px;
  display: none;
}
.commune-dropdown.show { display: block; }
.commune-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text);
}
.commune-option:hover { background: var(--surface2); }
.commune-option.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
.commune-option .check { margin-left: auto; color: var(--primary); }
.commune-option-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* === Catégories pliables sidebar === */
.nav-category {
  margin: 6px 4px 2px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  transition: background 0.15s;
}
.nav-category:hover { background: var(--surface2); }
.nav-category-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-category-chevron {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.25s ease;
}
.nav-category.collapsed .nav-category-chevron { transform: rotate(-90deg); }
.nav-category-content {
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.nav-category.collapsed + .nav-category-content { max-height: 0; opacity: 0; }
.nav-category-content .nav-item { margin-left: 6px; }

/* === LOGIN === */
.login-screen {
  width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff 60%);
}
.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 420px;
  box-shadow: 0 8px 40px rgba(29,158,117,0.12);
}
.login-box .logo { text-align: center; margin-bottom: 32px; }
.login-box .logo h1 {
  font-family: 'Syne', sans-serif;
  font-size: 32px; font-weight: 800;
  color: var(--primary);
}
.login-box .logo p {
  color: var(--muted);
  font-size: 13px; margin-top: 4px;
  text-transform: uppercase; letter-spacing: 1px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px;
  display: block; margin-bottom: 6px; font-weight: 600;
}
.login-form input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.login-form input:focus { border-color: var(--primary); }
.login-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.login-btn:hover { background: var(--primary-dark); }
.forgot-btn {
  background: none; border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  text-align: center; padding: 4px;
}
.forgot-btn:hover { color: var(--primary); }
.login-error {
  background: #FEF2F2;
  color: var(--error);
  border: 1px solid #FECACA;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.login-error.show { display: block; }

/* === APP === */
.app { display: none; width: 100%; }
.app.show { display: flex; }

/* === SIDEBAR === */
.sidebar {
  width: 240px;
  height: 100vh;
  max-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  box-shadow: 2px 0 12px rgba(0,0,0,0.04);
  overflow: hidden;
}
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo h1 {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--primary);
}
.sidebar-logo p {
  font-size: 11px; color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase; letter-spacing: 1px;
}
.mairie-info {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--primary-light);
}
.mairie-info .name {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 14px;
  display: flex; align-items: center; gap: 6px;
}
.mairie-info .ville {
  color: var(--primary);
  font-size: 12px; margin-top: 2px;
}

/* Badge ADMIN dans sidebar */
.admin-pill {
  display: none;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.admin-pill.show { display: inline-flex; }

.nav {
  flex: 1;
  min-height: 0;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.nav::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item .icon { font-size: 18px; width: 24px; text-align: center; }

.nav-admin-separator {
  display: none;
  margin: 8px 4px 4px;
  padding: 0 10px;
}
.nav-admin-separator.show { display: block; }
.nav-admin-separator span {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-admin-separator span::before,
.nav-admin-separator span::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #A7F3D0;
}

.nav-item.admin-nav {
  display: flex;
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid #A7F3D0;
  font-weight: 600;
}
.nav-item.admin-nav.show { display: flex; }
.nav-item.admin-nav:hover { background: #C6F0E2; }
.nav-item.admin-nav.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.logout-btn {
  width: 100%;
  background: #FEF2F2;
  color: var(--error);
  border: 1px solid #FECACA;
  padding: 9px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: background 0.2s;
}
.logout-btn:hover { background: #FEE2E2; }

/* === MAIN === */
.main { margin-left: 240px; flex: 1; padding: 32px; min-height: 100vh; }
.page { display: none; }
.page.active { display: block; }
.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header-left h2 {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.page-header-left p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* === STATS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid transparent;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.stat-card .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  font-weight: 600;
}
.stat-card .value {
  font-family: 'Syne', sans-serif;
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 800;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.1;
}
.stat-card.green { border-top-color: var(--primary); }
.stat-card.green .value { color: var(--primary); }
.stat-card.orange { border-top-color: var(--accent); }
.stat-card.orange .value { color: var(--accent); }
.stat-card.blue { border-top-color: #3B82F6; }
.stat-card.blue .value { color: #3B82F6; }
.stat-card.cyan { border-top-color: #06B6D4; }
.stat-card.cyan .value { color: #06B6D4; }
.stat-card.purple { border-top-color: #8B5CF6; }
.stat-card.purple .value { color: #8B5CF6; }
.stat-card.red { border-top-color: #E24B4A; }
.stat-card.red .value { color: #E24B4A; }

/* === TABLE === */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.table-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text);
}
table { width: 100%; border-collapse: collapse; }
th {
  padding: 10px 24px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: var(--surface2);
}
td {
  padding: 13px 24px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--primary-light); }

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge.green { background: #D1FAE5; color: #065F46; }
.badge.orange { background: var(--accent-light); color: #92400E; }
.badge.blue { background: #DBEAFE; color: #1E40AF; }
.badge.red { background: #FEE2E2; color: #991B1B; }
.badge.cyan { background: #CFFAFE; color: #155E75; }
.badge.purple { background: #EDE9FE; color: #5B21B6; }
.badge.gray { background: var(--surface2); color: var(--muted); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: #FEE2E2; color: var(--error); border: 1px solid #FECACA; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 7px; }

/* === FORMS === */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 72px; }
.form-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* === MODAL === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 580px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px; font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.modal-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.modal-footer {
  display: flex; gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* === Diviseurs et apercus === */
.section-divider {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.apercu-card {
  background: var(--primary-light);
  border: 1px solid #A7F3D0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
}
.apercu-card .apercu-title {
  font-size: 11px; font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.apercu-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--primary-dark);
  padding: 3px 0;
}
.apercu-row.total {
  font-weight: 700;
  border-top: 1px solid #6EE7B7;
  margin-top: 4px; padding-top: 8px;
}

/* === Notification preview === */
.notif-preview { background: #1A1A2E; border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.notif-preview-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.notif-app-icon {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: white; font-weight: 700;
}
.notif-app-name {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.notif-preview-titre { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.notif-preview-message { font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.5; }

/* === Alert (in-page) === */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
  font-weight: 500;
}
.alert.success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert.error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert.show { display: block; }

/* === Info grid === */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px; }
.info-item .info-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
  font-weight: 600;
}
.info-item .info-val { font-size: 14px; color: var(--text); font-weight: 500; }

/* === Campagne card === */
.campagne-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s;
}
.campagne-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.campagne-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.campagne-body { flex: 1; min-width: 0; }
.campagne-nom { font-weight: 700; font-size: 15px; color: var(--text); }
.campagne-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.campagne-montant {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

/* === Admin banner === */
.admin-banner {
  background: linear-gradient(135deg, #1D9E75, #0F6E56);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-banner-text h3 { color: white; font-size: 15px; font-weight: 700; }
.admin-banner-text p { color: rgba(255,255,255,0.75); font-size: 12px; margin-top: 2px; }

/* === Mairie switcher === */
.mairie-switch-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mairie-switch-btn {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #A7F3D0;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}
.mairie-switch-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.mairie-switch-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* === États vides / chargement === */
.loading { text-align: center; padding: 40px; color: var(--muted); font-size: 14px; }
.empty-state { text-align: center; padding: 48px; color: var(--muted); }
.empty-state .emoji { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; line-height: 20px; }

/* === Permissions modal === */
.perm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.perm-check:hover { background: var(--surface2); }
.perm-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* === CALENDRIER VISUEL (agenda) === */
.agenda-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.agenda-toggle-btn {
  padding: 8px 20px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}
.agenda-toggle-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-nav button {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s;
}
.cal-nav button:hover { background: var(--border); }
.cal-mois-label {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--text);
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-jour-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  padding: 6px 0;
}
.cal-case {
  min-height: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.cal-case:hover { background: var(--primary-light); }
.cal-case.autre-mois { opacity: 0.35; }
.cal-case.aujourd-hui { border-color: var(--primary); border-width: 2px; }
.cal-case.aujourd-hui .cal-num { color: var(--primary); font-weight: 800; }
.cal-num { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.cal-evt-pill {
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-more { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* === RESPONSIVE === */
.mobile-menu-btn { display: none; }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 140;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .sidebar { width: 200px; }
  .main { margin-left: 200px; padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .nav-category-label { font-size: 10px; }
  .nav-item { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open {
    display: flex !important;
    position: fixed;
    z-index: 150;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    top: 0; left: 0;
  }
  .mobile-menu-btn {
    display: flex !important;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 200;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .main {
    margin-left: 0 !important;
    padding: 60px 16px 16px 16px !important;
    width: 100% !important;
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .form-grid { grid-template-columns: 1fr !important; }
  .page-header { flex-direction: column !important; gap: 12px !important; }
  .table-container { overflow-x: auto !important; }
  table { min-width: 500px !important; }
  .campagne-card { flex-direction: column !important; }
  .modal { width: 95vw !important; padding: 16px !important; }
  .sidebar.open .nav-category-label { font-size: 11px; }
  .sidebar.open .nav-item { padding: 8px 10px; font-size: 13px; }
  .sidebar.open .nav { padding: 8px 6px; }
}
