/* ============================================================
   PLANNING COLLECTE — Quimperlé Communauté
   Design System
   ============================================================ */

:root {
  --primary:        #1B4332;
  --primary-mid:    #2D6A4F;
  --primary-light:  #52B788;
  --primary-xlight: #D8F3DC;
  --bg:             #F0F7F2;
  --card:           #FFFFFF;
  --text:           #1A2A1E;
  --text-muted:     #6B7878;
  --border:         #CBE0D4;
  --danger:         #DC2626;
  --danger-light:   #FEE2E2;
  --warning:        #D97706;
  --warning-light:  #FEF3C7;
  --success:        #16A34A;
  --success-light:  #DCFCE7;
  --info:           #0369A1;
  --info-light:     #E0F2FE;
  --om-bg:          #FFFBEB;
  --om-border:      #F59E0B;
  --om-text:        #92400E;
  --tri-bg:         #F0FDF4;
  --tri-border:     #22C55E;
  --tri-text:       #14532D;
  --radius:         10px;
  --shadow:         0 2px 8px rgba(27,67,50,.10);
  --shadow-lg:      0 8px 24px rgba(27,67,50,.15);
  --header-h:       56px;
  --nav-h:          64px;
  --transition:     .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
input, button, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }

/* ============================================================ SCREENS */
.screen { min-height: 100vh; }
.screen.hidden { display: none; }

/* ============================================================ LOGIN */
#screen-login {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-mid) 60%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px 16px;
}
.login-container { width: 100%; max-width: 420px; }

.login-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px; justify-content: center;
}
.login-brand-icon {
  width: 52px; height: 52px; background: rgba(255,255,255,.18);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
}
.login-brand-icon svg { width: 32px; height: 32px; fill: white; }
.login-brand-text { color: white; }
.login-brand-name { font-size: 1.15rem; font-weight: 700; display: block; }
.login-brand-sub { font-size: .82rem; opacity: .8; display: block; }

.login-card {
  background: white; border-radius: 18px; padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-card h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; color: var(--primary); }

.role-tabs {
  display: flex; gap: 4px; background: var(--bg); border-radius: 8px;
  padding: 4px; margin-bottom: 24px;
}
.role-tab {
  flex: 1; padding: 9px 8px; border: none; background: transparent;
  border-radius: 6px; cursor: pointer; font-size: .9rem; font-weight: 500;
  color: var(--text-muted); transition: var(--transition);
}
.role-tab.active { background: var(--primary); color: white; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 1rem; color: var(--text);
  background: white; transition: var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-xlight);
}
.form-group input[inputmode="numeric"] { letter-spacing: .3em; font-size: 1.3rem; text-align: center; }

.btn-primary {
  width: 100%; padding: 14px; background: var(--primary); color: white;
  border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); margin-top: 8px;
}
.btn-primary:hover { background: var(--primary-mid); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.login-error {
  margin-top: 14px; padding: 10px 14px; background: var(--danger-light);
  color: var(--danger); border-radius: 8px; font-size: .9rem; text-align: center;
}
.login-footer {
  color: rgba(255,255,255,.6); text-align: center; margin-top: 20px;
  font-size: .8rem;
}
.hidden { display: none !important; }

/* ============================================================ APP HEADER */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-brand-icon {
  width: 34px; height: 34px; background: rgba(255,255,255,.15);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; letter-spacing: -.02em;
}
.header-brand-title { font-size: .95rem; font-weight: 700; }
.header-brand-week { font-size: .75rem; opacity: .75; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-user-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border-radius: 20px; padding: 5px 10px;
  font-size: .82rem; font-weight: 600;
}
.header-user-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary-light);
}
.header-notif-btn {
  position: relative; background: none; border: none; cursor: pointer;
  color: white; padding: 6px; border-radius: 8px;
}
.header-notif-btn svg { width: 22px; height: 22px; fill: none; stroke: white; stroke-width: 2; }
.notif-badge {
  position: absolute; top: 2px; right: 2px; background: var(--danger);
  color: white; border-radius: 10px; font-size: .65rem; font-weight: 700;
  min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--primary);
}

