/* Opus (ex-ForeVote) — feuille de style unique. Jetons en :root, mode sombre sélectionné (pas inversé). */
@font-face { font-family: "Cinzel"; src: url("/static/fonts/cinzel-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/static/fonts/cinzel-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6d68;
  --line: #e1e0d9;
  --baseline: #c3c2b7;
  --accent: #9a6400;        /* or de la Horde : interface, jamais les données */
  --accent-ink: #ffffff;
  --accent-bg: #fbf1dc;
  --focus: #2a78d6;
  --good: #006300;
  --bad: #b3261e;
  --discord: #5865f2;
  /* Données (palette validée) */
  --series-1: #2a78d6;
  --series-1-soft: #86b6ef;
  --pos: #2a78d6;
  --neg: #e34948;
  --neutral: #c3c2b7;
  --mj0: #b0302f; --mj1: #e86a69; --mj2: #f3aaa8; --mj3: #d6d5cf; --mj4: #9ec5f4; --mj5: #5598e7; --mj6: #256abf;
  --win1: #cde2fb; --win2: #9ec5f4; --win3: #6da7ec;
  --lose1: #fbe0df; --lose2: #f3aaa8; --lose3: #ec8584;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 2px 8px rgb(0 0 0 / 0.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0a0f1c;
    --surface: #111a2e;
    --surface-2: #18233b;
    --ink: #ffffff;
    --ink-2: #c5cbd8;
    --muted: #9aa3b5;
    --line: #24304a;
    --baseline: #33405c;
    --accent: #e0a526;
    --accent-ink: #1a1206;
    --accent-bg: #231d12;
    --focus: #6da7ec;
    --good: #0ca30c;
    --bad: #e66767;
    --series-1: #3987e5;
    --series-1-soft: #1c5cab;
    --pos: #3987e5;
    --neg: #e66767;
    --neutral: #5a6278;
    --mj0: #e66767; --mj1: #b04a49; --mj2: #6d3433; --mj3: #3b4560; --mj4: #1c5cab; --mj5: #2a78d6; --mj6: #5598e7;
    --win1: #16325a; --win2: #184f95; --win3: #256abf;
    --lose1: #3a1d26; --lose2: #6d2a29; --lose3: #a33a39;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Structure */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .75rem 16px; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.brand img { filter: drop-shadow(0 1px 3px rgb(0 0 0 / .35)); }
.brand-name { font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 1.2rem; letter-spacing: .02em; }
.brand-guild { color: var(--accent); font-weight: 600; font-size: .95rem; }
h1 { font-family: "Cinzel", Georgia, serif; font-weight: 700; letter-spacing: .01em; }

.banner { display: block; margin: 0 0 1.25rem; }
.banner img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 4px 24px rgb(5 10 30 / .35); }
.band { display: block; margin: 0 0 1rem; }
.band img { display: block; width: 100%; height: 132px; object-fit: cover; object-position: center 22%; border-radius: var(--radius); opacity: .95; }
@media (max-width: 640px) { .band img { height: 96px; } }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state img { display: block; margin: 0 auto 1rem; opacity: .55; filter: saturate(.8); }
.banner-login { margin: -1rem -0.5rem 1.5rem; }
.topbar nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar nav a { color: var(--ink-2); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }
.me { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-2); }
.me img { border-radius: 50%; }
main { max-width: 1120px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 16px; }
.intro { margin: .5rem 0 1rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); min-width: 0;
}
.card.accent { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card.narrow { max-width: 560px; margin: 2rem auto; }
.hero { padding: 2rem 1.5rem 2.5rem; max-width: 640px; }
.count { display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; text-align: center; vertical-align: middle; }
.notice { background: var(--accent-bg); border-left: 3px solid var(--accent); padding: .6rem .8rem; border-radius: 4px; }

/* ---------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 40px; padding: .45rem .95rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--baseline); background: var(--surface-2); }
.btn.small { min-height: 32px; padding: .25rem .6rem; font-size: .85rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-discord { background: var(--discord); border-color: var(--discord); color: #fff; font-size: 1.05rem; margin: .5rem 0 1rem; }
.btn-discord:hover { background: #4752c4; }
.btn[disabled], .btn.busy { opacity: .6; pointer-events: none; }

/* ---------- Puces d’état */
.chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.chip-open { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.chip-proposals { background: var(--accent-bg); color: var(--accent); }
.chip-voted { background: color-mix(in srgb, var(--series-1) 14%, transparent); color: var(--series-1); }

/* ---------- Liste des scrutins */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.poll-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.poll-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.poll-card h3 { margin: .5rem 0 .25rem; font-size: 1.05rem; }
.poll-card-top { display: flex; gap: .4rem; flex-wrap: wrap; }
.poll-card p { margin: .2rem 0; }
.verdict-line { font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; }

/* ---------- Page d’un scrutin */
.poll-head { margin-bottom: 1.25rem; }
.poll-head-top { display: flex; align-items: center; gap: .75rem; }
.poll-head h1 { margin-top: .5rem; }
.description { max-width: 70ch; color: var(--ink-2); margin-bottom: .75rem; overflow-wrap: anywhere; }
.phase { font-weight: 600; }
.links { display: flex; gap: .5rem; flex-wrap: wrap; }
.poll-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 860px) { .poll-body { grid-template-columns: minmax(0, 1fr); } .not-voted { display: none; } }

.timeline { display: flex; list-style: none; padding: 0; margin: 1rem 0; gap: 0; flex-wrap: wrap; }
.timeline li { flex: 1 1 140px; position: relative; padding: 0 1rem 0 1.4rem; display: flex; flex-direction: column; }
.timeline .dot { position: absolute; left: 0; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--baseline); }
.timeline .step-done .dot { background: var(--muted); }
.timeline .step-current .dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.timeline .step-todo strong { color: var(--muted); font-weight: 500; }

