/* ========================================================================
   METOD · College Echevinal · Styles
   Design system v3.2 — METOD tokens
   ======================================================================== */

/* ---------- Token aliases ---------- */
:root {
  --cream: var(--metod-bone);
  --cream-warm: var(--metod-paper);
  --paper: var(--metod-paper);
  --ink: var(--metod-ink);
  --ink-70: var(--metod-ash);
  --ink-55: var(--metod-ash);
  --ink-40: var(--metod-stone);
  --ink-25: var(--metod-fog);
  --ink-10: var(--metod-mist);
  --ink-06: var(--metod-mist);

  --orange: var(--metod-orange);
  --orange-hover: var(--metod-orange-deep);
  --orange-soft: var(--metod-orange-soft);

  --status-red: var(--metod-brick);
  --status-orange: var(--metod-caramel);
  --status-yellow: var(--metod-plum);
  --status-green: var(--metod-forest);
  --status-red-bg: var(--metod-brick-soft);
  --status-orange-bg: var(--metod-caramel-soft);
  --status-yellow-bg: var(--metod-plum-soft);
  --status-green-bg: var(--metod-forest-soft);

  --font-ui: var(--font-body);
  --font-editorial: var(--font-display);
  --rail-width: 220px;
  --nav-height: var(--shell-topbar-height);
  --radius: var(--radius-sm);
  --hairline: var(--border-hairline);
  --hairline-strong: var(--border-soft);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Grain texture */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999; opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.06'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 256px 256px;
}

h1,h2,h3,h4,h5,h6,p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
*:focus { outline: none; }
*:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(232,90,16,0.3); border-radius: var(--radius-sm); }

.num, .mono, time, .metric-value {
  font-family: var(--font-mono);
  font-feature-settings: "tnum","zero";
  letter-spacing: -0.01em;
}

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--rail-width) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--cream);
  border-right: var(--hairline);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 0;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 8px;
}
.sidebar__brand img { height: 28px; }
.sidebar__commune {
  padding: 0 20px;
  margin-bottom: 28px;
}
.sidebar__commune-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sidebar__commune-sub {
  font-size: 11px;
  color: var(--ink-55);
  margin-top: 2px;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink-55);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 120ms ease, background 120ms ease;
  position: relative;
}
.sidebar__link:hover { color: var(--ink); background: var(--ink-06); }
.sidebar__link.is-active {
  color: var(--ink);
  background: var(--ink-06);
  font-weight: 600;
}
.sidebar__link.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--metod-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.sidebar__link svg { width: 18px; height: 18px; stroke: currentColor; flex-shrink: 0; }
.sidebar__link .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--metod-orange-soft);
  color: var(--metod-orange);
  padding: 2px 6px;
  border-radius: 100px;
  font-weight: 600;
}
.sidebar__footer {
  padding: 16px 20px;
  border-top: var(--hairline);
  margin-top: auto;
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
.sidebar__user-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.sidebar__user-role { font-size: 11px; color: var(--ink-55); }

/* ---------- Topbar ---------- */
.topbar {
  height: var(--nav-height);
  border-bottom: var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--cream);
  position: sticky; top: 0; z-index: 10;
}
.topbar__left { display: flex; align-items: center; gap: 16px; }
.topbar__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.topbar__breadcrumb {
  font-size: 13px;
  color: var(--ink-55);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar__breadcrumb .sep { opacity: 0.4; }
.topbar__right { display: flex; align-items: center; gap: 16px; }
.topbar__logos { display: flex; align-items: center; gap: 12px; }
.topbar__logos img { height: 28px; }

/* ---------- Page content ---------- */
.page {
  padding: 36px 44px 64px;
  max-width: 100%;
}
.page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  border-bottom: var(--hairline);
  padding-bottom: 28px;
}
.page__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--font-size-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-55);
  margin-bottom: var(--space-3);
}
.page__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--font-size-h1);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}
.page__subtitle {
  font-size: 14px;
  color: var(--ink-55);
  margin-top: 10px;
  max-width: 520px;
}
.page__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-55);
  text-align: right;
  line-height: 1.5;
}

