/* ==========================================================================
   Mandat ? hall public (simulation de gouvernance)
   ========================================================================== */

.mandat {
  --mandat-seal: var(--gold);
  --mandat-ink-soft: rgba(29, 27, 22, 0.72);
}

.mandat-crumb {
  padding: 14px var(--pad-x);
  border-bottom: 2px solid var(--ink);
}

/* ?? Hero ?? */
.mandat-hero {
  position: relative;
  min-height: min(78vh, 620px);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.mandat-hero__media {
  position: absolute;
  inset: 0;
}

.mandat-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.78) contrast(1.08) brightness(0.92);
  transform: scale(1.06);
  animation: mandat-hero-drift 28s ease-in-out infinite alternate;
}

.mandat-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(29, 27, 22, 0.35) 0%, rgba(29, 27, 22, 0.62) 42%, rgba(29, 27, 22, 0.9) 100%),
    linear-gradient(90deg, rgba(29, 27, 22, 0.72) 0%, rgba(29, 27, 22, 0.35) 55%, rgba(29, 27, 22, 0.55) 100%);
  pointer-events: none;
}

.mandat-hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 28px 36px;
  align-items: end;
  min-height: min(78vh, 620px);
  padding: 48px var(--pad-x) 44px;
  animation: mandat-rise 0.9s ease both;
}

.mandat-hero__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 560px;
  padding-bottom: 8px;
}

.mandat-hero__brand {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--paper);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35);
}

.mandat-hero__headline {
  margin: 18px 0 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--paper);
  max-width: 20ch;
}

.mandat-hero__lead {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.45;
  font-style: italic;
  color: rgba(233, 235, 227, 0.88);
  max-width: 36ch;
}

.mandat-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.mandat-hero__panel {
  border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  color: var(--ink);
  padding: 26px 26px 24px;
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  animation: mandat-seal-in 0.9s ease both 0.15s;
}

.mandat-hero__panel .kick {
  margin-bottom: 6px;
}

.mandat-hero__panel-brand {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
}

.mandat-hero__panel-title {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.mandat-hero__panel-lead {
  margin: 12px 0 0;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--soft);
}

.mandat-hero__panel-lead b {
  color: var(--ink);
  font-weight: 700;
}

.mandat-hero__panel-steps {
  margin: 16px 0 0;
  padding: 0 0 0 1.15em;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.45;
  color: var(--soft);
}

.mandat-hero__panel-steps li {
  margin: 0 0 8px;
  padding-left: 2px;
}

.mandat-hero__panel-steps li:last-child {
  margin-bottom: 0;
  font-style: italic;
}

.mandat-hero__credit {
  position: absolute;
  left: var(--pad-x);
  bottom: 14px;
  z-index: 2;
  font-size: 12px;
  color: rgba(233, 235, 227, 0.55);
  text-decoration: none;
}

.mandat-hero__credit:hover {
  color: var(--paper);
}

@media (max-width: 900px) {
  .mandat-hero__layout {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-bottom: 52px;
  }
  .mandat-hero__body {
    max-width: none;
  }
  .mandat-hero__panel {
    max-width: 520px;
  }
}

/* ?? Season strip ?? */
.mandat-season {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px 28px;
  align-items: center;
  padding: 18px var(--pad-x);
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(232, 176, 75, 0.16), transparent 40%),
    var(--paper);
}

.mandat-season__seal {
  width: 64px;
  height: 64px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  flex: none;
  animation: mandat-seal-in 1.1s ease both 0.2s;
}

.mandat-season__title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin: 0;
}

.mandat-season__meta {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

.mandat-season__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 22px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
}

.mandat-season__stats strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--clay);
  line-height: 1;
  margin-bottom: 3px;
}

.mandat-season__stats span {
  color: var(--muted);
  font-weight: 600;
}

/* ?? Notice ?? */
.mandat-notice {
  padding: 14px var(--pad-x);
  border-bottom: 2px solid var(--ink);
  background: rgba(86, 121, 163, 0.1);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--soft);
}

.mandat-notice b {
  font-family: var(--font-ui);
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
}

/* ?? Sections ?? */
.mandat-section {
  padding: 40px var(--pad-x) 44px;
  border-bottom: 2px solid var(--ink);
  scroll-margin-top: 16px;
}

.mandat-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
}

