/* ==========================================================================
   Gouvernement Austrasien — système de design
   Inspiré des principes de la charte numérique estonienne (DDS) :
   une couleur principale déclinée, des gris « pierre », des formes « pierre »
   (organiques) et « calcaire » (rectangles aux rayons égaux), des icônes au
   trait de 2 px, des filets pointillés, un texte toujours aligné à gauche.
   ========================================================================== */

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2-variations');
  font-weight: 300 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-italic.woff2') format('woff2-variations');
  font-weight: 300 900; font-style: italic; font-display: swap;
}

:root {
  /* Famille principale : le vert du drapeau */
  --green: #334835;        /* principale */
  --green-dark: #1c2a1e;   /* secondaire foncée */
  --green-mid: #4a6b4d;    /* secondaire moyenne */
  --green-light: #dde8db;  /* secondaire claire */
  --green-hover: #283a2a;

  /* Accents */
  --blue: #1e4d8b;         /* bleu du drapeau */
  --blue-light: #dce6f3;
  --sand: #fceec8;

  /* Neutres « pierre » */
  --bg: #f1f5f9;           /* fond */
  --white: #ffffff;
  --text: #0f172a;         /* texte */
  --line: #cbd5e1;         /* filets, tableaux */
  --muted: #64748b;
  --stone: #3d4b5e;

  /* Choix de vote */
  --pour: #334835;
  --contre: #b42318;
  --contre-light: #fbe9e7;
  --neutre: #64748b;
  --neutre-light: #e9eef3;

  --font: 'Figtree', Verdana, system-ui, sans-serif;

  /* Calcaire : rayons égaux, à trois échelles */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;

  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(64px, 8vw, 120px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0; font-family: var(--font); font-size: 1.125rem; line-height: 1.6; color: var(--text);
  background: var(--white); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-hover); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
main { outline: none; display: block; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible, .site-footer :focus-visible, .live-card:focus-visible { outline-color: var(--white); }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--green); color: var(--white); padding: 12px 18px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--white); }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.nowrap { white-space: nowrap; }

/* ───────────── Typographie ─────────────
   Titres : graisse moyenne, aérés, une seule taille par niveau. */

.h-display { font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: 1.04; font-weight: 500; letter-spacing: -0.03em; max-width: 16ch; }
.h-title { font-size: clamp(2.125rem, 4.4vw, 3.5rem); line-height: 1.08; font-weight: 500; letter-spacing: -0.025em; }
.h-section { font-size: clamp(1.875rem, 3.4vw, 2.75rem); line-height: 1.12; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 28px; }
.h-block { display: flex; align-items: center; gap: 10px; font-size: 1.375rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 12px; }
.h-block .icon { width: 24px; color: var(--green); }
.count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; background: var(--green-light); color: var(--green-dark); font-size: .875rem; font-weight: 700; }
.kicker { font-size: 1rem; font-weight: 600; color: var(--green-mid); margin-bottom: 16px; }
.lede { font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--stone); max-width: 46ch; }
.muted-lg { color: var(--muted); font-size: 1.125rem; max-width: 44ch; }
.muted { color: var(--muted); }
.block-hint, .hint { color: var(--muted); font-size: .9688rem; margin: 0 0 16px; }
.hint { margin: 0; font-size: .875rem; }
.prose { max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }

/* ───────────── Icônes : trait 2 px, grille 24 px ───────────── */

.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ───────────── Logo : le drapeau ───────────── */

.flag { width: 42px; height: auto; flex: none; border-radius: 3px; }
.flag-lg { width: 72px; }
.flag-xl { width: 96px; margin-bottom: 32px; }
.logo { display: inline-flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.logo-text span:first-child { font-weight: 500; font-size: .9375rem; color: var(--stone); }

/* ───────────── En-tête ───────────── */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 80px; }
.nav { display: flex; align-items: center; flex: 1; gap: 24px; }
.nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-main { flex: 1; margin-left: clamp(8px, 3vw, 40px); }
.nav a:not(.btn), .nav-link-button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px;
  border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 500; font-size: 1rem;
  background: none; border: 0; cursor: pointer;
}
.nav a:not(.btn):hover, .nav-link-button:hover { background: var(--bg); color: var(--text); }
.nav a[aria-current="page"]:not(.btn) { color: var(--green); box-shadow: inset 0 -3px 0 var(--green); border-radius: 0; }

