/* Nouveau nom — feuille de style unique, sans dépendance externe. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1b2230;
  --muted: #5d6676;
  --line: #dfe3ea;
  --accent: #1f3864;
  --accent-soft: #e8edf6;
  --ok: #1d7a4a;
  --ok-soft: #e3f3ea;
  --warn: #9a5b00;
  --warn-soft: #fbf0dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #1a2029;
    --text: #e6e9ef;
    --muted: #9aa3b2;
    --line: #2c3442;
    --accent: #8fb0e8;
    --accent-soft: #1f2a3d;
    --ok: #5cc98d;
    --ok-soft: #173326;
    --warn: #e6b25c;
    --warn-soft: #36290f;
    --danger: #f2877d;
    --danger-soft: #3a1c19;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 1rem; }
h3:first-child { margin-top: 0; }
p { margin: 0 0 .75rem; }
code { font-size: .9em; background: var(--accent-soft); padding: .1em .35em; border-radius: 4px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 520px; padding-top: 12vh; }
main.wrap { padding-bottom: 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 0 0 16px;
}
.eyebrow { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* ---------- public */
.hero { padding: 48px 0 24px; max-width: 720px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.privacy {
  display: inline-block;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: .92rem;
}

.brief summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.brief summary::-webkit-details-marker { display: none; }
.brief summary::after { content: "▾"; color: var(--muted); transition: transform .15s; }
.brief:not([open]) summary::after { transform: rotate(-90deg); }
.brief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; }
.brief ul { margin: 0; padding-left: 1.1rem; font-size: .93rem; }
.brief li { margin-bottom: .3rem; }

fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.hint { color: var(--muted); font-size: .9rem; margin-top: -6px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--muted); }
.field em { color: var(--danger); font-style: normal; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
[aria-invalid=true] { border-color: var(--danger); background: var(--danger-soft); }
.field-error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }

.row3 { display: grid; grid-template-columns: 1.3fr 1.3fr .8fr; gap: 16px; }
.proposal { border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 4px; margin-bottom: 12px; }
.proposal[hidden] { display: none; }
.proposal-head { display: flex; gap: 12px; align-items: flex-end; }
.proposal-head .grow { flex: 1; }
.pnum {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.alert { background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.actions p { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border-radius: 8px; padding: 10px 18px; min-height: 44px;
  border: 1px solid transparent;
}
.btn.primary { background: var(--accent); color: var(--surface); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .88rem; }
.btn.add { margin-top: 4px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thanks h1 { margin-bottom: 1rem; }
.closed { text-align: center; }

/* ---------- admin */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: .92rem; }
.topbar nav a[aria-current=page] { color: var(--accent); background: var(--accent-soft); }
form.inline { margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.kpi-v { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-v small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.kpi-l { color: var(--muted); font-size: .85rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: .92rem; }
.exports { display: flex; gap: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.on { background: var(--ok); }
.dot.off { background: var(--danger); }

.sub-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.sub-head h2 { margin-bottom: 2px; }
.meta { color: var(--muted); font-size: .88rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); margin-left: 0; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
td .tag:first-child { margin-left: 0; }
.sub.is-hidden { opacity: .55; }
.props { margin: 12px 0 0; padding-left: 1.3rem; }
.props li { margin-bottom: 10px; }
.prop-name { font-weight: 700; font-size: 1.05rem; margin: 0; }
.tagline { font-weight: 400; font-style: italic; color: var(--muted); }
.prop-why { margin: 2px 0 0; color: var(--text); font-size: .93rem; }
.comment { border-top: 1px solid var(--line); padding-top: 10px; margin: 12px 0 0; font-size: .93rem; }

.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tr.multi td:first-child strong { color: var(--accent); }
.empty { color: var(--muted); text-align: center; padding: 32px; }

@media (max-width: 760px) {
  .brief-grid, .row3 { grid-template-columns: 1fr; gap: 0; }
  .brief-grid > div + div { margin-top: 16px; }
  .card { padding: 18px; }
  .hero { padding-top: 32px; }
  .sub-head { flex-direction: column; }
  .topbar-inner { gap: 8px; padding: 8px 0; }
}