/* ---------- Welcome card ---------- */
.welcome {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: var(--paper);
  border: var(--hairline);
  margin-bottom: 32px;
}
.welcome__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 18px;
  flex-shrink: 0;
}
.welcome__greeting {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.welcome__role {
  font-size: 13px;
  color: var(--ink-55);
  margin-top: 4px;
}

/* ---------- Stat cards ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--paper);
  border: var(--hairline);
  margin-bottom: 32px;
}
.stat-card {
  padding: 28px 32px;
  border-right: var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card:last-child { border-right: 0; }
.stat-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-55);
}
.stat-card__value {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.stat-card__value--orange { color: var(--metod-orange); }
.stat-card__hint {
  font-size: 12px;
  color: var(--ink-55);
  font-family: var(--font-mono);
}

/* ---------- Seance card ---------- */
.seance-card {
  background: var(--paper);
  border: var(--hairline);
  padding: 24px 28px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.seance-card__left { display: flex; align-items: center; gap: 20px; }
.seance-card__icon {
  width: 48px; height: 48px;
  background: var(--ink);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.seance-card__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.seance-card__meta {
  font-size: 13px;
  color: var(--ink-55);
  margin-top: 4px;
}
.seance-card__meta .mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------- Dossier cards (dashboard) ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title .count-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--ink-06);
  color: var(--ink-70);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}
.dossier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.dossier-card {
  background: var(--paper);
  border: var(--hairline);
  padding: 24px;
  transition: background 120ms ease, box-shadow 120ms ease;
  cursor: pointer;
}
.dossier-card:hover {
  background: var(--cream);
  box-shadow: var(--shadow-md);
}
.dossier-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dossier-card__ref {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-55);
}
.dossier-card__address {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}
.dossier-card__type {
  font-size: 12px;
  color: var(--ink-70);
  margin-top: 2px;
}
.dossier-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: var(--hairline);
}
.dossier-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.dossier-card__row-label { color: var(--ink-55); }
.dossier-card__row-value { color: var(--ink); font-weight: 500; }
.dossier-card__footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.chip::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
}
.chip--red { background: var(--status-red-bg); color: var(--status-red); }
.chip--orange { background: var(--status-orange-bg); color: var(--status-orange); }
.chip--yellow { background: var(--status-yellow-bg); color: var(--status-yellow); }
.chip--green { background: var(--status-green-bg); color: var(--status-green); }
.chip--plum { background: var(--metod-plum-soft); color: var(--metod-plum); }
.chip--neutral { background: var(--ink-06); color: var(--ink-70); }
.chip--neutral::before { background: var(--ink-40); }