.nav-toggle { display: none; margin-left: auto; }
.nav-toggle summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-sm); }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle summary:hover { background: var(--bg); }
.burger { display: grid; gap: 5px; width: 22px; }
.burger span { height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s var(--ease), opacity .2s; }
.nav-toggle[open] .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[open] .burger span:nth-child(2) { opacity: 0; }
.nav-toggle[open] .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; box-shadow: 0 24px 40px -24px rgba(15, 23, 42, .25); }
.nav-mobile ul { list-style: none; display: grid; }
.nav-mobile li { border-bottom: 2px dashed var(--line); }
.nav-mobile li:last-child { border: 0; padding-top: 16px; }
.nav-mobile a:not(.btn), .nav-mobile .nav-link-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 0; font-size: 1.25rem; font-weight: 500; color: var(--text); text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer; }
.nav-mobile a[aria-current="page"] { color: var(--green); }
.nav-mobile .btn { width: 100%; }
@media (max-width: 1000px) { .nav { display: none; } .nav-toggle { display: block; } }

/* ───────────── Boutons ───────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-sm); border: 2px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn .icon { width: 20px; height: 20px; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-hover); color: var(--white); }
.btn-secondary { background: var(--white); border-color: var(--green); color: var(--green); }
.btn-secondary:hover { background: var(--green-light); color: var(--green-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--stone); color: var(--text); }
.btn-danger { background: var(--contre); color: var(--white); }
.btn-danger:hover { background: #8f1c13; color: var(--white); }
.btn-danger-ghost { background: transparent; border-color: #f0b7b0; color: var(--contre); }
.btn-danger-ghost:hover { border-color: var(--contre); color: var(--contre); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.inline-form { display: inline-flex; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--green); text-decoration: none; }
.link .icon { width: 20px; transition: transform .2s var(--ease); }
.link:hover .icon { transform: translateX(4px); }

/* ───────────── Étiquettes ───────────── */

.tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 8px; font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.tag-open, .tag-voting { background: var(--green); color: var(--white); }
.tag-scheduled { background: var(--blue-light); color: var(--blue); }
.tag-closed { background: var(--bg); color: var(--stone); box-shadow: inset 0 0 0 1px var(--line); }
.tag-cancelled { background: var(--bg); color: var(--muted); text-decoration: line-through; }
.tag-pending { background: var(--sand); color: #6b4e0a; }
.tag-admin { background: var(--blue-light); color: var(--blue); font-size: .75rem; padding: 2px 8px; }
.tag-user-pending { background: var(--sand); color: #6b4e0a; }
.tag-user-active { background: var(--green-light); color: var(--green-dark); }
.tag-user-suspended { background: var(--contre-light); color: var(--contre); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #7fd18b; box-shadow: 0 0 0 0 rgba(127, 209, 139, .6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(127, 209, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 209, 139, 0); } }

.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px; font-size: .875rem; font-weight: 700; }
.verdict::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict-adopted { background: var(--green-light); color: var(--green-dark); }
.verdict-rejected { background: var(--contre-light); color: var(--contre); }
.verdict-no_votes { background: var(--bg); color: var(--stone); }

/* ───────────── Pierres (formes organiques) ───────────── */

.stone path { fill: currentColor; }
.cluster { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 560px; margin-left: auto; }
.cluster .st { position: absolute; }
.cluster .st path { fill: currentColor; }
.st-a { width: 30%; left: 2%; top: 8%; color: var(--green); }
.st-b { width: 46%; right: 0; top: 0; color: var(--green-light); }
.st-c { width: 24%; left: 14%; bottom: 6%; color: var(--blue); }
.st-d { width: 34%; right: 6%; bottom: 0; color: var(--sand); }
.st-flag { width: 60%; left: 22%; top: 20%; filter: drop-shadow(0 24px 40px rgba(15, 23, 42, .18)); }
.blur { filter: blur(14px); opacity: .9; }
@media (max-width: 860px) { .cluster { max-width: 360px; margin: 0 auto; } }

/* ───────────── Accueil ───────────── */

.hero { padding-block: clamp(48px, 7vw, 104px) clamp(48px, 6vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-text .h-display { margin-bottom: 28px; }
.hero-text .lede { margin-bottom: 40px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { order: -1; } }

.band { padding-bottom: var(--section); }
.live-card {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px 32px;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 40px); border-radius: var(--r-lg);
  background: var(--green); color: var(--white); text-decoration: none; margin-bottom: 40px;
}
.live-card:hover { background: var(--green-hover); color: var(--white); }
.live-card-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--green-light); }
.live-card-title { font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.live-card-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--green-light); font-size: 1rem; }
.live-card-meta span { display: inline-flex; align-items: center; gap: 8px; }
.live-card-meta .icon { width: 20px; }
.live-card-go { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; padding: 12px 20px; border-radius: var(--r-sm); background: var(--white); color: var(--green); }
.live-card-idle { background: var(--bg); color: var(--text); grid-template-columns: auto 1fr auto; }
.live-card-idle .live-card-label, .live-card-idle .live-card-meta { color: var(--muted); }
@media (max-width: 860px) {
  .live-card, .live-card-idle { grid-template-columns: 1fr; }
  .live-card-go { justify-self: start; }
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.stats div { padding: 20px 24px 0 0; border-top: 2px dashed var(--line); }
.stats dt { font-size: .9375rem; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1.1; font-weight: 500; letter-spacing: -0.03em; color: var(--green); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; gap: 0 16px; } .stats div { padding-bottom: 20px; } }