/* ============================================================ BOTTOM NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h);
  background: white; border-top: 1px solid var(--border);
  display: flex; z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; background: none; border: none;
  cursor: pointer; color: var(--text-muted); font-size: .68rem; font-weight: 500;
  transition: var(--transition); padding: 8px 4px;
}
.nav-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { stroke: var(--primary); }
.nav-item-alert { color: var(--danger); }
.nav-item-alert svg { stroke: var(--danger); }
.nav-item-alert.active { color: var(--danger); }

/* ============================================================ MAIN CONTENT */
.app-main {
  padding-top: var(--header-h); padding-bottom: var(--nav-h);
  min-height: 100vh;
}
.page { padding: 16px; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================ CARDS */
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--primary); }
.card-subtitle { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

/* ============================================================ SECTION TITLE */
.section-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); margin: 20px 0 10px;
}
.section-title:first-child { margin-top: 4px; }

/* ============================================================ DASHBOARD */
.dashboard-greeting { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.dashboard-date { font-size: .9rem; color: var(--text-muted); margin-bottom: 20px; }

.today-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: white; border-radius: 14px; padding: 18px; margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(27,67,50,.3);
}
.today-card-label { font-size: .78rem; opacity: .75; text-transform: uppercase; letter-spacing: .08em; }
.today-card-circuit { font-size: 1.4rem; font-weight: 800; margin: 4px 0; }
.today-card-details { font-size: .88rem; opacity: .85; display: flex; gap: 12px; flex-wrap: wrap; }
.today-card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.18); border-radius: 6px; padding: 3px 8px;
}
.today-card-none { opacity: .7; font-size: .95rem; }

.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; border-left: 3px solid transparent;
}
.alert-item.absence { background: var(--danger-light); border-color: var(--danger); }
.alert-item.retard { background: var(--warning-light); border-color: var(--warning); }
.alert-item.info { background: var(--info-light); border-color: var(--info); }
.alert-item-icon { font-size: 1.1rem; }
.alert-item-text { flex: 1; font-size: .88rem; font-weight: 500; }
.alert-item-time { font-size: .75rem; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); text-align: center;
}
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================ PLANNING */
.planning-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.week-nav {
  display: flex; align-items: center; gap: 8px; background: var(--card);
  border-radius: var(--radius); padding: 6px 10px; box-shadow: var(--shadow);
}
.week-nav-btn {
  background: none; border: none; cursor: pointer; color: var(--primary);
  padding: 4px; border-radius: 6px; display: flex; align-items: center;
}
.week-nav-btn svg { width: 18px; height: 18px; }
.week-nav-label { font-weight: 600; font-size: .88rem; min-width: 180px; text-align: center; }
.btn-print {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 8px 12px; cursor: pointer; font-size: .85rem; font-weight: 600;
  color: var(--primary); transition: var(--transition);
}
.btn-print:hover { border-color: var(--primary); background: var(--primary-xlight); }
.btn-print svg { width: 16px; height: 16px; }

/* Planning table wrapper */
.planning-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
.planning-table {
  border-collapse: collapse; font-size: .8rem; min-width: 720px;
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.planning-table th {
  background: var(--primary); color: white; padding: 10px 8px;
  text-align: center; font-weight: 600; font-size: .75rem;
  white-space: nowrap; position: sticky; top: 0;
}
.planning-table th:first-child { text-align: left; padding-left: 12px; min-width: 140px; }
.planning-table td {
  padding: 6px 6px; border: 1px solid var(--border);
  vertical-align: top; min-width: 110px;
}
.planning-table td:first-child {
  min-width: 140px; max-width: 140px; padding: 8px 12px;
  background: var(--bg); font-weight: 600; font-size: .78rem;
  border-right: 2px solid var(--border); position: sticky; left: 0;
}

.circuit-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .7rem;
  font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-bottom: 3px;
}
.circuit-badge.om { background: var(--om-bg); color: var(--om-text); border: 1px solid var(--om-border); }
.circuit-badge.tri { background: var(--tri-bg); color: var(--tri-text); border: 1px solid var(--tri-border); }
.circuit-zone { font-size: .78rem; color: var(--text-muted); line-height: 1.3; }
.circuit-hours { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }

.planning-cell { cursor: pointer; transition: background var(--transition); min-height: 54px; }
.planning-cell:hover { background: var(--primary-xlight) !important; }
.planning-cell.om-row { background: #FFFDF4; }
.planning-cell.tri-row { background: #F7FDF9; }
.planning-cell.empty { background: #FAFAFA; cursor: default; }
.planning-cell.empty:hover { background: #FAFAFA !important; }

.cell-content { padding: 2px; }
.cell-ripeurs { display: flex; flex-direction: column; gap: 2px; }
.cell-ripeur {
  font-size: .75rem; font-weight: 500; padding: 2px 5px;
  background: var(--primary-xlight); color: var(--primary);
  border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100px;
}
.cell-ripeur.chauffeur { background: var(--primary); color: white; }
.cell-camion { font-size: .68rem; color: var(--text-muted); margin-top: 3px; }
.cell-add {
  font-size: .7rem; color: var(--text-muted); display: flex; align-items: center;
  gap: 3px; opacity: .6;
}
.cell-add svg { width: 12px; height: 12px; }

.type-separator th {
  background: var(--bg); color: var(--text-muted); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  padding: 6px 12px;
}

/* ============================================================ SIGNALER */
.signal-tabs {
  display: flex; gap: 4px; background: var(--bg); border-radius: var(--radius);
  padding: 4px; margin-bottom: 20px;
}
.signal-tab {
  flex: 1; padding: 10px 6px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; font-size: .85rem; font-weight: 600;
  color: var(--text-muted); transition: var(--transition); text-align: center;
}
.signal-tab.active { background: white; color: var(--primary); box-shadow: var(--shadow); }

.photo-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer;
  transition: var(--transition); margin-bottom: 14px;
}
.photo-upload-area:hover { border-color: var(--primary); background: var(--primary-xlight); }
.photo-upload-area svg { width: 32px; height: 32px; stroke: var(--text-muted); margin: 0 auto 8px; }
.photo-upload-area p { font-size: .85rem; color: var(--text-muted); }
.photo-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.photo-preview-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-remove {
  position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7);
  color: white; border: none; border-radius: 50%; width: 22px; height: 22px;
  cursor: pointer; font-size: .8rem; display: flex; align-items: center; justify-content: center;
}

/* ============================================================ INFOS / TABLEAU */
.annonce-card { margin-bottom: 14px; overflow: hidden; }
.annonce-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.annonce-categorie-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px;
}
.cat-info { background: var(--info); }
.cat-urgent { background: var(--danger); }
.cat-evenement { background: var(--warning); }
.annonce-title { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.annonce-meta { font-size: .75rem; color: var(--text-muted); }
.annonce-body { font-size: .9rem; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.annonce-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
.annonce-photos img { border-radius: 8px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.annonce-badge {
  display: inline-flex; align-items: center; padding: 3px 8px;
  border-radius: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; margin-top: 8px;
}
.annonce-badge.info { background: var(--info-light); color: var(--info); }
.annonce-badge.urgent { background: var(--danger-light); color: var(--danger); }
.annonce-badge.evenement { background: var(--warning-light); color: var(--warning); }

/* ============================================================ ÉQUIPES */
.ripeur-list { display: flex; flex-direction: column; gap: 8px; }
.ripeur-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow);
}
.ripeur-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-xlight); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.ripeur-info { flex: 1; }
.ripeur-name { font-weight: 700; font-size: .95rem; }
.ripeur-equipe { font-size: .78rem; color: var(--text-muted); }
.ripeur-status {
  font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
.status-actif { background: var(--success-light); color: var(--success); }
.status-absent { background: var(--danger-light); color: var(--danger); }
.status-conge { background: var(--warning-light); color: var(--warning); }

/* ============================================================ CAMIONS */
.camion-list { display: flex; flex-direction: column; gap: 8px; }
.camion-item {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); border-left: 4px solid transparent;
}
.camion-item.en_service { border-color: var(--success); }
.camion-item.garage { border-color: var(--warning); }
.camion-item.maintenance { border-color: var(--danger); }
.camion-header { display: flex; align-items: center; justify-content: space-between; }
.camion-num { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.camion-type { font-size: .8rem; color: var(--text-muted); }
.camion-status {
  font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
.camion-status.en_service { background: var(--success-light); color: var(--success); }
.camion-status.garage { background: var(--warning-light); color: var(--warning); }
.camion-status.maintenance { background: var(--danger-light); color: var(--danger); }
.camion-raison { font-size: .82rem; color: var(--text-muted); margin-top: 6px; }

/* ============================================================ HEURES */
.heures-period {
  display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px;
}
.period-btn {
  white-space: nowrap; padding: 8px 16px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--card);
  cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text-muted);
  transition: var(--transition);
}
.period-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.heures-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 8px;
}
.heures-ripeur-name { font-weight: 600; font-size: .95rem; }
.heures-equipe { font-size: .78rem; color: var(--text-muted); }
.heures-count {
  font-size: 1.3rem; font-weight: 800; color: var(--primary);
}
.heures-count span { font-size: .75rem; font-weight: 500; color: var(--text-muted); }

