:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1f4e78;
  --green: #2e9e5b;
  --orange: #e08a1e;
  --red: #d64545;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

header.top {
  background: var(--accent);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

header.top h1 {
  margin: 0;
  font-size: 1.3rem;
}

header.top nav a {
  color: #dce7f2;
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.95rem;
}

header.top nav a.active,
header.top nav a:hover {
  color: #fff;
  text-decoration: underline;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.kpi .label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi .value {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 4px;
}

table.budget {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

table.budget th, table.budget td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

table.budget th:first-child, table.budget td:first-child {
  text-align: left;
}

table.budget thead th {
  background: #eef2f7;
  color: var(--accent);
  font-weight: 600;
}

.bar-track {
  background: #e9ecf1;
  border-radius: 6px;
  height: 10px;
  width: 130px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.bar-fill {
  height: 100%;
  border-radius: 6px 0 0 6px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot.green { background: var(--green); }
.dot.orange { background: var(--orange); }
.dot.red { background: var(--red); }

.pct-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }

.neg { color: var(--red); }
.pos { color: var(--green); }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters input, .filters select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}

table.ops {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

table.ops th, table.ops td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

table.ops th {
  background: #eef2f7;
  color: var(--accent);
  position: sticky;
  top: 0;
}

table.ops td.montant {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.ops tbody tr:hover {
  background: #f5f8fc;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--accent);
  font-size: 0.78rem;
}

.footer-note {
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.8rem;
}
