/* ═══ VIGIE Charte Omexom ═══ */

:root {
  --blue: #0071CE;
  --turquoise: #00C1DE;
  --deep-blue: #002060;
  --yellow: #FFB91D;
  --colvert: #007B99;
  --danger: #C62828;
  --success: #2E7D32;
  --grey-dark: #706F6F;
  --grey-light: #E2E2E2;
  --bg: #F5F5F5;
  --bg-zone: #EEF3F8;
  --white: #FFFFFF;
  --text: #333333;
  --text-mid: #5A6978;
  --text-light: #8C9BAA;
  --radius: 3px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }

/* ═══ Layout ═══ */
.app { display: flex; height: 100vh; }
.sidebar { width: 220px; background: var(--white); border-right: 1px solid var(--grey-light); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-brand { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--grey-light); }
.sidebar-logo { width: 100%; max-width: 140px; height: auto; display: block; }
.sidebar-brand-title { font-size: 18px; font-weight: 700; color: var(--deep-blue); letter-spacing: -0.5px; }
.sidebar-brand-title span { font-weight: 400; color: var(--text-light); font-size: 11px; display: block; margin-top: 2px; }
.sidebar nav { flex: 1; padding: 8px 0; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 13px; color: var(--text-mid); transition: all 0.15s; }
.sidebar nav a:hover { color: var(--blue); background: var(--bg); }
.sidebar nav a.active { color: var(--blue); background: var(--bg-zone); border-left: 3px solid var(--blue); font-weight: 600; }

.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.header { display: flex; align-items: center; justify-content: flex-end; padding: 10px 24px; background: var(--white); }
.header-spacer { flex: 1; }
.year-select { border: 1px solid var(--grey-light); border-radius: var(--radius); padding: 5px 10px; font-size: 13px; background: var(--white); }
.tricolor { display: flex; height: 4px; }
.tricolor-navy { width: 65%; background: var(--blue); }
.tricolor-turq { width: 25%; background: var(--turquoise); }
.tricolor-yellow { width: 10%; background: var(--yellow); }
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ═══ Typography ═══ */
h1 { font-size: 18px; font-weight: 700; color: var(--deep-blue); margin-bottom: 16px; }
h2 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
h3 { font-size: 13px; font-weight: 600; color: var(--deep-blue); margin-bottom: 8px; }

/* ═══ KPI Cards ═══ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi-card { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border-top: 3px solid var(--blue); }
.kpi-card.turquoise { border-top-color: var(--turquoise); }
.kpi-card.success { border-top-color: var(--success); }
.kpi-card.danger { border-top-color: var(--danger); }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-mid); margin-bottom: 4px; }
.kpi-value { font-size: 24px; font-weight: 700; color: var(--text); }
.kpi-sub { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.kpi-link { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; display: block; }
.kpi-link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,32,96,0.12); }

/* ═══ Progress Bar ═══ */
.progress-bar { height: 8px; background: #e8eef3; border: 1px solid #dce4ec; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; min-width: 2px; }
.progress-fill.green { background: var(--success); }
.progress-fill.blue { background: var(--blue); }
.progress-fill.turquoise { background: var(--turquoise); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red { background: var(--danger); }

/* ═══ Charts (CSS only) ═══ */
.chart-section { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-box { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bar-label { width: 55px; font-size: 11px; font-weight: 600; color: var(--text-mid); text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 16px; background: var(--grey-light); border-radius: 2px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 2px; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-size: 10px; color: white; font-weight: 600; min-width: 24px; }
.bar-value { font-size: 11px; color: var(--text-mid); width: 35px; flex-shrink: 0; }

/* ═══ Category Bars (Dashboard) ═══ */
.cat-bar-row { margin-bottom: 14px; }
.cat-bar-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.cat-bar-code { font-size: 12px; font-weight: 700; min-width: 50px; }
.cat-bar-detail { font-size: 11px; color: var(--text-light); flex: 1; }
.cat-bar-pct { font-size: 13px; font-weight: 700; color: var(--text); }
.cat-bar-track { height: 10px; background: #e8eef3; border: 1px solid #dce4ec; border-radius: 5px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; min-width: 3px; }

.month-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.month-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.month-bar { width: 100%; border-radius: 2px 2px 0 0; background: var(--blue); min-height: 2px; }
.month-bar.target { background: var(--grey-light); }
.month-bar.prev { background: var(--yellow); opacity: 0.45; }
.month-name { font-size: 10px; color: var(--text-light); }

/* ═══ Monthly Chart (grouped bars) ═══ */
.mchart-legend { display: flex; gap: 16px; margin-bottom: 10px; font-size: 10px; color: var(--text-mid); }
.mchart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 1px; margin-right: 4px; vertical-align: middle; }
.mchart { display: flex; align-items: flex-end; gap: 3px; height: 140px; border-bottom: 1px solid var(--grey-light); padding-bottom: 0; }
.mchart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0; }
.mchart-bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 120px; }
.mchart-bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; transition: height 0.3s; }
.mchart-real { background: var(--blue); }
.mchart-target { background: repeating-linear-gradient(135deg, #b8c5d1 0 3px, #d6dee6 3px 6px); }
.mchart-prev { background: var(--yellow); opacity: 0.75; }
.mchart-label { font-size: 10px; color: var(--text-light); margin-top: 4px; }
.mchart-current .mchart-label { color: var(--blue); font-weight: 700; }
.mchart-current .mchart-bars { background: rgba(0,113,206,0.04); border-radius: 3px; }

/* ═══ Mini Timeline ═══ */
.mini-timeline { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 20px; }
.mini-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.mini-month { text-align: center; padding: 8px 0; cursor: pointer; border-radius: var(--radius); transition: background 0.15s; }
.mini-month:hover { background: var(--bg-zone); }
.mini-month-label { font-size: 10px; color: var(--text-light); margin-bottom: 4px; }
.mini-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 12px; padding: 0 2px; }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,0.5); }
.mini-dot.done { background: var(--success); }
.mini-dot.in_progress { background: var(--blue); }
.mini-dot.todo { background: var(--text-light); }
.mini-dot.postponed { background: var(--yellow); }
.mini-dot.cancelled { background: var(--grey-dark); }
.mini-month-active { background: var(--bg-zone) !important; outline: 2px solid var(--blue); outline-offset: -1px; border-radius: var(--radius); }
.mini-month-active .mini-month-label { color: var(--blue); font-weight: 700; }

