/* ================================================================
 * CEICOM PLANNING v3.0.0 — SEUL LE CSS v3 EST PRÉSENT
 * Legacy v2 supprimé (header, table, toolbar, sync-card, etc.)
 * ================================================================ */

:root {
  --ceicom-navy: #0a1f44;
  --ceicom-blue: #1e5aa8;
  --ceicom-blue-light: #3b82d4;
  --ceicom-accent: #00b4d8;
  --ceicom-gold: #c9a227;
  --bg-primary: #f1f5fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8fafc;
  --text-primary: #0f2942;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --shadow-sm: 0 1px 2px 0 rgba(15, 41, 66, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 41, 66, 0.08), 0 2px 4px -2px rgba(15, 41, 66, 0.06);
  --shadow-lg: 0 10px 25px -3px rgba(15, 41, 66, 0.1), 0 4px 6px -4px rgba(15, 41, 66, 0.05);
  --shadow-xl: 0 20px 40px -5px rgba(15, 41, 66, 0.12), 0 8px 10px -6px rgba(15, 41, 66, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* v3 LAYOUT TOKENS — densité optimisée 1920×1080 (zero scroll) */
:root {
  --rightbar-width: 292px;
  --leftbar-width: 292px;
  --leftbar-collapsed: 60px;
  --shell-gap: 0px;
  --row-h: 54px;
  --slot-col-w: 126px;
  --nav-h: 64px;
  --board-columns: 8;   /* 1 col horaire + 7 jours */
  --grid-gap: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: #e5ecf4;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ======================= v3 SHELL GRID ======================= */
body.mode-v3 { background:#e5ecf4; overflow:hidden; min-height:100vh; height:100vh; }
body.mode-v3::before { display:none; }
.app-shell {
  display:grid;
  grid-template-columns: var(--leftbar-width) 1fr;
  grid-template-rows: 100vh;
  gap: 0;
  width:100vw;
  height:100vh;
  overflow:hidden;
  transition: grid-template-columns 220ms cubic-bezier(.4,0,.2,1);
}
body.leftbar-collapsed .app-shell {
  grid-template-columns: var(--leftbar-collapsed) 1fr;
}
.app-main {
  display:flex;
  flex-direction:column;
  padding: 14px 18px 10px 14px;
  min-width:0;
  min-height:0;
  overflow:hidden;
}
body.leftbar-collapsed .app-main { padding-left: 12px; }

/* ======================= TOP WEEK NAV ======================= */
.week-nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 16px;
  margin-bottom: 10px;
  background:#fff;
  border:1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-height: 60px;
  flex-shrink:0;
}
.week-nav-left { min-width:0; }
.week-title {
  font-size: 20px;
  font-weight:800;
  letter-spacing:-0.015em;
  color:var(--text-primary);
  line-height:1.1;
}
.week-sub {
  margin-top:3px;
  font-size:11px;
  font-weight:600;
  color:var(--text-secondary);
  letter-spacing:0.03em;
  text-transform:uppercase;
}
.week-nav-right { display:flex; flex-shrink:0; }
.week-buttons { display:inline-flex; align-items:center; gap:5px; }
.nav-btn {
  width:34px; height:34px; border-radius:10px;
  border:1px solid var(--border-light);
  background:#fff;
  color:var(--text-secondary);
  font-weight:700; font-size:15px;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition: all var(--transition-fast);
  font-family:inherit;
}
.nav-btn:hover { border-color:var(--ceicom-blue); color:var(--ceicom-blue); background:#f0f6ff; }
.btn {
  border:none; border-radius:var(--radius-md); padding:9px 16px;
  font-weight:600; font-size:13px; cursor:pointer;
  transition:all var(--transition-normal);
  display:inline-flex; align-items:center; gap:8px; white-space:nowrap;
  font-family:inherit;
  justify-content:center;
}
.btn-ghost { background:#fff; border:1px solid var(--border-light); color:var(--text-primary); }
.btn-ghost:hover { border-color:var(--ceicom-blue); color:var(--ceicom-blue); background:#f0f6ff; }
.btn-solid { background:var(--ceicom-blue); color:#fff; }
.btn-solid:hover { background:var(--ceicom-blue-light); transform:translateY(-1px); box-shadow:var(--shadow-md); }
.btn-secondary { background:var(--bg-secondary); color:var(--text-primary); border:1px solid var(--border-medium); }
.btn-secondary:hover { background:var(--bg-tertiary); border-color:var(--ceicom-blue-light); color:var(--ceicom-blue); }
.btn-danger { background:var(--bg-secondary); color:var(--danger); border:1px solid #fecaca; }
.btn-danger:hover { background:var(--danger); color:#fff; border-color:var(--danger); }
.btn-sm { padding:6px 12px; font-size:12px; gap:6px; }
.btn:disabled { opacity:.45; cursor:not-allowed !important; filter:grayscale(.25); }

/* ======================= BOARD WRAP ======================= */
.board-wrap {
  flex:1;
  min-height:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px;
}

/* ======================= GRILLE SEMAINE ======================= */
.week-board {
  height: 100%;
  display:grid;
  grid-template-columns: var(--slot-col-w) repeat(6, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 1px;
  background: var(--border-light);
  border-radius: 12px;
  overflow:hidden;
  min-height:0;
}
.wb-spacer { background:var(--bg-tertiary); border-right:1px solid var(--border-light); border-bottom:1px solid var(--border-light); }

.wb-col-head {
  padding: 15px 10px 16px 10px;
  background:#f8fafc;
  border-bottom:2px solid var(--border-light);
  border-left:1px solid var(--border-light);
  text-align:center;
  min-width:0;
}
.wb-col-head.col-weekend { background:#f1f5f9; }
.wb-col-head.col-today { background:linear-gradient(180deg,#eef5ff 0%,#fff 100%); border-bottom:2px solid var(--ceicom-blue); }
.wb-col-head.col-sat { background:linear-gradient(180deg,#fffbeb 0%,#fffdf5 100%); border-bottom:2px solid #f59e0b; }
.wb-col-head.col-sun { background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%); border-bottom:2px solid #94a3b8; }
.wb-col-head.col-sat { background:linear-gradient(180deg,#fff7e6 0%,#fffdf5 100%); border-bottom:2px solid #ea580c; }
.wb-col-head.col-sat .wb-dow { color:#9a3412; font-weight:900; }
.wb-col-head.col-sat .wb-date { color:#7c2d12; font-weight:900; }
.wb-col-head.col-sun { background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%); border-bottom:2px solid #94a3b8; }
.wb-col-head.col-sun .wb-dow { color:#64748b; font-weight:900; }
.wb-col-head.col-sun .wb-date { color:#475569; font-weight:900; }
.wb-col-head.col-understaffed {
  background:linear-gradient(180deg,#fee2e2 0%,#fff 100%);
  border-bottom:2px solid #dc2626;
}
.wb-col-head.col-understaffed .wb-dow { color:#991b1b; font-weight:900; }
.wb-col-head.col-understaffed .wb-date { color:#7f1d1d; font-weight:900; }
.wb-col-head.col-understaffed .wb-counter { color:#991b1b; }
.wb-col-head.col-understaffed .wb-counter-strong { color:#7f1d1d; }
.wb-dow { font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text-muted); }
.wb-col-head.col-today .wb-dow { color:var(--ceicom-blue); }
.wb-date { margin-top:4px; font-size:26px; font-weight:900; color:var(--text-primary); line-height:1; }
.wb-col-head.col-today .wb-date { color:var(--ceicom-blue); }
.wb-counter {
  margin-top: 10px;
  display:flex; justify-content:center; align-items:center; gap:9px;
  font-size: 15px; font-weight:800; letter-spacing:-.01em;
  color:#334155;
}
.wb-counter-strong { font-weight:900; letter-spacing:-.02em; font-size: 16px; }
.wb-counter-sep { color:#94a3b8; font-weight:900; font-size: 16px; }
.wb-abs-list { margin-top:8px; display:flex; flex-direction:column; align-items:stretch; gap:4px; min-height:24px; }
.wb-abs-list-empty { min-height:24px; margin-top:8px; }
.wb-abs-list-empty span { color:#cbd5e1; font-size:10px; font-weight:700; letter-spacing:.04em; }
.wb-abs-pill {
  font-size:9.5px; font-weight:700; padding:2px 6px; border-radius:999px;
  color:var(--danger); background:var(--danger-light);
  white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis;
  border:1px solid transparent;
  display:inline-flex; align-items:center; gap:4px;
  background: color-mix(in srgb, var(--pc, #dc2626) 12%, white);
  color: var(--pc, #991b1b);
  border-color: color-mix(in srgb, var(--pc, #dc2626) 35%, white);
}
.wb-abs-pill-hol { background:#fef3c7 !important; color:#92400e !important; border-color:#fde68a !important; }
.wb-abs-pill-sm {
  font-size:9px; padding:2px 5px;
  gap:4px;
}
.wb-abs-dot {
  width:7px; height:7px; border-radius:50%;
  background: var(--pc, #dc2626);
  flex-shrink:0;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.6);
}
.wb-abs-pill-lg {
  font-size:10.5px; padding:4px 7px 4px 4px;
  border-radius:8px;
  gap:5px;
  font-weight:700;
  min-height:24px;
  box-shadow: 0 1px 2px rgba(15,41,66,.06);
  background: color-mix(in srgb, var(--pc, #1e5aa8) 10%, white) !important;
  color: var(--pc, #0f2942) !important;
  border:1px solid color-mix(in srgb, var(--pc, #1e5aa8) 35%, white);
}
.wb-abs-avatar {
  width:18px; height:18px; border-radius:5.5px;
  background: color-mix(in srgb, var(--pc, #1e5aa8) 85%, black 15%);
  color:#fff; font-weight:800; font-size:9.5px;
  display:inline-flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.wb-abs-lg-name {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-weight:800; letter-spacing:-.01em;
}
.wb-abs-lg-type {
  margin-left:auto;
  font-size:8.5px; font-weight:800; letter-spacing:.04em;
  padding:1.5px 5px; border-radius:999px;
  background: rgba(255,255,255,.55);
  color: var(--pc, #0f2942);
  text-transform: uppercase;
}

.wb-slot-head {
  display:flex; flex-direction:column; justify-content:center;
  padding: 5px 10px 5px 12px;
  background:#f8fafc;
  border-top:1px solid var(--border-light);
  border-right:1px solid var(--border-light);
  min-height:var(--row-h);
}
.wb-slot-head.slot-absences {
  background: linear-gradient(180deg,#fef2f2,#fee2e2);
  border-right-color: #fecaca;
  border-bottom: 1px solid #fecaca;
}
.wb-slot-absences { color: #991b1b; }
.wb-slot-name { font-size:13px; font-weight:800; color:var(--text-primary); line-height:1.1; letter-spacing:-.005em; }
.wb-slot-end { font-size:11px; font-weight:600; color:#64748b; margin-left:2px; }
.wb-slot-hours { display:none; }
.wb-slot-label { font-size:9.5px; color:#94a3b8; margin-top:2px; font-weight:600; letter-spacing:.02em; }

.wb-cell {
  padding: 5px 6px;
  background:#fff;
  border-top:1px solid var(--border-light);
  border-left:1px solid var(--border-light);
  position:relative;
  min-height:var(--row-h);
  transition:background var(--transition-fast);
  overflow:hidden;
  cursor:pointer;
}
.wb-cell:hover:not(.cell-disabled) { background:#f8fbff; box-shadow:inset 0 0 0 2px rgba(59,130,212,.3); z-index:2; }
.wb-cell.col-weekend { background:#fbfcfe; }
.wb-cell.col-today { background:linear-gradient(180deg,#f8fbff 0%,#fff 100%); }
.wb-cell.col-sat { background:#fffbeb; border-left-color:#fde68a; }
.wb-cell.col-sat:hover:not(.cell-disabled) { background:#fef3c7; box-shadow:inset 0 0 0 2px rgba(245,158,11,.4); }
.wb-cell.col-sun { background:#f1f5f9; border-left-color:#cbd5e1; cursor:default !important; }
.wb-cell.col-understaffed { background:#fff5f5; }
.wb-cell.col-understaffed:hover:not(.cell-disabled) { background:#ffe4e4; box-shadow:inset 0 0 0 2px rgba(220,38,38,.35); }
.wb-cell.cell-disabled { opacity:.8; cursor:default; background:repeating-linear-gradient(45deg,#fafafa,#fafafa 6px,#f1f1f1 6px,#f1f1f1 12px); pointer-events:auto; }
.wb-cell.cell-disabled.col-sun { background:#f1f5f9; background-image:none; }
.wb-rest-label {
  width:100%; height:100%; min-height:32px;
  display:flex; align-items:center; justify-content:center;
  color:#94a3b8; font-size:12px; font-weight:700; letter-spacing:.08em;
}
.wb-ast-empty { color:#cbd5e1; font-weight:800; }
.wb-cell-badges { display:flex; flex-direction:column; gap:4px; min-height:100%; align-items:stretch; }
.wb-cell-badges .badge-person,
.wb-col-ast-block .badge-person {
  width: 100%;
  min-height: 28px;
  padding: 5px 9px 5px 10px;
  border-radius: 9px;
  border-left: 4px solid color-mix(in srgb, var(--pc, #1e5aa8) 85%, black 15%);
  background: var(--pc, #1e5aa8);
  box-shadow: 0 1px 2px rgba(15,41,66,.10), inset 0 -1px 0 rgba(0,0,0,.08);
}
.wb-col-head .wb-col-ast-block { margin-top: 3px; }
.wb-cell-badges .badge-person .bp-name { font-size: 11.5px; letter-spacing: -.01em; }
.wb-cell-badges .badge-person .bp-avatar { background: rgba(255,255,255,.22); }

.wb-cell.wb-cell-absences {
  min-height: 64px;
  padding: 7px;
  background: repeating-linear-gradient(135deg,#fff 0,#fff 8px,#fafafa 8px,#fafafa 16px);
}
.wb-cell.wb-cell-absences.col-sat {
  background: repeating-linear-gradient(135deg,#fffbeb 0,#fffbeb 8px,#fef6d7 8px,#fef6d7 16px);
}
.wb-cell-placeholder {
  padding: 14px 4px;
  text-align:center;
  color:#cbd5e1;
  font-weight:700;
  font-size:11px;
  letter-spacing:.03em;
}
.wb-abs-lg-list {
  min-height: 100%;
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  align-content:flex-start;
  margin:0 !important;
  justify-content:flex-start !important;
}
.wb-col-ast-block {
  margin-top: 6px;
  margin-bottom: 2px;
  display:flex;
  align-items:stretch;
  justify-content:center;
  padding: 0 4px;
}
.wb-col-ast-block .badge-person {
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  width:100% !important;
  position:relative;
  overflow:hidden;
}
.wb-col-ast-block .badge-person .bp-name {
  display:block !important;
  flex:1 !important;
  visibility:visible !important;
  font-weight:800;
  font-size:11.5px;
}
.wb-col-ast-block .bp-avatar { flex-shrink:0; }
.wb-col-ast-block .bp-ast-pill { flex-shrink:0; margin-left:2px; }
.wb-col-ast-block .badge-person {
  width: 100%;
  min-height: 28px;
  padding: 5px 9px 5px 10px;
  border-radius: 9px;
}
.bp-dark-text,
.bp-dark-text .bp-name,
.bp-dark-text .bp-presence { color: #0f172a !important; }
.bp-dark-text .bp-presence { background: rgba(15,23,42,.12) !important; }
.bp-dark-text .bp-avatar { background: rgba(15,23,42,.15) !important; color: #0f172a !important; }
.wb-dark-text { color: #0f172a !important; border-color: color-mix(in srgb, var(--pc,#94a3b8) 55%, #475569 45%) !important; }
.wb-dark-text .wb-abs-lg-type { color: #0f172a !important; }
.wb-dark-text .wb-abs-avatar { background: color-mix(in srgb, var(--pc,#94a3b8) 92%, black 8%) !important; }
.wb-cell-empty-ph {
  width: 22px;
  height: 22px;
  margin: auto;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 16px;
  font-weight: 900;
  color: #cbd5e1;
  border-radius: 6px;
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.wb-cell:hover .wb-cell-empty-ph { opacity: 0.9; color: var(--ceicom-blue); }
.wb-ast-inline-plus {
  display:flex; align-items:center; justify-content:center; gap:6px;
  padding: 4px 8px;
  border:2px dashed #fdba74; border-radius:8px;
  background: linear-gradient(180deg,#fff7ed,#ffedd5);
  color:#9a3412;
  font-size:10.5px; font-weight:800; letter-spacing:.01em;
  cursor:pointer;
  text-align:center;
}
.wb-ast-inline-plus:hover { border-color:#ea580c; background:#ffedd5; color:#7c2d12; }

.badge-person {
  display:flex; align-items:center; gap:5.5px;
  padding:3.5px 6px 3.5px 7px;
  border-radius:8px;
  border-left: 3.5px solid rgba(0,0,0,.22);
  font-size:11.5px;
  font-weight:700;
  color:#fff;
  box-shadow: 0 1px 2px rgba(15,41,66,.09), inset 0 -1px 0 rgba(0,0,0,.06);
  cursor:pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position:relative;
  background-blend-mode: lighten;
}
.badge-person.bp-telework {
  box-shadow: 0 1px 2px rgba(15,41,66,.09), 0 0 0 2px #86efac;
}
.badge-person.bp-astreinte {
  box-shadow: 0 1px 2px rgba(15,41,66,.09), 0 0 0 2px #fdba74;
}
.badge-person.badge-astreinte-inline {
  box-shadow: 0 1px 2px rgba(15,41,66,.09), 0 0 0 2px #ea580c;
  background-image: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(0,0,0,0) 60%);
  border-left-color: rgba(0,0,0,.28);
}
.badge-person:hover { transform:translateY(-1px); box-shadow:0 4px 8px rgba(15,41,66,.13), inset 0 -1px 0 rgba(0,0,0,.06); }
.badge-person.bp-warn { outline:2px dashed #f87171; outline-offset:-1px; }
.bp-avatar { width:17px; height:17px; border-radius:6px; background:rgba(255,255,255,.22); display:inline-flex; align-items:center; justify-content:center; font-size:9.5px; font-weight:800; flex-shrink:0; }
.bp-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bp-presence { font-size:8.5px; padding:1px 5px; border-radius:999px; background:rgba(255,255,255,.24); letter-spacing:.04em; text-transform:uppercase; font-weight:800; }
.bp-ast-pill {
  background: linear-gradient(180deg,#fff7ed,#fed7aa) !important;
  color: #7c2d12 !important;
  border: 1.5px solid #f97316;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  padding: 1px 6px !important;
}
.bp-tt-badge {
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:16px;
  font-size:8.5px; font-weight:900;
  border-radius:999px;
  background:#dcfce7; color:#15803d;
  border:1.5px solid #86efac;
  line-height:1;
  padding:0 4px;
}
.bp-warn-ic { position:absolute; right:-3px; top:-3px; width:16px; height:16px; background:#fff; color:#dc2626; border:1.5px solid #dc2626; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:8.5px; font-weight:900; line-height:1; box-shadow:0 1px 3px rgba(0,0,0,.18); }

/* ======================= SÉLECTION MULTIPLE (SUPPRIMER) ======================= */
body.msel-on .weekBoard .badge-person { cursor:crosshair; }
.badge-person.msel-badge { padding-left:4px; }
.msel-cb {
  flex-shrink:0;
  width:18px; height:18px;
  border-radius:5px;
  border:1.8px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.12);
  color:#fff;
  font-size:12px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:2px;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);
}
.msel-cb.msel-cb-on {
  background:#fff;
  color:#1d4ed8;
  border-color:#fff;
  box-shadow:0 2px 5px rgba(15,41,66,.25);
}
.badge-person.msel-selected {
  outline: 2.5px solid #1d4ed8;
  outline-offset: 1.5px;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(29,78,216,.25), inset 0 -1px 0 rgba(0,0,0,.08) !important;
}
body.msel-on .weekBoard .wb-cell-badges { gap: 7px; }
#rbBtnMultiSelect.active {
  background: linear-gradient(180deg,#1e40af,#1e3a8a) !important;
  border-color:#0f2a6e !important;
  color:#fff;
  box-shadow: 0 0 0 2px rgba(30,64,175,.35);
}
#rbBtnDeleteSelected:not(:disabled):hover { background: #fef2f2 !important; border-color:#b91c1c !important; color:#7f1d1d !important; }
#rbBtnDeleteSelected:not(:disabled) { color:#991b1b; }

/* ======================= LEFTBAR ======================= */
.app-leftbar {
  background:linear-gradient(180deg,#0a1f44 0%,#0f2850 40%,#123064 100%);
  color:#d7e2f3;
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  overflow-x:hidden;
  flex-shrink:0;
  padding: 12px 11px 11px 11px;
  gap: 10px;
  border-right:1px solid #1e3a6e;
  transition: padding 220ms ease, width 220ms ease, min-width 220ms ease;
  position:relative;
  min-width:0;
}
body.leftbar-collapsed .app-leftbar {
  padding: 10px 8px;
  overflow: visible;
}
body.leftbar-collapsed .app-leftbar::-webkit-scrollbar { width: 0; display:none; }
.app-leftbar::-webkit-scrollbar { width:5px; }
.app-leftbar::-webkit-scrollbar-thumb { background:rgba(255,255,255,.12); border-radius:3px; }

.lb-head {
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom: 2px;
  position: relative;
  z-index: 10;
}
.lb-brand-text { flex:1; min-width:0; transition: opacity 180ms ease; }
body.leftbar-collapsed .lb-brand-text { opacity: 0; pointer-events:none; width:0; flex:0; }

.lb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px 8px 11px;
  margin-bottom: 2px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  transition: padding 180ms ease, justify-content 180ms ease;
  position: relative;
  z-index: 9;
}
.lb-tb-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #88a4d1;
  flex-shrink: 0;
}
body.leftbar-collapsed .lb-toolbar {
  justify-content: center;
  padding: 8px 4px;
}
body.leftbar-collapsed .lb-tb-label {
  display: none;
}

.lb-collapse {
  width: 30px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: #d7e2f3;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 180ms ease;
  font-family: inherit;
  flex-shrink: 0;
  line-height: 1;
}
.lb-collapse:hover {
  background: rgba(59,130,212,.22);
  border-color: rgba(125,180,255,.5);
  color:#fff;
}
body.leftbar-collapsed .lb-collapse .lb-chevron {
  display: inline-block;
  transform: rotate(180deg);
}

.lb-body {
  display:flex;
  flex-direction:column;
  gap: 10px;
  flex:1;
  min-height: 0;
  transition: opacity 180ms ease;
  position: relative;
  z-index: 5;
}
body.leftbar-collapsed .lb-body,
body.leftbar-collapsed .rb-footer { opacity: 0; pointer-events: none; height: 0; overflow: hidden; flex: 0; gap: 0; margin:0; padding:0; }
body.leftbar-collapsed .rb-footer { display:none !important; }

.lb-collapsed-icons {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding-top: 6px;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 8;
}
body.leftbar-collapsed .lb-collapsed-icons {
  display: flex;
}
.lb-ci-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  color: #d7e2f3;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 160ms ease;
  font-family: inherit;
  position: relative;
  padding: 0;
  line-height: 1;
}
.lb-ci-btn:hover {
  background: rgba(59,130,212,.26);
  border-color: rgba(125,180,255,.55);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.lb-ci-btn:active { transform: translateY(0); }
.lb-ci-btn .lb-ci-tip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0a1f44;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid rgba(125,180,255,.25);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
  z-index: 50;
  letter-spacing: .01em;
  box-shadow: 0 3px 10px rgba(0,0,0,.4);
}
.lb-ci-btn:hover .lb-ci-tip { opacity: 1; }
.lb-ci-sep {
  width: 26px;
  height: 1px;
  background: rgba(255,255,255,.09);
  border-radius: 999px;
  margin: 2px 0;
}

.lb-section {
  min-width: 0;
}

.rightbar-brand { display:flex; align-items:center; gap:10px; padding-bottom:12px; margin-bottom:1px; border-bottom:1px solid rgba(255,255,255,.08); }
body.leftbar-collapsed .rightbar-brand { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.rb-logo {
  width:36px; height:36px; border-radius:11px;
  background:linear-gradient(135deg,#fff 0%,#dbe9ff 100%);
  color:var(--ceicom-navy);
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:900; font-size:16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  flex-shrink: 0;
}
.rb-title { font-size:13px; font-weight:800; color:#fff; letter-spacing:-.01em; }
.rb-sub { font-size:10.5px; color:#88a4d1; margin-top:2px; font-weight:600; letter-spacing:.04em; }

.rb-section {
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.07);
  border-radius:11px;
  padding:10px 11px 9px 11px;
  backdrop-filter:blur(6px);
}
.rb-label {
  font-size:9.5px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:#7ea1d9;
  margin-bottom:7px;
}
.rightbar-week-nav .rb-week { font-size:14px; font-weight:800; color:#fff; }
.rightbar-week-nav .rb-date { font-size:11.5px; color:#a7bde0; margin-top:2px; font-weight:500; }

.rightbar-sync .sync-indicator-mini { display:flex; align-items:center; gap:7px; font-size:11.5px; font-weight:600; color:#d7e2f3; }
.rb-dot { width:9px; height:9px; border-radius:50%; background:#94a3b8; box-shadow: 0 0 0 3px rgba(148,163,184,.22); }
.rb-dot.sync-ok { background:#4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
.rb-dot.sync-syncing { background:#fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.2); animation:pulse-amber 1.2s infinite; }
.rb-dot.sync-error { background:#f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.22); }
.rb-sync-text { color:#c7d6ef; font-size:11.5px; }

.rightbar-stats .rb-stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:5.5px; }
.rb-stat { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); border-radius:9px; padding:6px 5px 5px 5px; text-align:center; }
.rb-stat-n { display:block; font-size:15px; font-weight:900; color:#fff; line-height:1; }
.rb-stat-l { display:block; font-size:9px; margin-top:2.5px; color:#9db7dd; font-weight:700; letter-spacing:.03em; text-transform:uppercase; }
.rb-stat.ok .rb-stat-n { color:#86efac; }
.rb-stat.warn .rb-stat-n { color:#fcd34d; }
.rb-stat.info .rb-stat-n { color:#7dd3fc; }

.rb-actions-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.rb-action {
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  color:#e2ecfb;
  border-radius:9px;
  padding:8px 4px 6px 4px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  cursor:pointer;
  transition:all var(--transition-fast);
  font-family:inherit;
}
.rb-action:hover { background:rgba(59,130,212,.22); border-color:rgba(125,180,255,.5); transform:translateY(-1px); }
.rb-action:disabled { opacity:.45; cursor:not-allowed; transform:none !important; background:rgba(255,255,255,.03) !important; border-color:rgba(255,255,255,.05) !important; }
.rba-ic { font-size:15px; line-height:1; }
.rba-lb { font-size:9.5px; font-weight:700; letter-spacing:.02em; color:#c7d6ef; }

.rb-manage-list { display:flex; flex-direction:column; gap:4.5px; }
.rb-manage-btn {
  display:flex;
  align-items:center;
  gap:9px;
  padding:7.5px 10px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.07);
  color:#e2ecfb;
  border-radius:8.5px;
  cursor:pointer;
  font-family:inherit;
  font-size:11.5px;
  font-weight:600;
  transition:all var(--transition-fast);
  text-align:left;
}
.rb-manage-btn:hover:not(:disabled) { background:rgba(59,130,212,.2); border-color:rgba(125,180,255,.45); }
.rb-manage-btn:disabled { opacity:.45; cursor:not-allowed; }

.rb-footer { margin-top:auto; padding-top:4px; }
.rb-auth-badge {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.02em;
  width:100%;
  justify-content:center;
}
.rb-auth-badge.readonly { background:rgba(248,113,113,.16); border:1px solid rgba(248,113,113,.35); color:#fecaca; }
.rb-auth-badge.editor { background:rgba(74,222,128,.15); border:1px solid rgba(74,222,128,.38); color:#bbf7d0; }

/* ======================= POPOVER INLINE ======================= */
#popoverRoot { position:fixed; inset:0; pointer-events:none; z-index:60; }
.popover-inline {
  position:absolute;
  pointer-events:auto;
  background:#fff;
  border:1px solid var(--border-medium);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xl);
  padding: 13px 13px 11px 13px;
  width: 320px;
  z-index:70;
  animation:popIn 180ms cubic-bezier(.4,0,.2,1);
}
.popover-inline::before {
  content:""; position:absolute; inset:-1px;
  border-radius:inherit;
  padding:1px;
  background:linear-gradient(135deg,rgba(59,130,212,.35),rgba(0,180,216,.1));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  pointer-events:none;
}
.popover-title { font-size:13.5px; font-weight:800; color:var(--text-primary); margin-bottom:10px; letter-spacing:-.01em; }
.pp-sub { color:var(--text-secondary); font-weight:500; font-size:11.5px; }
.pp-block { margin-bottom:9px; }
.pp-label { font-size:10.5px; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:5px; }

.pp-agents-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:5px; max-height:185px; overflow:auto; padding-right:2px; }
.pp-agent-btn {
  display:flex; align-items:center; gap:7px;
  padding:6px 8px;
  border-radius:8.5px;
  border:1px solid var(--border-light);
  background:#fff;
  cursor:pointer;
  transition:all var(--transition-fast);
  font-family:inherit;
}
.pp-agent-btn:not(.disabled):hover { border-color:var(--ceicom-blue-light); background:#f8fbff; }
.pp-agent-btn.active { outline:2px solid var(--ceicom-blue); outline-offset:1px; border-color:var(--ceicom-blue); background:#eff6ff; }
.pp-agent-btn.disabled { opacity:.45; filter:grayscale(.6); cursor:not-allowed; }
.pp-agent-nm { font-weight:700; font-size:11.5px; color:var(--text-primary); min-width:0; overflow:hidden; text-overflow:ellipsis; }
.pp-agent-abs { font-size:9.5px; color:#999; margin-left:auto; font-weight:700; }

.pp-presence { display:flex; gap:3.5px; background:#f1f5f9; border-radius:8px; padding:3px; width:100%; }
.pp-pres { padding:6px 10px; border:none; background:transparent; border-radius:6px; font-size:11px; font-weight:700; color:var(--text-secondary); cursor:pointer; transition:all var(--transition-fast); font-family:inherit; flex:1; white-space:nowrap; min-width:0; }
.pp-pres.active { background:#fff; color:var(--ceicom-blue); box-shadow:0 1px 2px rgba(15,41,66,.08); }

.pp-repeat-wrap {
  display:flex; align-items:center; gap:7px;
  margin-top:3px; padding:6.5px 8.5px;
  background:#f8fafc; border:1px solid var(--border-light); border-radius:9px;
  font-size:11.5px; font-weight:600; color:var(--text-primary);
}
.pp-repeat-wrap select { margin-left:auto; border:1px solid var(--border-light); border-radius:6px; padding:2.5px 5px; font-size:10.5px; font-weight:700; background:#fff; font-family:inherit; color:var(--text-primary); cursor:pointer; }
.pp-repeat-wrap input[type="checkbox"] { accent-color:var(--ceicom-blue); }

.pp-buttons { display:flex; flex-direction:column; gap:5.5px; }
.pp-meta { font-size:11.5px; color:var(--text-secondary); margin:-5px 0 9px 0; }

.popover-actions { display:flex; gap:7px; justify-content:flex-end; margin-top:10px; }

@keyframes popIn { from { opacity:0; transform:translateY(4px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }

/* ======================= TOASTS ======================= */
.toast-container {
  position:fixed;
  bottom:16px;
  right: 18px;
  display:flex;
  flex-direction:column;
  gap:7px;
  z-index:90;
  pointer-events:none;
  max-width:360px;
}
.toast {
  pointer-events:auto;
  display:flex; align-items:center; gap:9px;
  padding:9px 13px;
  background:#fff;
  border-radius:11px;
  border:1px solid var(--border-light);
  box-shadow:var(--shadow-lg);
  font-size:12.5px; font-weight:600;
  color:var(--text-primary);
  animation:slideUp 260ms cubic-bezier(.4,0,.2,1);
}
.toast-success { border-left:3px solid var(--success); }
.toast-error   { border-left:3px solid var(--danger); }
.toast-warn    { border-left:3px solid var(--warning); }

@keyframes slideUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse-green { 0%,100% { box-shadow:0 0 0 0 rgba(34,197,94,.35); } 50% { box-shadow:0 0 0 6px rgba(34,197,94,0); } }
@keyframes pulse-amber { 0%,100% { box-shadow:0 0 0 0 rgba(251,191,36,.45); } 50% { box-shadow:0 0 0 6px rgba(251,191,36,0); } }

.cell-pulse-green { animation:pulse-green 650ms ease-out; }

/* ======================= MODALES (auth + gestion) ======================= */
.modal-overlay {
  display:none; position:fixed; inset:0;
  background:rgba(10,31,68,.55);
  backdrop-filter:blur(6px);
  z-index:1000;
  align-items:center; justify-content:center;
  padding:20px;
  animation:fadeOverlay .2s ease;
}
#conflictDialogOverlay.modal-overlay { z-index: 10000000 !important; }
#conflictDialogOverlay.modal-overlay > .modal.cd-box { z-index: 10000001 !important; }
@keyframes fadeOverlay { from { opacity:0; } to { opacity:1; } }
.modal-overlay.show { display:flex; }
.modal {
  width:100%;
  max-width: 480px;
  background:var(--bg-secondary);
  border-radius:var(--radius-xl);
  padding:24px;
  box-shadow:var(--shadow-xl);
  animation:slideUp .3s cubic-bezier(.34,1.56,.64,1);
  max-height:90vh;
  overflow-y:auto;
}
.modal.modal-manage { max-width: 680px; padding:22px 24px 20px; }

.modal-header {
  display:flex; align-items:flex-start; justify-content:space-between;
  margin-bottom:18px; padding-bottom:14px;
  border-bottom:1px solid var(--border-light);
}
.modal-header h2 { font-size:19px; font-weight:800; color:var(--text-primary); display:flex; align-items:center; gap:10px; }
.modal-subtitle { color:var(--text-secondary); font-size:12px; margin-top:4px; display:flex; align-items:center; gap:6px; }
.modal-close {
  width:32px; height:32px; border:none; background:var(--bg-tertiary);
  border-radius:50%; cursor:pointer; font-size:18px; color:var(--text-muted);
  display:flex; align-items:center; justify-content:center;
  transition:all var(--transition-fast);
}
.modal-close:hover { background:var(--danger-light); color:var(--danger); transform:rotate(90deg); }

/* FORMULAIRES (partagés auth + panneaux gestion) */
.auth-form { max-width:100%; }
.form-field { margin-bottom:12px; }
.form-field label {
  display:block; font-size:10.5px; font-weight:800; margin-bottom:5px;
  color:var(--text-secondary); text-transform:uppercase; letter-spacing:.06em;
}
.form-field input, .form-field select {
  width:100%; padding:10px 13px; border:1px solid var(--border-medium);
  border-radius:var(--radius-md); font-size:13px; font-family:inherit;
  transition:all var(--transition-fast);
  background:var(--bg-secondary); color:var(--text-primary);
}
.form-field input:focus, .form-field select:focus {
  outline:none; border-color:var(--ceicom-blue);
  box-shadow:0 0 0 3px rgba(30,90,168,.1); background:#fff;
}
.form-field input[type="color"] { padding:3px; height:42px; cursor:pointer; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.form-row.mg-hidden { display:none; }
.form-actions, .modal-actions {
  display:flex; justify-content:flex-end; gap:9px;
  margin-top:18px; padding-top:14px;
  border-top:1px solid var(--border-light);
}
.auth-error {
  background:var(--danger-light); color:#991b1b; border:1px solid #fecaca;
  padding:9px 11px; border-radius:11px; font-size:12.5px; font-weight:600;
  margin:10px 0 3px;
}
.auth-hint {
  margin-top:14px; padding:9px 11px; background:#eff6ff;
  border:1px solid #bfdbfe; border-radius:11px; color:#1e40af;
  font-size:11.5px; line-height:1.55;
}
.auth-hint b { color:#1e3a8a; }

/* ======================= PANNEAUX GESTION (Task 9) ======================= */
.new-person-row { margin-bottom:4px; }
.divider { height:1px; background:var(--border-light); margin:14px 0 11px; }

.person-list {
  max-height:340px; overflow-y:auto;
  padding:4px;
  border:1px solid var(--border-light);
  border-radius:var(--radius-md);
  background:var(--bg-tertiary);
}
.person-item {
  display:flex; align-items:center; justify-content:space-between;
  padding:9px 11px;
  margin-bottom:5px;
  background:#fff;
  border:1px solid var(--border-light);
  border-radius:10px;
  transition:all var(--transition-fast);
}
.person-item:last-child { margin-bottom:0; }
.person-item:hover { background:#f8fafc; border-color:var(--ceicom-blue-light); }
.person-info { display:flex; align-items:center; gap:11px; min-width:0; }
.person-name { font-weight:800; font-size:13px; color:var(--text-primary); }
.person-actions { display:flex; gap:5.5px; align-items:center; flex-shrink:0; }
.color-preview { width:30px; height:30px; border-radius:8px; border:2px solid #fff; box-shadow:var(--shadow-sm); flex-shrink:0; }
.color-input-inline { width:40px; height:34px; padding:2px; border:1px solid var(--border-medium); border-radius:8px; cursor:pointer; }

.slot-new-row { display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; }
.slot-new-row input[type="time"] { max-width:110px; padding:9px 10px; font-family:inherit; font-size:13px; border:1px solid var(--border-medium); border-radius:var(--radius-md); background:#fff; }
.slot-new-row input[type="text"] { padding:10px 13px; font-family:inherit; font-size:13px; border:1px solid var(--border-medium); border-radius:var(--radius-md); background:#fff; }
.slot-new-row input:focus { outline:none; border-color:var(--ceicom-blue); box-shadow:0 0 0 3px rgba(30,90,168,.1); }

.slot-list { display:flex; flex-direction:column; gap:6px; max-height:340px; overflow-y:auto; padding:4px; }
.slot-item {
  display:grid;
  grid-template-columns: 1.4fr 1fr auto 1fr auto auto;
  gap:7px;
  align-items:center;
  padding:8px 10px;
  background:#fff;
  border:1px solid var(--border-light);
  border-radius:10px;
}
.slot-item input[type="text"], .slot-item input[type="time"] {
  width:100%; padding:7px 9px;
  border:1px solid var(--border-light);
  border-radius:7px;
  font-family:inherit; font-size:12.5px;
  background:var(--bg-tertiary);
}
.slot-item input:focus { outline:none; border-color:var(--ceicom-blue); background:#fff; box-shadow:0 0 0 2px rgba(30,90,168,.1); }
.slot-name-field { min-width:0; }
.slot-sep { color:var(--text-muted); font-size:13px; font-weight:700; text-align:center; }
.slot-ast { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:700; color:var(--text-secondary); white-space:nowrap; }
.slot-ast input { accent-color:#c2410c; }
.slot-actions { display:flex; gap:4px; }

.holiday-list { display:flex; flex-direction:column; gap:6px; max-height:360px; overflow-y:auto; padding:4px; }
.holiday-item {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 12px;
  border:1px solid var(--border-light); border-radius:11px; background:#fff;
  transition:all var(--transition-fast);
}
.holiday-item:hover { transform:translateY(-1px); background:#f8fafc; border-color:var(--ceicom-blue-light); box-shadow:var(--shadow-sm); }
.holiday-info { flex:1; display:flex; flex-direction:column; gap:4px; min-width:0; }
.abs-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.abs-person-name { font-size:13.5px; font-weight:800; color:var(--text-primary); }
.abs-date { font-size:11.5px; font-weight:700; padding:2px 8px; background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; border-radius:999px; }

.empty-state { text-align:center; padding:26px 18px; color:var(--text-muted); font-size:12.5px; }

/* ======================= ACCESSIBILITÉ — focus-visible ======================= */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wb-cell:focus-visible,
.badge-person:focus-visible,
.nav-btn:focus-visible,
.rb-action:focus-visible,
.rb-manage-btn:focus-visible,
.pp-agent-btn:focus-visible,
.pp-pres:focus-visible,
.person-item:focus-within,
.slot-item:focus-within,
.holiday-item:focus-within {
  outline: 2px solid var(--ceicom-accent);
  outline-offset: 2px;
  border-radius: inherit;
}
.wb-cell:focus-visible { outline-offset: -2px; }

/* ======================= MODAL AFFECTATION / ABSENCE ======================= */
.modal.modal-assign { max-width: 580px; padding: 22px 24px 20px; }
.am-tabs {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}
.am-tab {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: 9px;
  font-weight: 800;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 150ms ease;
  letter-spacing: -.01em;
}
.am-tab:hover:not(.active) { color: var(--ceicom-blue); background: #fff; }
.am-tab.active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(15,41,66,.08), 0 1px 2px rgba(15,41,66,.04);
}
.am-tab.active span:first-child { filter: none; transform: scale(1.08); }
.am-tt-row {
  display:inline-flex;
  align-items:center;
  gap: 9px;
  padding: 10px 13px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  color: #166534;
  font-size: 12.5px;
  width: 100%;
  margin-top: 12px;
}
.am-tt-row input[type="checkbox"] { accent-color: #166534; width: 16px; height: 16px; }
.am-repeat-advanced {
  border: 1px solid var(--border-light);
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px 11px;
}
.am-repeat-head {
  display:flex;
  align-items:center;
  gap:9px;
  cursor:pointer;
  font-size:12px;
  color:var(--text-primary);
  padding: 2px 2px 3px;
}
.am-repeat-head input[type="checkbox"] { accent-color: var(--ceicom-blue); width: 16px; height:16px; flex-shrink:0; }
.am-repeat-head b { font-size:13px; }
.am-repeat-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}
.am-repeat-block { padding: 3px 2px 1px; }
.am-repeat-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing:.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.am-repeat-dows {
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:5px;
  margin-bottom: 5px;
}
.am-repeat-dows.am-repeat-dows-lv {
  grid-template-columns: repeat(5, 1fr);
}
.cursor-edit { cursor: pointer; }
.cursor-edit:hover { filter: brightness(1.05); transform: translateY(-0.5px); }
.am-dow {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:8px 4px;
  background:#fff;
  border:1px solid var(--border-light);
  border-radius:9px;
  cursor:pointer;
  transition: all 140ms ease;
  user-select:none;
}
.am-dow:hover:not(.am-dow-disabled) {
  border-color: var(--ceicom-blue-light);
  background: #eff6ff;
}
.am-dow input[type="checkbox"] {
  accent-color: var(--ceicom-blue);
  width:15px; height:15px;
}
.am-dow span {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing:.02em;
}
.am-dow:has(input:checked):not(.am-dow-disabled) {
  background: linear-gradient(180deg,#eef5ff,#ffffff);
  border-color: var(--ceicom-blue);
  box-shadow: 0 0 0 2px rgba(30,90,168,.1);
}
.am-dow:has(input:checked):not(.am-dow-disabled) span { color: var(--ceicom-blue); }
.am-dow-disabled {
  opacity:.4;
  cursor:not-allowed;
  background:#f1f5f9;
}
.am-repeat-hint {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* PRÉSENCE SOUS BADGE */
.wb-presence-row {
  display:flex;
  gap:4px;
  align-items:center;
  justify-content:flex-start;
  margin-top: -2px;
  padding: 0 1px;
  flex-wrap: wrap;
}
.wb-presence-chip {
  font-size: 8.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing:.06em;
  text-transform:uppercase;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid var(--border-light);
}
.wb-presence-chip.pres-am { background:#dbeafe; color:#1d4ed8; border-color:#bfdbfe; }
.wb-presence-chip.pres-pm { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.wb-presence-chip.pres-custom { background:#ede9fe; color:#6d28d9; border-color:#ddd6fe; }
.am-edit-actions .divider { margin: 4px 0 10px; }
#assignPerson { font-weight: 700; }
#assignPerson option { padding: 6px 8px; }
.person-option-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-right: 7px;
  vertical-align: middle;
}

/* ======================= LECTURE SEULE ======================= */
body.auth-mode-readonly .wb-cell { cursor:default !important; }
body.auth-mode-readonly .wb-cell:hover { background:inherit !important; box-shadow:none !important; }
body.auth-mode-readonly .badge-person { cursor:default !important; pointer-events:none; }

/* ======================= PRINT A4 PAYSAGE ======================= */
@media print {
  @page { size: A4 landscape; margin: 6mm 4mm 5mm 4mm; }
  html, body { background:#fff !important; -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
  body.mode-v3 { background:#fff; height:auto; overflow:visible; }
  .app-shell { grid-template-columns:1fr; width:100%; height:auto; overflow:visible; }
  .no-print, .app-leftbar, .app-rightbar, .week-nav, #popoverRoot, .toast-container, .modal-overlay { display:none !important; }
  .app-main { padding: 0 !important; }
  .board-wrap {
    border:none; box-shadow:none; padding:0; overflow:visible;
    width:100%;
  }
  :root { --row-h: 62px; --slot-col-w: 116px; }
  .week-board { overflow:visible; border-radius: 0; border: 0.5px solid var(--border-medium); }
  .wb-col-head.col-sun, .wb-cell.col-sun { display:none !important; }
  .wb-cell:hover { box-shadow:none !important; background:#fff !important; }
  .badge-person {
    box-shadow:none !important;
    transform:none !important;
    min-height:32px !important;
    padding:6px 10px 6px 11px !important;
  }
  .badge-person .bp-avatar { width:19px !important; height:19px !important; font-size:10px !important; }
  .badge-person .bp-name { font-size:12px !important; }
  .badge-person .bp-presence { font-size:9px !important; padding:1.5px 6px !important; }
  .wb-col-head { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .wb-col-head.col-today { border-bottom:2px solid #000 !important; }
  .wb-col-head.col-today .wb-dow, .wb-col-head.col-today .wb-date { color:#000 !important; }
  .wb-col-head { padding: 10px 9px 11px 9px !important; }
  .wb-dow { font-size:12px !important; }
  .wb-date { font-size:18px !important; }
  .wb-counter { font-size:11.5px !important; margin-top:5px !important; }
  .wb-col-ast-block .badge-person { min-height:30px !important; padding:5px 9px 5px 10px !important; }
  .wb-col-ast-block .bp-name { font-size:11.5px !important; }
  .wb-abs-pill { font-size:10.5px !important; padding:4px 10px !important; }
  .wb-slot-head .wb-slot-name { font-size:11px !important; }
  .wb-cell.wb-cell-absences { min-height:72px !important; }
}

/* ======================= RESPONSIVE MINIMAL ======================= */
@media (max-width: 1280px) {
  :root { --leftbar-width: 270px; --slot-col-w: 112px; --row-h: 54px; }
  .app-main { padding:12px 14px 8px 14px; }
}

/* ======================= MODALE IMPRESSION MOIS ======================= */
.modal.modal-print { max-width: 680px; }
.pm-body { display:flex; flex-direction:column; gap: 14px; margin-top: 8px; }
.pm-picker { display:flex; align-items:center; gap:10px; justify-content:center; padding: 12px; background: #f1f5fb; border-radius: 12px; border: 1px solid #dbe3ef; }
.pm-picker .btn-ghost { width: 36px; height: 36px; padding: 0; font-size: 22px; font-weight: 900; border-radius: 10px; }
.pm-selects { display:flex; gap: 8px; flex: 1; max-width: 460px; }
.pm-selects select {
  flex: 1; min-width: 0;
  padding: 10px 12px;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #0b2547;
  font-weight: 600;
}
.pm-summary {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.pm-sum-title { font-size: 12px; font-weight: 800; color: #47618a; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.pm-sum-list { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.pm-sum-item {
  display:flex; align-items:center; gap: 8px;
  padding: 7px 10px;
  background: linear-gradient(135deg,#f7fafe,#eef4fd);
  border: 1px solid #dfe7f4;
  border-radius: 9px;
  font-size: 12.5px;
  color: #1e3a60;
  font-weight: 600;
}
.pm-sum-item .pm-sum-idx {
  width: 22px; height: 22px; border-radius: 7px;
  background: #0b4493; color: #fff;
  display: inline-flex; align-items:center; justify-content:center;
  font-size: 11px; font-weight: 900;
  flex-shrink: 0;
}
.pm-opts {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 14px;
  padding: 12px 14px;
  background: #fbfcfe;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.pm-opt {
  display:flex; align-items:center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #24406a;
  cursor: pointer;
  padding: 4px 2px;
}
.pm-opt input { width: 16px; height: 16px; accent-color: #0b4493; }

/* ================================================================
 * MODULE IMPRESSION DÉDIÉ (Print First) — classes préfixées pg-/bp-
 * ================================================================ */
#printBufferRoot { display: none; }
body.print-mode { background: #fff !important; }

/* --- Conteneur racine affichage écran aperçu --- */
body.print-mode .print-root { display: block !important; }
body.print-mode > :not(#printBufferRoot):not(.print-root) { display: none !important; }
body.print-mode > #printBufferRoot,
body.print-mode > #printBufferRoot > .print-root { display: block !important; }

.print-root {
  background: #fff;
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: #0b2547;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* --- Une page A4 paysage (297 × 210 mm) hors marges @page --- */
.pg {
  width: 297mm;
  height: 210mm;
  margin: 0 auto 5mm auto;
  box-sizing: border-box;
  padding: 3mm 4mm;
  background: #fff;
  border: 1px solid #cbd5e1;
  page-break-after: always;
  break-after: page;
  display: block;
  overflow: hidden;
}
.pg:last-child {
  page-break-after: auto;
  break-after: auto;
  margin-bottom: 0;
}

/* --- Table principale (plus fiable en impression que CSS Grid) --- */
.pg-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10pt;
  line-height: 1.2;
  color: #0b2547;
}
.pg-table .pg-col-slot { width: 24mm; }
.pg-table .pg-col-day { width: auto; }

/* -- En-tête page -- */
.pg-table .pgh-main {
  background: linear-gradient(180deg, #0b2547 0%, #0b3370 100%);
  color: #fff;
  padding: 1.2mm 4mm;
  text-align: left;
  border: 1px solid #0b2547;
  border-radius: 0;
}

/* -- En-têtes colonnes (jours) -- */
.pgh-cols { }
.pgh-cols > th { box-sizing: border-box; }
.pghc {
  background: #0b4493;
  color: #fff;
  padding: 0.5mm 0.8mm 0.5mm 0.8mm;
  border: 1px solid #0b2547;
  vertical-align: top;
  text-align: center;
  box-sizing: border-box;
  width: auto;
  max-height: 20mm;
  overflow: hidden;
}
.pghc-slot {
  background: #0b2547;
  width: 24mm;
  text-align: left;
  padding: 0.6mm 1mm;
  vertical-align: middle;
  color: rgba(255,255,255,.9);
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: .08em;
  box-sizing: border-box;
  border: 1px solid #0b2547 !important;
}
.pghc-slot span { display: inline-block; padding: 0.3mm 0.8mm; background: rgba(255,255,255,.1); border-radius: 2px; }

.pghc-row1 { display: inline-flex; align-items: baseline; justify-content: center; gap: 0.6mm; flex-wrap: wrap; }
.pghc-dow { font-size: 7pt; font-weight: 900; letter-spacing: .07em; color: rgba(255,255,255,.82); }
.pghc-num { font-size: 11pt; font-weight: 900; line-height: 1; color: #fff; }
.pg-out-tag {
  font-size: 6.5pt; background: rgba(255,255,255,.15); color: #fff; padding: 0.15mm 0.6mm;
  border-radius: 2px; font-weight: 800;
}
.pghc-row2 {
  margin-top: 0.3mm;
  display: inline-flex;
  align-items: center;
  gap: 0.8mm;
  font-size: 7pt;
  background: rgba(255,255,255,.12);
  padding: 0.2mm 0.8mm;
  border-radius: 2px;
  font-weight: 700;
  line-height: 1;
}
.pg-pres b { font-weight: 900; color: #fff; }
.pg-sep { width: 1px; height: 6pt; background: rgba(255,255,255,.4); display: inline-block; }
.pg-abs { color: rgba(255,255,255,.88); font-weight: 800; }

.pghc-ast { margin-top: 0.3mm; display: flex; justify-content: center; overflow: hidden; max-height: 6mm; }
.pg-hol-tag {
  margin-top: 0.3mm;
  display: inline-block;
  font-size: 6.5pt;
  font-weight: 800;
  background: #fff7ed;
  color: #92400e;
  border: 1px solid #fdba74;
  padding: 0.15mm 0.6mm;
  border-radius: 2px;
}

/* -- États colonnes -- */
.pghc.pg-sat, .pgc.pg-sat { background: #1c6fdb; color: #fff; }
.pghc.pg-sat .pg-sep { background: rgba(255,255,255,.5); }
.pgc.pg-sat { background: #eff6ff; }
.pghc.pg-under, .pgc.pg-under { }
.pghc.pg-under { background: #b91c1c; color: #fff; }
.pgc.pg-under { background: #fff1f1; }
.pghc.pg-out { background: #c7d6ea !important; color: #0b2547 !important; }
.pghc.pg-out .pghc-dow { color: #475569 !important; }
.pghc.pg-out .pghc-num { color: #0b2547 !important; }
.pghc.pg-out .pghc-row2 { background: rgba(11,68,147,.14); color: #0b2547; }
.pghc.pg-out .pg-pres b { color: #0b2547; }
.pghc.pg-out .pg-abs { color: #334155; }
.pghc.pg-out .pg-sep { background: rgba(11,68,147,.3); }
.pgc.pg-out { background: repeating-linear-gradient(135deg, #fafcfe 0 3mm, #f3f6fb 3mm 6mm); }

/* -- Lignes des créneaux -- */
.pg-slot {
  height: var(--slot-h, 16mm);
  max-height: var(--slot-h, 16mm) !important;
  border-bottom: 1px solid #cbd5e1;
  outline: none;
  overflow: hidden;
  box-sizing: border-box;
}
.pg-slot:first-child { border-top: 1px solid #cbd5e1; }

.pg-slot .pgs {
  background: linear-gradient(180deg, #f1f5fb 0%, #e2e8f0 100%);
  color: #0b2547;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  border-top: none;
  border-bottom: none;
  padding: 0.6mm 0.9mm;
  text-align: left;
  vertical-align: middle;
  font-weight: 800;
  width: 24mm;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  background-clip: border-box;
  overflow: hidden;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.1mm;
  align-items: flex-start;
  justify-content: flex-start;
  outline: 0.4px solid #cbd5e1;
  outline-offset: -0.4px;
}

.pgs-start { font-size: 9pt; font-weight: 900; color: #0b2547; line-height: 1; }
.pgs-arrow { font-size: 8pt; color: #64748b; margin: 0 0.4mm; line-height: 1; }
.pgs-end { font-size: 7.5pt; color: #475569; font-weight: 700; line-height: 1; }

.pgc {
  border-left: none;
  border-right: 1px solid #cbd5e1;
  border-top: none;
  border-bottom: none;
  padding: 0.3mm 0.4mm;
  vertical-align: top;
  background: #fff;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  background-clip: border-box;
  margin: 0 !important;
  overflow: hidden;
  outline: 0.4px solid #cbd5e1;
  outline-offset: -0.4px;
}
.pgc:first-child { border-left: 1px solid #cbd5e1; }
.pgc-in {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5mm;
  min-height: 0;
  box-sizing: border-box;
  position: relative;
}
.pgc-in::before {
  content: "";
  position: absolute;
  inset: -0.4mm -0.5mm -0.4mm -0.5mm;
  background: transparent;
  pointer-events: none;
  display: block;
}
.pg-empty {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 100%;
  visibility: visible;
  pointer-events: none;
  content: " ";
  font-size: 1pt;
  line-height: 0;
}
.pgc-in::after {
  content: "";
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

/* -- Badges agent (assignation) -- */
.bp {
  --pc: #1e5aa8;
  display: flex;
  align-items: center;
  gap: 0.8mm;
  background: var(--pc);
  color: #fff;
  border-radius: 2px;
  padding: 0.5mm 0.7mm;
  font-size: 7pt;
  font-weight: 700;
  line-height: 1.1;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
  flex-wrap: nowrap;
  min-height: 0;
}
.bp.bp-dark { color: #0b2547; }
.bp.bp-dark .bp-av { color: #0b2547 !important; background: rgba(255,255,255,.55); }
.bp-av {
  width: 3.6mm; height: 3.6mm;
  border-radius: 2px;
  background: rgba(255,255,255,.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 6.2pt;
  font-weight: 900;
  flex-shrink: 0;
  color: #fff;
  letter-spacing: .02em;
}
.bp-n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 7pt;
}
.bp-tt, .bp-pres, .bp-warn, .bp-ast-tag {
  font-size: 6.2pt;
  font-weight: 900;
  padding: 0.2mm 0.5mm;
  border-radius: 2px;
  flex-shrink: 0;
  line-height: 1;
}
.bp-tt { background: rgba(255,255,255,.2); color: inherit; border: 1px solid rgba(255,255,255,.4); }
.bp.bp-dark .bp-tt { background: rgba(11,37,71,.12); border-color: rgba(11,37,71,.2); color: #0b2547; }
.bp-pres { background: rgba(255,255,255,.2); color: inherit; font-weight: 800; }
.bp-pres.am { border-left: 2px solid rgba(11,37,71,.5); }
.bp-pres.pm { border-right: 2px solid rgba(11,37,71,.5); }
.bp-pres.cust { background: rgba(255,237,213,.85); color: #7c2d12; }
.bp-warn { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-size: 6pt; padding: 0.1mm 0.4mm; }
.bp-ast-tag { background: #fde68a; color: #92400e; border: 1px solid #f59e0b; }

/* -- Badge astreinte samedi en-tête -- */
.pghc-ast .bp.bp-ast {
  max-width: 95%;
  background: var(--pc);
  border: 1px solid rgba(255,255,255,.35);
  padding: 0.4mm 0.6mm;
  font-size: 7pt;
}
.pghc-ast .bp.bp-ast .bp-av { width: 3.2mm; height: 3.2mm; font-size: 6pt; }

/* -- Ligne Absences -- */
.pg-abs-row {
  border-top: 1px solid #fca5a5;
  border-bottom: 1px solid #fca5a5;
  overflow: hidden;
  box-sizing: border-box;
}
.pgs-abs {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  color: #7f1d1d;
  border-left: 1px solid #fca5a5;
  border-right: 1px solid #fca5a5;
  border-top: none;
  border-bottom: none;
  padding: 0.4mm 0.8mm;
  text-align: left;
  vertical-align: top;
  font-weight: 800;
  width: 24mm;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  background-clip: border-box;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.2mm;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  outline: 0.4px solid #fca5a5;
  outline-offset: -0.4px;
}
.pga-title { font-size: 8pt; font-weight: 900; line-height: 1; }
.pga-sub { font-size: 6.5pt; font-weight: 600; color: #991b1b; opacity: .85; line-height: 1; }

.pgc.pgc-abs {
  background: #fff5f5;
  border-left: none;
  border-right: 1px solid #fca5a5;
  border-top: none;
  border-bottom: none;
  padding: 0.3mm 0.4mm;
  vertical-align: top;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  background-clip: border-box;
  margin: 0 !important;
  overflow: hidden;
  outline: 0.4px solid #fca5a5;
  outline-offset: -0.4px;
}
.pgc.pgc-abs:first-child { border-left: 1px solid #fca5a5; }
.pgc-abs-in {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.5mm 0.7mm;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  position: relative;
}
.pgc-abs-in::before {
  content: "";
  position: absolute;
  inset: -0.4mm -0.5mm -0.4mm -0.5mm;
  background: transparent;
  pointer-events: none;
  display: block;
}
.pgc-abs-in::after {
  content: "";
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

/* -- Pillules absence -- */
.pgap {
  --pc: #1e5aa8;
  display: inline-flex;
  align-items: center;
  gap: 0.6mm;
  background: var(--pc);
  color: #fff;
  border-radius: 2px;
  padding: 0.4mm 0.6mm 0.4mm 0.4mm;
  font-size: 6.8pt;
  font-weight: 700;
  line-height: 1.1;
  max-width: 100%;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.pgap.bp-dark { color: #0b2547; }
.pgap-av {
  width: 3.4mm; height: 3.4mm; border-radius: 2px;
  background: rgba(255,255,255,.22);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 6.2pt; font-weight: 900; color: #fff; flex-shrink: 0;
}
.pgap.bp-dark .pgap-av { background: rgba(11,37,71,.18); color: #0b2547; }
.pgap-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 20mm; }
.pgap-t {
  font-size: 6.2pt; font-weight: 900; padding: 0.15mm 0.5mm;
  background: rgba(255,255,255,.22); border-radius: 2px; flex-shrink: 0;
}
.pgap.bp-dark .pgap-t { background: rgba(11,37,71,.12); color: #0b2547; }
.pgap-hol {
  background: #fff7ed;
  color: #92400e;
  border: 1px solid #fdba74;
  padding: 0.3mm 0.8mm;
  font-weight: 900;
  font-size: 7pt;
}

/* ======================= @MEDIA PRINT : A4 PAYSAGE, mm PRÉCIS ======================= */
@media print {
  @page {
    size: A4 landscape;
    margin: 2mm 3mm 2mm 3mm;
  }
  html, body {
    background: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color: #0b2547;
    font-family: "Segoe UI", system-ui, Roboto, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.print-mode { background: #fff !important; height: auto; overflow: visible; }

  #printBufferRoot {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #printBufferRoot > .print-root {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Masquer l'interface utilisateur (shell, modales, toasts, ...) */
  body > :not(#printBufferRoot),
  .no-print,
  .app-shell, .app-leftbar, .app-rightbar, .week-nav,
  #popoverRoot, .toast-container, .modal-overlay,
  #weekBoard, .board-wrap, .app-main,
  #toastContainer, #authModal, #assignModal, #manageModal, #printModal {
    display: none !important;
  }

  .pg {
    width: 100% !important;
    height: 204mm !important;
    max-height: 204mm !important;
    margin: 0 !important;
    padding: 2mm 3mm 2mm 3mm !important;
    border: none !important;
    page-break-after: always;
    break-after: page;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .pg:last-child { page-break-after: auto; break-after: auto; }

  .pg-table {
    width: 100% !important;
    height: 200mm !important;
    max-height: 200mm !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
  }
  .pg-table .pg-col-slot { width: 24mm !important; }
  .pg-table .pg-col-day { width: auto !important; }

  .pg-slot {
    height: var(--slot-h, 16mm) !important;
    max-height: var(--slot-h, 16mm) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    border-collapse: separate !important;
  }
  .pg-slot > * { line-height: normal !important; }
  .pg-slot .pgs, .pgs-abs {
    width: 24mm !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  .pgc {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  .pghc-slot { width: 24mm !important; box-sizing: border-box !important; }
  .pgh-cols > th { box-sizing: border-box !important; overflow: hidden !important; }

  /* Ajustements badges à l'impression (éviter d'être écrasés par styles globaux) */
  .bp {
    box-shadow: none !important;
    transform: none !important;
    padding: 0.4mm 0.5mm !important;
    font-size: 6.5pt !important;
  }
  .bp .bp-av { width: 2.8mm !important; height: 2.8mm !important; font-size: 5.5pt !important; }
  .pgap {
    box-shadow: none !important;
    transform: none !important;
    padding: 0.35mm 0.5mm 0.35mm 0.3mm !important;
    font-size: 6.5pt !important;
  }
  .pgap .pgap-av { width: 3mm !important; height: 3mm !important; font-size: 5.5pt !important; }
  .pgap .pgap-t { font-size: 6pt !important; padding: 0.1mm 0.35mm !important; }
  .pgs-start { font-size: 8.5pt !important; }
  .pgs-end { font-size: 7pt !important; }
  .pga-title { font-size: 7.5pt !important; }
  .pga-sub { font-size: 6pt !important; }
  .pghc-dow { font-size: 6.5pt !important; }
  .pghc-num { font-size: 10pt !important; }
  .pghc-row2 { font-size: 6.5pt !important; }
}