/* ---------- Pastille ---------- */
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.pastille::before {
  content: ""; width: 8px; height: 8px;
  border-radius: 50%; background: var(--ink-40); flex-shrink: 0;
}
.pastille--green::before { background: var(--status-green); }
.pastille--orange::before { background: var(--status-orange); }
.pastille--red::before { background: var(--status-red); }
.pastille--plum::before { background: var(--metod-plum); }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  background: var(--orange);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--radius);
  transition: background 120ms ease, transform 60ms ease;
}
.btn-primary:hover { background: var(--orange-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary--green { background: var(--status-green); }
.btn-primary--green:hover { background: #2d5639; }
.btn-primary--red { background: var(--status-red); }
.btn-primary--red:hover { background: #8c2a18; }
.btn-primary--ink { background: var(--ink); }
.btn-primary--ink:hover { background: #333; }
.btn-primary--full { width: 100%; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  border: var(--hairline);
  border-radius: var(--radius);
  transition: background 100ms ease;
}
.btn-secondary:hover { background: var(--ink-06); }
.btn-secondary--full { width: 100%; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--ink-70);
  border-radius: 2px;
}
.btn-ghost:hover { color: var(--ink); background: var(--ink-06); }

.btn-large {
  height: 52px;
  padding: 0 28px;
  font-size: 15px;
}

/* ---------- Dossier detail layout ---------- */
.dossier-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  min-height: calc(100vh - var(--nav-height));
}
.dossier-main {
  padding: 0;
  background: var(--paper);
  border-right: var(--hairline);
}
.dossier-panel {
  padding: 28px 24px;
  background: var(--cream);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

/* Dossier header */
.dossier-header {
  padding: 28px 32px;
  background: var(--cream);
  border-bottom: var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dossier-header__ref {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-55);
}
.dossier-header__address {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--font-size-h2);
  letter-spacing: -0.015em;
  margin-top: 4px;
}
.dossier-header__zone {
  font-size: 12px;
  color: var(--ink-55);
  margin-top: 4px;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  border-bottom: var(--hairline);
  padding: 0 32px;
  background: var(--cream);
}
.tabs__item {
  padding: 16px 0;
  margin-right: 32px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-55);
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tabs__item:hover { color: var(--ink); }
.tabs__item.is-active { color: var(--ink); font-weight: 600; }
.tabs__item.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 3px;
  background: var(--metod-orange);
}
.tabs__item .count {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--ink-06);
  color: var(--ink-70);
  padding: 2px 6px;
  border-radius: 100px;
  font-weight: 600;
}
.tab-panel { display: none; padding: 32px; }
.tab-panel.is-active { display: block; }

/* ---------- Synthese content ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--paper);
  border: var(--hairline);
  margin-bottom: 24px;
}
.info-section {
  padding: 24px 28px;
  border-right: var(--hairline);
  border-bottom: var(--hairline);
}
.info-section:nth-child(2n) { border-right: 0; }
.info-section__title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-55);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: var(--hairline);
}
.info-field {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}
.info-field__label { color: var(--ink-55); font-size: 12px; }
.info-field__value { color: var(--ink); font-weight: 500; }
.info-field__value.mono { font-family: var(--font-mono); }

/* ---------- Verdict ---------- */
.verdict-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 32px;
  background: var(--cream);
  border: var(--hairline);
  margin-bottom: 24px;
}
.verdict-big {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}
.verdict-big .sep { color: var(--ink-25); }
.verdict-big .total { color: var(--ink-55); font-size: 40px; }
.verdict-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--font-size-h3);
  letter-spacing: -0.01em;
}
.verdict-caption { font-size: 13px; color: var(--ink-55); margin-top: 6px; }

/* Rules table */
.rules-table {
  width: 100%;
  background: var(--paper);
  border: var(--hairline);
}
.rule {
  display: grid;
  grid-template-columns: 24px 1fr 120px 120px 100px;
  gap: 16px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: var(--hairline);
  font-size: 13px;
}
.rule:last-child { border-bottom: 0; }
.rule__mark {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.rule__mark--green { background: var(--status-green); }
.rule__mark--red { background: var(--status-red); }
.rule__mark--orange { background: var(--status-orange); }
.rule__name { font-weight: 600; font-size: 13px; }
.rule__desc { font-size: 12px; color: var(--ink-55); margin-top: 2px; }
.rule__value, .rule__limit {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
}
.rule__limit { color: var(--ink-55); }
.rule__verdict-text {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
}
.rule__verdict-text--conforme { color: var(--status-green); }
.rule__verdict-text--nonconforme { color: var(--status-red); }
.rule__verdict-text--averifier { color: var(--status-orange); }
.rule--non-conformant { background: var(--status-red-bg); }

/* ---------- Avis summary ---------- */
.avis-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.avis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--paper);
  border: var(--hairline);
}
.avis-row__service {
  font-size: 14px;
  font-weight: 600;
}
.avis-row__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-55);
}

/* ---------- Decision panel ---------- */
.panel-block {
  margin-bottom: 24px;
}
.panel-block__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-55);
  margin-bottom: 10px;
}
.panel-block__value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.panel-block__hint {
  font-size: 12px;
  color: var(--ink-55);
  margin-top: 8px;
  line-height: 1.4;
}

.recommandation-card {
  background: var(--metod-forest-soft);
  border: 1px solid var(--metod-forest);
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
}
.recommandation-card--defavorable {
  background: var(--metod-brick-soft);
  border-color: var(--metod-brick);
}
.recommandation-card__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--metod-forest);
  margin-bottom: 6px;
}
.recommandation-card--defavorable .recommandation-card__label { color: var(--metod-brick); }
.recommandation-card__text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.decision-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.divider { height: 1px; background: var(--ink-10); border: 0; margin: 24px 0; }