/* ═══ Tabs ═══ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--grey-light); margin-bottom: 16px; }
.tab { padding: 8px 16px; font-size: 12px; font-weight: 500; color: var(--text-mid); border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab:hover { color: var(--blue); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab-pct { font-size: 10px; color: var(--text-light); margin-left: 4px; }

/* ═══ Category Header ═══ */
.cat-header { background: var(--white); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.cat-info { font-size: 13px; }
.cat-info small { font-size: 11px; color: var(--text-mid); }
.cat-progress { width: 180px; }

/* ═══ PASE Table ═══ */
.pase-table { width: 100%; border-collapse: collapse; font-size: 12px; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pase-table thead th { background: var(--blue); color: white; padding: 8px 6px; font-weight: 500; text-align: center; font-size: 11px; white-space: nowrap; }
.pase-table thead th:nth-child(2) { text-align: left; min-width: 180px; }
.pase-table tbody tr { border-bottom: 1px solid #f0f0f0; }
.pase-table tbody tr:nth-child(even) { background: var(--bg-zone); }
.pase-table tbody td { padding: 4px 4px; vertical-align: middle; }
.pase-table input[type="number"] { width: 40px; text-align: center; border: 1px solid transparent; background: transparent; padding: 3px 2px; font-size: 12px; border-radius: 2px; }
.pase-table input[type="text"] { border: 1px solid transparent; background: transparent; padding: 3px 4px; font-size: 12px; border-radius: 2px; width: 100%; }
.pase-table input:focus { border-color: var(--blue); outline: none; background: white; }
.pase-table input:hover { border-color: var(--grey-light); }
.pase-table .total-cell { font-weight: 700; text-align: center; color: var(--text); }
.pase-table .pct-cell { display: flex; align-items: center; gap: 4px; }
.pase-table .pct-cell span { font-size: 10px; width: 30px; text-align: right; }
.pase-table .pct-bar { flex: 1; height: 4px; background: var(--grey-light); border-radius: 2px; overflow: hidden; }
.pase-table .pct-fill { height: 100%; border-radius: 2px; }
.pase-table .zero { color: var(--text-light); }
.sem-pct { font-size: 9px; color: var(--text-light); margin-top: 2px; white-space: nowrap; }

.totals-row td { background: var(--deep-blue) !important; color: white !important; padding: 8px 6px; font-weight: 700; font-size: 12px; text-align: center; }
.totals-row td:first-child { text-align: left; }

.btn-delete { background: none; border: none; color: var(--text-light); cursor: pointer; padding: 4px; font-size: 14px; }
.btn-delete:hover { color: var(--danger); }

/* ═══ Buttons ═══ */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 13px; font-weight: 500; border: none; border-radius: var(--radius); cursor: pointer; transition: all 0.15s; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--deep-blue); }
.btn-secondary { background: white; color: var(--blue); border: 1px solid var(--blue); }
.btn-secondary:hover { background: var(--bg-zone); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-ghost { background: none; color: var(--text-mid); padding: 4px 8px; }
.btn-ghost:hover { color: var(--blue); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══ Roadmap ═══ */
.filters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.filter-btn { padding: 5px 12px; font-size: 11px; font-weight: 500; border: 1px solid var(--grey-light); border-radius: 2px; background: white; color: var(--text-mid); cursor: pointer; transition: all 0.15s; }
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); color: white; border-color: transparent; }
.filter-count { opacity: 0.7; font-size: 10px; }

.timeline-month { margin-bottom: 24px; }
.timeline-month-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.timeline-month-header .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.timeline-month-header h3 { margin: 0; }
.timeline-month-header .line { flex: 1; height: 1px; background: var(--grey-light); }
.timeline-month-header .count { font-size: 11px; color: var(--text-light); }
.milestone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-left: 20px; }