.section { padding-block: var(--section); }
.section-flush { padding-top: 0; }
.section-tint { background: var(--bg); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 900px) { .split, .split-rev { grid-template-columns: 1fr; } }
.split .link { margin-top: 8px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li { position: relative; padding: 32px 28px 28px; border-radius: var(--r-md); background: var(--bg); }
.steps li::after { counter-increment: step; content: counter(step); position: absolute; top: 24px; right: 28px; font-size: 1rem; font-weight: 700; color: var(--muted); }
.steps h3 { font-size: 1.375rem; font-weight: 600; margin: 24px 0 8px; }
.steps p { margin: 0; color: var(--stone); font-size: 1rem; }
.pictogram { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--white); color: var(--green); }
.pictogram .icon { width: 32px; height: 32px; stroke-width: 2; }
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.decisions { list-style: none; display: grid; gap: 16px; }
.decision a { display: block; padding: 28px; border-radius: var(--r-md); background: var(--white); color: var(--text); text-decoration: none; transition: box-shadow .2s; }
.decision a:hover { box-shadow: 0 0 0 2px var(--green); color: var(--text); }
.decision-meta { font-size: .9375rem; color: var(--muted); margin-bottom: 6px; }
.decision h3 { font-size: 1.3125rem; font-weight: 600; line-height: 1.3; margin-bottom: 18px; }
.decision .bar { height: 12px; }
.decision-figures { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 14px 0 0; font-size: .9688rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.decision-figures .verdict { margin-left: auto; }
.t-pour { color: var(--pour); }
.t-contre { color: var(--contre); }
.t-neutre { color: var(--neutre); }

.callout { position: relative; display: grid; place-items: center; min-height: 360px; }
.callout-stone { position: absolute; inset: 0; margin: auto; width: min(420px, 100%); color: var(--green); }
.callout-body { position: relative; color: var(--white); max-width: 240px; }
.callout-body .icon { width: 36px; height: 36px; margin-bottom: 16px; color: var(--green-light); }
.callout-body p { font-size: 1.5rem; line-height: 1.3; font-weight: 500; margin: 0; }

.upcoming { list-style: none; margin-bottom: 24px; }
.upcoming li { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 16px; padding: 18px 0; border-top: 2px dashed var(--line); }
.upcoming li:last-child { border-bottom: 2px dashed var(--line); }
.upcoming-date { display: flex; flex-direction: column; font-weight: 600; }
.upcoming-day::first-letter { text-transform: uppercase; }
.upcoming-date span:last-child { color: var(--muted); font-weight: 500; }
.upcoming-title { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.upcoming-rec { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; font-size: .9375rem; }
.upcoming-rec .icon { width: 18px; }
@media (max-width: 520px) { .upcoming li { grid-template-columns: 1fr; gap: 4px; } }

.empty { padding: 32px; border-radius: var(--r-md); border: 2px dashed var(--line); color: var(--stone); }
.empty-sm { padding: 24px; }
.empty-title { font-size: 1.1875rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.empty p:last-child { margin-bottom: 0; }

/* ───────────── Pied de page ───────────── */

.site-footer { background: var(--green-dark); color: var(--green-light); }
.footer-top { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: clamp(56px, 7vw, 88px) 48px; }
.footer-brand .flag { margin-bottom: 20px; }
.footer-name { font-size: 1.625rem; font-weight: 600; color: var(--white); letter-spacing: -0.01em; margin-bottom: 8px; }
.footer-tag { max-width: 34ch; }
.footer-col h2 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: var(--green-light); text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-block: 24px 32px; border-top: 2px dashed rgba(221, 232, 219, .25); font-size: .9375rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

/* ───────────── Messages ───────────── */

.flash { padding: 14px 0; font-weight: 600; }
.flash-success { background: var(--green-light); color: var(--green-dark); }
.flash-info { background: var(--bg); color: var(--text); }
.flash-error { background: var(--contre-light); color: var(--contre); }
.form-errors { padding: 16px 20px; border-radius: var(--r-sm); background: var(--contre-light); color: #7a1a12; outline: none; }
.form-errors p { margin-bottom: 4px; }
.form-errors ul { padding-left: 20px; }
.notice { padding: 16px 20px; border-radius: var(--r-sm); background: var(--sand); color: #5a420a; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 32px; }
.notice a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: inherit; }
.notice .icon { width: 18px; }

/* ───────────── Pages ───────────── */

.page-head { padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 56px); }
.page-head .h-display { margin-bottom: 20px; }
.page-error { min-height: 55vh; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.tabs a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 18px; border-radius: var(--r-sm); background: var(--bg); color: var(--text); font-weight: 600; text-decoration: none; }
.tabs a span { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs a:hover { background: var(--green-light); }
.tabs a[aria-current="page"] { background: var(--green); color: var(--white); }
.tabs a[aria-current="page"] span { color: var(--green-light); }
.tabs-line { gap: 0; margin-top: 28px; }
.tabs-line a { background: none; border-radius: 0; padding: 12px 2px; margin-right: 28px; box-shadow: inset 0 -3px 0 transparent; }
.tabs-line a:hover { background: none; box-shadow: inset 0 -3px 0 var(--line); }
.tabs-line a[aria-current="page"] { background: none; color: var(--green); box-shadow: inset 0 -3px 0 var(--green); }

.recurring { display: grid; gap: 8px; margin-bottom: 24px; }
.recurring p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 16px 20px; border-radius: var(--r-sm); background: var(--blue-light); color: var(--blue); }

.seance-rows { list-style: none; display: grid; gap: 12px; }
.seance-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto 24px; align-items: center; gap: 16px 28px; padding: 24px 28px; border-radius: var(--r-md); background: var(--bg); color: var(--text); text-decoration: none; transition: box-shadow .2s; }
.seance-row:hover { box-shadow: 0 0 0 2px var(--green); color: var(--text); }
.seance-row-date { display: flex; flex-direction: column; font-weight: 600; }
.seance-row-date::first-letter { text-transform: uppercase; }
.seance-row-date span { color: var(--muted); font-weight: 500; }
.seance-row-title { display: flex; flex-direction: column; gap: 4px; font-size: 1.1875rem; font-weight: 600; }
.seance-row-title span { font-size: 1rem; font-weight: 400; color: var(--stone); }
.seance-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: .9375rem; }
.seance-row-meta > span:not(.tag) { display: inline-flex; align-items: center; gap: 6px; }
.seance-row-meta .icon { width: 18px; }
.row-arrow { color: var(--green); }
@media (max-width: 760px) {
  .seance-row { grid-template-columns: 1fr 24px; padding: 20px; }
  .seance-row-date, .seance-row-title, .seance-row-meta { grid-column: 1; }
  .row-arrow { grid-column: 2; grid-row: 1 / 4; }
}

.rules { display: grid; gap: 16px; }
.rule { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 32px; border-radius: var(--r-md); background: var(--bg); }
.rule .pictogram { background: var(--white); }
.rule h2 { font-size: 1.375rem; font-weight: 600; margin-bottom: 8px; }
.rule p { margin: 0; color: var(--stone); max-width: 72ch; }
@media (max-width: 600px) { .rule { grid-template-columns: 1fr; gap: 16px; padding: 24px; } }

.journal { list-style: none; }
.journal li { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 16px 0; border-top: 2px dashed var(--line); }
.journal time { color: var(--muted); font-size: .9375rem; }
.journal p { margin: 0; }
@media (max-width: 600px) { .journal li { grid-template-columns: 1fr; gap: 2px; } }

/* ───────────── Salle de séance ───────────── */

.room-head { padding-block: clamp(32px, 4vw, 56px); background: var(--bg); margin-bottom: clamp(32px, 4vw, 48px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9375rem; color: var(--muted); margin-bottom: 20px; }
.crumbs span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50ch; }
.room-head .h-title { margin-bottom: 12px; max-width: 24ch; }
.room-head .lede { margin-bottom: 0; }
.room-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.room-when { display: inline-flex; align-items: center; gap: 8px; color: var(--stone); font-weight: 500; }
.room-when .icon { width: 20px; color: var(--muted); }
.room-status .inline-form:first-of-type { margin-left: auto; }
@media (max-width: 600px) { .room-status .inline-form:first-of-type { margin-left: 0; } }

.room { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 4vw, 48px); align-items: start; padding-bottom: var(--section); }
.room-main { display: grid; gap: 40px; min-width: 0; }
.room-main > div:empty { display: none; }
.room-side { position: sticky; top: 104px; display: grid; gap: 16px; }
@media (max-width: 960px) { .room { grid-template-columns: 1fr; } .room-side { position: static; order: -1; } }

