/* One stylesheet, no build step, no framework. Copied from apps/prono on
   2026-09-26 and owned by conseil from then on: the two apps share nothing at
   run time. Everything below is plain CSS that every current browser
   understands. */

:root {
  /* A reading column. Text running the full width of a 1900px screen is what
     makes a page look unfinished, more than any missing decoration. */
  --measure: 46rem;

  /* One spacing scale, used everywhere, rather than the browser's defaults. */
  --gap-xs: 0.25rem;
  --gap-s: 0.5rem;
  --gap: 1rem;
  --gap-l: 1.75rem;
  --gap-xl: 2.5rem;

  --ink: #17191c;
  --ink-soft: #5b6167;
  --line: #e2e5e9;
  --line-strong: #c9ced4;
  --bg: #fcfcfb;
  --surface: #ffffff;
  --accent: #1f6feb;
  --warn: #b3261e;

  --radius: 8px;
}

/* The palette is tokenised, so the dark theme is a redefinition rather than a
   second stylesheet. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaed;
    --ink-soft: #9aa1a9;
    --line: #2b2f34;
    --line-strong: #3d434a;
    --bg: #14161a;
    --surface: #1b1e23;
    --accent: #6ea8fe;
    --warn: #f28b82;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 var(--gap) var(--gap-xl);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

header,
main {
  max-width: var(--measure);
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: var(--gap) 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--gap-l);
}

.brand {
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

header form { display: flex; align-items: center; gap: var(--gap-s); margin: 0; }
header span { color: var(--ink-soft); font-size: 0.875rem; }

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--gap-l);
}

h2 {
  font-size: 1.125rem;
  line-height: 1.3;
  margin: var(--gap-l) 0 var(--gap-xs);
}

h3 { font-size: 1rem; margin: 0 0 var(--gap-xs); }
p { margin: 0 0 var(--gap-s); }
a { color: var(--accent); }

/* --- Buttons ------------------------------------------------------------ */

button {
  font: inherit;
  font-weight: 550;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
}

/* An irreversible action and a harmless one must not look alike. */
button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
  font-weight: 500;
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 400;
  text-decoration: underline;
}

.actions { display: flex; flex-wrap: wrap; gap: var(--gap-s); margin-top: var(--gap-l); }

/* --- Forms -------------------------------------------------------------- */

.stack { display: flex; flex-direction: column; gap: var(--gap); max-width: 22rem; }
.stack label { display: flex; flex-direction: column; gap: var(--gap-xs); }
.stack input {
  font: inherit;
  padding: 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.messages { list-style: none; padding: 0; margin: 0 0 var(--gap-l); }
.messages li {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.messages li.error, .error { color: var(--warn); border-color: currentColor; }

header nav { display: flex; gap: var(--gap); margin-right: auto; margin-left: var(--gap); }
header nav a { text-decoration: none; }

.meta, .discret { color: var(--ink-soft); font-size: 0.875rem; }
.discret { font-style: italic; margin-left: var(--gap-xs); }
.compte { color: var(--ink-soft); font-weight: 400; font-size: 0.9rem; }

/* --- Terms: one tab per term, scrolling sideways on a phone -------------- */

.onglets {
  display: flex;
  gap: var(--gap-s);
  overflow-x: auto;
  margin-bottom: var(--gap);
  padding-bottom: var(--gap-xs);
}
.onglets a {
  flex: none;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.875rem;
}
.onglets a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* What the meeting delegated to the council comes first, and looks like it. */
.alerte {
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  padding: var(--gap-s) var(--gap);
  margin: var(--gap) 0;
}
.alerte h2 { margin-top: var(--gap-xs); color: var(--warn); font-size: 1rem; }
.alerte ul { padding-left: 1.1rem; margin: 0; }

/* --- Lists of subjects and meetings: large targets for a thumb ----------- */

.sujets { list-style: none; padding: 0; margin: 0; }
.sujets li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.sujets li a { font-weight: 550; text-decoration: none; }

/* --- A subject ------------------------------------------------------------ */

.etat { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--gap-s); margin: 0 0 var(--gap); }
.etat div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--gap-s); }
.etat dt { color: var(--ink-soft); font-size: 0.8rem; }
.etat dd { margin: 0; }
.texte { margin-bottom: var(--gap); }

.statut, .resultat {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid var(--line-strong);
}
.statut.en_cours, .resultat.adoptee { border-color: var(--accent); color: var(--accent); }
.statut.termine { color: var(--ink-soft); }
.resultat.rejetee, .statut.refuse_ag { border-color: var(--warn); color: var(--warn); }

.chrono { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.chrono li { position: relative; padding: 0 0 var(--gap) var(--gap); }
.chrono li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.chrono li.resolution::before { background: var(--accent); }
.chrono time { display: block; font-size: 0.8rem; color: var(--ink-soft); }
.alternatives { font-size: 0.875rem; color: var(--ink-soft); padding-left: 1.1rem; }

/* --- A meeting ------------------------------------------------------------ */

.resolutions { list-style: none; padding: 0; margin: 0; }
.resolutions > li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.resolutions.alternatives { margin-top: var(--gap-xs); padding-left: var(--gap); border-left: 2px solid var(--line); }
.resolutions.alternatives > li { border-bottom: 0; padding: 0.3rem 0; }
.resolution.rejetee, .resolution.sans_objet { opacity: 0.75; }

/* Lot 1d: the term in two sections, and the two writes on a subject. */
.partie { margin-top: var(--gap-l); }
.partie > h2 { border-bottom: 2px solid var(--ink); padding-bottom: var(--gap-xs); }
.partie h3 { margin-top: var(--gap); }
.sujets li.vide { color: var(--ink-soft); font-style: italic; }
.ecrire { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--gap-s); margin: 0 0 var(--gap); }
.ecrire form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-s); margin: 0 0 var(--gap-s); }
.ecrire label { display: flex; align-items: center; gap: var(--gap-xs); }
.ecrire input[type="date"] { font: inherit; padding: 0.3rem; }
.ecrire .error { flex-basis: 100%; margin: 0; }
.ecrire .case input { width: 1.2rem; height: 1.2rem; }

/* Lot 2a: editing, and the administrator's clean-up. */
.bouton { display: inline-block; padding: 0.5rem 0.9rem; border-radius: var(--radius); background: var(--ink); color: var(--bg); text-decoration: none; }
.bouton.secondaire { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.actions-sujet { display: flex; flex-wrap: wrap; gap: var(--gap-s); align-items: center; }
form.en-ligne { display: inline; margin: 0; }
button.danger { background: var(--warn); border-color: var(--warn); color: var(--bg); }
button.link.danger { background: none; color: var(--warn); }
.formulaire { max-width: 36rem; }
.formulaire textarea, .formulaire select, .formulaire input[type="text"], .formulaire input[type="number"] { font: inherit; padding: 0.4rem; width: 100%; box-sizing: border-box; }
.formulaire label.case { flex-direction: row; align-items: center; }
.ecrire form.note { flex-direction: column; align-items: stretch; }
.ecrire form.note textarea { font: inherit; width: 100%; box-sizing: border-box; }
.ecrire select, .ecrire input[type="text"] { font: inherit; padding: 0.3rem; }