.milestone-card { background: var(--white); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); border-left: 3px solid var(--blue); cursor: pointer; transition: box-shadow 0.15s; }
.milestone-card:hover { box-shadow: 0 4px 12px rgba(0,32,96,0.10); }
.milestone-card .top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.milestone-card .title { font-size: 13px; font-weight: 500; color: var(--text); }
.milestone-card .pilot { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.milestone-card .deliverables { font-size: 11px; color: var(--text-mid); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.badge { display: inline-block; padding: 2px 6px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: white; border-radius: 2px; }

.status-icon { font-size: 13px; }

/* ═══ Drawer ═══ */
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.15); z-index: 40; }
.drawer-overlay.open { display: block; }
.drawer { position: fixed; top: 0; right: -440px; width: 420px; height: 100%; background: white; z-index: 50; box-shadow: -4px 0 16px rgba(0,0,0,0.1); transition: right 0.2s; display: flex; flex-direction: column; }
.drawer.open { right: 0; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--grey-light); }
.drawer-header h2 { margin: 0; }
.drawer-close { background: none; border: none; font-size: 20px; color: var(--text-light); cursor: pointer; }
.drawer-close:hover { color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }

/* ═══ Forms ═══ */
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 11px; font-weight: 500; color: var(--text-mid); margin-bottom: 4px; }
.form-input { width: 100%; border: 1px solid var(--grey-light); border-radius: var(--radius); padding: 7px 10px; font-size: 13px; }
.form-input:focus { border-color: var(--blue); outline: none; }
.form-select { width: 100%; border: 1px solid var(--grey-light); border-radius: var(--radius); padding: 7px 10px; font-size: 13px; background: white; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--grey-light); }

