:root {
  color-scheme: dark;
  --bg: #16181c;        /* fond de page */
  --bg-2: #1b1d22;      /* barres et menu */
  --card: #23262d;      /* cartes */
  --card-2: #2a2d35;    /* tuiles */
  --well: #17191d;      /* champs et boutons sombres */
  --line: #2f333c;
  --text: #e8eaee;
  --muted: #9aa1ad;
  --brand: #5865f2;
  --brand-text: #8f9bff;
  --brand-soft: rgba(88, 101, 242, .16);
  --red: #ed4245;
  --green: #3ba55d;
  --accent: var(--brand);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 .95rem/1.5 var(--font); }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-text); }
code { font: 500 .72rem ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--muted); }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.muted { color: var(--muted); }
.error { color: #ff7a7c; font-weight: 600; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid transparent; border-radius: .5rem; padding: .6rem 1rem; cursor: pointer;
  background: var(--brand); color: #fff; font: 600 .9rem var(--font); text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.danger { background: var(--red); }
.btn.soft { background: var(--brand-soft); color: var(--brand-text); border-color: rgba(88, 101, 242, .4); }
.btn.outline-danger { background: rgba(237, 66, 69, .12); color: #ff7a7c; border-color: rgba(237, 66, 69, .45); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); padding: .4rem .8rem; font-size: .85rem; }

/* Barre du haut */
.top { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem 2rem; padding: .55rem 1rem;
  background: linear-gradient(180deg, #1d2026, #17191d); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.1rem var(--font); color: var(--brand-text); text-decoration: none; }
.brand .icon { width: 1.4em; height: 1.4em; color: var(--brand); }
#topnav { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .4rem .9rem; }
.top-link { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: .5rem; color: var(--text); text-decoration: none; font-weight: 500; font-size: .9rem; }
.top-link:hover { background: var(--card); }
.top-link.active { background: var(--brand-soft); color: var(--brand-text); }
.lang-select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: .5rem; padding: .45rem .6rem; font: 500 .85rem var(--font); cursor: pointer; width: auto; }
.credit-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: .5rem; text-decoration: none; font-size: .88rem;
  color: #f6c453; background: rgba(240, 160, 32, .12); border: 1px solid rgba(240, 160, 32, .45); }
.credit-pill:hover { background: rgba(240, 160, 32, .2); }
.credit-pill strong { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Tableau de bord : menu à gauche, page à droite */
main.dash { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: calc(100vh - 3.4rem); }
.side { background: var(--bg-2); border-right: 1px solid var(--line); }
.profile { display: grid; justify-items: center; gap: .2rem; padding: 1.8rem 1rem 1.4rem; border-bottom: 1px solid var(--line); text-align: center; }
.ring { position: relative; display: grid; place-items: center; width: 4.4rem; height: 4.4rem; border-radius: 50%; border: 2px solid var(--brand); margin-bottom: .6rem; }
.profile-avatar { width: 3.7rem; height: 3.7rem; border-radius: 50%; object-fit: cover; background: var(--card-2); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; }
.online { position: absolute; right: .15rem; bottom: .15rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--green); border: 2px solid var(--bg-2); }
.profile strong { font-size: 1rem; }
.profile small { color: var(--muted); font-size: .78rem; }
.side-label { padding: 1.1rem 1.2rem .5rem; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side nav { display: grid; gap: .25rem; padding: 0 .6rem; }
.side nav a, .cats a { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-left: 3px solid transparent; border-radius: .5rem;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .9rem; }
.side nav a:hover, .cats a:hover { background: var(--card); }
.side nav a > .icon:last-child { margin-left: auto; width: .9em; height: .9em; color: var(--muted); }
.side nav a[aria-current="page"], .cats a[aria-current="page"] { background: var(--brand-soft); border-left-color: var(--brand); color: var(--brand-text); }

.page { padding: 1.4rem clamp(1rem, 2.5vw, 1.9rem) 2.5rem; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-bottom: 1.1rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.page-head h1 { display: flex; align-items: center; gap: .65rem; font-size: 1.6rem; font-weight: 700; }
.page-head h1 .icon { color: var(--brand); width: 1.2em; height: 1.2em; }
.page-head p { margin-top: .5rem; font-size: .82rem; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: .9rem; }
.tile-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .6rem; background: var(--brand-soft); color: var(--accent); flex: none; }
.tile-icon .icon { width: 1.25rem; height: 1.25rem; }

/* Cartes de statistiques */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.stat { display: grid; gap: .15rem; padding: 1.2rem; border-top: 3px solid var(--accent); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.stat .tile-icon { color: var(--brand); }
.stat .mark { color: var(--green); font-size: .8rem; }
.stat strong { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-weight: 600; font-size: .85rem; margin-top: .5rem; }
.stat small { color: var(--muted); font-size: .72rem; }

/* Cartes des serveurs */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; }
.server { display: grid; justify-items: center; gap: .55rem; padding: 1.3rem 1rem; border-top: 3px solid var(--brand); color: var(--text); text-decoration: none; text-align: center; }
.server:hover { border-color: var(--brand); }
.server.absent { border-top-color: var(--line); }
.server-icon { width: 3.6rem; height: 3.6rem; border-radius: .9rem; border: 2px solid var(--brand); object-fit: cover; background: var(--card-2); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; }
.server strong { font-size: 1.02rem; }

.staff-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; margin-bottom: 1rem; }
.staff-form label { display: grid; gap: .25rem; flex: 1 1 12rem; font-size: .82rem; color: var(--muted); }
.staff-form small { min-height: 1em; }
.staff-grants { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.staff-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.staff-list li { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .7rem; padding: .55rem .75rem; background: var(--well); border: 1px solid var(--line); border-radius: .5rem; }
.staff-list li > strong { min-width: 0; }
.staff-list li > .btn { margin-left: auto; }
.staff-list .when { font-size: .78rem; }
.staff-list .icon, .staff-list .tile-icon { color: var(--brand); flex: none; }
.staff-list .tile-icon { width: 1.8rem; height: 1.8rem; }
.section-head .count { margin-left: .4rem; font-size: .8rem; padding: .1rem .5rem; border-radius: 1rem; background: var(--card-2); color: var(--muted); }

.premium-all { padding: .9rem 1rem; margin: .5rem 0; background: rgba(240, 160, 32, .08); border: 1px solid rgba(240, 160, 32, .35); border-radius: .6rem; }
.premium-all h3.sub { margin-top: 0; padding-top: 0; border-top: 0; }
h3.sub { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 700; margin: 1.3rem 0 .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
h3.sub:first-of-type { border-top: 0; padding-top: 0; margin-top: .5rem; }
h3.sub .icon { color: var(--brand); }
.user-result:empty { display: none; }
.user-result { margin-top: 1rem; display: grid; gap: .8rem; }
.user-head { display: flex; align-items: center; gap: .6rem; }
.user-head strong { font-size: 1.05rem; }
.user-badges { display: flex; flex-wrap: wrap; gap: .4rem; }

.raid-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.raid-tab { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-radius: .5rem; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text); font: 600 .88rem var(--font); }
.raid-tab.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.raid-tab.danger.active { background: rgba(237, 66, 69, .15); border-color: var(--red); color: #ff8e90; }
.raid-tab .count { font-size: .78rem; padding: .05rem .5rem; border-radius: 1rem; background: var(--card-2); color: var(--muted); }
.notice.danger { border-left-color: var(--red); color: #ff8e90; }
.raid-list { display: grid; gap: 1rem; }
.raid-card { padding: 1.1rem 1.2rem; border-left: 4px solid var(--line); }
.raid-card.ongoing { border-left-color: var(--red); }
.raid-card.resolved { border-left-color: var(--green); }
.raid-card.stale { border-left-color: var(--brand); }
.raid-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem; }
.raid-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: var(--brand); }
.raid-dot.ongoing { background: var(--red); box-shadow: 0 0 0 4px rgba(237, 66, 69, .2); }
.raid-dot.resolved { background: var(--green); }
.raid-title { display: grid; }
.raid-title strong { font-size: 1.02rem; }
.raid-title .muted { font-size: .82rem; }
.raid-head .badge:last-child { margin-left: auto; }
.badge.sev-crit { color: #ff8e90; border-color: rgba(237, 66, 69, .5); background: rgba(237, 66, 69, .12); }
.badge.sev-high { color: #f6c453; border-color: rgba(240, 160, 32, .5); background: rgba(240, 160, 32, .12); }
.badge.sev-mid { color: var(--brand-text); }
.raid-diag { margin: .7rem 0; color: #c5cad3; font-size: .9rem; }
.raid-meta { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .4rem .9rem; font-size: .85rem; }
.raid-meta li { display: grid; gap: .1rem; }
.raid-meta .muted { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.raid-timeline { margin-top: .8rem; }
.raid-timeline summary { cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--brand-text); }
.raid-timeline ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; }
.raid-timeline li { display: flex; gap: .7rem; font-size: .84rem; padding: .35rem .6rem; background: var(--well); border-radius: .4rem; }
.raid-timeline .muted { white-space: nowrap; }

/* Votes : classement des serveurs */
.section { display: grid; gap: 1rem; padding: 1.3rem; margin-bottom: 1.2rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.section-head h2, .ranking h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; font-weight: 700; }
.section-head h2 .icon, .ranking h2 .icon { color: var(--brand); }
.section-tools { display: flex; align-items: center; gap: .6rem; }
.section-tools select { width: auto; max-width: 14rem; }
.vote-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .7rem; }
.vote-tile { display: grid; justify-items: center; gap: .3rem; padding: 1.1rem; border-radius: .6rem; border: 1px solid var(--line); text-align: center; }
.vote-tile strong { font-size: 1.6rem; font-weight: 700; }
.vote-tile span { font-size: .8rem; color: #c5cad3; }
.vote-tile.blue { background: rgba(88, 101, 242, .22); } .vote-tile.blue strong { color: var(--brand-text); }
.vote-tile.green { background: rgba(59, 165, 93, .22); } .vote-tile.green strong { color: #57d98a; }
.vote-tile.grey { background: var(--card-2); }
.vote-list { display: grid; gap: .6rem; }
.vote-row { display: flex; align-items: flex-start; gap: .9rem; padding: .9rem 1rem; background: var(--well); border: 1px solid var(--line); border-radius: .7rem; }
.rank { min-width: 2.2rem; font-weight: 800; font-size: 1.05rem; color: var(--brand-text); padding-top: .6rem; }
.vote-main { flex: 1; min-width: 0; display: grid; gap: .4rem; }
.vote-main p { color: #c5cad3; font-size: .88rem; overflow-wrap: anywhere; }
.chips.small .chip { padding: .15rem .6rem; border-radius: 1rem; font-size: .74rem; font-weight: 500; cursor: default; background: var(--brand-soft); border-color: transparent; color: #c9cffb; }
.vote-side { display: grid; justify-items: end; gap: .1rem; text-align: right; white-space: nowrap; }
.vote-side strong { font-size: 1.3rem; color: var(--brand-text); line-height: 1.1; }
.vote-side small { font-size: .72rem; }
.vote-side .btn { margin-top: .5rem; }
.ranking { display: grid; gap: .7rem; margin-top: 2.2rem; }
.ranking:empty { display: none; }

.board-head { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 1.5rem; }
.board-head h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.2rem; align-items: start; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.board li { display: flex; align-items: center; gap: .8rem; padding: .5rem .75rem; background: var(--well); border-radius: .5rem; }
.board .rank { padding: 0; min-width: 2.4rem; }
.board strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge.gold { color: #f6c453; border-color: rgba(240, 160, 32, .5); background: rgba(240, 160, 32, .12); margin-left: .5rem; }
.shop-items { display: grid; gap: .6rem; }
.shop-item { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; background: var(--well); border: 1px solid var(--line); border-radius: .7rem; }
.shop-item > div:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.shop-item p { font-size: .85rem; }
.shop-buy { display: grid; justify-items: end; gap: .4rem; white-space: nowrap; }
.shop-buy > strong { color: #f6c453; }
.section > .toast { margin: 0; }

/* Page serveur et avis */
.vote-name { text-decoration: none; color: inherit; }
.vote-name:hover strong { text-decoration: underline; }
.server-head { display: flex; gap: 1.2rem; align-items: flex-start; margin: 1rem 0 1.5rem; flex-wrap: wrap; }
.server-big { width: 5rem; height: 5rem; border-radius: 1rem; border: 2px solid var(--brand); object-fit: cover; background: var(--card-2); display: grid; place-items: center; font: 700 1.6rem var(--font); flex: none; }
.server-head > div { flex: 1; min-width: 0; display: grid; gap: .6rem; }
.server-head h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.server-desc { color: #c5cad3; max-width: 60ch; }
.server-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.stars { display: inline-flex; gap: .1rem; }
.stars .icon { width: 1em; height: 1em; color: #5b616c; fill: none; }
.stars .icon.on { color: #f6c453; fill: #f6c453; }
.star-pick { display: flex; gap: .3rem; margin: .4rem 0 .8rem; }
.star-pick .icon { width: 1.8rem; height: 1.8rem; color: #5b616c; cursor: pointer; }
.star-pick .icon.on { color: #f6c453; fill: #f6c453; }
.review-form { padding: 1.2rem; display: grid; gap: .6rem; margin-bottom: 1.5rem; }
.review-form h2 { font-size: 1.2rem; }
.review-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.reviews { display: grid; gap: .8rem; }
.reviews h2 { font-size: 1.3rem; }
.review-list { display: grid; gap: .7rem; }
.review { padding: .9rem 1rem; background: var(--well); border: 1px solid var(--line); border-radius: .7rem; }
.review-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.review-top .when { margin-left: auto; font-size: .78rem; }
.review p { color: #c5cad3; font-size: .92rem; overflow-wrap: anywhere; }

/* Fenêtre de configuration */
.overlay { position: fixed; inset: 0; z-index: 10; display: grid; justify-items: center; align-items: start; padding: clamp(.5rem, 2vw, 1.5rem); background: rgba(0, 0, 0, .65); overflow-y: auto; }
.modal { width: min(78rem, 100%); background: #1f2228; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .5); }
.modal.small { width: min(28rem, 100%); padding: 1.5rem; display: grid; gap: 1rem; justify-items: start; }
.modal-head { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; background: linear-gradient(180deg, #2a2e39, #23262d); }
.modal-head h2 { font-size: 1.3rem; font-weight: 700; }
.modal-head p { font-size: .8rem; margin-top: .2rem; }
.modal-icon { width: 3rem; height: 3rem; border-radius: .7rem; object-fit: cover; background: var(--card-2); display: grid; place-items: center; font-weight: 700; flex: none; }
.close { margin-left: auto; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .5rem; background: var(--card-2); color: var(--text); }
.modal-tools { display: flex; flex-wrap: wrap; gap: .6rem; padding: .9rem 1.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #1b1d22; }
.searchbox { flex: 1 1 14rem; display: flex; align-items: center; gap: .6rem; padding: 0 .85rem; background: var(--well); border: 1px solid var(--line); border-radius: .5rem; color: var(--muted); }
.searchbox input { flex: 1; border: 0 !important; background: transparent !important; padding: .6rem 0 !important; outline: none; }
.toast { display: block; margin: .9rem 1.5rem 0; padding: .6rem .85rem; border-radius: .5rem; background: rgba(59, 165, 93, .14); border: 1px solid rgba(59, 165, 93, .4); font-weight: 500; }
.toast.error { background: rgba(237, 66, 69, .12); border-color: rgba(237, 66, 69, .45); }
.toast:empty { display: none; }
.modal-body { display: grid; grid-template-columns: 14rem minmax(0, 1fr) 15rem; gap: 1.25rem; align-items: start; padding: 1.25rem 1.5rem 1.6rem; }
.cats { display: grid; gap: .25rem; padding: .7rem; background: #1a1c21; border-radius: .8rem; }
.cats .count, .cat-list .count, .feature .count { margin-left: auto; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cfg-panel { display: grid; gap: 1.1rem; align-content: start; min-width: 0; padding: 1.4rem; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: .9rem; }
.panel-title { display: flex; align-items: center; gap: .9rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.panel-title h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.panel-title .tile-icon { background: var(--card-2); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem; background: var(--well); border: 1px solid var(--line); border-radius: .55rem;
  color: var(--text); font: 600 .86rem var(--font); text-decoration: none; cursor: pointer; }
a.chip:hover, button.chip:hover { border-color: var(--accent); }
button.chip:disabled { opacity: .5; cursor: not-allowed; }
.chip .icon { color: var(--accent); }
.chip .dot { width: .5rem; height: .5rem; border-radius: 50%; background: #5b616c; }
.chip.on .dot { background: var(--green); }
.quick { display: grid; gap: .8rem; padding: 1rem 1.1rem; background: rgba(88, 101, 242, .09); border: 1px solid rgba(88, 101, 242, .45); border-radius: .8rem; --accent: var(--brand); }
.quick-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
.quick-head h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.quick-head h3 .icon { color: #f0a020; }
.tiles { display: grid; gap: 1rem; }
.sec-tile { grid-column: 1 / -1; align-items: stretch; text-align: left; gap: .4rem; }
.sec-head { display: flex; align-items: center; gap: .9rem; }
.sec-ring { width: 3.4rem; height: 3.4rem; flex: none; }
.sec-value { display: grid; line-height: 1.1; }
.sec-value strong { font-size: 1.5rem; }
.sec-value small { color: var(--muted); font-size: .78rem; }
.sec-label { font-weight: 600; font-size: .9rem; }
.sec-advice { margin-top: .3rem; }
.sec-advice ul { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.sec-advice li { font-size: .74rem; padding: .1rem .5rem; border-radius: 1rem; background: rgba(237, 66, 69, .14); color: #ff9c9e; }
.tile { display: grid; gap: .35rem; justify-items: center; padding: 1.3rem 1rem; background: var(--card-2); border-radius: .7rem; }
.tile strong { font-size: 1.5rem; font-weight: 700; color: #6d78f7; }
.tile span { color: #c5cad3; font-size: .85rem; }
.cat-list { display: grid; gap: .5rem; }
.cat-list a { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; background: var(--well); border: 1px solid var(--line); border-radius: .6rem; color: var(--text); text-decoration: none; }
.cat-list a:hover { border-color: var(--accent); }
.cat-list a > span:nth-child(2) { display: grid; }
.cat-list small { color: var(--muted); font-size: .78rem; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.history li { display: flex; flex-wrap: wrap; gap: .3rem .7rem; padding: .55rem .75rem; background: var(--well); border-radius: .5rem; font-size: .88rem; }
.facts { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; color: var(--muted); font-size: .88rem; }
.source { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; background: var(--well); border: 1px solid var(--line); border-radius: .6rem; }
.source strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.back { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .88rem; text-decoration: none; justify-self: start; }

/* Réglages d'un module */
.panel { min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.panel-head h2 { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; font-size: 1.25rem; font-weight: 700; }
.panel-head h2 > .icon { color: var(--accent); }
.panel > p { max-width: 65ch; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 1rem; font: 600 .74rem var(--font); color: var(--muted); white-space: nowrap; }
.badge .icon { width: 1em; height: 1em; }
.notice { background: var(--well); border: 1px solid var(--line); border-left: 3px solid #f0a020; border-radius: .5rem; padding: .7rem .9rem; max-width: 70ch; margin: .75rem 0 0; }
.fields { display: grid; gap: 1.1rem; margin: 1.3rem 0 0; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.field { display: grid; gap: .3rem; max-width: 34rem; }
.field > label, .field > span.label { font-weight: 600; font-size: .9rem; }
.field small { color: var(--muted); font-size: .8rem; }
.field.inline { grid-template-columns: auto 1fr; align-items: center; column-gap: .7rem; }
.field.inline small { grid-column: 2; }
.field.wide { max-width: none; }
h3.section { font-size: 1rem; font-weight: 700; margin: .8rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line); display: grid; gap: .25rem; }
h3.section small { font-weight: 400; font-size: .82rem; color: var(--muted); max-width: 60ch; }
.fields > h3.section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
input[type=text], input[type=number], select, textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: .45rem;
  background: var(--well); color: var(--text); font: 400 .92rem var(--font); }
input[type=number] { max-width: 9rem; }
input[type=color] { width: 3.5rem; height: 2.3rem; padding: 0; border: 1px solid var(--line); border-radius: .45rem; background: none; }
textarea { min-height: 6rem; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
.rows { display: grid; gap: .6rem; justify-items: start; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; width: 100%; padding: .7rem; border: 1px solid var(--line); border-radius: .5rem; background: rgba(0, 0, 0, .12); }
.row label { display: grid; gap: .2rem; flex: 1 1 11rem; font-size: .82rem; color: var(--muted); }
.row label.wide { flex-basis: 100%; }
.row textarea { min-height: 3.5rem; }
.switch { appearance: none; width: 2.7rem; height: 1.5rem; border-radius: 1rem; background: #5b616c; position: relative; cursor: pointer; margin: 0; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(1.2rem); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.power { display: flex; align-items: center; gap: .6rem; font-weight: 600; white-space: nowrap; }
.save { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.save output { font-weight: 600; }

/* Page d'accueil publique */
main.public { max-width: 72rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem); }
.hero { max-width: 46rem; padding: clamp(1rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 3rem); display: grid; gap: 1.2rem; justify-items: start; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.hero p { font-size: 1.08rem; color: #c5cad3; max-width: 60ch; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; }
.feature { display: grid; gap: .7rem; align-content: start; padding: 1.2rem; border-top: 3px solid var(--accent); }
.feature h2 { display: flex; align-items: center; gap: .7rem; font-size: 1.1rem; }

@media (max-width: 1000px) {
  .modal-body { grid-template-columns: minmax(0, 1fr); }
  .cats { display: flex; overflow-x: auto; }
  .cats a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .cats a[aria-current="page"] { border-bottom-color: var(--brand); }
  .cats .count { display: none; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
  .tile { padding: .8rem .4rem; }
}
@media (max-width: 760px) {
  main.dash { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .profile, .side-label { display: none; }
  .side nav { display: flex; overflow-x: auto; padding: .5rem; }
  .side nav a { white-space: nowrap; border-left: 0; }
  .side nav a > .icon:last-child { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-head { flex-direction: column; }
  .top { justify-content: space-between; }
  .vote-row, .shop-item { flex-wrap: wrap; }
  .shop-buy { justify-items: start; flex-basis: 100%; }
  .vote-side { justify-items: start; text-align: left; flex-basis: 100%; padding-left: 3.1rem; }
}
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

.site-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .9rem; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand-text); text-decoration: underline; }