.stack { display: grid; gap: 16px; }
.room-block .h-block { margin-bottom: 4px; }

.motion { padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: var(--white); border: 2px solid var(--line); }
.motion-voting { border-color: var(--green); box-shadow: 0 24px 48px -32px rgba(51, 72, 53, .45); }
.motion-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.motion-author { color: var(--muted); font-size: .9375rem; }
.motion-title { font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 12px; }
.motion-desc { color: var(--stone); margin-bottom: 8px; }
.motion-desc p:last-child { margin-bottom: 0; }
.motion-foot { margin: 20px 0 0; font-size: .875rem; color: var(--muted); }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-face {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 12px 16px;
  border-radius: var(--r-sm); border: 2px solid currentColor; background: var(--white);
  font-weight: 700; font-size: 1.0625rem; transition: background .15s, color .15s, box-shadow .15s;
}
.choice-face .icon { width: 22px; height: 22px; stroke-width: 2.4; }
.choice-pour .choice-face { color: var(--pour); }
.choice-contre .choice-face { color: var(--contre); }
.choice-neutre .choice-face { color: var(--neutre); }
.choice:hover .choice-face { background: var(--bg); }
.choice input:focus-visible + .choice-face { outline: 3px solid var(--blue); outline-offset: 3px; }
.choice input:checked + .choice-face { color: var(--white); }
.choice-pour input:checked + .choice-face { background: var(--pour); border-color: var(--pour); }
.choice-contre input:checked + .choice-face { background: var(--contre); border-color: var(--contre); }
.choice-neutre input:checked + .choice-face { background: var(--neutre); border-color: var(--neutre); }
@media (max-width: 520px) { .choices { grid-template-columns: 1fr; } }