.rules { list-style: none; padding: 0; margin: 0 0 .5rem; }
.rules li { padding: .15rem 0; }
.role { color: var(--discord); font-weight: 600; }
.receipt { font-size: 1rem; user-select: all; }
.journal { list-style: none; padding: 0; margin: .5rem 0 0; max-height: 360px; overflow: auto; }
.journal li { padding: .3rem 0; border-top: 1px solid var(--line); }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2 { display: inline; }
details > summary::after { content: " ▾"; color: var(--muted); }
details[open] > summary::after { content: " ▴"; }

.filter { width: 100%; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; margin: .25rem 0 .75rem; }
input, textarea { font: inherit; color: var(--ink); background: var(--surface); }
.form-status { min-height: 1.5em; margin: .5rem 0 0; font-weight: 600; }
.form-status.ok { color: var(--good); }
.form-status.err { color: var(--bad); }

/* ---------- Propositions */
.proposals { list-style: none; padding: 0; margin: 0 0 1rem; }
.proposal { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.proposal.pending { opacity: .75; }
.proposal-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.proposal-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.btn-support.on { background: color-mix(in srgb, var(--good) 15%, var(--surface)); border-color: var(--good); color: var(--good); }
.support-count { color: var(--ink-2); font-weight: 600; }
.progress { display: block; width: 120px; height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: .3rem; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--good); }
.propose { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .6rem; }
.propose label { display: grid; gap: .25rem; font-weight: 600; font-size: .9rem; }
.propose input, .propose textarea { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; }
.propose .btn { justify-self: start; }