/* ============================================================ MESSAGES */
.message-list { display: flex; flex-direction: column; gap: 8px; }
.message-item {
  background: var(--card); border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow);
}
.message-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.message-from { font-weight: 700; font-size: .88rem; }
.message-time { font-size: .75rem; color: var(--text-muted); }
.message-body { font-size: .88rem; color: var(--text); line-height: 1.5; }
.message-unread { border-left: 3px solid var(--primary); }

/* ============================================================ FAB */
.fab {
  position: fixed; bottom: calc(var(--nav-h) + 16px); right: 16px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: white; border: none;
  cursor: pointer; box-shadow: 0 4px 16px rgba(27,67,50,.4);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); z-index: 50;
}
.fab:hover { background: var(--primary-mid); transform: scale(1.05); }
.fab svg { width: 24px; height: 24px; fill: none; stroke: white; stroke-width: 2.5; }

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius); border: none;
  cursor: pointer; font-size: .9rem; font-weight: 600; transition: var(--transition);
}
.btn-sm { padding: 7px 12px; font-size: .82rem; }
.btn-ghost {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary-xlight); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: .9; }
.btn-success { background: var(--success); color: white; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================ MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 200; padding: 16px;
  animation: overlayIn .2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  background: white; border-radius: 20px 20px 0 0; width: 100%; max-width: 520px;
  max-height: 88vh; overflow-y: auto; padding: 24px;
  animation: sheetUp .25s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-handle {
  width: 40px; height: 4px; background: var(--border); border-radius: 2px;
  margin: -12px auto 18px;
}
.modal-title { font-size: 1.15rem; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 20px; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* ============================================================ CHIPS & BADGES */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600;
}
.chip-primary { background: var(--primary-xlight); color: var(--primary); }
.chip-om { background: var(--om-bg); color: var(--om-text); border: 1px solid var(--om-border); }
.chip-tri { background: var(--tri-bg); color: var(--tri-text); border: 1px solid var(--tri-border); }

/* ============================================================ EMPTY STATE */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .95rem; }

/* ============================================================ TOAST */
#toast-container {
  position: fixed; bottom: calc(var(--nav-h) + 12px); left: 16px; right: 16px;
  z-index: 300; pointer-events: none;
}
.toast {
  background: var(--text); color: white; border-radius: 10px;
  padding: 12px 16px; margin-top: 8px; font-size: .88rem; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); animation: toastIn .25s ease;
  pointer-events: auto;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================ SELECT MULTI */
.multi-select {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  max-height: 180px; overflow-y: auto; margin-bottom: 14px;
}
.multi-select-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background var(--transition);
}
.multi-select-item:hover { background: var(--bg); }
.multi-select-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.multi-select-item label { cursor: pointer; font-size: .9rem; flex: 1; }
.multi-select-item.selected { background: var(--primary-xlight); }

/* ============================================================ MENU PAGE */
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-link {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
  color: var(--text); font-size: .95rem; font-weight: 600;
}
.menu-link:hover { background: var(--primary-xlight); }
.menu-link-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-xlight); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.menu-link-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 2; }
.menu-link-arrow { margin-left: auto; color: var(--text-muted); }
.menu-link-arrow svg { width: 16px; height: 16px; stroke: currentColor; }
.menu-link-badge {
  background: var(--danger); color: white; border-radius: 10px;
  font-size: .7rem; font-weight: 700; padding: 2px 6px; margin-left: auto;
}
.menu-logout { color: var(--danger) !important; }
.menu-logout .menu-link-icon { background: var(--danger-light); color: var(--danger); }
.menu-logout .menu-link-icon svg { stroke: var(--danger); }

/* ============================================================ PRINT */
@media print {
  .app-header, .bottom-nav, .fab, .btn-print, .week-nav-btn { display: none !important; }
  .app-main { padding: 0 !important; }
  .page { padding: 8px !important; }
  .planning-scroll { overflow: visible; margin: 0; padding: 0; }
  .planning-table { font-size: .7rem; box-shadow: none; min-width: 100%; }
  .planning-table th { background: #1B4332 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .planning-cell.om-row { background: #FFFBEB !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .planning-cell.tri-row { background: #F0FDF4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ============================================================ RESPONSIVE */
@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .annonce-photos { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .app-main { padding-top: var(--header-h); padding-bottom: var(--nav-h); max-width: 780px; margin: 0 auto; }
}