/* ═══ Settings Table ═══ */
.settings-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.settings-table th { text-align: left; padding: 10px 16px; font-size: 11px; color: var(--text-mid); font-weight: 500; border-bottom: 1px solid var(--grey-light); }
.settings-table td { padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.settings-table tr:nth-child(even) td { background: var(--bg-zone); }
.settings-table .actions { display: flex; gap: 4px; justify-content: flex-end; }

.status-badge { display: inline-block; padding: 2px 8px; font-size: 10px; font-weight: 500; border-radius: 2px; }
.status-badge.active { background: #e8f5e9; color: var(--success); }
.status-badge.archived { background: #f5f5f5; color: var(--grey-dark); }

/* ═══ Messages ═══ */
.alert { padding: 10px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #ffebee; color: var(--danger); border: 1px solid var(--danger); }
.alert-success { background: #e8f5e9; color: var(--success); border: 1px solid var(--success); }

.empty { text-align: center; padding: 32px; color: var(--text-light); font-size: 13px; }
.last-update { text-align: right; font-size: 11px; color: var(--text-light); margin-top: 8px; }

/* ═══ Recent log widget (dashboard) ═══ */
.recent-log { background: var(--white); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-top: 20px; }
.recent-log-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--grey-light); }
.recent-log-head h3 { margin: 0; }
.recent-log-count { font-size: 11px; color: var(--text-light); }
.recent-log-list { list-style: none; margin: 0; padding: 0; }
.recent-log-item { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 12px; }
.recent-log-item:last-child { border-bottom: none; }
.rl-meta { display: flex; flex-direction: column; gap: 2px; }
.rl-time { font-size: 11px; color: var(--text-mid); font-weight: 600; }
.rl-kind { font-size: 10px; color: var(--text-light); }
.rl-cat { background: var(--bg-zone); color: var(--deep-blue); padding: 1px 5px; border-radius: 2px; font-size: 9px; font-weight: 700; letter-spacing: 0.5px; margin-left: 2px; }
.rl-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.rl-entity { font-weight: 600; color: var(--text); }
.rl-badge { padding: 1px 6px; font-size: 10px; font-weight: 700; border-radius: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.rl-create { background: #e8f5e9; color: var(--success); }
.rl-delete { background: #ffebee; color: var(--danger); }
.rl-field { font-size: 11px; color: var(--text-mid); font-style: italic; }
.rl-change { font-size: 11px; color: var(--text); font-variant-numeric: tabular-nums; }
.rl-old { color: var(--text-light); text-decoration: line-through; }
.rl-arrow { color: var(--blue); font-weight: 700; margin: 0 3px; }
.rl-new { color: var(--deep-blue); font-weight: 600; }

/* ═══ HTMX indicator ═══ */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-settling tr { transition: background 0.3s; }
tr.htmx-added { background: #e8f5e9 !important; }

/* ═══ Export cards ═══ */
.export-card { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--bg-zone); border-radius: var(--radius); margin-bottom: 12px; }
.export-info { display: flex; align-items: center; gap: 12px; }
.export-icon { font-size: 20px; }
.export-title { font-size: 13px; font-weight: 500; }
.export-desc { font-size: 11px; color: var(--text-light); }
.export-card.disabled { opacity: 0.5; }

/* ═══ Confirm modal ═══ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 60; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: var(--radius); padding: 24px; width: 380px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.modal h3 { margin-bottom: 8px; }
.modal p { font-size: 13px; color: var(--text-mid); margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ═══ Volets (axe Sécurité / Environnement) ═══ */
.volet-bar { display: flex; gap: 6px; margin-bottom: 12px; }
.volet-pill { --chip: var(--blue); display: inline-flex; align-items: center; gap: 5px; padding: 5px 13px; font-size: 12px; font-weight: 600; border: 1px solid var(--grey-light); border-radius: 20px; color: var(--text-mid); background: var(--white); transition: all 0.15s; }
.volet-pill:hover { border-color: var(--chip); color: var(--chip); }
.volet-pill.active { background: var(--chip); border-color: var(--chip); color: #fff; }
.volet-pill-pct { font-size: 10px; font-weight: 400; opacity: 0.85; }
.volet-cell { white-space: nowrap; }
.volet-chip { --chip: var(--grey-dark); font-size: 9px; font-weight: 700; letter-spacing: 0.3px; padding: 2px 7px; margin-right: 3px; border-radius: 10px; border: 1px solid var(--grey-light); background: var(--white); color: var(--text-light); cursor: pointer; transition: all 0.15s; }
.volet-chip:hover { border-color: var(--chip); color: var(--chip); }
.volet-chip.on { background: var(--chip); border-color: var(--chip); color: #fff; }

/* ═══ Sélection multiple (suppression en lot) ═══ */
.pase-table .sel-cell { width: 32px; min-width: 32px; max-width: 32px; text-align: center; }
.sel-cell input { width: 13px; height: 13px; cursor: pointer; accent-color: var(--blue); vertical-align: middle; }
.bulk-bar { display: none; position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); z-index: 50; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--grey-light); border-left: 3px solid var(--danger); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.18); padding: 8px 14px; font-size: 13px; white-space: nowrap; }
.bulk-bar.show { display: flex; }
.bulk-bar #bulk-count { font-weight: 600; }

/* ═══ Current month highlight ═══ */
.month-current { background: rgba(0, 113, 206, 0.06) !important; }
th.month-current { background: var(--deep-blue) !important; font-weight: 700; }
.month-current-total { background: rgba(0, 113, 206, 0.15) !important; }

/* ═══ Sticky table header ═══ */
.pase-table thead th { position: sticky; top: 0; z-index: 10; }

/* ═══ Flash save ═══ */
@keyframes flash-save { 0% { background: #e8f5e9; } 100% { background: transparent; } }
.flash-save { animation: flash-save 0.8s ease-out; }

/* ═══ Search input ═══ */
#pase-search { border: 1px solid var(--grey-light); }
#pase-search:focus { border-color: var(--blue); outline: none; }

/* ═══ Toast ═══ */
.toast { position: fixed; bottom: -60px; left: 50%; transform: translateX(-50%); padding: 10px 24px; border-radius: var(--radius); font-size: 13px; font-weight: 500; color: white; z-index: 100; transition: bottom 0.3s ease; pointer-events: none; }
.toast.show { bottom: 24px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--blue); }

/* ═══ A11y focus ═══ */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
.pase-table input:focus-visible { outline: 2px solid var(--blue); outline-offset: -1px; }
button:focus-visible, a:focus-visible { outline-offset: 2px; }

/* ═══ Disabled state ═══ */
.btn:disabled { cursor: not-allowed; background: var(--grey-light); color: var(--text-light); }
.btn:disabled:hover { background: var(--grey-light); }

/* ═══ Tabs small % when 0 ═══ */
.tab-pct { font-size: 10px; color: var(--text-light); margin-left: 4px; font-weight: 400; }
.tab.active .tab-pct { color: var(--blue); }

/* ═══ PASE sticky colonnes sélection + action ═══ */
.pase-table { position: relative; }
.pase-table thead th:first-child,
.pase-table tbody td:first-child { position: sticky; left: 0; z-index: 5; background: var(--white); }
.pase-table thead th:nth-child(2),
.pase-table tbody tr:not(.totals-row) td:nth-child(2) { position: sticky; left: 32px; z-index: 5; background: var(--white); box-shadow: 2px 0 4px -2px rgba(0,0,0,0.08); }
.pase-table thead th:first-child,
.pase-table thead th:nth-child(2) { background: var(--blue); z-index: 11; }
.pase-table tbody tr:nth-child(even) td:first-child,
.pase-table tbody tr:nth-child(even):not(.totals-row) td:nth-child(2) { background: var(--bg-zone); }
.pase-table .totals-row td:first-child { background: var(--deep-blue) !important; }

/* ═══ Sidebar collapse ═══ */
.sidebar-toggle { background: none; border: none; color: var(--text-light); cursor: pointer; padding: 12px 20px; font-size: 16px; text-align: left; transition: color 0.15s; }
.sidebar-toggle:hover { color: var(--blue); }
.sidebar-logout { margin: 0; padding: 0; border-top: 1px solid var(--grey-light); }
.sidebar-logout button { width: 100%; background: none; border: 0; color: var(--text-light); cursor: pointer; padding: 12px 20px; font-size: 14px; text-align: left; transition: color 0.15s; font-family: inherit; }
.sidebar-logout button:hover { color: var(--danger, #C62828); }
.app.collapsed .sidebar { width: 52px; }
.app.collapsed .sidebar-brand-title span,
.app.collapsed .sidebar nav a span,
.app.collapsed .sidebar-logout button span,
.app.collapsed .sidebar-toggle span { display: none; }
.app.collapsed .sidebar-logo { display: none; }
.app.collapsed .sidebar-brand { padding: 14px 8px; align-items: center; }
.app.collapsed .sidebar-brand-title { font-size: 14px; text-align: center; }
.app.collapsed .sidebar nav a { padding: 10px 14px; justify-content: center; font-size: 16px; }
.app.collapsed .sidebar-logout button { padding: 10px 14px; text-align: center; }
.app.collapsed .sidebar-toggle { text-align: center; }

/* ═══ Print ═══ */
@media print {
  .sidebar, .header, .tricolor, .toast, .modal-overlay, #pase-search, #btn-add-action, .btn-delete, .btn, .filters, .bulk-bar, .volet-bar { display: none !important; }
  .sel-cell { width: 0 !important; min-width: 0 !important; padding: 0 !important; }
  .sel-cell input { display: none !important; }
  .app { display: block; }
  .main-wrap { display: block; }
  .content { padding: 0; overflow: visible; }
  .pase-table { font-size: 10px; box-shadow: none; }
  .pase-table thead th { background: #333 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pase-table input { border: none !important; padding: 0; font-size: 10px; }
  .cat-header { box-shadow: none; }
  h1 { font-size: 16px; }
}