/* ---------- Bulletin */
.yn { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .75rem; }
.btn-yn { min-height: 56px; font-size: 1.05rem; }
.btn-yn.on { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (max-width: 480px) { .yn { grid-template-columns: 1fr; } }

.choices, .grade-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .4rem; cursor: pointer; }
.choice:hover { border-color: var(--baseline); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.choice input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.choice span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.choice input:disabled + span { opacity: .5; }

.rank-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 640px) { .rank-columns { grid-template-columns: 1fr; } }
.rank-list { list-style: none; padding: .4rem; margin: 0; min-height: 64px; border: 1px dashed var(--baseline); border-radius: 8px; }
.rank-list.ranked { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pool { max-height: 520px; overflow: auto; }
.rank-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .55rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin: .3rem 0; cursor: grab; touch-action: manipulation; }
.rank-item:active { cursor: grabbing; }
.rank-item.sortable-ghost { opacity: .35; }
.rank-label { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.rank-num { display: none; min-width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.ranked .rank-num { display: inline-flex; }
.rank-tools { display: flex; gap: .15rem; flex-shrink: 0; }
.icon { width: 32px; height: 32px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer; font-size: .85rem; }
.icon:hover { border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.pool [data-move="up"], .pool [data-move="down"], .pool [data-move="remove"], .ranked [data-move="add"] { display: none; }
.pool .add { font-size: 1.1rem; color: var(--accent); }
.rank-empty { display: none; }
.ranked:empty + .rank-empty { display: block; }
.ranking.full .pool .rank-item { opacity: .5; cursor: not-allowed; }

.grade-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .grade-list li { grid-template-columns: 1fr; } }
.grade-label { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.grade-scale { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .2rem; }
.grade { position: relative; cursor: pointer; }
.grade input { position: absolute; opacity: 0; pointer-events: none; }
.grade span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 .4rem; border: 1px solid var(--line); border-radius: 6px; font-size: .85rem; background: var(--surface); }
.grade input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.stars .grade span { font-size: 1.15rem; color: var(--baseline); border-color: transparent; background: transparent; min-width: 32px; }
.stars .grade.zero span { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); }
.stars .grade.lit span { color: var(--accent); }
.stars .grade.zero input:checked + span { background: var(--surface-2); color: var(--ink); }
.judgment .grade input:checked + span { color: #fff; border-color: transparent; font-weight: 600; }
.judgment .g0 input:checked + span { background: var(--mj0); }
.judgment .g1 input:checked + span { background: var(--mj1); }
.judgment .g2 input:checked + span { background: var(--mj2); color: var(--ink); }
.judgment .g3 input:checked + span { background: var(--mj3); color: var(--ink); }
.judgment .g4 input:checked + span { background: var(--mj4); color: var(--ink); }
.judgment .g5 input:checked + span { background: var(--mj5); }
.judgment .g6 input:checked + span { background: var(--mj6); }

/* ---------- Résultats (graphiques) */
.verdict { font-size: 1.2rem; font-weight: 700; margin-bottom: .25rem; }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; color: var(--ink-2); margin: .75rem 0 .5rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw-yes { background: var(--pos); } .sw-no { background: var(--neg); }
.sw.mj0, .seg.mj0 { background: var(--mj0); } .sw.mj1, .seg.mj1 { background: var(--mj1); } .sw.mj2, .seg.mj2 { background: var(--mj2); }
.sw.mj3, .seg.mj3 { background: var(--mj3); } .sw.mj4, .seg.mj4 { background: var(--mj4); } .sw.mj5, .seg.mj5 { background: var(--mj5); }
.sw.mj6, .seg.mj6 { background: var(--mj6); }

.bars { margin: 1rem 0; }
.bar-row, .mj-row { display: grid; grid-template-columns: 2rem minmax(0, 14rem) minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .3rem .25rem; border-radius: 6px; }
.bar-row:hover, .mj-row:hover { background: var(--surface-2); }
.bar-row.extra { display: none; }
.bars.expanded .bar-row.extra { display: grid; }
.bar-rank { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: .9rem; }
.bar-label { overflow-wrap: anywhere; display: flex; flex-direction: column; }
.win .bar-label { font-weight: 700; }
.bar-track { height: 14px; border-left: 1px solid var(--baseline); }
.bar-fill { display: block; height: 100%; background: var(--series-1-soft); border-radius: 0 4px 4px 0; }
.win .bar-fill { background: var(--series-1); }
.bar-value { font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 1.5rem minmax(0, 1fr) auto; }
  .bar-row .bar-track { grid-column: 2 / -1; grid-row: 2; }
  .mj-row { grid-template-columns: 1.5rem minmax(0, 1fr); }
  .mj-row .mj-bar { grid-column: 1 / -1; }
}

.yn-chart .yn-bar { position: relative; display: flex; gap: 2px; height: 36px; margin: .5rem 0 1rem; }
.seg { display: flex; align-items: center; justify-content: center; height: 100%; color: #fff; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.seg-yes { background: var(--pos); border-radius: 4px 0 0 4px; }
.seg-no { background: var(--neg); border-radius: 0 4px 4px 0; }
.seg-yes:last-of-type { border-radius: 4px; }
.seg-empty { flex: 1; background: var(--surface-2); color: var(--muted); border-radius: 4px; font-weight: 500; }
.threshold { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); }
.threshold::after { content: "seuil"; position: absolute; top: -1.3rem; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--ink-2); }

.mj-row { grid-template-columns: 2rem minmax(0, 14rem) minmax(0, 1fr); }
.mj-bar { position: relative; display: flex; gap: 2px; height: 16px; }
.mj-bar .seg:first-child { border-radius: 4px 0 0 4px; }
.mj-bar .seg:nth-last-child(2) { border-radius: 0 4px 4px 0; }
.median-mark { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }

table.data, table.matrix { border-collapse: collapse; font-size: .85rem; }
table.data th, table.data td { padding: .3rem .6rem; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
table.data td.out { color: var(--bad); font-weight: 700; text-decoration: line-through; }
.matrix-wrap { margin: 1rem 0; }
.matrix-wrap > summary { font-weight: 600; margin-bottom: .5rem; }
.matrix-scroll { overflow-x: auto; }
.matrix th, .matrix td { padding: .3rem .45rem; text-align: center; border: 2px solid var(--surface); font-variant-numeric: tabular-nums; white-space: nowrap; }
.matrix .row-head { text-align: left; font-weight: 500; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.matrix td { border-radius: 4px; background: var(--surface-2); }
.matrix td.self { background: transparent; }
.matrix td.w1 { background: var(--win1); } .matrix td.w2 { background: var(--win2); } .matrix td.w3 { background: var(--win3); }
.matrix td.l1 { background: var(--lose1); } .matrix td.l2 { background: var(--lose2); } .matrix td.l3 { background: var(--lose3); }
.notes ul { padding-left: 1.2rem; font-size: .9rem; color: var(--ink-2); }
.notes > summary { font-weight: 600; margin: .75rem 0 .25rem; }
.verify { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.digest { word-break: break-all; }
form.inline { display: flex; gap: .5rem; flex-wrap: wrap; }
form.inline input { flex: 1 1 180px; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; }

@media (forced-colors: active) {
  .bar-fill, .seg, .sw { forced-color-adjust: none; border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Création et brouillons */
.intro-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.intro-row h1 { margin: 0; }
.create .card { margin-bottom: 1rem; }
.field { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; margin-bottom: .8rem; }
.field input, .field textarea, .field select, .inline select {
  font: inherit; font-weight: 400; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 0;
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; align-items: end; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; margin: .4rem 0 .8rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: .15rem; flex-shrink: 0; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.method-card { display: flex; gap: .6rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.method-card:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.method-card input { accent-color: var(--accent); margin-top: .25rem; }
.method-card > span { display: flex; flex-direction: column; gap: .2rem; }
.seg-toggle { display: inline-flex; gap: .8rem; font-weight: 400; }
.seg-toggle label { display: inline-flex; gap: .3rem; align-items: center; cursor: pointer; }
[hidden] { display: none !important; }
.copy-line { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.command { font-size: .95rem; padding: .35rem .6rem; }
.option-preview { margin: 0; padding-left: 1.6rem; columns: 2 220px; }
.option-preview li { padding: .15rem 0; break-inside: avoid; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }
.card.danger summary h2 { color: var(--bad); }

/* Réglages : listes de rôles */
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 1rem; }
.role-list .check { align-items: center; margin: .3rem 0; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ------------------------------------------------------------ Butin */
.wl-chars { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.wl-chars li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wl-chars a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.wl-chars a:hover strong { color: var(--accent); }
.wl-items { margin: .4rem 0; padding-left: 1.6rem; display: grid; gap: .15rem; }
.wl-filters { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .5rem; align-items: center; }
.wl-filters select, .wl-filters input {
  width: 100%; margin: 0; font: inherit; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 0;
}
.wishlist .pool { max-height: 70vh; overflow-y: auto; }
.wl-info { font-size: .8rem; text-decoration: none; margin-left: .25rem; }
.wishlist.full .pool .rank-item { opacity: .5; }
.wishlist .rank-label a { font-weight: 600; }
.chip-wl-submitted { background: var(--accent-bg); color: var(--accent); }
.chip-wl-validated, .chip-tier-open { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.chip-wl-returned { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.chip-report-review { background: var(--accent-bg); color: var(--accent); }
.chip-report-validated { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.report-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.report-list .bad { color: var(--bad); }
.report-steps, .report-fixes { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .25rem; }
.report-fixes { border-left: 3px solid var(--accent); padding-left: .6rem; }
.gap-open .chip { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.gap-ok .chip { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.report-correct summary { cursor: pointer; color: var(--accent); margin-top: .3rem; }
.chip-tier-frozen { background: color-mix(in srgb, var(--series-1) 14%, transparent); color: var(--series-1); }
.snapshot { width: 100%; font-family: ui-monospace, monospace; font-size: .8rem; word-break: break-all; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .6rem; }
/* couleurs de qualité des objets (celles du jeu, assombries en thème clair pour rester lisibles) */
.q-common { color: var(--ink); }
.q-uncommon { color: #1a9c00; }
.q-rare { color: #0062c4; }
.q-epic { color: #8a2ad6; }
.q-legendary { color: #c95f00; }
@media (prefers-color-scheme: dark) {
  .q-uncommon { color: #1eff00; }
  .q-rare { color: #3d9bff; }
  .q-epic { color: #b56bff; }
  .q-legendary { color: #ff8000; }
}
/* Sur téléphone : une colonne, et la table défile avec la page plutôt que dans un cadre */
@media (max-width: 720px) {
  .wishlist .rank-columns { grid-template-columns: 1fr; }
  .wishlist .pool { max-height: none; overflow: visible; }
  .wl-filters { grid-template-columns: 1fr; }
}

/* Expéditions */
.expedition-head { display: flex; gap: 1rem; align-items: flex-start; }
.expedition-head h2 { margin: 0 0 .2rem; }
.expedition-img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.expedition-desc { white-space: pre-line; margin: .4rem 0 0; }
.expedition-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem 1rem; margin: .9rem 0 .4rem; }
.expedition-groups h3 { margin: 0 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
.expedition-groups ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.expedition-groups li.mine strong { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.expedition-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
.expedition-actions .form-status { flex-basis: 100%; margin: 0; }
.expedition-actions .inline-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.expedition-actions select { max-width: 100%; font: inherit; font-size: .9rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.expedition-actions .form-status:empty { display: none; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
@media (max-width: 520px) { .expedition-img { width: 64px; height: 64px; } }