/* ---------- Plans viewer ---------- */
.plans-viewer {
  display: flex;
  gap: 0;
  border: var(--hairline);
  background: var(--paper);
  height: 500px;
}
.plans-sidebar {
  width: 240px;
  border-right: var(--hairline);
  background: var(--cream);
  overflow-y: auto;
  padding: 16px;
  flex-shrink: 0;
}
.plans-thumb {
  padding: 10px;
  margin-bottom: 2px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: var(--radius-sm);
}
.plans-thumb:hover { background: var(--ink-06); }
.plans-thumb.is-active { background: var(--ink); color: var(--cream); }
.plans-thumb__icon {
  width: 32px; height: 32px;
  background: var(--paper);
  border: var(--hairline);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--ink-55);
}
.plans-thumb.is-active .plans-thumb__icon { border-color: transparent; }
.plans-thumb__title { font-size: 12px; font-weight: 500; line-height: 1.3; }
.plans-thumb__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.65;
  margin-top: 2px;
}
.plans-stage {
  flex: 1;
  background: var(--cream-warm);
  display: flex;
  flex-direction: column;
  position: relative;
}
.plans-stage iframe {
  width: 100%;
  flex: 1;
  border: 0;
}
.plans-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--cream);
  border-bottom: var(--hairline);
}
.plans-tools {
  display: flex; gap: 2px;
  background: var(--paper);
  border: var(--hairline);
  padding: 4px;
}
.plans-tools button {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-55); border-radius: 2px;
}
.plans-tools button:hover { color: var(--ink); background: var(--ink-06); }

/* ---------- Fullscreen plan overlay ---------- */
.plan-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(10,10,10,0.92);
  flex-direction: column;
}
.plan-fullscreen.is-active { display: flex; }
.plan-fullscreen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--metod-graphite);
  color: var(--cream);
  flex-shrink: 0;
}
.plan-fullscreen__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}
.plan-fullscreen__close {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-size: 20px;
  border-radius: var(--radius-sm);
}
.plan-fullscreen__close:hover { background: rgba(255,255,255,0.1); }
.plan-fullscreen__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.plan-fullscreen__body iframe {
  width: 90%;
  height: 95%;
  border: 0;
  background: white;
}
.plan-fullscreen__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  font-size: 20px;
}
.plan-fullscreen__nav:hover { background: rgba(255,255,255,0.2); }
.plan-fullscreen__nav--prev { left: 20px; }
.plan-fullscreen__nav--next { right: 20px; }

/* ---------- Remarques ---------- */
.remarque {
  background: var(--paper);
  border: var(--hairline);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.remarque__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.remarque__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-55);
}
.remarque__plan {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-55);
}
.remarque__text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 10px;
}
.remarque__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-55);
}
.remarque__resolved {
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 20px; margin-top: 8px; }
.timeline::before {
  content: ""; position: absolute;
  left: 5px; top: 4px; bottom: 4px;
  width: 1px; background: var(--ink-10);
}
.timeline__item { position: relative; margin-bottom: 18px; }
.timeline__item::before {
  content: ""; position: absolute;
  left: -20px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-25);
}
.timeline__item--current::before { background: var(--ink); border-color: var(--ink); }
.timeline__item--past::before { background: var(--ink-25); border-color: var(--ink-25); }
.timeline__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-55);
}
.timeline__title {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.35;
}

/* ---------- Archives table ---------- */
.archive-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.archive-filters .search-input {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  width: 280px;
  height: 36px;
}
.archive-filters .search-input:focus { border-color: var(--ink); }
.archive-filters .search-input::placeholder { color: var(--ink-40); }
.archive-filters select {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  height: 36px;
  cursor: pointer;
}

.archive-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.archive-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}
.archive-stat__value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
}
.archive-stat__label { color: var(--ink-55); }

.archive-table {
  font-size: 13px;
  width: 100%;
}
.archive-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-55);
  padding: 12px 16px;
  border-bottom: var(--hairline);
  background: var(--cream);
}
.archive-table td {
  padding: 14px 16px;
  border-bottom: var(--hairline);
  vertical-align: middle;
}
.archive-table tbody tr { cursor: pointer; transition: background 100ms ease; }
.archive-table tbody tr:hover { background: var(--cream-warm); }
.archive-table .mono-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-55);
}
.archive-table .address-cell { font-weight: 600; }