.mandat-section__title {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(26px, 3.5vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.mandat-section__hint {
  margin: 10px 0 0;
  max-width: 560px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
}

.mandat-section__aside {
  flex: none;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

/* ?? Hall ranking ?? */
.mandat-hall {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.mandat-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.35fr) minmax(140px, 0.9fr) minmax(160px, 1fr) auto;
  gap: 16px 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1.5px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, padding 0.2s ease;
  animation: mandat-row-in 0.55s ease both;
}

.mandat-row:nth-child(1) { animation-delay: 0.05s; }
.mandat-row:nth-child(2) { animation-delay: 0.1s; }
.mandat-row:nth-child(3) { animation-delay: 0.15s; }
.mandat-row:nth-child(4) { animation-delay: 0.2s; }
.mandat-row:nth-child(5) { animation-delay: 0.25s; }
.mandat-row:nth-child(6) { animation-delay: 0.3s; }
.mandat-row:nth-child(7) { animation-delay: 0.35s; }
.mandat-row:nth-child(8) { animation-delay: 0.4s; }

.mandat-row:hover,
.mandat-row:focus-visible {
  background: color-mix(in srgb, var(--paper) 70%, var(--gold) 12%);
  outline: none;
}

.mandat-row:hover .mandat-row__enter,
.mandat-row:focus-visible .mandat-row__enter {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.mandat-row__rank {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--muted);
  text-align: center;
}

.mandat-row:nth-child(-n+3) .mandat-row__rank {
  color: var(--clay);
}

.mandat-row__who {
  min-width: 0;
}

.mandat-row__player {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.mandat-row__commune {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

.mandat-row__pop {
  color: var(--fog);
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
}

.mandat-row__score-block {
  text-align: left;
}

.mandat-row__score {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.mandat-row__score-label {
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.mandat-row__line {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 1.5px solid color-mix(in srgb, var(--blue) 40%, transparent);
}

.mandat-gauges {
  display: grid;
  gap: 7px;
}

.mandat-gauge {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  gap: 8px;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.mandat-gauge__track {
  height: 5px;
  background: var(--line);
  overflow: hidden;
}

.mandat-gauge__fill {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left center;
  animation: mandat-bar 1s ease both;
}

.mandat-gauge--sat .mandat-gauge__fill { background: var(--green-dark); }
.mandat-gauge--trust .mandat-gauge__fill { background: var(--blue); }
.mandat-gauge--cohesion .mandat-gauge__fill { background: var(--clay); }

.mandat-gauge__val {
  text-align: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.mandat-row__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 150px;
}

.mandat-row__pending {
  text-align: right;
  max-width: 220px;
}

.mandat-row__pending-kind {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--ink);
  display: inline-block;
  padding: 2px 7px;
  margin-bottom: 5px;
}

.mandat-row__pending-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--soft);
  line-height: 1.3;
}

.mandat-row__pending-eta {
  margin-top: 3px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.mandat-row__enter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
  background: var(--card);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}

/* ?? Acts timeline ?? */
.mandat-acts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
}

.mandat-act {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1.5px solid var(--line);
}

.mandat-act__when {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.mandat-act__kind {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 4px;
}

.mandat-act__title {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.mandat-act__meta {
  margin: 5px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

.mandat-act__eta {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 6px 10px;
  white-space: nowrap;
}

.mandat-act__link {
  text-decoration: none;
  color: inherit;
}

.mandat-act__link:hover .mandat-act__title {
  color: var(--clay);
}

/* ?? How it works ?? */
.mandat-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 2px solid var(--ink);
  background: var(--card);
}

.mandat-step {
  padding: 28px 24px;
  border-right: 2px solid var(--ink);
}

.mandat-step:last-child {
  border-right: 0;
}

.mandat-step__num {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--clay);
  margin-bottom: 12px;
}

.mandat-step__title {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.mandat-step__body {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.45;
}

/* ?? CTA ?? */
.mandat-cta {
  padding: 48px var(--pad-x);
  background: var(--ink);
  color: var(--paper);
}

.mandat-cta__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.mandat-cta__title {
  margin: 8px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.025em;
  color: var(--paper);
  max-width: 16ch;
  line-height: 1.05;
}

.mandat-cta__lead {
  margin: 12px 0 0;
  max-width: 420px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(233, 235, 227, 0.78);
  line-height: 1.45;
}

.mandat-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mandat .kick.t-gold { color: var(--gold); }

/* ?? Demo badge ?? */
.mandat-demo-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: middle;
}

/* ?? Animations ?? */
@keyframes mandat-hero-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.2%, -0.8%, 0); }
}

@keyframes mandat-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mandat-seal-in {
  from { opacity: 0; transform: scale(0.85) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes mandat-row-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mandat-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mandat-hero__media img,
  .mandat-hero__body,
  .mandat-season__seal,
  .mandat-row,
  .mandat-gauge__fill {
    animation: none !important;
  }
  .mandat-hero__media img {
    transform: none;
  }
}

/* ?? Responsive ?? */
@media (max-width: 960px) {
  .mandat-season {
    grid-template-columns: auto 1fr;
  }
  .mandat-season__stats {
    grid-column: 1 / -1;
  }
  .mandat-row {
    grid-template-columns: 40px 1fr auto;
    gap: 10px 14px;
  }
  .mandat-row__score-block,
  .mandat-gauges {
    display: none;
  }
  .mandat-act {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .mandat-act__eta {
    justify-self: start;
  }
  .mandat-steps {
    grid-template-columns: 1fr;
  }
  .mandat-step {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }
  .mandat-step:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .mandat-hero {
    min-height: auto;
  }
  .mandat-hero__layout {
    min-height: auto;
    padding: 36px 20px 52px;
  }
  .mandat-crumb,
  .mandat-season,
  .mandat-notice,
  .mandat-section,
  .mandat-cta {
    padding-left: 20px;
    padding-right: 20px;
  }
  .mandat-hero__credit {
    right: 20px;
  }
  .mandat-row {
    grid-template-columns: 32px 1fr;
  }
  .mandat-row__aside {
    grid-column: 2;
    align-items: flex-start;
    min-width: 0;
  }
  .mandat-row__pending {
    text-align: left;
    max-width: none;
  }
  .mandat-section__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .mandat-party-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .mandat-decide {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ?? My mandate strip ?? */
.mandat-mine {
  border-bottom: 2px solid var(--ink);
  background: rgba(189, 75, 44, 0.08);
}
.mandat-mine__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px var(--pad-x);
  flex-wrap: wrap;
}
.mandat-mine__name {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.mandat-mine__meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}
.mandat-mine__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mandat-mine__restart {
  margin: 0;
  display: inline;
}

.mandat-restart {
  background: rgba(189, 75, 44, 0.05);
}
.mandat-restart__form {
  display: grid;
  gap: 14px;
  justify-items: start;
  margin-top: 8px;
  max-width: 520px;
}
.mandat-restart__confirm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-style: italic;
  font-size: 15px;
  color: var(--soft);
  line-height: 1.4;
  cursor: pointer;
}
.mandat-restart__confirm input {
  margin-top: 3px;
  flex: none;
}

.mandat-row.is-mine {
  background: rgba(189, 75, 44, 0.06);
}

/* ?? Flash ?? */
.mandat-flash {
  padding: 14px 18px;
  margin-bottom: 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
}
.mandat-flash--ok {
  background: rgba(111, 143, 90, 0.14);
  border: 1.5px solid var(--green-dark);
  color: var(--ink);
}
.mandat-flash--err {
  background: rgba(189, 75, 44, 0.1);
  border: 1.5px solid var(--clay);
  color: var(--ink);
}

/* Toasts flottants (partie) ? ancr?s en bas */
.mp-toasts {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 24px));
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.mp-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 8px 13px 14px;
  border: 2px solid var(--ink);
  border-left-width: 5px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 rgba(29, 27, 22, 0.22);
  animation: mp-toast-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mp-toast.is-out {
  animation: mp-toast-out 0.28s ease both;
}

.mp-toast--ok {
  border-left-color: var(--gold);
}

.mp-toast--err {
  border-left-color: var(--clay);
}

.mp-toast__mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: var(--gold);
  flex: none;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}

.mp-toast--err .mp-toast__mark { color: var(--clay); }
.mp-toast__mark .mp-ico {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
}

.mp-toast__msg {
  margin: 0;
  min-width: 0;
  font-family: var(--font-ui);
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.mp-toast__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(233, 235, 227, 0.55);
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  flex: none;
  transition: color 0.15s ease;
}

.mp-toast__close:hover {
  color: var(--paper);
  background: transparent;
}

.mp-toast--err .mp-toast__close:hover {
  color: var(--clay);
}

@keyframes mp-toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mp-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  .mp-toast,
  .mp-toast.is-out { animation: none; }
}

/* ?? Briefing ouvrir ?? */
.mandat-brief {
  margin: 0 0 36px;
  padding: 26px 28px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(232, 176, 75, 0.14), transparent 45%),
    var(--card);
}
.mandat-brief__title {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.mandat-brief__list {
  margin: 18px 0 0;
  padding: 0 0 0 1.2em;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--soft);
}
.mandat-brief__list li {
  margin: 0 0 12px;
}
.mandat-brief__list strong {
  font-family: var(--font-ui);
  font-weight: 800;
  color: var(--ink);
}
.mandat-brief__list em {
  font-style: italic;
  color: var(--ink);
}
.mandat-brief__note {
  margin: 8px 0 0;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.mandat-ouvrir__foot {
  margin: 14px 0 0;
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  max-width: 52ch;
}

/* ?? Ouvrir ?? */
.mandat-fieldset {
  margin: 0 0 36px;
  padding: 0;
  border: 0;
}
.mandat-fieldset__legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 0;
}
.mandat-fieldset__title {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.mandat-commune-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mandat-commune {
  display: block;
  cursor: pointer;
}
.mandat-commune input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mandat-commune__body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink);
  background: var(--card);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.mandat-commune:hover .mandat-commune__body {
  background: color-mix(in srgb, var(--paper) 70%, var(--gold) 15%);
}
.mandat-commune input:focus-visible + .mandat-commune__body {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.mandat-commune input:checked + .mandat-commune__body {
  background: var(--ink);
  color: var(--paper);
}
.mandat-commune input:checked + .mandat-commune__body .mandat-commune__meta {
  color: rgba(233, 235, 227, 0.65);
}
.mandat-commune__name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.015em;
}
.mandat-commune__meta {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.mandat-lines {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.mandat-line {
  display: block;
  cursor: pointer;
}
.mandat-line input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mandat-line__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 16px;
  border: 2px solid var(--ink);
  background: var(--card);
  min-height: 100%;
  transition: background 0.15s ease;
}
.mandat-line:hover .mandat-line__body {
  background: color-mix(in srgb, var(--paper) 75%, var(--gold) 12%);
}
.mandat-line input:checked + .mandat-line__body {
  background: var(--ink);
  color: var(--paper);
}
.mandat-line input:checked + .mandat-line__body .kick {
  color: var(--gold);
}
.mandat-line input:checked + .mandat-line__body .mandat-line__hint {
  color: rgba(233, 235, 227, 0.72);
}
.mandat-line input:focus-visible + .mandat-line__body {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.mandat-line__name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.mandat-line__hint {
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
}

.mandat-ouvrir__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}

@media (max-width: 900px) {
  .mandat-commune-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .mandat-commune-grid,
  .mandat-lines { grid-template-columns: 1fr; }
}

/* ?? Party ?? */
.mandat-party-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 36px var(--pad-x) 28px;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(165deg, var(--paper) 0%, var(--bg) 100%);
}
.mandat-party-hero__title {
  margin: 8px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.mandat-party-hero__title span {
  display: inline;
  color: var(--muted);
  font-weight: 700;
}
.mandat-party-hero__lead {
  margin: 12px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}
.mandat-party-hero__score {
  flex: none;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 16px 22px;
  text-align: center;
  min-width: 110px;
}
.mandat-party-hero__score strong {
  display: block;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--gold);
}
.mandat-party-hero__score span {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(233, 235, 227, 0.7);
}

.mandat-progress {
  margin-bottom: 28px;
}
.mandat-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.mandat-progress__meta .mono {
  color: var(--ink);
  font-size: 14px;
}
.mandat-progress__track {
  height: 8px;
  background: var(--line);
  border: 1.5px solid var(--ink);
  overflow: hidden;
}
.mandat-progress__track i {
  display: block;
  height: 100%;
  background: var(--clay);
  animation: mandat-bar 1s ease both;
}

.mandat-party-gauges {
  display: grid;
  gap: 10px;
  max-width: 520px;
}
.mandat-gauge--treasury .mandat-gauge__fill { background: var(--gold); }
.mandat-gauge--attr .mandat-gauge__fill { background: var(--soft); }

