:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #6b7280;
  --border: #e3e6ea;
  --accent: #e5a00d;      /* jaune Plex */
  --accent-2: #cc7b19;
  --bar-bg: #e3e6ea;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c; --card: #1f2226; --text: #e8eaed; --muted: #9aa0a6;
    --border: #2c3036; --bar-bg: #2c3036;
    --shadow: 0 1px 3px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.site-header nav { display: flex; align-items: center; gap: 1rem; }
.user { color: var(--muted); font-size: .95rem; }
.badge {
  background: var(--accent); color: #1c1e21; border-radius: 999px;
  padding: .05rem .5rem; font-size: .75rem; font-weight: 600; margin-left: .25rem;
}
.link { color: var(--muted); font-size: .9rem; }

.content { max-width: 820px; margin: 2rem auto; padding: 0 1.2rem; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 2rem; box-shadow: var(--shadow);
}
.center { text-align: center; max-width: 460px; margin: 4rem auto; }

.notice {
  background: rgba(229,160,13,.12); border: 1px solid var(--accent);
  border-radius: 10px; padding: .9rem 1.1rem; margin-bottom: 1.5rem;
}

.wiki h1 { font-size: 1.9rem; margin: 0 0 .4rem; }
.wiki h2 { font-size: 1.3rem; margin: 2.2rem 0 .8rem; border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.wiki h3 { font-size: 1.05rem; margin: 0 0 .6rem; }
.lead { color: var(--text); font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.legal { margin-top: 2rem; }

.progress-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.3rem 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow);
}
.progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .7rem; }
.raised { font-size: 1.6rem; font-weight: 700; }
.goal { color: var(--muted); margin-left: .3rem; }
.pct { font-size: 1.2rem; font-weight: 700; color: var(--accent-2); }
.bar { background: var(--bar-bg); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); height: 100%; border-radius: 999px; transition: width .6s ease; }

.cost-table { width: 100%; border-collapse: collapse; margin: .5rem 0; }
.cost-table td, .cost-table th { padding: .5rem .3rem; border-bottom: 1px solid var(--border); text-align: left; }
.cost-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cost-table tfoot th { border-bottom: none; border-top: 2px solid var(--border); }

.donate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 640px) { .donate-grid { grid-template-columns: 1fr; } }
.donate-col { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; box-shadow: var(--shadow); }
.amounts { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.amount-opt { position: relative; }
.amount-opt input { position: absolute; opacity: 0; }
.amount-opt span {
  display: inline-block; padding: .4rem .8rem; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-weight: 600;
}
.amount-opt input:checked + span { border-color: var(--accent); background: rgba(229,160,13,.12); }
.sub-tier { margin-bottom: 1rem; }
.tier-amount { display: block; font-weight: 600; margin-bottom: .3rem; }
.pp-buttons { min-height: 42px; }

.btn {
  display: inline-block; padding: .7rem 1.4rem; border-radius: 8px; font-weight: 600;
  cursor: pointer; border: none;
}
.btn-plex { background: var(--accent); color: #1c1e21; }
.btn-plex:hover { background: var(--accent-2); text-decoration: none; }