/* ---------- Pagination ---------- */
.pagination {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-55);
  font-family: var(--font-mono);
}
.pagination__pages { display: flex; gap: 2px; }
.pagination__page {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-55);
  border-radius: 2px;
  cursor: pointer;
}
.pagination__page:hover { background: var(--ink-06); color: var(--ink); }
.pagination__page.is-active { background: var(--ink); color: var(--cream); }

/* ---------- Statistiques ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.stats-panel {
  background: var(--paper);
  border: var(--hairline);
  padding: 28px 32px;
}
.stats-panel__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--font-size-h3);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.stats-panel__subtitle {
  font-size: 12px;
  color: var(--ink-55);
  margin-bottom: 24px;
}

/* Bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 180px;
  padding-top: 20px;
}
.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.bar {
  width: 100%;
  max-width: 40px;
  border-radius: 2px 2px 0 0;
  transition: height 0.4s ease;
}
.bar--ink { background: var(--ink); }
.bar--forest { background: var(--metod-forest); }
.bar--brick { background: var(--metod-brick); }
.bar--plum { background: var(--metod-plum); }
.bar--mist { background: var(--ink-25); }
.bar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-55);
}
.bar-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

/* Horizontal bar */
.h-bar-chart { display: flex; flex-direction: column; gap: 16px; }
.h-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  gap: 16px;
  align-items: center;
}
.h-bar-row__label { font-size: 13px; font-weight: 500; }
.h-bar-row__track {
  height: 10px;
  background: var(--ink-06);
  border-radius: 5px;
  overflow: hidden;
}
.h-bar-row__fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}
.h-bar-row__value {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
}

/* KPI row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--paper);
  border: var(--hairline);
  margin-bottom: 32px;
}
.kpi {
  padding: 28px;
  border-right: var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi:last-child { border-right: 0; }
.kpi__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-55);
}
.kpi__value {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: 4px;
}
.kpi__trend {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-55);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi__trend--up { color: var(--status-green); }
.kpi__trend--down { color: var(--status-red); }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(10,10,10,0.5);
  align-items: center;
  justify-content: center;
}
.modal-overlay.is-active { display: flex; }
.modal {
  background: var(--cream);
  border: var(--hairline);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.modal__header {
  padding: 24px 28px;
  border-bottom: var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--font-size-h3);
  letter-spacing: -0.01em;
}
.modal__close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-55); border-radius: var(--radius-sm);
}
.modal__close:hover { background: var(--ink-06); color: var(--ink); }
.modal__body { padding: 24px 28px; }
.modal__footer {
  padding: 16px 28px;
  border-top: var(--hairline);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- Decree ---------- */
.decree {
  background: var(--paper);
  border: var(--hairline);
  padding: var(--space-12) var(--space-16);
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
}
.decree__head {
  text-align: center;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 24px;
  margin-bottom: 28px;
}
.decree__commune {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-70);
  margin-bottom: 10px;
}
.decree__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--font-size-h2);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.decree__ref {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-55);
  margin-top: 10px;
  letter-spacing: 0.04em;
}
.decree__body { font-size: 14px; line-height: 1.7; }
.decree__body p { margin-bottom: 14px; }
.decree__body strong { font-weight: 600; }
.decree__considerant {
  padding-left: 20px;
  border-left: 2px solid var(--ink-10);
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--ink-70);
}
.decree__sign {
  margin-top: 40px;
  padding-top: 28px;
  border-top: var(--hairline);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  font-size: 12px;
}
.decree__sign-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-55);
  margin-bottom: 4px;
}
.decree__sign-name { font-weight: 600; font-size: 14px; }
.decree__sign-meta {
  color: var(--ink-55);
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------- Success state ---------- */
.success-msg {
  display: none;
  text-align: center;
  padding: 40px;
}
.success-msg.is-active { display: block; }
.success-msg__icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--metod-forest-soft);
  color: var(--metod-forest);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.success-msg__title {
  font-family: var(--font-display);
  font-size: var(--font-size-h3);
  font-weight: 500;
  margin-bottom: 8px;
}
.success-msg__text {
  font-size: 14px;
  color: var(--ink-55);
  max-width: 400px;
  margin: 0 auto;
}

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.muted { color: var(--ink-55); }
.strong { font-weight: 600; }
.small { font-size: 12px; }
.text-right { text-align: right; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--font-size-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-55);
}