.mandat-party-pop {
  margin: 22px 0 0;
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
}

.mandat-decide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.mandat-decide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1.5px solid var(--line);
}
.mandat-decide.is-affinity {
  background: linear-gradient(90deg, rgba(232, 176, 75, 0.12), transparent 55%);
  padding-left: 12px;
  margin-left: -12px;
  padding-right: 4px;
}
.mandat-decide.is-locked {
  opacity: 0.55;
}
.mandat-decide__title {
  margin: 4px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.mandat-decide__meta {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.mandat-decide__locked {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ?? Incidents ?? */
.mandat-incident {
  background:
    linear-gradient(180deg, rgba(189, 75, 44, 0.1), transparent 120px),
    var(--card);
}
.mandat-incident__badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 9px;
  background: var(--clay);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mandat-incident__body {
  margin: 14px 0 0;
  max-width: 640px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  font-style: italic;
  color: var(--soft);
}
.mandat-incident__hint {
  margin: 18px 0 0;
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
}
.mandat-incident__choices {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-width: 640px;
}
.mandat-incident__btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.mandat-incident__btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.mandat-incident__btn .mono {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.015em;
}
.mandat-incident-log {
  margin-bottom: 28px;
}

.mp-event {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.mp-event:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.mp-event-badge--incident { background: var(--clay); }
.mp-event-badge--citoyen { background: var(--green-dark, #5c6b4a); }
.mp-event-badge--quete { background: var(--gold, #b8923a); color: var(--ink); }

/* Home map + bulle habitant */
.mp-home-map,
.mp-map--home {
  position: relative;
  height: 260px;
  min-height: 220px;
  margin-top: 20px;
  overflow: visible;
}

.mp-citizen-bubble {
  position: absolute;
  z-index: 500;
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.mp-citizen-bubble__pin,
.mp-citizen-bubble__card {
  pointer-events: auto;
}

.mp-citizen-bubble__pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  animation: mp-bubble-pulse 2.4s ease-in-out infinite;
}

.mp-citizen-bubble__pin:hover,
.mp-citizen-bubble.is-open .mp-citizen-bubble__pin {
  animation: none;
  background: var(--clay);
  color: var(--paper);
}

@keyframes mp-bubble-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 146, 58, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(184, 146, 58, 0); }
}

.mp-citizen-bubble__card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, 72vw);
  padding: 14px 16px;
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
}

.mp-citizen-bubble__title {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.mp-citizen-bubble__body {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--soft);
}

.mp-citizen-bubble__choices {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mp-citizen-bubble__choice { margin: 0; }

/* ?conomie / gestion */
.mp-eco-grid {
  display: grid;
  gap: 18px;
  margin: 20px 0;
}

@media (min-width: 640px) {
  .mp-eco-grid { grid-template-columns: 1fr 1fr; }
}

.mp-eco-field {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  background: var(--card);
}

.mp-eco-field__label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-eco-field__value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.mp-eco-field input[type="range"] {
  width: 100%;
  accent-color: var(--clay);
}

.mp-eco-projection__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.mp-eco-projection__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 15px;
}

.mp-eco-projection__list b.is-pos { color: var(--green-dark, #5c6b4a); }
.mp-eco-projection__list b.is-neg { color: var(--clay); }

.mp-eco-projection__net {
  font-weight: 600;
  border-bottom: 0;
  padding-top: 12px;
}

.mp-eco-sources__list {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
}

.mp-eco-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

@media (min-width: 720px) {
  .mp-eco-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.mp-eco-summary__card {
  padding: 14px 16px;
  border: 2px solid var(--line);
  background: var(--card);
}

.mp-eco-summary__card span {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-eco-summary__card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}

.mp-eco-summary__card strong.is-pos { color: var(--green-dark, #5c6b4a); }
.mp-eco-summary__card strong.is-neg { color: var(--clay); }

.mp-eco-summary__card--proj {
  border-color: color-mix(in srgb, var(--gold) 50%, var(--line));
  background: color-mix(in srgb, var(--gold) 10%, var(--card));
}

.mp-eco-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.mp-eco-borrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.mp-eco-select {
  margin-left: 8px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  font: inherit;
}

.mp-eco-ledger__wrap {
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--card);
}

.mp-eco-ledger__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 12px;
}

.mp-eco-ledger__table th,
.mp-eco-ledger__table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.mp-eco-ledger__table th:first-child,
.mp-eco-ledger__table td:first-child {
  text-align: left;
}

.mp-eco-ledger__table th {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
}

.mp-eco-ledger__table .is-pos { color: var(--green-dark, #5c6b4a); }
.mp-eco-ledger__table .is-neg { color: var(--clay); }

/* ==========================================================================
   Page de jeu ? cockpit / live / actions
   ========================================================================== */

.mandat-play .mandat-section { scroll-margin-top: 12px; }

.mp-cockpit {
  padding: 28px var(--pad-x) 26px;
  border-bottom: 2px solid var(--ink);
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(232, 176, 75, 0.18), transparent 55%),
    linear-gradient(165deg, var(--ink) 0%, #2a261f 55%, #1d1b16 100%);
  color: var(--paper);
}

.mp-cockpit__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
}

.mp-cockpit__title {
  margin: 8px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--paper);
}

.mp-cockpit__title span {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(233, 235, 227, 0.65);
}

.mp-cockpit__score {
  flex: none;
  text-align: right;
  border: 2px solid rgba(233, 235, 227, 0.35);
  padding: 12px 16px;
  min-width: 110px;
}

.mp-cockpit__score strong {
  display: block;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.03em;
  color: var(--gold);
  line-height: 1;
}

.mp-cockpit__score span {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(233, 235, 227, 0.6);
}

.mp-cockpit__score em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: rgba(233, 235, 227, 0.75);
}

.mp-cockpit__rank {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1.5px solid rgba(212, 168, 67, 0.55);
  color: var(--gold);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  line-height: 1;
}
.mp-cockpit__rank span {
  color: rgba(233, 235, 227, 0.55);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.mp-cockpit__rank:hover {
  background: rgba(212, 168, 67, 0.12);
  color: var(--gold);
}
.mp-cockpit__rank.is-lead {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.14);
}

.mp-bigstats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mp-bigstat {
  border: 1.5px solid rgba(233, 235, 227, 0.28);
  background: rgba(0, 0, 0, 0.22);
  padding: 14px 14px 12px;
}

.mp-bigstat__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(233, 235, 227, 0.55);
}

.mp-bigstat__trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 800;
  font-size: 10px;
  line-height: 1;
  flex: none;
}

.mp-bigstat__trend .mp-ico--trend {
  width: 14px;
  height: 14px;
  display: block;
}

.mp-bigstat__trend em {
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-bigstat__trend--good { color: #9ec27a; }
.mp-bigstat__trend--bad { color: #e08a6e; }
.mp-bigstat__trend--flat { color: rgba(233, 235, 227, 0.45); }

.mp-bigstat__value {
  display: block;
  margin-top: 6px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--paper);
}

.mp-bigstat__value.is-bad { color: #e08a6e; }

.mp-bigstat__note {
  display: block;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: rgba(233, 235, 227, 0.5);
}

.mp-tick {
  margin: 0 0 16px;
  font-size: 14px;
  color: rgba(233, 235, 227, 0.78);
}

.mp-tick b { color: var(--gold); font-style: normal; font-family: var(--font-ui); font-weight: 700; }

.mp-absence {
  margin: 0 0 18px;
  border: 1px solid rgba(233, 235, 227, 0.18);
  background: rgba(29, 27, 22, 0.35);
  color: rgba(233, 235, 227, 0.9);
}

.mp-absence__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-absence__summary::-webkit-details-marker { display: none; }

.mp-absence__meta {
  color: var(--gold);
  font-weight: 700;
}

.mp-absence__body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(233, 235, 227, 0.12);
}

.mp-absence__eco {
  margin: 12px 0 10px;
  font-size: 14px;
  color: rgba(233, 235, 227, 0.78);
}

.mp-absence__eco b {
  color: var(--gold);
  font-style: normal;
  font-family: var(--font-ui);
}

.mp-absence__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
}

.mp-absence__item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(233, 235, 227, 0.08);
  font-size: 14px;
}

.mp-absence__item.is-alert .mp-absence__msg {
  color: #f0b4a8;
}

.mp-absence__when {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(233, 235, 227, 0.5);
}

.mp-absence__empty {
  margin: 12px 0 0;
  font-size: 14px;
  color: rgba(233, 235, 227, 0.65);
  font-style: italic;
}

.mp-buffs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
}

.mp-buffs__item {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: rgba(232, 176, 75, 0.08);
  font-family: var(--font-ui);
  font-size: 12px;
}

.mp-buffs__item strong { font-weight: 700; }
.mp-buffs__item span { color: var(--muted); }

.mp-gauges {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mp-gauge__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: rgba(233, 235, 227, 0.65);
}

.mp-gauge__head b { color: var(--paper); font-variant-numeric: tabular-nums; }

.mp-gauge__track {
  display: block;
  height: 6px;
  background: rgba(233, 235, 227, 0.15);
  overflow: hidden;
}

.mp-gauge__track i {
  display: block;
  height: 100%;
  background: var(--paper);
  animation: mandat-bar 0.9s ease both;
}

.mp-gauge--sat .mp-gauge__track i { background: #8faf72; }
.mp-gauge--trust .mp-gauge__track i { background: #7a9bc0; }
.mp-gauge--cohesion .mp-gauge__track i { background: #d27a5c; }
.mp-gauge--treasury .mp-gauge__track i { background: var(--gold); }
.mp-gauge--attr .mp-gauge__track i { background: #c4bfb0; }

.mp-progress-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mp-progress__meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: rgba(233, 235, 227, 0.6);
}

.mp-progress__track {
  height: 7px;
  background: rgba(233, 235, 227, 0.12);
  border: 1px solid rgba(233, 235, 227, 0.25);
  overflow: hidden;
}

.mp-progress__track i {
  display: block;
  height: 100%;
  background: var(--clay);
}

.mp-progress__track--xp i { background: var(--gold); }

/* Bureau : actions (gauche) + situation / live (droite) */
.mp-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 0;
  border-bottom: 2px solid var(--ink);
  min-height: 560px;
  align-items: start;
}

.mp-play {
  border-right: 2px solid var(--ink);
  background: var(--card);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.mp-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 3;
  text-align: left;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.mp-tabs__btn {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 11px;
  cursor: pointer;
  line-height: 1.1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
  margin: 0;
  min-height: 36px;
}

.mp-tabs__btn:first-child {
  padding-left: 14px;
}

.mp-tabs__btn:hover { color: var(--ink); background: rgba(0, 0, 0, 0.03); }
.mp-tabs__btn.is-active {
  color: var(--ink);
  background: var(--card);
  box-shadow: inset 0 -2px 0 var(--clay);
}
.mp-tabs__btn--alert { color: var(--clay); }
.mp-tabs__btn--alert.is-active { box-shadow: inset 0 -2px 0 var(--clay); }

.mp-tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--clay);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: middle;
}

.mp-tabs__btn--home,
.mp-tabs__btn--icon {
  padding-left: 10px;
  padding-right: 10px;
  min-width: 36px;
}
.mp-tabs__btn--icon {
  margin-left: auto;
  border-right: 0;
  border-left: 1px solid var(--line);
  position: sticky;
  right: 0;
  background: var(--paper);
  z-index: 1;
}
.mp-tabs__btn--icon.is-active,
.mp-tabs__btn--icon:hover {
  background: var(--card);
}
.mp-tabs__btn--home .mp-ico--tab,
.mp-tabs__btn--icon .mp-ico--tab {
  width: 16px;
  height: 16px;
  display: block;
}

.mp-actions-switch {
  display: flex;
  gap: 0;
  margin: 4px 0 18px;
  border: 2px solid var(--ink);
  background: var(--paper);
  width: 100%;
  max-width: 520px;
}
.mp-actions-switch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  padding: 12px 14px;
  cursor: pointer;
  line-height: 1.2;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  border-right: 1px solid var(--line);
  flex: 1 1 0;
  text-align: left;
  min-width: 0;
}
.mp-actions-switch__btn:last-child { border-right: 0; }
.mp-actions-switch__btn:hover { color: var(--ink); background: rgba(0, 0, 0, 0.03); }
.mp-actions-switch__btn.is-active {
  color: var(--ink);
  background: var(--card);
  box-shadow: inset 0 -3px 0 var(--clay);
}
.mp-actions-switch__btn .mp-ico {
  color: inherit;
  flex: 0 0 auto;
  margin-top: 2px;
}
.mp-actions-switch__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.mp-actions-switch__label {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.mp-actions-switch__sub {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  line-height: 1.3;
}
.mp-actions-switch__btn.is-active .mp-actions-switch__sub {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
}
.mp-actions-panel[hidden] { display: none !important; }

.mp-screens {
  flex: 1;
  min-height: 0;
}

.mp-screen {
  padding: 24px var(--pad-x) 32px;
  animation: mp-screen-in 0.28s ease both;
}

.mp-screen[hidden] { display: none !important; }

@keyframes mp-screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mp-watch {
  background: var(--paper);
  min-width: 0;
  position: sticky;
  top: 0;
  max-height: none;
  overflow: visible;
  border-left: 0;
}

.mp-situation {
  padding: 20px 22px 18px;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(232, 176, 75, 0.12), transparent 70%),
    var(--paper);
}

.mp-situation.mp-counsel--good {
  background:
    linear-gradient(180deg, rgba(61, 122, 74, 0.12), transparent 70%),
    var(--paper);
}

.mp-situation.mp-counsel--bad {
  background:
    linear-gradient(180deg, rgba(189, 75, 44, 0.12), transparent 70%),
    var(--paper);
}

.mp-situation.mp-counsel--warn {
  background:
    linear-gradient(180deg, rgba(232, 176, 75, 0.16), transparent 70%),
    var(--paper);
}

.mp-gauges--compact {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}

.mp-gauges--compact .mp-gauge__head,
.mp-gauges--stats .mp-gauge__head {
  font-size: 12px;
  color: var(--muted);
}

.mp-gauges--compact .mp-gauge__head b,
.mp-gauges--stats .mp-gauge__head b {
  color: var(--ink);
}

.mp-gauges--compact .mp-gauge__track,
.mp-gauges--stats .mp-gauge__track {
  background: rgba(28, 32, 28, 0.1);
  height: 7px;
}

.mp-partie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.mp-restart-block {
  padding-top: 18px;
  border-top: 1.5px solid var(--line);
}

/* Pop-up lancement de partie */
.mp-welcome-dialog {
  border: 2px solid var(--ink);
  background: transparent;
  padding: 0;
  max-width: min(520px, calc(100vw - 28px));
  width: 100%;
  color: var(--ink);
  z-index: 50;
}

.mp-welcome-dialog::backdrop {
  background: rgba(28, 32, 28, 0.62);
  backdrop-filter: blur(3px);
}

.mp-welcome-dialog__panel {
  background:
    linear-gradient(165deg, rgba(232, 176, 75, 0.18), transparent 42%),
    var(--paper);
  padding: 26px 26px 22px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
}

.mp-welcome-dialog__title {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.mp-welcome-dialog__lead {
  margin: 10px 0 0;
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.4;
}

.mp-welcome-dialog__facts {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mp-welcome-dialog__facts li {
  border: 1.5px solid var(--ink);
  background: var(--card);
  padding: 10px 12px;
}

.mp-welcome-dialog__facts span {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-welcome-dialog__facts b {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.mp-welcome-dialog__copy {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.mp-welcome-dialog__copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.mp-welcome-dialog__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

@media (max-width: 520px) {
  .mp-welcome-dialog__facts { grid-template-columns: 1fr; }
  .mp-welcome-dialog__panel { padding: 22px 18px 18px; }
}

/* Onglet Bienvenue */
.mp-welcome-facts {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mp-welcome-facts li {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 10px 12px;
}

.mp-welcome-facts span {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-welcome-facts b {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mp-welcome-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.mp-welcome-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.mp-welcome-tips {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.mp-welcome-tips li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mp-welcome-tips__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 4px;
}

.mp-welcome-tips p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

.mp-welcome-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.mp-screen--welcome .mp-panel-title {
  font-size: clamp(24px, 3vw, 30px);
}

/* Onglet Stats */
.mp-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}

.mp-stats-card {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 14px 14px 12px;
}

.mp-stats-card__label {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-stats-card__value {
  display: block;
  margin-top: 6px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.mp-stats-card__value small {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}

.mp-stats-card__note {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}

.mp-stats-sub {
  margin: 22px 0 10px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-stats-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.mp-stats-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.mp-stats-row__label {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink);
}

.mp-stats-row__value {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  text-align: right;
}

.mp-stats-row__trend {
  display: grid;
  place-items: center;
  width: 18px;
}

.mp-stats-row__trend--good { color: var(--green-dark); }
.mp-stats-row__trend--bad { color: var(--clay); }
.mp-stats-row__trend--flat { color: var(--muted); }

.mp-gauges--stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.mp-main {
  border-right: 2px solid var(--ink);
  background: var(--card);
  min-width: 0;
}

.mp-counsel {
  padding: 22px var(--pad-x) 20px;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(232, 176, 75, 0.12), transparent 70%),
    var(--paper);
}

.mp-counsel--good {
  background:
    linear-gradient(180deg, rgba(61, 122, 74, 0.12), transparent 70%),
    var(--paper);
}

.mp-counsel--bad {
  background:
    linear-gradient(180deg, rgba(189, 75, 44, 0.12), transparent 70%),
    var(--paper);
}

.mp-counsel--warn {
  background:
    linear-gradient(180deg, rgba(232, 176, 75, 0.16), transparent 70%),
    var(--paper);
}

.mp-counsel__title {
  margin: 4px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mp-counsel__summary {
  margin: 8px 0 12px;
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
}

.mp-counsel__watch {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mp-counsel__watch li {
  position: relative;
  padding: 0 0 0 14px;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
}

.mp-counsel__watch li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--clay);
}

.mp-counsel--good .mp-counsel__watch li::before { background: var(--green-dark); }
.mp-counsel--warn .mp-counsel__watch li::before { background: var(--gold); }

.mp-live {
  padding: 22px 22px 28px;
  background: var(--card);
}

.mp-watch .mp-live__list {
  max-height: none;
  overflow: visible;
}

.mp-ledger {
  padding: 24px var(--pad-x) 32px;
  border-top: 2px solid var(--ink);
  background: var(--paper);
}

.mp-ledger__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.mp-ledger__item {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 14px;
  padding: 14px 4px 14px 0;
  border-bottom: 1px solid var(--line);
}

.mp-ledger__when {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.mp-ledger__kind {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.mp-ledger__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.mp-ledger__detail {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.35;
}

.mp-ledger__item--good .mp-ledger__kind { color: var(--green-dark); }
.mp-ledger__item--warn .mp-ledger__kind { color: var(--clay); }
.mp-ledger__item--bad .mp-ledger__kind { color: var(--clay); }

.mp-side {
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.mp-side > section {
  padding: 24px 22px 26px;
  border-bottom: 2px solid var(--ink);
}

.mp-side > section:last-child { border-bottom: 0; }

.mp-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mp-panel-title {
  margin: 4px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.mp-panel-hint {
  margin: 8px 0 16px;
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.mp-panel-unlock {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.mp-panel-unlock strong {
  color: var(--ink);
  font-style: normal;
  font-family: var(--font-ui);
  font-weight: 700;
}
.mp-panel-unlock__when {
  white-space: nowrap;
}

.mp-live__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 0 rgba(189, 75, 44, 0.5);
  animation: mp-pulse 1.8s ease infinite;
  margin-top: 10px;
}

@keyframes mp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(189, 75, 44, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(189, 75, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(189, 75, 44, 0); }
}

.mp-live__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: none;
  overflow: hidden;
  border: 0;
}

.mp-live__item {
  padding: 12px 0;
  border: 0;
  overflow: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, padding 0.35s ease, margin 0.35s ease;
  max-height: 160px;
}

.mp-live__item.is-out {
  opacity: 0;
  transform: translateY(8px);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
}

.mp-live__item--rare { background: rgba(232, 176, 75, 0.08); }

.mp-live__item.is-alert,
.mp-live__item--bad.is-alert {
  background: rgba(176, 52, 40, 0.1);
  border-left: 3px solid var(--clay);
  padding-left: 10px;
}

.mp-live__item.is-alert .mp-live__cat,
.mp-live__item.is-alert .mp-live__msg {
  color: #9b2f22;
}

.mp-live[hidden] { display: none !important; }

.mandat-decide__stats {
  margin-top: 10px;
}

.mandat-decide__stats-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.mandat-decide__stats-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}

.mandat-decide__stats-grid li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-soft, var(--ink));
}

.mandat-decide__stats-grid b { font-weight: 700; }
.mandat-decide__stats-grid .is-pos b { color: var(--green-dark, #2f6b3a); }
.mandat-decide__stats-grid .is-neg b { color: var(--clay); }
.mandat-decide__stats--later { margin-top: 8px; }

.mp-live__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-live__when {
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 2px;
}

.mp-live__msg {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}

.mp-quick__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-quick__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mp-quick__item.is-off { opacity: 0.55; }

.mp-quick__name {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.015em;
}

.mp-quick__hint {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.mp-quick__cost {
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--soft);
}

.mp-quick__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mp-quick__meta-chip {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--soft);
  line-height: 1.3;
}

.mp-upgrade-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  background: color-mix(in srgb, var(--gold) 18%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.mp-pending-acts {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--gold) 8%, var(--card));
}

.mp-pending-acts__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-pending-acts__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-pending-acts__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.mp-pending-acts__item:first-child { border-top: 0; padding-top: 0; }

.mp-pending-acts__title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.mp-pending-acts__eta {
  font-size: 11px;
  font-weight: 700;
  color: var(--clay);
  white-space: nowrap;
}

.mp-quick__wait {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 12px;
  color: var(--clay);
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--clay) 35%, var(--line));
  background: color-mix(in srgb, var(--clay) 8%, transparent);
  white-space: nowrap;
  min-width: 4.5em;
  text-align: center;
}

.mp-busy-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1.5px solid var(--clay);
  background: color-mix(in srgb, var(--clay) 10%, var(--paper));
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.35;
}
.mp-busy-banner.is-hidden,
.mp-busy-banner[hidden] { display: none; }
.mp-busy-banner strong {
  font-weight: 800;
  color: var(--clay);
  letter-spacing: -0.01em;
}
.mp-busy-banner span { color: var(--ink); }

.mp-miles__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-miles__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.mp-miles__item.is-done { opacity: 0.72; }
.mp-miles__item.is-done b { text-decoration: line-through; text-decoration-thickness: 1px; }

.mp-miles__mark {
  font-family: var(--font-ui);
  font-weight: 800;
  color: var(--clay);
  width: 1.2em;
}

.mp-miles__item b {
  display: block;
  font-size: 13px;
}

.mp-miles__item small {
  display: block;
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}

@media (max-width: 960px) {
  .mp-bigstats { grid-template-columns: repeat(2, 1fr); }
  .mp-gauges { grid-template-columns: repeat(2, 1fr); }
  .mp-desk { grid-template-columns: 1fr; }
  .mp-play { border-right: 0; border-bottom: 2px solid var(--ink); min-height: 0; }
  .mp-watch { position: static; max-height: none; }
  .mp-progress-row { grid-template-columns: 1fr; }
  .mp-ledger__item { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 640px) {
  .mp-cockpit { padding: 22px 20px; }
  .mp-cockpit__top { flex-direction: column; align-items: flex-start; }
  .mp-screen,
  .mp-situation,
  .mp-live { padding-left: 20px; padding-right: 20px; }
  .mp-tabs__btn { padding: 7px 9px; font-size: 10px; min-height: 34px; }
  .mp-tabs__btn--home,
  .mp-tabs__btn--icon { padding-left: 9px; padding-right: 9px; min-width: 34px; }
  .mp-actions-switch { width: 100%; max-width: none; }
  .mp-actions-switch__btn { flex: 1; padding: 10px 10px; }
  .mp-actions-switch__label { font-size: 11px; }
  .mp-actions-switch__sub { font-size: 11px; }
  .mp-rivalry-facts { grid-template-columns: 1fr; }
  .mp-group-hall .mandat-row { grid-template-columns: 40px 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  .mp-screen { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mp-live__pulse { animation: none; }
}

/* ?? Cockpit photo commune ?? */
.mp-cockpit { position: relative; overflow: hidden; }
.mp-cockpit__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.mp-cockpit__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.75) contrast(1.05) brightness(0.72);
  transform: scale(1.04);
}
.mp-cockpit__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(29,27,22,0.55) 0%, rgba(29,27,22,0.72) 40%, rgba(29,27,22,0.92) 100%),
    linear-gradient(90deg, rgba(29,27,22,0.55), transparent 60%);
  pointer-events: none;
}
.mp-cockpit__inner {
  position: relative;
  z-index: 2;
}
.mp-cockpit__credit {
  margin: 12px 0 0;
  font-size: 11px;
  color: rgba(233,235,227,0.45);
}

/* ?? Flat icons ?? */
.mp-ico {
  display: inline-block;
  vertical-align: -0.2em;
  flex: none;
  color: currentColor;
}
.mp-ico--xs { width: 14px; height: 14px; vertical-align: -0.15em; }
.mp-ico--sm { width: 18px; height: 18px; }
.mp-ico--inline { width: 16px; height: 16px; margin-right: 4px; }

.mp-bigstat__ico {
  display: flex;
  color: var(--gold);
  margin-bottom: 6px;
}
.mp-bigstat__ico .mp-ico { width: 24px; height: 24px; }

.mp-gauge__head span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mp-live__item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 0;
}
.mp-live__ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.mp-live__item--good .mp-live__ico { color: var(--green-dark); }
.mp-live__item--bad .mp-live__ico { color: var(--clay); }
.mp-live__item--rare .mp-live__ico { color: var(--gold); }
.mp-live__item.is-new {
  animation: mp-live-in 0.55s ease both;
  background: color-mix(in srgb, var(--gold) 14%, transparent);
}
@keyframes mp-live-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mp-quick__item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.mp-quick__ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  flex: none;
}
.mp-quick__ico .mp-ico {
  width: 20px;
  height: 20px;
  display: block;
}
.mp-quick__copy { min-width: 0; }

.mp-confirm__limit {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--clay);
  background: color-mix(in srgb, var(--clay) 8%, transparent);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

/* Confirmation / r?sultat */
.mp-confirm {
  border: 2px solid var(--ink);
  background: transparent;
  padding: 0;
  max-width: min(440px, calc(100vw - 28px));
  width: 100%;
  margin: auto;
  color: var(--ink);
  z-index: 70;
}
.mp-confirm::backdrop {
  background: rgba(28, 32, 28, 0.58);
  backdrop-filter: blur(3px);
}
.mp-confirm__panel {
  background: var(--paper);
  padding: 22px 22px 18px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
}
.mp-confirm__head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.mp-confirm__ico {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  flex: none;
}
.mp-confirm__ico--good { color: var(--green-dark); border-color: var(--green-dark); }
.mp-confirm__ico--bad { color: var(--clay); border-color: var(--clay); }
.mp-confirm__ico--rare { color: var(--gold); background: var(--ink); border-color: var(--ink); }
.mp-confirm__ico--neutral { color: var(--ink); }
.mp-confirm__ico .mp-ico { width: 22px; height: 22px; display: block; }
.mp-confirm__title {
  margin: 4px 0 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.mp-confirm__hint {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}
.mp-confirm__live {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--clay);
  background: rgba(189, 75, 44, 0.06);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}
.mp-confirm__lines {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.mp-confirm__lines[hidden] { display: none; }
.mp-confirm__lines li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.35;
}
.mp-confirm__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.mp-confirm--result .mp-confirm__actions {
  justify-content: stretch;
}
.mp-confirm--result .mp-confirm__actions .btn {
  width: 100%;
}

.kick .mp-ico { color: inherit; }

/* ?? Bilan de fin de mandat ?? */
.mp-bilan {
  display: grid;
  gap: 22px;
}
.mp-bilan__score {
  display: grid;
  gap: 4px;
  padding: 18px 0 8px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.mp-bilan__score strong {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 72px);
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.mp-bilan__score span {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mp-bilan__score em {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
}
.mp-bilan__copy {
  display: grid;
  gap: 10px;
}
.mp-bilan__copy p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}
.mp-bilan__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.mp-bilan__facts li {
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
}
.mp-bilan__facts li:nth-child(even) {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.mp-bilan__facts span {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mp-bilan__facts strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}
.mp-bilan__gauges {
  display: grid;
  gap: 10px;
}
.mp-bilan__gauge-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
}
.mp-bilan__gauge-track {
  display: block;
  height: 6px;
  background: var(--line);
  overflow: hidden;
}
.mp-bilan__gauge-track i {
  display: block;
  height: 100%;
  background: var(--ink);
}
.mp-bilan__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.mp-bilan__note {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
}
.mandat-ended-flag {
  border-color: var(--ink) !important;
  color: var(--ink) !important;
}

@media (max-width: 720px) {
  .mp-bilan__facts {
    grid-template-columns: 1fr;
  }
  .mp-bilan__facts li:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-live__item.is-new { animation: none; }
  .mp-live__item { transition: none; }
  .mp-live__item.is-out { display: none; }
}

/* ===== Succ?s / pr?sence / soutiens / carte graphite ===== */
.mp-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(233, 235, 227, 0.18);
}
.mp-social__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mp-social__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(233, 235, 227, 0.22);
  color: rgba(233, 235, 227, 0.88);
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(20, 18, 14, 0.35);
}
.mp-social__chip b {
  color: var(--gold);
  font-weight: 700;
}
.mp-social__chip--link {
  text-decoration: none;
  color: inherit;
}
.mp-social__chip--link:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.mp-rivalry-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}
.mp-rivalry-fact {
  border: 1.5px solid var(--ink);
  padding: 12px 14px;
  background: var(--card);
}
.mp-rivalry-fact span {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.mp-rivalry-fact strong {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.mp-rivalry-tease {
  color: var(--ink) !important;
  font-weight: 500;
}
.mp-group-hall {
  margin: 0;
}
.mp-group-hall .mandat-row {
  grid-template-columns: 48px 1fr auto;
}
.mp-group-hall .mandat-gauges,
.mp-group-hall .mandat-row__aside {
  display: none;
}

.mp-rivalry-aside {
  padding: 20px 22px 18px;
  border-bottom: 2px solid var(--ink);
  background: rgba(189, 75, 44, 0.06);
}
.mp-rivalry-aside__tease {
  margin: 6px 0 10px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
}
.mp-rivalry-aside__cta {
  margin: 0;
}
.mp-rivalry-aside__cta a {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clay);
  text-decoration: none;
}
.mp-rivalry-aside__cta a:hover {
  text-decoration: underline;
}

.mp-social__chip.is-hot {
  border-color: rgba(201, 162, 74, 0.55);
  color: #f0e6c8;
}
.mp-social__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.mp-social__hint {
  margin: 0;
  font-size: 13px;
  color: rgba(233, 235, 227, 0.7);
}
.mp-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid rgba(233, 235, 227, 0.55);
  background: rgba(233, 235, 227, 0.08);
  color: #f3f1ea;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.mp-like-btn:hover,
.mp-like-btn:focus-visible {
  background: rgba(201, 162, 74, 0.2);
  border-color: var(--gold);
  outline: none;
}
.mp-like-btn.is-liked {
  background: rgba(180, 70, 70, 0.22);
  border-color: #d47878;
  color: #ffd5d5;
}
.mp-like-btn--ghost {
  text-decoration: none;
}
.mp-share-block {
  margin: 0 0 28px;
  padding: 18px 18px 16px;
  border: 2px solid var(--ink);
  background: rgba(29, 27, 22, 0.03);
}
.mp-share-block .mp-stats-sub {
  margin-top: 0;
}
.mp-share-block .mp-panel-hint {
  margin-bottom: 12px;
}
.mp-share {
  max-width: 100%;
}
.mp-share .share {
  margin: 0;
}
.mp-share .share__label {
  margin-bottom: 8px;
}

.mp-success-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}
.mp-success-summary__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: rgba(29, 27, 22, 0.03);
}
.mp-success-summary__item span {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.mp-success-summary__item strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.mp-miles__reward {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.mp-miles__item.is-done .mp-miles__reward {
  color: var(--green, #5c6b4a);
}

.mp-map {
  position: relative;
  width: 100%;
  height: min(52vh, 420px);
  min-height: 280px;
  border: 2px solid var(--ink);
  background: #e6e2d8;
  overflow: hidden;
  filter: grayscale(0.35) contrast(1.05) sepia(0.12);
}
.mp-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 450;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(70, 62, 48, 0.08), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(40, 36, 28, 0.1), transparent 50%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 2px,
      rgba(45, 40, 32, 0.03) 2px,
      rgba(45, 40, 32, 0.03) 3px
    );
  mix-blend-mode: multiply;
  opacity: 0.85;
}
.mp-map.is-loading::before {
  content: "Chargement de la carte?";
  position: absolute;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: #e6e2d8;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
}
.mp-map.is-failed::before {
  content: "Carte indisponible";
  position: absolute;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: #e6e2d8;
  color: var(--muted);
}
.mp-map__legend {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.mp-map-pin {
  background: transparent !important;
  border: 0 !important;
}
.mp-map-pin__dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pin, #5c6b4a);
  border: 1.5px solid #2c2a24;
  box-shadow: 0 0 0 2px rgba(230, 226, 216, 0.7);
}
.mp-map .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(230, 226, 216, 0.85) !important;
  color: #4a453c;
}
.mp-map-popup__type {
  color: #6a6358;
  font-size: 12px;
}

/* Carte groupe (chaleur / concurrence) */
.mp-gmap-block {
  margin: 0 0 22px;
}
.mp-gmap-block--page {
  margin: 0 0 1.75rem;
}
.mp-map--group {
  height: min(56vh, 460px);
  min-height: 300px;
  filter: grayscale(0.15) contrast(1.04) sepia(0.08);
}
.mp-gmap__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.mp-gmap__mode {
  appearance: none;
  border: 1.5px solid var(--ink);
  background: var(--card, #f3efe6);
  color: var(--muted);
  font-family: var(--font-ui, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
}
.mp-gmap__mode.is-active {
  background: var(--ink);
  color: var(--paper, #f3efe6);
}
.mp-gmap__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 0;
  font-family: var(--font-ui, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.mp-gmap__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--heat);
  border: 1.5px solid #2c2a24;
  margin-right: 2px;
  vertical-align: -2px;
}
.mp-gmap__hint {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 13px;
  margin-left: auto;
}
.mp-gmap-icon {
  background: transparent !important;
  border: 0 !important;
}
.mp-gmap-pin {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.mp-gmap-pin__halo {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--heat, #bd4b2c);
  opacity: 0.22;
  filter: blur(1px);
}
.mp-gmap-pin.is-leader .mp-gmap-pin__halo {
  inset: 8%;
  opacity: 0.34;
  box-shadow: 0 0 0 2px rgba(196, 154, 58, 0.55);
}
.mp-gmap-pin__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--heat, #bd4b2c);
  color: #f7f2e8;
  border: 2px solid #2c2a24;
  font-family: var(--font-ui, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(44, 42, 36, 0.25);
}
.mp-gmap-pin.is-me .mp-gmap-pin__dot {
  box-shadow:
    0 0 0 3px rgba(243, 239, 230, 0.95),
    0 0 0 5px #2c2a24;
}
.mp-gmap-pin.is-idle .mp-gmap-pin__dot {
  background: #8a8070;
  color: #f3efe6;
  opacity: 0.85;
}
.mp-gmap-pin__meta {
  position: absolute;
  top: calc(50% + 18px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
  pointer-events: none;
}
.mp-gmap-pin__meta b {
  font-family: var(--font-ui, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #2c2a24;
  background: rgba(243, 239, 230, 0.92);
  padding: 1px 5px;
  border: 1px solid rgba(44, 42, 36, 0.35);
  line-height: 1.3;
}
.mp-gmap-pin__meta small {
  font-family: var(--font-ui, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 700;
  color: #4a453c;
  background: rgba(243, 239, 230, 0.88);
  padding: 0 4px;
  border: 1px solid rgba(44, 42, 36, 0.2);
}
.mp-gmap-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 0;
  border: 2px solid #2c2a24;
  box-shadow: 4px 4px 0 rgba(44, 42, 36, 0.12);
  background: #f3efe6;
}
.mp-gmap-popup-wrap .leaflet-popup-tip {
  background: #f3efe6;
  border: 2px solid #2c2a24;
  box-shadow: none;
}
.mp-gmap-popup {
  min-width: 180px;
  font-family: var(--font-ui, ui-sans-serif, sans-serif);
  color: #2c2a24;
}
.mp-gmap-popup__rank {
  font-family: var(--font-ui, ui-monospace, monospace);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #bd4b2c;
  margin-bottom: 2px;
}
.mp-gmap-popup__commune {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.mp-gmap-popup__player {
  margin: 4px 0 8px;
  font-size: 13px;
  color: #6a6358;
}
.mp-gmap-popup__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
}
.mp-gmap-popup__flag {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #2c2a24;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(189, 75, 44, 0.1);
}
.mp-gmap-popup__flag.is-me {
  background: rgba(196, 154, 58, 0.2);
}
.mp-gmap-popup__score {
  font-size: 13px;
  margin: 0 0 10px;
  color: #4a453c;
}
.mp-gmap-popup__score span {
  font-weight: 800;
  color: #2c2a24;
}
.mp-gmap-popup__gauges {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
}
.mp-gmap-popup__gauge {
  display: grid;
  grid-template-columns: 88px 1fr 28px;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.mp-gmap-popup__gauge span {
  color: #6a6358;
}
.mp-gmap-popup__gauge i {
  display: block;
  height: 6px;
  background: rgba(44, 42, 36, 0.12);
  border: 1px solid rgba(44, 42, 36, 0.25);
}
.mp-gmap-popup__gauge i b {
  display: block;
  height: 100%;
  background: #bd4b2c;
}
.mp-gmap-popup__gauge em {
  font-style: normal;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mp-gmap-popup__link {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #bd4b2c;
  text-decoration: none;
  border-bottom: 1px solid rgba(189, 75, 44, 0.4);
}
.mp-gmap-popup__link:hover {
  border-bottom-color: #bd4b2c;
}

@media (max-width: 720px) {
  .mp-social {
    flex-direction: column;
    align-items: stretch;
  }
  .mp-success-summary {
    grid-template-columns: 1fr;
  }
  .mp-map {
    height: 300px;
    min-height: 240px;
  }
  .mp-map--group {
    height: 320px;
    min-height: 260px;
  }
  .mp-gmap__hint {
    margin-left: 0;
    width: 100%;
  }
  .mp-gmap-pin__meta b {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ?? Groupes / ouverture ?? */
.mandat-vues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin: 0 0 1.25rem;
}
.mandat-vue {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--paper, #f3efe6) 80%, transparent);
}
.mandat-vue:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}
.mandat-vue.is-active {
  color: var(--ink);
  border-color: var(--clay, #8b5a3c);
  background: color-mix(in srgb, var(--clay, #8b5a3c) 12%, var(--paper, #f3efe6));
}
.mandat-group-banner {
  margin: 0 0 1rem;
  font-family: var(--font-serif, Georgia, serif);
}
.mandat-group-banner a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
}
.mandat-group-banner a:hover {
  border-bottom-color: var(--clay, #8b5a3c);
}
.mandat-group-modes {
  display: grid;
  gap: 0.75rem;
}
.mandat-group-mode {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  cursor: pointer;
  background: color-mix(in srgb, var(--paper, #f3efe6) 70%, transparent);
}
.mandat-group-mode:has(input:checked) {
  border-color: var(--clay, #8b5a3c);
  background: color-mix(in srgb, var(--clay, #8b5a3c) 8%, var(--paper, #f3efe6));
}
.mandat-group-mode__name {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.mandat-group-mode__hint {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}
.mandat-group-private {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}
.mandat-field {
  display: grid;
  gap: 0.35rem;
}
.mandat-field__label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.mandat-field input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: var(--paper, #f3efe6);
  color: var(--ink);
  font: inherit;
}
.mandat-invite-users {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.45rem;
}
.mandat-invite-user {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.45rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  font-size: 0.92rem;
  cursor: pointer;
}
.mandat-invite-user small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.mandat-commune.is-taken {
  opacity: 0.45;
  cursor: not-allowed;
}
.mandat-invite-form {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
}
.mandat-hall--groups .mandat-row__aside {
  margin-left: auto;
}

/* ==========================================================================
   Mobile play shell ? UX native (?960px)
   HUD compact ? onglets ? Live pane ? tactile
   ========================================================================== */

.mp-hud {
  display: none;
}

/* Live est dans la colonne droite desktop ? onglet utile surtout en mobile */
.mp-tabs__btn--live {
  display: none;
}

@media (max-width: 960px) {
  .mp-tabs__btn--live {
    display: inline-flex;
  }

  .mandat-play {
    --mp-hud-h: 58px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .mandat-play .mandat-crumb {
    display: none;
  }

  /* ?? HUD compact sticky ?? */
  .mp-hud {
    display: block;
    position: sticky;
    top: 0;
    z-index: 12;
    background: #1d1b16;
    color: var(--paper);
    border-bottom: 2px solid var(--ink);
    padding:
      max(8px, env(safe-area-inset-top, 0px))
      14px
      0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  }

  .mp-hud__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
  }

  .mp-hud__identity {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 4px 0;
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    cursor: pointer;
  }

  .mp-hud__place {
    display: block;
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mp-hud__meta {
    display: block;
    margin-top: 2px;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    color: rgba(233, 235, 227, 0.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mp-hud__meta b {
    color: var(--gold);
    font-weight: 800;
  }

  .mp-hud__metrics {
    display: flex;
    align-items: stretch;
    gap: 6px;
    flex: 0 0 auto;
  }

  .mp-hud__metric {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 52px;
    padding: 5px 6px;
    border: 1px solid rgba(233, 235, 227, 0.22);
    background: rgba(0, 0, 0, 0.28);
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 700;
    color: rgba(233, 235, 227, 0.55);
    line-height: 1.1;
  }

  .mp-hud__metric b {
    color: var(--paper);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 4.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mp-hud__metric.is-bad b { color: #e08a6e; }
  .mp-hud__metric .mp-ico { color: var(--gold); }

  .mp-hud__track {
    height: 3px;
    margin: 8px -14px 0;
    background: rgba(233, 235, 227, 0.12);
    overflow: hidden;
  }

  .mp-hud__track i {
    display: block;
    height: 100%;
    background: var(--clay);
  }

  /* Cockpit : repli? par d?faut, d?pli? via HUD */
  .mp-cockpit {
    display: none;
    padding: 18px 16px 16px;
  }

  .mandat-play.is-cockpit-open .mp-cockpit {
    display: block;
  }

  .mp-cockpit__media {
    opacity: 0.85;
  }

  .mp-cockpit__title {
    font-size: clamp(24px, 7vw, 32px);
  }

  .mp-cockpit__score {
    min-width: 0;
    padding: 10px 12px;
  }

  .mp-cockpit__score strong { font-size: 28px; }

  .mp-bigstats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .mp-bigstat {
    padding: 12px 12px 10px;
  }

  .mp-bigstat__note { display: none; }

  .mp-bigstat__value {
    font-size: clamp(16px, 4.5vw, 22px);
  }

  .mp-social {
    gap: 10px;
  }

  .mp-social__stats {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .mp-social__stats::-webkit-scrollbar { display: none; }

  .mp-social__chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .mp-absence__item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  /* Onglets scrollables (remplacent l?ancien dock bas) */
  .mp-tabs {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: var(--mp-hud-h, 58px);
    z-index: 11;
    background: var(--paper);
  }

  .mp-tabs::-webkit-scrollbar {
    display: none;
  }

  .mp-tabs__btn {
    flex: 0 0 auto;
  }

  .mp-desk {
    border-bottom: 0;
    min-height: 0;
  }

  .mp-play {
    border-bottom: 0;
    min-height: 0;
  }

  .mp-screens {
    min-height: min(60vh, 520px);
  }

  .mp-screen {
    padding: 18px 16px 28px;
  }

  .mp-panel-title {
    font-size: clamp(22px, 6vw, 28px);
  }

  /* Watch / Live : pane d?di?e */
  .mp-watch {
    display: none;
  }

  .mp-desk.is-live-pane .mp-play {
    display: none;
  }

  .mp-desk.is-live-pane .mp-watch {
    display: block;
    border-top: 0;
  }

  .mp-desk.is-live-pane .mp-live {
    display: block !important;
  }

  .mp-situation,
  .mp-live {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mp-live {
    padding-bottom: 24px;
  }

  .mp-live__list {
    max-height: none;
  }

  /* Confirm / welcome ? bottom sheets */
  .mp-confirm,
  .mp-welcome-dialog {
    margin: auto 0 0;
    max-width: 100vw;
    width: 100vw;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    max-height: min(88vh, 720px);
  }

  .mp-confirm:modal,
  .mp-welcome-dialog:modal {
    margin: auto 0 0;
  }

  .mp-confirm__panel,
  .mp-welcome-dialog__panel {
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    max-height: min(88vh, 720px);
    overflow: auto;
  }

  .mp-confirm__actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, transparent, var(--paper) 28%);
    padding-top: 12px;
  }

  .mp-confirm__actions .btn {
    min-height: 48px;
    flex: 1 1 0;
    justify-content: center;
  }

  .mp-welcome-dialog__actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .mp-toasts {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: min(420px, calc(100vw - 20px));
  }

  /* Actions rapides : cartes pleine largeur */
  .mp-quick__item {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px 12px;
    align-items: start;
    padding: 14px 0;
  }

  .mp-quick__item .mp-quick__ico {
    grid-row: 1 / span 1;
    width: 40px;
    height: 40px;
  }

  .mp-quick__item .mp-quick__copy {
    grid-column: 2;
    grid-row: 1;
  }

  .mp-quick__item .mp-quick__form,
  .mp-quick__item .mp-quick__wait {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .mp-quick__item .mp-quick__form {
    display: block;
    margin: 0;
  }

  .mp-quick__item .mp-quick__form .btn,
  .mp-quick__item .btn {
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }

  .mp-quick__wait {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
  }

  .mp-quick__name { font-size: 15px; }
  .mp-quick__hint { font-size: 13px; }

  .mp-actions-switch {
    max-width: none;
    width: 100%;
  }

  .mp-actions-switch__btn {
    padding: 12px 10px;
    min-height: 52px;
  }

  /* D?lib?rations */
  .mandat-decide {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 0;
  }

  .mandat-decide__title { font-size: 17px; }

  .mandat-decide__stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mandat-decide form .btn,
  .mandat-decide .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  /* Carte / bulle habitant */
  .mp-home-map,
  .mp-map--home {
    height: min(42vh, 320px);
    min-height: 240px;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
  }

  .mp-citizen-bubble.is-open .mp-citizen-bubble__card {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    top: auto;
    width: auto;
    max-width: none;
    transform: none;
    z-index: 45;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  }

  .mp-citizen-bubble__choices .btn {
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }

  .mp-map:not(.mp-map--home) {
    height: min(55vh, 420px);
    min-height: 280px;
  }

  /* Divers tactile */
  .mp-partie-actions .btn,
  .mp-bilan__actions .btn {
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }

  .mp-partie-actions,
  .mp-bilan__actions {
    display: grid;
    gap: 10px;
  }

  .mp-like-btn {
    min-height: 44px;
  }

  .mp-eco-ledger,
  .mp-eco-ledger__table {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .mp-hud__metric:nth-child(3) {
    display: none;
  }

  .mp-welcome-facts {
    grid-template-columns: 1fr;
  }

  .mp-rivalry-aside__cta a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .mp-hud__metrics {
    gap: 4px;
  }

  .mp-hud__metric {
    min-width: 46px;
    padding: 4px 5px;
  }
}

/* —— Agenda / objectifs / emprunt lisible —— */
.mp-agenda {
  margin: 0 var(--pad-x, 1.25rem) 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(29, 27, 22, 0.12);
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.9), rgba(255, 255, 255, 0.65));
  display: grid;
  gap: 0.85rem;
}
.mp-agenda__list,
.mp-agenda__goals-list {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}
.mp-agenda__card,
.mp-agenda__goal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(29, 27, 22, 0.14);
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mp-agenda__card:hover,
.mp-agenda__goal:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.mp-agenda__card strong,
.mp-agenda__goal strong {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mp-agenda__card span,
.mp-agenda__goal span {
  font-size: 0.92rem;
  color: rgba(29, 27, 22, 0.72);
  line-height: 1.35;
}
.mp-agenda__card--good { border-left: 3px solid #2f6b4f; }
.mp-agenda__card--bad { border-left: 3px solid var(--clay); }
.mp-agenda__card--neutral { border-left: 3px solid var(--gold); }

.mp-day-pin {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(29, 27, 22, 0.22);
  background: rgba(255, 255, 255, 0.55);
}
.mp-day-pin p { margin: 0.35rem 0 0; }

.mp-levers {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  list-style: none;
  border: 1px solid rgba(29, 27, 22, 0.12);
  background: rgba(255, 255, 255, 0.55);
  display: grid;
  gap: 0.55rem;
}
.mp-levers li { margin: 0; line-height: 1.4; }

.mp-loan-rate {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.86rem;
  color: rgba(29, 27, 22, 0.78);
}
.mp-loan-preview {
  margin: 0.55rem 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(29, 27, 22, 0.14);
  background: rgba(255, 248, 235, 0.75);
}
.mp-loan-preview p { margin: 0; font-size: 0.95rem; }

.mp-quick__meta-chip--desk {
  background: rgba(47, 107, 79, 0.12);
  color: #2f6b4f;
}

.mandat-incident__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}
.mandat-incident__fx {
  font-size: 0.78rem;
  opacity: 0.75;
  font-weight: 500;
}

.mp-tabs__btn--secondary {
  opacity: 0.78;
}

@media (max-width: 720px) {
  .mp-agenda {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
  .mp-agenda__list,
  .mp-agenda__goals-list {
    grid-template-columns: 1fr;
  }
}