.vote-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.vote-confirm p { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .9375rem; }
.vote-confirm .icon { width: 18px; }
.voted { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; padding: 16px 20px; border-radius: var(--r-sm); background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.voted .icon { width: 24px; flex: none; }
.hint-box { margin: 24px 0 0; padding: 16px 20px; border-radius: var(--r-sm); background: var(--bg); color: var(--stone); }

.motion-progress { margin-top: 24px; padding-top: 20px; border-top: 2px dashed var(--line); }
.motion-progress p { margin: 0 0 10px; color: var(--stone); font-size: .9688rem; }
.meter { width: 100%; height: 8px; border-radius: 8px; overflow: hidden; }
.meter-track { fill: var(--bg); }
.meter-fill { fill: var(--green); }
.admin-actions { margin-top: 16px; display: flex; gap: 8px; }

.pending-list { list-style: none; display: grid; gap: 12px; }
.pending { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 24px; padding: 20px 24px; border-radius: var(--r-md); background: var(--bg); }
.pending > div:first-child { flex: 1 1 320px; }
.pending-title { margin: 0 0 4px; font-weight: 600; font-size: 1.125rem; line-height: 1.35; }
.pending-meta { margin: 0; color: var(--muted); font-size: .9375rem; }
.pending-desc { margin-top: 8px; color: var(--stone); font-size: 1rem; }
.pending-desc p:last-child { margin: 0; }
.pending-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.propose { padding: clamp(24px, 3vw, 32px); border-radius: var(--r-lg); background: var(--bg); }
.propose .form { margin-top: 12px; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-row .block-hint { margin: 0; flex: 1 1 240px; }

.motion-result .bar { height: 20px; margin: 8px 0 20px; border-radius: 8px; }
.bar { width: 100%; height: 16px; border-radius: 6px; overflow: hidden; }
.bar .seg-empty { fill: var(--bg); }
.bar .seg-pour { fill: var(--pour); }
.bar .seg-contre { fill: var(--contre); }
.bar .seg-neutre { fill: #a3b0c0; }
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.fig { padding: 16px 18px; border-radius: var(--r-sm); background: var(--bg); }
.fig dt { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9375rem; }
.fig dt .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.fig dd { margin: 6px 0 0; display: flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.fig strong { font-size: 2rem; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
.fig span { color: var(--muted); font-size: .9375rem; }
.fig-pour dt { color: var(--pour); }
.fig-contre dt { color: var(--contre); }
.fig-neutre dt { color: var(--neutre); }
.fig-total { background: var(--white); box-shadow: inset 0 0 0 2px var(--line); }
@media (max-width: 640px) { .figures { grid-template-columns: 1fr 1fr; } }

.join-box { display: grid; gap: 16px; padding: 24px; border-radius: var(--r-md); background: var(--green-light); margin: 0; }
.join-box p { margin: 0; color: var(--green-dark); }
.join-box-in { background: var(--white); border: 2px solid var(--green-light); }
.join-box-in p { display: flex; align-items: center; gap: 8px; }
.join-box-in .icon { color: var(--green); }
.join-box-in .btn { justify-self: start; }

.members { padding: 24px; border-radius: var(--r-md); background: var(--bg); }
.member-list { list-style: none; display: grid; gap: 4px; margin-top: 12px; max-height: min(70vh, 640px); overflow-y: auto; }
.member-list li { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.member-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.you { color: var(--muted); font-weight: 400; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: var(--white); font-size: .8125rem; font-weight: 700; letter-spacing: .02em; }
.member-list li:nth-child(3n + 2) .avatar { background: var(--blue); }
.member-list li:nth-child(3n) .avatar { background: var(--green-mid); }
.avatar-sm { width: 30px; height: 30px; font-size: .75rem; }
.avatar-xl { width: 88px; height: 88px; font-size: 1.75rem; }
.live-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .875rem; }
.live-note .icon { width: 18px; }
.live-note.is-off { color: var(--contre); }

/* ───────────── Formulaires ───────────── */

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-weight: 600; font-size: 1rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input:not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: var(--r-sm);
  border: 2px solid var(--line); background: var(--white); transition: border-color .15s;
}
.field textarea { min-height: 0; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.radios legend { width: 100%; margin-bottom: 8px; }
.radios label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.radios input { width: 20px; height: 20px; accent-color: var(--green); }
.form-alt { text-align: center; color: var(--stone); margin: 0; }

.auth { padding-block: clamp(40px, 6vw, 88px) var(--section); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.auth-form { max-width: 480px; }
.auth-form .h-title { margin-bottom: 12px; }
.auth-form .lede { font-size: 1.125rem; margin-bottom: 32px; }
@media (max-width: 860px) { .auth-grid { grid-template-columns: 1fr; } .auth-visual { display: none; } }

.account-head { display: flex; align-items: center; gap: 24px; }
.status-card { padding: 28px; border-radius: var(--r-md); background: var(--green-light); color: var(--green-dark); }
.status-pending { background: var(--sand); color: #5a420a; }
.status-suspended { background: var(--contre-light); color: var(--contre); }
.status-title { font-size: 1.375rem; font-weight: 600; margin-bottom: 6px; }
.status-card p:last-child { margin: 0; }
.my-seances { list-style: none; display: grid; gap: 8px; }
.my-seances a { display: grid; grid-template-columns: 1fr auto 24px; gap: 16px; align-items: center; padding: 16px 20px; border-radius: var(--r-sm); background: var(--bg); color: var(--text); text-decoration: none; }
.my-seances a:hover { box-shadow: 0 0 0 2px var(--green); }
.my-seances a > span:first-child { display: flex; flex-direction: column; }

/* ───────────── Administration ───────────── */

.admin-head { padding-top: clamp(32px, 4vw, 56px); background: var(--bg); margin-bottom: clamp(32px, 4vw, 48px); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.admin-grid > div > .h-block:not(:first-child) { margin-top: 40px; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.panel { padding: 28px; border-radius: var(--r-md); background: var(--bg); position: sticky; top: 104px; }
@media (max-width: 1000px) { .panel { position: static; } }

.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 2px solid var(--line); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 1rem; }
.table th, .table td { padding: 14px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table thead th { font-size: .875rem; font-weight: 700; color: var(--stone); background: var(--bg); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-title { font-weight: 600; color: var(--text); }
.cell-sub { display: block; color: var(--muted); font-size: .875rem; }
.actions-cell { text-align: right !important; white-space: nowrap; }
.actions-cell .inline-form, .actions-cell .btn { margin-left: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chips a { display: inline-flex; gap: 8px; padding: 8px 14px; border-radius: var(--r-sm); background: var(--bg); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.chips a span { color: var(--muted); }
.chips a[aria-current="page"] { background: var(--text); color: var(--white); }
.chips a[aria-current="page"] span { color: var(--line); }

.schedules { list-style: none; display: grid; gap: 12px; }
.schedule { display: grid; grid-template-columns: 200px 1fr auto; gap: 16px 24px; align-items: center; padding: 20px 24px; border-radius: var(--r-md); background: var(--bg); }
.schedule.is-paused { opacity: .6; }
.schedule-when { display: flex; align-items: center; gap: 12px; }
.schedule-when .icon { color: var(--green); }
.schedule-when > span, .schedule-title { display: flex; flex-direction: column; }
.schedule-when > span > span, .schedule-title > span { color: var(--muted); font-size: .9375rem; }
@media (max-width: 760px) { .schedule { grid-template-columns: 1fr; } .schedule .actions-cell { text-align: left !important; } .schedule .actions-cell .inline-form { margin: 0 4px 0 0; } }

@media print { .site-header, .site-footer, .room-side, .vote, .propose { display: none !important; } }

/* Ajustements */
.stone, .cluster .st { overflow: visible; }
.band + .section { padding-top: 0; }
@media (max-width: 960px) {
  .room-side { display: contents; }
  .room-side .join-box { order: -1; }
  .room-side .members, .room-side #live-members { order: 2; }
  .room-side .live-note { order: 3; }
}
@media (max-width: 860px) { .cluster { max-width: 260px; } .hero { padding-top: 32px; } }

/* Logo officiel du gouvernement */
.logo img { height: 60px; width: auto; }
.footer-logo { width: 200px; height: auto; margin-bottom: 20px; }
@media (max-width: 480px) { .logo img { height: 44px; } }
