/* Thèmes. SOMBRE par défaut (aussi sans JavaScript) ; le choix du visiteur est mémorisé (static/theme.js : attribut data-theme sur <html>). */
:root, :root[data-theme="sombre"] {
  --bg: #17150f; --panel: #211e15; --text: #ece6d3; --muted: #9d9378;
  --line: #342f20; --accent: #d9b254; --accent-soft: #3a3016; --pos: #4cc77d; --neg: #ef6b5b;
  --radius: 12px; color-scheme: dark;
}
:root[data-theme="clair"] {
  --bg: #f6f3ea; --panel: #ffffff; --text: #2a2418; --muted: #8a8167;
  --line: #e7e0cb; --accent: #a9822a; --accent-soft: #f3e9c8; --pos: #1e8a4c; --neg: #c0392b;
  color-scheme: light;
}
:root[data-theme="ocean"] {
  --bg: #0e1620; --panel: #162231; --text: #e4ecf7; --muted: #8ea2bb;
  --line: #243449; --accent: #5aa9f5; --accent-soft: #1b3350; --pos: #4cc77d; --neg: #ef6b5b;
  color-scheme: dark;
}
:root[data-theme="foret"] {
  --bg: #0f1913; --panel: #16251b; --text: #e3efe5; --muted: #8fae98;
  --line: #243a2b; --accent: #7fcf6b; --accent-soft: #1f3a26; --pos: #5fd68a; --neg: #ef7a62;
  color-scheme: dark;
}
.theme-switch select { font: inherit; font-size: 0.85rem; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.theme-switch select:hover, .theme-switch select:focus-visible { border-color: var(--accent); outline: none; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand small { color: var(--accent); font-weight: 600; margin-left: 6px; }
nav a { color: var(--muted); padding: 8px 11px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
header nav { display: flex; flex-wrap: wrap; gap: 2px 0; }
nav a:hover { color: var(--text); text-decoration: none; }
nav a.on { color: var(--accent); background: var(--accent-soft); }

main { padding-top: 20px; padding-bottom: 32px; }
h1 { font-size: 1.6rem; margin: 8px 0 16px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; min-width: 0; overflow: hidden; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats .card { margin: 0; }
.stat { color: var(--muted); font-size: 0.85rem; }
.stat span { display: block; font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.grid2 .card { margin: 0; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-bottom: 8px; }
.grid4 .card { margin: 0; }
.grid4 h2 { font-size: 0.95rem; }
.small { font-size: 0.82rem; margin: -4px 0 6px; }

table { width: 100%; border-collapse: collapse; }
td, th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; white-space: nowrap; }
th a { color: var(--muted); }
th a.on { color: var(--accent); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { text-align: right; }
.rk { color: var(--muted); width: 36px; font-variant-numeric: tabular-nums; }
table.big { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.big tbody tr:hover { background: var(--accent-soft); }
.scroll { overflow-x: auto; }
.card.scroll { padding: 6px 10px; }

.tag { white-space: nowrap; background: var(--accent-soft); color: var(--accent); padding: 1px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.tag.tag-home { background: linear-gradient(135deg, #ffd54f, #ff9800); color: #2a1600; font-weight: 800; box-shadow: 0 0 0 1px #e65100, 0 0 8px rgba(255, 152, 0, .45); text-shadow: none; }   /* alliance de la chaîne (C6P) : bien visible, en thème clair comme sombre */
.tag:hover { text-decoration: none; filter: brightness(0.95); }
.pos { color: var(--pos); font-weight: 600; }
.neg { color: var(--neg); font-weight: 600; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
input, button {
  font: inherit; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text);
}
button { background: var(--accent); color: #fff; border-color: var(--accent); cursor: pointer; font-weight: 600; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 16px 0; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--panel); }
.pills a.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Listes d'événements : jamais plus larges que leur carte */
.evlist { list-style: none; margin: 0; padding: 0; }
.ev { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev-main { min-width: 0; }
.ev-name { font-weight: 600; overflow-wrap: anywhere; }
.ev-sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; overflow-wrap: anywhere; }
.nw { white-space: nowrap; }
.ev-delta { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.filters-group .pills { margin: 0 0 10px; }

.spark { width: 100%; height: 80px; color: var(--accent); }
.spark-legend { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }

footer { padding-top: 8px; padding-bottom: 24px; font-size: 0.85rem; }
@media (max-width: 600px) {
  h1 { font-size: 1.35rem; }
  td, th { padding: 7px 6px; }
}

/* ---------- Traceur ---------- */
.tfilters { display: flex; flex-direction: column; gap: 10px; }
.trow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.trow label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.trow input[type="search"] { flex: 1 1 200px; min-width: 0; }
.trow input[type="datetime-local"] { min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font-weight: 500; user-select: none; }
.chip input:checked + span { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.small0 { font-size: 0.82rem; margin: 0; }

.movetable td { vertical-align: top; }
.movetable .when { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.movetable .who { font-weight: 600; overflow-wrap: anywhere; }
.movetable .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.movetable .sub { color: var(--muted); font-size: 0.82rem; }
.movetable .what { white-space: nowrap; font-weight: 600; }
.movetable .ico { font-size: 1.1rem; }
.movetable .hunt { color: var(--pos); font-weight: 600; }
.movetable tr.scanrow td { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.85rem; padding: 6px 10px; }
.movetable tr.kind-steal .what { color: #d9822b; }
.movetable tr.kind-chain .what { color: #7b5bd6; }
.movetable tr.kind-war .what { color: var(--neg); }
.movetable tr.kind-ally .what { color: var(--pos); }
.movetable tr.kind-unknown .what { color: var(--muted); }
.method summary { cursor: pointer; font-weight: 600; }
.method ul { padding-left: 20px; }
.method p, .method li { margin: 6px 0; }

@media (max-width: 700px) {
  .movetable thead { display: none; }
  .movetable, .movetable tbody, .movetable tr, .movetable td { display: block; width: 100%; }
  .movetable tr { padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .movetable tr.scanrow { padding: 0; }
  .movetable td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 4.2rem 1fr; gap: 8px; text-align: left; }
  .movetable .cell { min-width: 0; }
  .movetable td.what::before, .movetable td.when::before { font-weight: 400; }
  .movetable td::before { content: attr(data-label); color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 3px; }
  .movetable tr.scanrow td { display: block; }
  .movetable tr.scanrow td::before { content: none; }
}
.movetable .approx { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }

/* ---------- Carte ---------- */
.mapwrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.mappanel { margin: 0; overflow: visible; }
.mappanel h2 { margin-top: 4px; }
.mappanel h2 ~ h2 { margin-top: 16px; }
.mappanel input[type="search"] { width: 100%; min-width: 0; }
.arow { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 2px 6px; align-items: center; margin-bottom: 10px; }
.arow .swatch { grid-column: 1; grid-row: 1; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); }
.arow .fld { grid-column: 2; grid-row: 1; min-width: 0; }
.arow input { min-width: 0; width: 100%; }
.arow .icon[title^="Centrer"] { grid-column: 3; grid-row: 1; }
.arow .icon[title="Retirer"] { grid-column: 4; grid-row: 1; }
.arow .hint { grid-column: 2 / -1; grid-row: 2; color: var(--muted); font-size: 0.78rem; min-height: 1em; }
.suggest { position: absolute; z-index: 30; left: 20px; right: 0; top: 44px; max-height: 280px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.suggest li { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.suggest li.on, .suggest li:hover { background: var(--accent-soft); }
.suggest li.none { color: var(--muted); cursor: default; }
.suggest .t { font-weight: 700; white-space: nowrap; }
.suggest .n { flex: 1; min-width: 0; color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .c { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
button.icon { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 4px 8px; line-height: 1; font-weight: 600; }
button.icon:hover { color: var(--accent); border-color: var(--accent); }
button.plus { width: 100%; background: var(--accent-soft); color: var(--accent); border: 1px dashed var(--accent); }
.mapinfo { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow-wrap: anywhere; }
.mapinfo div { margin: 2px 0; }
.mapopts { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 6px; }
.bgpick select { flex: 1; min-width: 0; font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.mapopts label { display: flex; align-items: center; gap: 8px; color: var(--text); }

.mapbox { position: relative; height: min(72vh, 760px); min-height: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mapbox canvas { display: block; touch-action: none; cursor: grab; }
.mapbox canvas:active { cursor: grabbing; }
.maptip { position: absolute; pointer-events: none; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-size: 0.85rem; box-shadow: 0 2px 8px rgba(0,0,0,.18); white-space: nowrap; }
.maptip .maptip-row { font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.maptip .maptip-row:first-of-type { margin-top: 3px; }
.mapctl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mapctl button { width: 36px; height: 36px; padding: 0; font-size: 1.1rem; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.mapctl button:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 860px) {
  .mapwrap { grid-template-columns: minmax(0, 1fr); }
  .mapbox { height: 62vh; }
}

/* ---------- Gestion de chaîne ---------- */
.logincard { max-width: 400px; margin: 32px auto; }
.logincard h1 { margin-top: 0; }
.logincard form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.logincard label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-weight: 500; }
.logincard input { width: 100%; }
.loginerror { background: rgba(192, 57, 43, 0.12); border: 1px solid var(--neg); color: var(--neg); padding: 8px 12px; border-radius: 8px; font-weight: 600; }

.chainhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chainhead h1 .tag { font-size: 0.9rem; vertical-align: middle; margin-left: 6px; }
button.textbtn { font-size: 0.9rem; padding: 6px 12px; }

.legend { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.legitem { display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; font-weight: 500; text-align: left; cursor: pointer; }
.legitem:hover { background: var(--accent-soft); }
.legitem .swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line); }
.legitem .legname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.legitem .legcount { color: var(--muted); font-variant-numeric: tabular-nums; }
.legitem.off { opacity: 0.45; }
.legitem.off .legname { text-decoration: line-through; }
.infolabel { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--muted); }
.infolabel select { flex: 1; min-width: 0; }

.chainlist { margin-top: 16px; }
.chainlisthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chainlisthead h2 { margin: 0; }
.chainlisthead input { flex: 0 1 260px; min-width: 0; }
.chaintable td, .chaintable th { vertical-align: middle; }
.sortbtn { background: transparent; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }
.sortbtn.on { color: var(--accent); }
.sortbtn.on::after { content: " " attr(data-dir); }
.namebtn { background: transparent; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.namebtn:hover { text-decoration: underline; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; box-shadow: 0 0 0 1px var(--line); vertical-align: middle; }
details.also { position: relative; }
details.also summary { list-style: none; cursor: pointer; padding: 5px 9px; border-radius: 8px; border: 1px dashed var(--line); color: var(--muted); font-size: 0.85rem; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
details.also summary::-webkit-details-marker { display: none; }
details.also summary.on { border-style: solid; color: var(--text); background: var(--panel); }
details.also .also-list { position: absolute; z-index: 20; right: 0; top: calc(100% + 4px); min-width: 230px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
details.also .also-list label { display: flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer; white-space: nowrap; }
details.also .also-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
details.also .also-list p { margin: 6px 0 0; max-width: 240px; white-space: normal; }
select.labelselect, .infolabel select { font: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); max-width: 100%; }

@media (max-width: 700px) {
  /* liste des membres : une petite fiche par joueur (nom + terrain, puis coordonnées + étiquette) */
  .chaintable, .chaintable tbody { display: block; width: 100%; }
  .chaintable thead { display: block; }
  .chaintable thead tr { display: flex; gap: 16px; padding: 4px 2px 8px; border-bottom: 1px solid var(--line); }
  .chaintable thead th { display: block; border: 0; padding: 0; }
  .chaintable thead th:nth-child(3) { display: none; }
  .chaintable tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); align-items: center; }
  .chaintable tbody td { border: 0; padding: 0; min-width: 0; }
  .chaintable tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .chaintable tbody td:nth-child(2) { grid-column: 2; grid-row: 1; text-align: right; }
  .chaintable tbody td:nth-child(3) { grid-column: 1; grid-row: 2; font-size: 0.85rem; }
  .chaintable tbody td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .chaintable tbody td[colspan] { grid-column: 1 / -1; }
}

/* ---------- Flèches de classement, inactifs ---------- */
.rk { white-space: nowrap; }
.rkd { display: inline-flex; align-items: center; gap: 1px; margin-left: 6px; font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: middle; }
.rkd.up { color: var(--pos); }
.rkd.down { color: var(--neg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.statlink { display: block; color: var(--muted); text-decoration: none; }
a.statlink:hover { border-color: var(--accent); text-decoration: none; }
.stat small { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.stat small.prov { color: var(--accent); }
.notice { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.badge { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 0.72rem; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }

.idlebtn { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--line); font-weight: 600; text-align: left; }
.idlebtn:hover:not(:disabled) { border-color: var(--accent); }
.idlebtn.on { background: var(--accent-soft); border-color: var(--accent); }
.idlebtn:disabled { opacity: 0.55; cursor: not-allowed; }
.idlebtn .swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line); }
.idlebtn .idlelabel { flex: 1; }
.idlebtn .legcount { color: var(--muted); font-variant-numeric: tabular-nums; }
.idlebadge { margin: 4px 0; font-weight: 600; }

.healthbar { background: rgba(192, 57, 43, 0.14); border-bottom: 1px solid var(--neg); color: var(--text); padding: 8px 0; font-size: 0.9rem; }
.healthbar code { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); user-select: all; }

.filternote { margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--line); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; }
button.linkbtn { background: transparent; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.mapempty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; color: var(--muted); font-weight: 600; text-align: center; padding: 20px; }

/* L'attribut hidden doit toujours gagner, même sur un élément qui a son propre « display » */
[hidden] { display: none !important; }

/* ---------- Demandes de ressources (compte Demeter) ---------- */
:root {
  --u-late: #7f1d1d; --u-critique: #e53935; --u-urgent: #fb8c00; --u-bientot: #f9c32e; --u-normal: #2e7d32; --u-done: #8a8167;
}
.chainhead .who { margin-right: 10px; font-size: 0.85rem; }
.rv-stats .withicon { display: inline-flex; align-items: center; gap: 8px; }
.rv-stats .withicon b { font-size: 1.6rem; }
.withicon img { vertical-align: middle; }
.rv-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }

.u-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; color: #fff; background: var(--u-normal); }
.u-chip.u-late { background: var(--u-late); }
.u-chip.u-critique { background: var(--u-critique); }
.u-chip.u-urgent { background: var(--u-urgent); color: #1b1b1b; }
.u-chip.u-bientot { background: var(--u-bientot); color: #1b1b1b; }
.u-chip.u-normal { background: var(--u-normal); }
.u-chip.u-done { background: var(--u-done); }

.rv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.rv-tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.rv-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.rv-tabs .count { display: inline-block; min-width: 1.4em; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; text-align: center; }
.rv-tabs .count:empty { display: none; }

.rv-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.rv-filters input { flex: 1 1 220px; min-width: 0; }
.rv-filters select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.rv-card { padding: 0; }
.rv-table th img.chrono { margin-right: 6px; vertical-align: middle; }
.rv-table td { vertical-align: middle; }
.rv-table .rv-row td:first-child { border-left: 6px solid transparent; }
.rv-row.u-row-late td:first-child { border-left-color: var(--u-late); }
.rv-row.u-row-critique td:first-child { border-left-color: var(--u-critique); }
.rv-row.u-row-urgent td:first-child { border-left-color: var(--u-urgent); }
.rv-row.u-row-bientot td:first-child { border-left-color: var(--u-bientot); }
.rv-row.u-row-normal td:first-child { border-left-color: var(--u-normal); }
.rv-row.u-row-done td:first-child { border-left-color: var(--u-done); }
.rv-row.u-row-late { background: color-mix(in srgb, var(--u-late) 14%, transparent); }
.rv-row.u-row-critique { background: color-mix(in srgb, var(--u-critique) 11%, transparent); }
.rv-row.u-row-urgent { background: color-mix(in srgb, var(--u-urgent) 11%, transparent); }
.rv-row.u-row-bientot { background: color-mix(in srgb, var(--u-bientot) 10%, transparent); }
.rv-order { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: .85rem; line-height: 1.45; }
.rv-rank { width: 40px; text-align: center; }
.rv-rank b { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 5px; border-radius: 99px; font-weight: 800; background: var(--line); color: var(--text); }
.rv-row.p-top td:first-child { border-left-color: #2e9e44; } .rv-row.p-top { background: color-mix(in srgb, #2e9e44 14%, transparent); } .rv-row.p-top .rv-rank b { background: #2e9e44; color: #fff; }
.rv-row.p-mid td:first-child { border-left-color: #f2b72b; } .rv-row.p-mid { background: color-mix(in srgb, #f2b72b 7%, transparent); } .rv-row.p-mid .rv-rank b { background: #f2b72b; color: #3a2e00; }
.rv-row.p-low td:first-child { border-left-color: var(--line); }
.rv-row.p-wait, .rv-row.p-ign { opacity: .72; } .rv-row.p-ign { font-style: italic; }
.rv-tdp .gap { color: #e5534b; font-weight: 700; } .rv-tdp .ok { color: #2e9e44; font-weight: 700; }
.rv-encours { margin-top: 3px; color: #c98a00; }
.rv-prodok { margin-top: 3px; color: #2e9d55; font-weight: 600; }
.rv-prod { margin-top: 3px; color: #8fb3d9; }
.rv-tcatw { margin: 3px 0 1px; }
.rv-tcat { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.rv-tcat.t-vide { background: #3d1f1f; color: #ff8a80; border-color: #8e3b3b; }
.rv-tcat.t-auj { background: #3a2a10; color: #ffb74d; border-color: #8a5a1a; }
.rv-tcat.t-24 { background: #1f2d3d; color: #90caf9; border-color: #2f4f75; }
.rv-tcat.t-48 { background: #23272e; color: #a0a8b4; border-color: #3c434d; }
.rv-tcat.t-unk { background: #23272e; color: #a0a8b4; border-color: #3c434d; border-style: dashed; }
.rv-file { margin-top: 3px; color: #58a6ff; }
.rv-file.idle { color: #3fb950; }
.rv-file.unk { color: var(--muted, #8b949e); font-style: italic; }
.rv-file-it { padding-left: 14px; }
.rv-row.fresh { animation: rvflash 2.4s ease-out 2; }
@keyframes rvflash { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 40% { box-shadow: inset 0 0 0 3px var(--accent); } }
.rv-who { font-weight: 700; overflow-wrap: anywhere; }
.rolebadge { display: inline-block; margin-top: 2px; padding: 0 8px; border-radius: 999px; color: #fff; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.rv-time { font-variant-numeric: tabular-nums; }
.rv-empty { padding: 18px; text-align: center; }
.rv-actions-cell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rv-actions-cell .muted { flex-basis: 100%; }

.rv-btn { font: inherit; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.rv-btn:hover:not(:disabled) { border-color: var(--accent); }
.rv-btn:disabled { opacity: 0.6; cursor: wait; }
.rv-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rv-btn.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.rv-btn.ghost { background: transparent; color: var(--muted); }

.rv-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.5); }
.rv-dialog { width: min(480px, 100%); max-height: 90vh; overflow: auto; padding: 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.rv-dialog h2 { margin-top: 0; }
.rv-recap { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.rv-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.rv-error { color: var(--neg); font-weight: 600; }
.rv-code { margin: 10px 0; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--accent); font: 700 1.5rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; text-align: center; user-select: all; }
.rv-steps { padding-left: 20px; } .rv-steps li { margin: 6px 0; }
.rv-copy { display: flex; gap: 8px; margin-top: 6px; } .rv-copy input { flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .rv-table thead { display: none; }
  .rv-table, .rv-table tbody, .rv-table tr, .rv-table td { display: block; width: 100%; }
  .rv-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); border-left: 6px solid transparent; }
  .rv-row.u-row-late { border-left-color: var(--u-late); } .rv-row.u-row-critique { border-left-color: var(--u-critique); }
  .rv-row.u-row-urgent { border-left-color: var(--u-urgent); } .rv-row.u-row-bientot { border-left-color: var(--u-bientot); }
  .rv-row.u-row-normal { border-left-color: var(--u-normal); } .rv-row.u-row-done { border-left-color: var(--u-done); }
  .rv-table td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 7.2rem 1fr; gap: 8px; text-align: left; }
  .rv-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 3px; }
  .rv-table td.num { text-align: left; }
  .rv-table .rv-row td:first-child { border-left: 0; }
  .rv-actions-cell { display: flex; }
}

/* tableau des demandes : cellules resserrées pour que les actions restent visibles */
.rv-table td, .rv-table th { padding: 8px 8px; }
.rv-table .u-chip { font-size: 0.72rem; padding: 2px 8px; }
.rv-actions-cell { flex-direction: column; align-items: stretch; gap: 4px; min-width: 96px; }
.rv-actions-cell .rv-btn { padding: 5px 10px; font-size: 0.85rem; text-align: center; }
@media (max-width: 900px) { .rv-actions-cell { flex-direction: row; } }

.rv-table .cell { min-width: 0; }

/* ---------- Optimiseur XP ---------- */
.xp-head p { margin-top: -6px; }
.xp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; border-bottom: 1px solid var(--line); }
.xp-tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.xp-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.xp-panel .card { margin-bottom: 14px; }
.xp-panel h3 { margin: 14px 0 6px; font-size: 1rem; }
.xp-panel textarea { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 0.85rem/1.4 ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.xp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.xp-btn { font: inherit; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.xp-btn:hover { border-color: var(--accent); } .xp-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; } .xp-btn.ghost { background: transparent; color: var(--muted); }
.xp-status { min-height: 1.4em; margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
.xp-status.ok { color: var(--pos); } .xp-status.ko { color: var(--neg); font-weight: 600; } .xp-status .warn { color: #b7791f; font-weight: 600; }
.xp-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.xp-table th, .xp-table td { padding: 5px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.xp-table th.num, .xp-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.xp-table thead th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.xp-table tfoot th, .xp-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.xp-table input { width: 100%; min-width: 7rem; max-width: 11rem; text-align: right; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.xp-table td.changed { color: var(--accent); font-weight: 700; } .xp-table td.okcell { color: var(--pos); } .xp-table tr.off { opacity: 0.4; }
.xp-table.compact { width: auto; min-width: 220px; }
.xp-levels { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 12px; }
.xp-levels label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.xp-levels input { width: 6rem; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; text-align: right; }
.xp-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.xp-metric { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--line); }
.xp-metric.big { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.xp-m-label { font-size: 0.78rem; color: var(--muted); } .xp-m-value { font-size: 1.15rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.xp-metric.big .xp-m-value { font-size: 1.45rem; } .xp-m-hint { font-size: 0.74rem; color: var(--muted); }
.xp-badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: #fff; }
.xp-badge.ok { background: var(--pos); } .xp-badge.ko { background: var(--neg); }
.xp-alerts { display: grid; gap: 6px; margin-top: 12px; }
.xp-alert { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }
.xp-alert.ok { background: color-mix(in srgb, var(--pos) 10%, transparent); } .xp-alert.ko { background: color-mix(in srgb, var(--neg) 12%, transparent); border-color: var(--neg); }
.xp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; margin: 8px 0; }
.xp-form label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 0.88rem; } .xp-form label small { color: var(--muted); font-weight: 400; }
.xp-form input { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.xp-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.xp-combo { max-height: 360px; overflow: auto; }
.xp-gridwrap { max-height: 540px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.xp-grid { border-collapse: separate; border-spacing: 0; font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.xp-grid th, .xp-grid td { padding: 3px 6px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: right; white-space: nowrap; }
.xp-grid thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; } .xp-grid tbody th { position: sticky; left: 0; background: var(--panel); z-index: 1; }
.xp-grid .corner { left: 0; z-index: 3; } .xp-grid td.hit { background: var(--accent); color: #fff; font-weight: 700; } .xp-grid tbody tr:hover td { background: var(--accent-soft); }
.tools { margin: 0 0 14px; } .toollink { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; border-color: var(--accent); }
.toollink:hover { background: var(--accent-soft); } .tool-ico { font-size: 1.9rem; }

/* ---------- Fiches des membres (page de Hades) ---------- */
.pf { margin-top: 18px; }
.pf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 12px; }
.pf-bar label { font-weight: 700; }
.pf-bar select { font: inherit; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); min-width: 14rem; }
.pf-members { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-member { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.pf-member:hover { border-color: var(--accent); } .pf-member.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent) inset; }
.pf-member small { font-size: 0.74rem; }
.pf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--u-done); flex: none; } .pf-dot.fresh { background: var(--pos); } .pf-dot.stale { background: var(--u-urgent); }
.pf-detail { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; } .pf-head h3 { margin: 0; font-size: 1.3rem; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.pf-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--panel); }
.pf-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; } .pf-card-head h3 { margin: 0; font-size: 1.02rem; }
.pf-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pf-metric { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); } .pf-metric strong { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.pf-metric img { vertical-align: middle; }
.pf-bar-track { height: 8px; min-width: 90px; border-radius: 999px; background: var(--line); overflow: hidden; } .pf-bar-fill { height: 100%; background: var(--accent); }
.pf-missing { margin: 4px 0; } .pf-foot { margin: 6px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); }

/* fiches : tableaux resserrés pour que toutes les colonnes tiennent dans la carte */
.pf-card .xp-table { font-size: 0.82rem; }
.pf-card .xp-table th, .pf-card .xp-table td { padding: 3px 6px; }
.pf-card .xp-table td:first-child, .pf-card .xp-table th:first-child { white-space: normal; }
.pf-grid { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

/* ---------- Sélecteur de page (Hades : chaîne <-> demandes) ---------- */
.pageswitch { display: inline-flex; gap: 4px; padding: 4px; margin: 6px 0 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--line); flex-wrap: wrap; }
.pageswitch a { padding: 7px 16px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; }
.pageswitch a:hover { color: var(--text); }
.pageswitch a.on { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.pageswitch .count { display: inline-block; min-width: 1.4em; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--neg); color: #fff; font-size: 0.78rem; text-align: center; }

/* ---------- Top / Flop de l'accueil ---------- */
.topflop, .tabbed { margin: 14px 0; }
.tf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tf-head h2 { margin: 0; }
.tf-switch { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--line); }
.tf-switch button { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.tf-switch button.on { background: var(--accent); color: #fff; }
.tf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px 24px; }
.tf-cols h3 { margin: 12px 0 6px; font-size: 1rem; }
.tf-partial { margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--u-urgent) 14%, transparent); font-size: 0.85rem; }
.evlist.ranked .ev { align-items: center; }
.evlist .ev .rk { flex: none; width: 1.7em; text-align: right; margin-right: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tf-period[hidden] { display: none; }
.evlist.ranked .ev .ev-main { flex: 1; min-width: 0; }
.rv-actions-cell { min-width: 112px; } .rv-actions-cell .rv-btn { white-space: nowrap; }

/* ---------- Blocs repliables ---------- */
.collapse-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.collapse-head h2 { margin: 0; }
.chainlisthead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chainlisthead h2 { margin-right: auto; }
.collapse-btn { font: inherit; font-size: 0.85rem; font-weight: 600; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; white-space: nowrap; }
.collapse-btn:hover { border-color: var(--accent); color: var(--text); }
.chainlist.collapsed .chainlisthead input { display: none; }
.card.collapsed { padding-bottom: 12px; }

/* fiches : activités en cours */
.pf-act th { text-align: left; white-space: nowrap; font-weight: 600; width: 1%; }
.pf-timer { font-variant-numeric: tabular-nums; font-weight: 700; } .pf-timer.done { color: var(--muted); font-weight: 400; }
.pf-targets a { color: var(--accent); font-weight: 600; }
.pf-live { font-size: 0.95rem; }
.pf-sortval { font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.pf-stale { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--u-urgent) 14%, transparent); font-size: 0.82rem; }

/* ---------- Ennemis ---------- */
.en-form { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.en-form label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 0.88rem; }
.en-form label.chk { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.en-form input[type=text], .en-form input[type=number] { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; min-width: 12rem; }
.en-form input[type=number] { min-width: 6rem; width: 6rem; }
.en-me h2 { margin-bottom: 2px; } .en-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.en-stats div { padding: 8px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--muted); font-size: 0.85rem; } .en-stats span { display: block; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.en-error { color: var(--neg); font-weight: 600; } .en-name { font-weight: 700; }
.df { font-size: 0.72rem; font-weight: 700; margin-left: 4px; vertical-align: super; line-height: 0; font-variant-numeric: tabular-nums; }
.df.pos { color: var(--pos); } .df.neg { color: var(--neg); } .df.nul { color: var(--muted); font-weight: 400; }

/* ---------- Analyse RC ---------- */
.rc-combos { display: flex; flex-wrap: wrap; gap: 6px; } .rc-chip { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; }
.xp-panel select { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }

/* Analyse RC : deux tableaux d'armées côte à côte, compacts pour que les cinq colonnes tiennent */
.rc-two { grid-template-columns: repeat(auto-fit, minmax(470px, 1fr)); }
.rc-two .xp-table th, .rc-two .xp-table td { padding: 3px 6px; font-size: 0.8rem; }
.rc-two .xp-table td:first-child, .rc-two .xp-table th:first-child { white-space: normal; }

.rv-manual { color: var(--accent); font-weight: 600; }
.rv-ok { color: #2e9e44; font-weight: 700; }
.rv-ko { color: #d64545; font-weight: 700; }

/* ---------- Page Installation ---------- */
.nav-install { background: var(--accent); color: #fff !important; border-radius: 8px; font-weight: 700; }
.nav-install:hover { filter: brightness(1.08); }
.nav-stats, nav a.nav-stats.on { background: #2f7fd1; color: #fff !important; border-radius: 8px; font-weight: 700; } .nav-stats:hover { filter: brightness(1.08); } nav a.nav-stats.on { box-shadow: inset 0 -3px 0 rgba(255,255,255,.55); }
.inst { max-width: 52rem; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.inst h1 { margin: 4px 0 0; } .inst h2 { margin: 0; } .inst h3 { margin: 0 0 4px; font-size: 1.05rem; }
.inst-eyebrow { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.inst-lead { color: var(--muted); font-size: 1.05rem; max-width: 40rem; margin: 8px 0 0; }
.inst-needs { list-style: none; counter-reset: need; padding: 0; margin: 10px 0 14px; display: grid; gap: 10px; }
.inst-needs li { counter-increment: need; display: grid; grid-template-columns: 2rem 1fr; gap: 2px 12px; align-items: start; }
.inst-needs li::before { content: counter(need); grid-row: span 2; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
.inst-needs span { color: var(--muted); }
.inst-link { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent); margin: 10px 0 4px; }
.inst-link-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.inst-copyrow { display: flex; gap: 8px; align-items: center; } .inst-copyrow.wrap { flex-wrap: wrap; margin: 6px 0; }
.inst-url { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 0.85rem ui-monospace, Menlo, Consolas, monospace; }
.inst-path { padding: 4px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font: 0.85rem ui-monospace, Menlo, Consolas, monospace; }
.inst-copy { font: inherit; font-size: 0.85rem; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; }
.inst-copy:hover { border-color: var(--accent); }
.inst-btn { align-self: flex-start; display: inline-block; padding: 9px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.inst-btn:hover { filter: brightness(1.1); }
.inst-note { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.inst-choose { margin: 8px 0 -6px; }
.inst-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.inst-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.inst-tab small { color: var(--muted); } .inst-tab:hover { border-color: var(--accent); }
.inst-tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.inst-panel { display: flex; flex-direction: column; gap: 14px; } .inst-panel[hidden] { display: none; }
.inst-intro { font-size: 1.05rem; margin: 0; }
.inst-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px; }
.inst-steps > li { counter-increment: step; position: relative; padding: 14px 16px 14px 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.inst-steps > li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); font-weight: 700; display: grid; place-items: center; }
.inst-steps > li p { margin: 4px 0 0; }
.inst-steps > li.inst-key { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.inst-steps > li.inst-key::before { background: var(--accent); color: #fff; }
.inst-steps > li.inst-code { border-style: dashed; }
.inst-steps code, .inst-note code, .inst-panel code { padding: 1px 6px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line); font-size: 0.88em; }
.inst-option { display: flex; flex-direction: column; gap: 10px; } .inst-option-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inst-tag { padding: 2px 10px; border-radius: 999px; background: var(--u-normal); color: #fff; font-size: 0.78rem; font-weight: 700; } .inst-tag.paid { background: var(--u-urgent); color: #1b1b1b; }
.inst-divider { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.inst-warn { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--u-urgent) 16%, transparent); border: 1px solid var(--u-urgent); }
.inst-help details { border-top: 1px solid var(--line); padding: 10px 0; } .inst-help summary { cursor: pointer; font-weight: 600; } .inst-help details > div { margin-top: 8px; color: var(--text); }
.inst-help ul { margin: 6px 0; padding-left: 20px; }
@media (max-width: 560px) { .inst-steps > li { padding-left: 48px; } .inst-steps > li::before { left: 10px; } .inst-copyrow:not(.wrap) { flex-wrap: wrap; } }

/* ---------- Accès à la gestion de chaîne ---------- */
.gate-msg { margin: 14px 0; padding: 18px 20px; border-radius: 12px; background: color-mix(in srgb, var(--u-urgent) 16%, transparent); border: 1px solid var(--u-urgent); font-size: 1.25rem; font-weight: 700; text-align: center; }
.gate-admin { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; } .gate-admin summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.gate-admin form { margin-top: 10px; }


/* ---------- Page d'accès : carte et classement des chasseurs ---------- */
.logincard.wide { max-width: 64rem; }
.gate-mapbox { height: min(52vh, 460px); margin: 8px 0; }
.gate-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 8px; font-size: 0.88rem; color: var(--muted); }
.gate-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.hunt { margin: 14px 0; }
.hunt-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 22px; }
.hunt-cols h3 { margin: 8px 0 6px; font-size: 1rem; }
.hunt-list { list-style: none; margin: 0; padding: 0; }
.hunt-list li { display: grid; grid-template-columns: 2rem 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); }
.hunt-list li.zero { color: var(--muted); } .hunt-list .rk { text-align: center; color: var(--muted); } .hunt-list .nm { font-weight: 600; } .hunt-list .val { font-variant-numeric: tabular-nums; }

/* ---------- Convois ---------- */
.cv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin: 14px 0; }
.cv-live { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; } .cv-live li { padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--line); }
.cv-amounts { color: var(--muted); }
#panel-convois .card { margin: 14px 0; }

/* couleurs des chaînes (traits de la carte) */
.chainkey-title { margin: 14px 0 6px; font-size: 0.95rem; }
.chainkey li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; font-size: 0.92rem; }
.chainline { display: inline-block; width: 22px; height: 4px; border-radius: 2px; }
.gate-key i.line { width: 18px; height: 4px; border-radius: 2px; }

/* ---------- version du script (page Installation) ---------- */
.inst-version { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.inst-version.ok { background: color-mix(in srgb, var(--u-normal) 14%, transparent); border-color: var(--u-normal); }
.inst-version.old { background: color-mix(in srgb, var(--u-urgent) 18%, transparent); border-color: var(--u-urgent); }
.inst-version .inst-btn[hidden] { display: none; }
/* bonnet d'âne du classement des chasseurs ; carte sous les tickets */
.hunt-list .dunce { vertical-align: middle; height: 24px; width: auto; }
.ravito-map { margin: 18px 0; }

.home-update { margin: 0 0 14px; }
.home-update[hidden] { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* en-tête : nom du site + sélecteur de thème sur la première ligne, menu complet sur la seconde */
.top .bar .brand { order: 1; } .top .bar .theme-switch { order: 2; margin-left: auto; } .top .bar nav { order: 3; flex: 1 1 100%; }

/* Historique des changements : nature du mouvement (chasse, flood, guerre…) */
.ev-move { margin-top: 3px; font-size: 0.85rem; overflow-wrap: anywhere; }
.mvbadge { display: inline-block; padding: 0 8px; border-radius: 999px; font-weight: 600; font-size: 0.78rem; background: var(--accent-soft); color: var(--accent); }
.ev-move.kind-chain .mvbadge { background: rgba(123, 91, 214, .18); color: #9a80ec; }
.ev-move.kind-war .mvbadge, .ev-move.kind-steal .mvbadge { background: rgba(220, 70, 70, .16); color: var(--neg); }
.ev-move.kind-hunt .mvbadge { background: rgba(60, 180, 90, .16); color: var(--pos); }

/* Page Diplomatie */
.diplo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.rel-list li:first-child { border-top: 0; }
.rel-list .vs { color: var(--muted); font-weight: 600; }
.rel-list .when { margin-left: auto; color: var(--muted); font-size: 0.82rem; }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 6px 0 6px 10px; }
.tl li::before { content: ""; position: absolute; left: -20px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.tl li.start-war::before { background: var(--neg); }
.tl li.start-pact::before { background: var(--pos); }
.tl .when { color: var(--muted); font-size: 0.82rem; margin-right: 8px; }

.ptype { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: .03em; vertical-align: middle; border: 1px solid transparent; }
.ptype-pt { background: #1d3b25; color: #8fe0a2; border-color: #2f6b3d; }
.ptype-pna { background: #4a3413; color: #f5c577; border-color: #7a5a22; }
:root[data-theme="light"] .ptype-pt { background: #d8f0dc; color: #1b6b2a; border-color: #8cc79a; }
:root[data-theme="light"] .ptype-pna { background: #fde7c4; color: #8a4b00; border-color: #e2b46a; }
.ptype-legend { font-size: 0.75rem; font-weight: 400; color: var(--muted); margin-left: 8px; }

.ptag { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; vertical-align: middle; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }

.linkedit { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.linkedit button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.linkedit button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.inst-gate { border-left: 4px solid #d7c284; margin-bottom: 14px; } .inst-gate p { margin: 6px 0 0; }

a.rv-btn { display: inline-flex; align-items: center; text-decoration: none; }

.cv-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.cv-fold > summary::-webkit-details-marker { display: none; }
.cv-fold > summary::before { content: "▾"; color: #8a7a52; font-size: 14px; }
.cv-fold:not([open]) > summary::before { content: "▸"; }
.cv-fold > summary h2 { margin: 0; display: inline; }
.cv-fold[open] > summary { margin-bottom: 8px; }

.rv-actions-cell { display: table-cell; }
.rv-act { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; max-width: 230px; }
.rv-act .muted { flex-basis: 100%; }
.rv-act .rv-btn { padding: 4px 9px; font-size: 13px; border-radius: 7px; white-space: nowrap; text-decoration: none; }
.rv-table td, .rv-table th { padding-left: 8px; padding-right: 8px; }

.hunted-grid { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 6px; } .hunted-grid b { font-size: 1.2em; }

/* Onglets de la page d'administration + Gestion chaîne */
.chtabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line, #8884); }
.chtabs button { background: none; border: 1px solid transparent; border-bottom: 0; padding: 7px 14px; border-radius: 8px 8px 0 0; cursor: pointer; font: inherit; color: inherit; opacity: .7; }
.chtabs button.on { opacity: 1; font-weight: 600; border-color: var(--line, #8884); background: var(--card, #8881); }
.need-big { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; }
.need-score { font-size: 2em; font-weight: 700; } .need-score.ok { color: #2e9e4f; } .need-score.mid { color: #d98a00; } .need-score.low { color: #d33; }
.need-sub { opacity: .8; }
.need-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.need-table td { vertical-align: top; } .need-table .tdp-sum { font-size: 1.1em; text-align: center; }
.tdp-range { display: inline-flex; gap: 4px; } .tdp-range button { padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line, #8886); background: none; color: inherit; cursor: pointer; }
.tdp-range button.on { background: var(--accent, #4363d8); color: #fff; border-color: transparent; }
.tdp-chips { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0; }
.tdp-chip { padding: 2px 9px; border-radius: 99px; border: 1px solid var(--c, #8886); background: none; color: inherit; cursor: pointer; font-size: 12px; opacity: .6; }
.tdp-chip.on { background: var(--c); color: #fff; opacity: 1; }
.tdp-svg { width: 100%; height: auto; max-height: 340px; } .tdp-svg text { font-size: 10px; fill: currentColor; opacity: .7; } .tdp-svg .grid { stroke: currentColor; opacity: .15; }
.chaindef { margin-top: 10px; } .cd-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.cd-list > span { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid #8884; border-radius: 99px; }
.cd-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.cd-del { background: none; border: 0; color: #d33; cursor: pointer; padding: 0 2px; }
.tdp-chip.nodata { border-style: dashed; opacity: .4; }
.tdp-chips { margin: 10px 0 4px; }
.pf-prod { margin-top: 2px; }

/* Page joueur : RC, données de combat, historique repliable */
.rc-row { margin: 16px 0; }
#rc-text { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.rc-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; display: grid; gap: 6px; }
.rc-list li { padding: 6px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.rc-link { font-weight: 600; }
.rc-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.rc-modal[hidden] { display: none; }
.rc-dialog { position: relative; width: min(760px, 100%); max-height: 86vh; overflow: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.rc-dialog h3 { margin: 0 34px 4px 0; }
.rc-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.rc-close:hover { color: var(--text); background: var(--bg); }
.rc-body { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: 0.95rem; }
body.rc-lock { overflow: hidden; }
.ev-clip { max-height: 260px; overflow: hidden; }
.ev-more { display: block; margin: 6px auto 0; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 2px 16px; font-size: 0.8rem; cursor: pointer; }
.ev-more:hover { color: var(--text); }
.ev-more[hidden] { display: none; }
.ev[hidden] { display: none; }
.ev-filters { margin: 6px 0 10px; }
.ev-filters .chip span { padding: 3px 10px; font-size: 0.85rem; }
.ev-filters small { opacity: .7; margin-left: 2px; }

/* Carte : étiquettes de joueurs filtrables, alliance par alliance */
.arow .tagchips { grid-column: 2 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tagchip { padding: 2px 8px; font-size: 0.75rem; line-height: 1.4; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.tagchip:hover { border-color: var(--muted); }
.tagchip.on { background: var(--accent, #3a62e0); border-color: var(--accent, #3a62e0); color: #fff; }

.sec-alert { border-left: 4px solid #c0392b; }
.sec-item { padding: 8px 0; border-top: 1px solid var(--line, #ddd); display: grid; gap: 4px; }
.sec-item code { word-break: break-all; }
.sec-blocked { color: #c0392b; font-weight: 700; margin-left: 6px; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* patch notes */
.pn { max-width: 860px; margin: 0 auto; }
.pn-new input, .pn-new textarea { width: 100%; box-sizing: border-box; margin: 6px 0; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line, #8884); background: var(--card, transparent); color: inherit; }
.pn-actions { display: flex; align-items: center; gap: 12px; }
.pn-note summary { cursor: pointer; }
.pn-text { white-space: pre-wrap; margin-top: 10px; line-height: 1.5; }
.pn-del { margin-top: 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.pn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.pn-bar button { font: inherit; font-size: .9rem; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line, #8886); background: transparent; color: inherit; cursor: pointer; }
.pn-bar button:hover { background: #8883; }
.pn-bar .pn-c { width: 24px; height: 24px; padding: 0; border-radius: 50%; }
.pn-sep { width: 1px; height: 22px; background: #8885; margin: 0 4px; }
.pn-text .al-c { text-align: center; } .pn-text .al-r { text-align: right; }
.pn-text .pn-h { display: block; font-size: 1.15rem; margin: 10px 0 4px; } .pn-text .pn-small { font-size: .82rem; opacity: .8; }
.hunt-list .nm a { color: inherit; text-decoration: none; } .hunt-list .nm a:hover { text-decoration: underline; }
.pf-offline { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pf-offline h4 { margin: 0 0 4px; font-size: 0.95rem; }
.ptag-deathnote { background: #5a0d0d; color: #ffd9d9; border-color: #c62828; }
.pt-flag { display: inline-flex; align-items: center; gap: 4px; margin: 0 10px 0 6px; font-weight: 600; }
.pf-offline { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rv-row.drag { opacity: .45; }
.rv-row.over td { box-shadow: inset 0 3px 0 var(--accent, #2a6df4); }
.rv-table .rv-row[draggable="true"] { cursor: grab; }
.pf-ghist { margin-top:.6rem; } .pf-ghist summary { cursor:pointer; font-weight:600; }
.alert-red { border: 2px solid #c62828; background: #3b1010; color: #ffd9d9; } .alert-red h2 { color: #ff8a80; margin-top: 0; } :root[data-theme="clair"] .alert-red { background: #fdecea; color: #7f0000; } :root[data-theme="clair"] .alert-red h2 { color: #b71c1c; }
.rc-del { background: none; border: 0; cursor: pointer; padding: 0 4px; opacity: .7 } .rc-del:hover { opacity: 1 }

/* Onglet « Ressources de l'alliance » */
.ares-tabs, .ares-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; align-items: center; }
.ares-tab, .ares-pill { border: 1px solid var(--line); background: var(--panel); color: inherit; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; }
.ares-tab.on, .ares-pill.on { background: var(--accent, #2a6df4); color: #fff; border-color: transparent; }
.ares-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ares-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ares-kpi b { font-size: 1.05rem; }
.ares-svg { width: 100%; height: auto; color: inherit; }
.ares-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 10px; font-size: .85rem; }
.ares-key i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; }
.ares-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; }
.ares-chk { white-space: nowrap; cursor: pointer; }
.ares-table th.sortable { cursor: pointer; }
/* Membres : 11 colonnes visibles sans défilement latéral (police réduite, montants sur deux lignes : nourriture puis matériaux) */
.ares-compact { font-size: .74rem; }
.ares-compact th { white-space: normal; line-height: 1.2; padding: 5px 5px; vertical-align: bottom; }
.ares-compact td { padding: 4px 5px; white-space: pre-line; line-height: 1.25; }
.ares-compact td.ares-neg { color: #e5533d; } .ares-compact td.ares-pos { color: #2e9e44; }

/* Accueil : graphiques par membre actif (couleurs du thème, sombre par défaut) */
.hc h2 { margin-top: 0; }
.hc-periods { display: flex; gap: 6px; margin: 0 0 10px; }
.hc-per { font: inherit; font-size: .85rem; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.hc-per.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.hc-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; min-width: 0; }
.hc-card h3 { margin: 0 0 2px; font-size: 1rem; }
.hc-sub, .hc-note { margin: 0 0 8px; font-size: .8rem; color: var(--muted); }
.hc-two { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.hc-two .hc-card { margin-bottom: 0; }
@media (max-width: 800px) { .hc-two { grid-template-columns: 1fr; } }
.hc-svg { width: 100%; height: auto; display: block; }
.hc-grid { stroke: var(--line); stroke-width: 1; }
.hc-zero { stroke: var(--muted); stroke-width: 1; }
.hc-tick { fill: var(--muted); font-size: 11px; }
.hc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; font-size: .85rem; }
.hc-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; }
.hc-bars { display: grid; gap: 8px; }
.hc-bar { display: grid; grid-template-columns: 84px 1fr auto; gap: 8px; align-items: center; font-size: .9rem; }
.hc-bn.me { color: var(--accent); font-weight: 600; }
.hc-track { background: var(--line); border-radius: 4px; height: 14px; overflow: hidden; }
.hc-track i { display: block; height: 100%; border-radius: 4px; }
.hc-bv { font-variant-numeric: tabular-nums; }
.hc-sel { font: inherit; font-size: .85rem; margin: 2px 0 8px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.hc-key { display: inline-flex; align-items: center; gap: 2px; }
.hc-x { font: inherit; line-height: 1; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: var(--neg); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s; }
.hc-key:hover .hc-x, .hc-x:focus-visible { opacity: 1; }
@media (hover: none) { .hc-x { opacity: .7; } }
.hc-plus { font: inherit; line-height: 1; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px dashed var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.hc-plus:hover { background: var(--accent-soft); }
.hc-reset { font: inherit; font-size: .8rem; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
.hc-add { margin: 0; }
.ares-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.ares-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.chainlisthead select { font: inherit; font-size: .85rem; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.hc-plot { position: relative; }
.hc-rule { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.hc-hot { stroke: var(--panel); stroke-width: 2; pointer-events: none; }
.hc-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; box-shadow: 0 6px 18px rgba(0,0,0,.35); white-space: nowrap; }
.hc-tip-h { font-size: .85rem; font-weight: 600; }
.hc-tip-h i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.hc-tip-v { font-variant-numeric: tabular-nums; font-size: 1rem; }
.hc-tip-d { font-size: .75rem; color: var(--muted); }
.hc-duelper { margin: 2px 0 8px; }

/* Classements C6P : légende du graphique par chaîne */
.cl-legend { margin-top: 14px; display: flex; flex-direction: column; }
.cl-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--line); }
.cl-row:first-child { border-top: 0; }
.cl-key { flex: 0 0 64px; padding-top: 6px; }
.cl-txt { flex: 1 1 auto; min-width: 0; }
.cl-name { font-size: .98rem; font-weight: 500; overflow-wrap: anywhere; }
.cl-val { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-size: 1rem; font-weight: 500; white-space: nowrap; }
@media (max-width: 560px) { .cl-key { flex-basis: 44px; } .cl-key svg { width: 44px; } .cl-row { gap: 8px; } }

/* Radar : Traque, Habitudes */
.h2tab{margin:.2em 0 .4em}
.hbars{display:flex;align-items:flex-end;gap:2px;height:52px;margin:.4em 0 0}
.hbars i{flex:1;min-width:3px;background:var(--border,#d8cfb4);border-radius:2px 2px 0 0}
.hbars i.on{background:var(--accent,#c9ad63)}
.hbars-l{display:flex;justify-content:space-between}
.tq-j{list-style:none;margin:0;padding:0}.tq-j li{padding:2px 0}
.st-edit,.st-restore{background:transparent;border:0;cursor:pointer;opacity:.45;font-size:13px;padding:0 3px}.st-edit:hover,.st-restore:hover{opacity:1}

/* Accueil : recherche rapide d'un joueur ou d'une alliance */
.qsearch { position: relative; display: flex; gap: 8px; max-width: 560px; margin: 0 0 16px; }
.qsearch input[type=search] { flex: 1; min-width: 0; font: inherit; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: inherit; }
.qsearch button { font: inherit; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.qsearch-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-height: 360px; overflow: auto; }
.qsearch-list a { display: block; padding: 6px 10px; border-radius: 7px; color: inherit; text-decoration: none; }
.qsearch-list li.on a, .qsearch-list a:hover { background: var(--accent-soft); }
.qsearch-list small { color: var(--muted); }
.qsearch-list .qs-kind { display: inline-block; min-width: 62px; margin-right: 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.qsearch-list .qs-none { padding: 6px 10px; color: var(--muted); }

/* Traque : suivi d'une cible (cartes, heures de retour, grille jour par jour, journal) */
.tq-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tq-cards > div { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 2px; }
.tq-cards small { color: var(--muted); font-size: .8rem; } .tq-cards b { font-size: 1.35rem; } .tq-cards b.pos { color: var(--pos); } .tq-cards b.neg { color: var(--neg); } .tq-cards em { font-style: normal; }
.tq-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tq-tabs > label { display: inline-block; padding: 4px 12px; margin: 0 2px 8px 0; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: .85rem; }
.tq-tabs > input:checked + label { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.tq-tabs > input:focus-visible + label { outline: 2px solid var(--accent); }
.tq-pane { display: none; }
#tq-h-all:checked ~ #tq-p-all, #tq-h-semaine:checked ~ #tq-p-semaine, #tq-h-weekend:checked ~ #tq-p-weekend { display: block; }
.tq-rel { padding: 1px 8px; border-radius: 9px; font-size: .78rem; font-weight: 600; color: #fff; } .tq-rel.forte { background: #2e7d32; } .tq-rel.moyenne { background: #b7791f; } .tq-rel.faible { background: #7a6a4f; }
table.tq-grid { border-collapse: separate; border-spacing: 2px; font-size: .72rem; }
table.tq-grid th { font-weight: 600; color: var(--muted); padding: 0 2px; text-align: center; white-space: nowrap; } table.tq-grid tbody th { text-align: right; padding-right: 6px; color: var(--text); }
table.tq-grid thead tr:first-child th[colspan] { border-bottom: 1px solid var(--line); }
table.tq-grid th.top { color: var(--neg); }
table.tq-grid td { width: 20px; height: 20px; padding: 0; text-align: center; background: var(--accent-soft); border-radius: 4px; }
table.tq-grid td.top { box-shadow: inset 0 0 0 2px var(--neg); }
table.tq-grid td.num { background: none; width: auto; padding: 0 4px; font-weight: 700; }
.tq-c { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-style: normal; font-weight: 700; color: #fff; line-height: 1; }
.tq-c.ret { background: #2e7d32; } .tq-c.flood { background: #c49a2c; } .tq-c.atk { background: #b23b22; } .tq-c.topk { background: none; box-shadow: inset 0 0 0 2px var(--neg); }
.tq-grid .tq-tot td { background: none; vertical-align: bottom; height: 34px; color: var(--muted); font-size: .7rem; }
.tq-grid .tq-tot .bar { display: block; width: 12px; margin: 0 auto 2px; background: #2e7d32; border-radius: 2px; }
.tq-grid .tq-tot td.top .bar { background: var(--neg); } .tq-grid .tq-tot td.top { box-shadow: none; }
.tq-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); } .tq-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tq-b { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: .75rem; font-weight: 600; color: #fff; }
.tq-b.retour { background: #2e7d32; } .tq-b.flood_in, .tq-b.flood_out { background: #c49a2c; } .tq-b.attaque { background: #b23b22; }
details.tq-all summary { cursor: pointer; color: var(--accent); margin: 8px 0; }

/* Carte : mode Sélection (cercle) et liste de la zone */
.mapbox canvas.selecting { cursor: crosshair; }
.mapbox canvas.selecting:active { cursor: crosshair; }
.mapctl .zselbtn { display: inline-flex; align-items: center; justify-content: center; }
.mapctl .zselbtn .zring { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 50%; }
.mapctl .zselbtn[aria-pressed="true"] { background: var(--accent); color: #111; border-color: var(--accent); }
.mapctl .zhomebtn { font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.mapctl .zhomebtn[aria-pressed="true"] { background: #f5b301; color: #111; border-color: #f5b301; }
.zhint { position: absolute; left: 10px; bottom: 10px; right: 56px; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.zone { margin-top: 16px; }
.zone-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.zone-actions { display: flex; gap: 14px; }
.zone h3 { margin: 14px 0 6px; font-size: .95rem; }
.zone-table th.sortable, .zone-allies th.sortable { cursor: pointer; white-space: nowrap; user-select: none; }
.zone-table td, .zone-allies td { white-space: nowrap; }
.zone-allies tbody tr { cursor: pointer; }
.zone-allies tbody tr.on { background: var(--accent-soft); }
.zone-allies tbody tr.on td:first-child { font-weight: 700; }
.zone-table .zflag { font-size: .8rem; }

/* Suivis (étoile jaune des administrateurs, onglet Suivis du Radar) */
.follow-star { background: none; border: 0; padding: 0 4px; font-size: 1.5em; line-height: 1; cursor: pointer; color: var(--muted); vertical-align: middle; }
.follow-star.on { color: #f2b705; }
span.follow-star { cursor: default; }
.follow-star:hover:not(:disabled) { color: #f2b705; }
.follow-note { width: 100%; min-width: 9em; }
.rel { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: .85em; white-space: nowrap; }
.rel-target { color: #e0a030; } .rel-both { color: #ef7a2e; } .rel-threat { color: #e05252; } .rel-ally, .rel-pact { color: #4fa3e0; } .rel-war { color: #e05252; } .rel-none, .rel-me { color: var(--muted); }
.ptag.boosté { background: linear-gradient(135deg, #5a3a00, #8a5a00); color: #ffe9a8; border-color: #f2b705; }
.alert-orange { border: 2px solid #e08a1e; background: #33240c; color: #ffe8c7; } .alert-orange h2 { color: #ffb74d; margin-top: 0; } :root[data-theme="clair"] .alert-orange { background: #fff4e5; color: #6b3d00; } :root[data-theme="clair"] .alert-orange h2 { color: #b45f06; }
.an-list { list-style: none; margin: 8px 0 0; padding: 0; } .an-list > li { padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); } .an-list > li:first-child { border-top: 0; }
.an-why { margin: 4px 0 0 1.4em; padding: 0; font-size: .9rem; opacity: .9; } .an-lvl { padding: 1px 8px; border-radius: 9px; font-size: .78rem; font-weight: 700; color: #fff; margin-right: 4px; }
.an-lvl.forte { background: #c62828; } .an-lvl.moyenne { background: #b7791f; }
.theo-manual .theo-scan { margin-top: 6px; } .theo-manual .theo-msg { display: block; margin-top: 4px; }

.rv-row.rv-faim { background: color-mix(in srgb, #d81b60 13%, transparent); } .rv-row.rv-faim td:first-child { border-left-color: #d81b60; } .rv-row.rv-faim strong { color: #d81b60; }

/* Radar : barre de recherche joueur / alliance (2.85.2) */
.rd-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; }
.rd-search input[type=search] { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.rd-result h2 { margin-top: 0; }

/* Statistiques (2.85.2) */
.st-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.st-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-tools select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.st-seg a { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; }
.st-seg a.on { background: #2f7fd1; border-color: #2f7fd1; color: #fff; }
.st-score { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 16px; align-items: center; }
@media (max-width: 640px) { .st-score { grid-template-columns: 1fr; } }
.st-gauge { width: 100%; max-width: 220px; display: block; margin: 0 auto; }
.st-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.st-kpi { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.st-kpi b { display: block; font-size: 1.25rem; } .st-kpi span { color: var(--muted); font-size: .85rem; }
.st-hours { display: flex; align-items: flex-end; gap: 2px; height: 46px; margin-top: 8px; } .st-hours i { flex: 1; background: var(--line); border-radius: 2px 2px 0 0; min-height: 2px; } .st-hours i.on { background: #2f7fd1; }
details.st-sec { margin: 12px 0; } details.st-sec > summary { cursor: pointer; font-size: 1.15rem; font-weight: 700; padding: 8px 0; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.st-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 6px; background: var(--panel); min-width: 0; }
.st-card.red { border: 2px solid var(--neg); }
.st-card h3 { margin: 0 0 2px; font-size: .98rem; display: flex; justify-content: space-between; gap: 6px; }
.st-card h3 small { color: var(--muted); font-weight: 400; }
.st-card .st-gap { font-size: .8rem; color: var(--muted); } .st-card .st-gap .neg { color: var(--neg); font-weight: 700; } .st-card .st-gap .pos { color: var(--pos); font-weight: 700; }
.st-card svg { width: 100%; height: 110px; display: block; }
.st-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--muted); margin: 6px 0 10px; }
.st-legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 5px; }
.st-legend i.d { border-top-style: dashed; } .st-legend i.o { border-top-style: dotted; }
.st-check td.focus { font-weight: 700; color: var(--accent); }

/* Carte : pinceau temporaire (2.85.2) */
.mapctl .zdrawbtn[aria-pressed="true"] { background: #e53935; color: #fff; border-color: #e53935; }
.zbrush { position: absolute; left: 10px; top: 10px; right: 56px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: .85rem; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.zbrush[hidden] { display: none; }
.zbrush input[type=color] { width: 32px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; vertical-align: middle; }
.zbrush input[type=range] { width: 110px; vertical-align: middle; }
canvas.drawing { cursor: crosshair; touch-action: none; }

.st-objs { list-style: none; padding: 0; margin: 4px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.st-objs li { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); } .st-objs li.ok { border-color: var(--pos); } .st-objs li.ok b { color: var(--pos); }
.st-objs li.ko { border-color: var(--neg); } .st-objs li.ko b { color: var(--neg); } .st-objs li.na b { color: var(--muted); }
.st-objorder { margin: 6px 0; } .st-objorder select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
tr.st-editing td { background: rgba(47, 127, 209, .14); }
.st-objform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; } .st-objform select, .st-objform input { font: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); max-width: 100%; }
.st-objmsg.bad { color: var(--neg); } .st-objmsg.ok { color: var(--pos); } .st-card .st-objtag { font-size: .78rem; font-weight: 700; } .st-card .st-objtag.ok { color: var(--pos); } .st-card .st-objtag.ko { color: var(--neg); }
.hc-gtitle { margin: 22px 0 8px; font-size: 1.15rem; }
.war-bilan { margin: 6px 0 2px 22px; padding: 6px 10px; border-left: 3px solid var(--accent, #c9962a); border-radius: 6px; background: rgba(127,127,127,.07); font-size: .92em; line-height: 1.55; }
.war-bilan .up { color: #2e9e5b; font-weight: 700; } .war-bilan .down { color: #d84a3f; font-weight: 700; }
.ptag-realdeathnote { background: #000; color: #ff3b3b; border-color: #ff3b3b; text-shadow: 0 0 4px rgba(255,59,59,.6); }
.plus.rdn { margin-top: 6px; background: #120000; color: #ff5b5b; border-color: #ff3b3b; }
.dn-aigle { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.orc-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.orc-by { font: 700 12px/1 system-ui, sans-serif; letter-spacing: .4px; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: linear-gradient(90deg, #2e7d32, #66bb6a); color: #fff; }
.orc-host { margin: 10px 0; }

/* 2.104.0 : page « Guerre » */
.gr-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.gr-allies { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gr-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; border: 1px solid #e53935; background: rgba(229, 57, 53, .12); font-weight: 700; }
.gr-x { border: 0; background: none; color: inherit; font-size: 1rem; cursor: pointer; padding: 0 6px; }
.gr-add { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gr-in { font: inherit; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); max-width: 100%; }
.gr-n { width: 110px; }
.gr-btn { font: inherit; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.gr-btn.p { background: #c62828; border-color: #c62828; color: #fff; font-weight: 700; } .gr-btn:disabled { opacity: .5; cursor: default; }
.gr-msg { font-weight: 700; margin-left: 6px; }
.gr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.gr-tab { font: inherit; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; position: relative; }
.gr-tab.on { border-color: #c62828; box-shadow: inset 0 -3px 0 #c62828; font-weight: 700; }
.gr-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: #e53935; color: #fff; font-size: .75rem; font-weight: 800; text-align: center; }
.gr-scroll { overflow-x: auto; max-width: 100%; }
.gr-tbl th.gr-sort { cursor: pointer; white-space: nowrap; user-select: none; } .gr-tbl th.on { color: #c62828; }
.gr-tbl td { white-space: nowrap; }
.gr-who { display: inline-flex; gap: 6px; align-items: center; }
.gr-flood { border: 1px solid #1e88e5; background: rgba(30, 136, 229, .1); border-radius: 6px; padding: 0 6px; cursor: pointer; font-size: .9rem; line-height: 1.5; }
.gr-role { padding: 1px 7px; border-radius: 999px; background: rgba(127, 127, 127, .18); font-size: .8rem; }
.gr-red { color: #e53935; font-weight: 700; } .gr-pos { color: var(--pos, #2e9e44); } .gr-neg { color: var(--neg, #e53935); }
.gr-err { color: #e53935; font-weight: 700; }
.gr-sondes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--line); }
.gr-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.gr-mapbox { height: min(70vh, 720px); }
main.gr-widepage { max-width: none; }                                                                        /* 3.6.34 : Map Guerre sur toute la largeur */
main.gr-widepage .gr-mapbox { height: max(520px, calc(100vh - 230px)); }
main .gr-mapbox.gr-full, .gr-mapbox.gr-full { position: fixed; inset: 0; z-index: 3000; height: 100vh; height: 100dvh; min-height: 0; border-radius: 0; border: 0; }
body.gr-noscroll { overflow: hidden; }
.gr-mapopt { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: .9rem; } .gr-mapopt label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }   /* 3.6.33 */
.gr-assigned { color: #ffca28; font-weight: 700; }
.gr-gplan { display: block; min-width: 240px; max-width: 380px; white-space: normal; line-height: 1.25; margin-top: 2px; text-align: left; }
.gr-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 8px; font-size: .9rem; }
.gr-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; } .gr-legend i.ln { width: 20px; height: 3px; border-radius: 2px; vertical-align: 3px; }
.gr-live { margin-top: 8px; font-size: .88rem; display: grid; gap: 2px; }
.gr-seg { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.gr-seg button { font: inherit; border: 0; padding: 5px 12px; background: var(--panel); color: var(--text); cursor: pointer; } .gr-seg button.on { background: #c62828; color: #fff; }
.gr-mat td.diag { opacity: .45; }
.gr-chrono { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.gr-ev { display: grid; grid-template-columns: 110px minmax(0, 1fr) 120px 100px; gap: 8px; padding: 4px 8px; border-top: 1px solid var(--line); font-size: .88rem; }
.gr-ev:first-child { border-top: 0; } .gr-ev.in { box-shadow: inset 3px 0 0 #2e9e44; } .gr-ev.out { box-shadow: inset 3px 0 0 #e53935; } .gr-ev .num { text-align: right; } .gr-ev .w { color: var(--muted); }
.gr-line { width: 100%; max-width: 680px; height: auto; display: block; margin: 6px 0; }
.gr-rcbox { margin-top: 10px; } .gr-rc pre { white-space: pre-wrap; max-height: 260px; overflow: auto; font-size: .78rem; background: rgba(127, 127, 127, .08); padding: 8px; border-radius: 8px; }
@media (max-width: 640px) { .gr-ev { grid-template-columns: 1fr; } }

/* 2.105.0 : tickets : matériaux demandés en marron, nourriture en rouge */
.rv-need.rv-mat { color: #c0834a; }
.rv-need.rv-nou { color: #e8453c; }
/* 2.105.1 : rôle de PapeYeku (rose pastel) : les LETTRES ont un léger contour noir (pas le cadre) */
[style*="248, 187, 208"], [style*="f8bbd0" i] { text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important; }
/* 2.105.0 : page Guerre : Map Greeny et réglage « Masquer heures d'arrivées » */
.gr-btn.gr-big { font-size: 1.1rem; padding: 10px 18px; }
.gr-greeny label.gr-row, .gr-opt label.gr-row { display: flex; gap: 8px; align-items: center; cursor: pointer; }
a.gr-btn { text-decoration: none; display: inline-block; }   /* 3.6 : bouton « 📖 Ouvrir le tuto » */
.gr-opt { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid #c62828; }
/* 2.105.0 : habitudes et armée à la maison : semaine / week-end, grille jour par jour */
.hb-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 8px 0; }
.hb-split h4 { margin: 4px 0 6px; font-size: 14px; }
.hb-grid { display: grid; gap: 2px; overflow-x: auto; padding: 6px 0; }
.hb-row { display: grid; grid-template-columns: 58px repeat(24, minmax(10px, 1fr)); gap: 2px; align-items: center; }
.hb-row i { display: block; height: 14px; border-radius: 3px; background: var(--accent, #e0a020); }
.hb-row b { font: 600 10px system-ui, sans-serif; color: var(--muted); text-align: left; }
.hb-d { font-size: 12px; }
/* 2.105.0 : Gestion de chaîne › Niveau TDP : améliorations en cours */
.tdp-plus { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; background: rgba(46, 125, 50, .15); color: #2e7d32; font-size: .8em; font-weight: 700; }
/* 2.105.0 : sur téléphone, le menu du site se replie derrière un bouton « ☰ » (la page en cours y est écrite) */
.nav-toggle { display: none; }
@media (max-width: 700px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; order: 3; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 600 14px system-ui, sans-serif; cursor: pointer; }
  .top .bar nav#main-nav { display: none; order: 4; }
  .top .bar nav#main-nav.open { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 6px 0;
    /* 2.107.6 : l'en-tête reste collé en haut : le menu ouvert défile DANS l'écran (sinon le bas du menu était inaccessible) */
    max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .top .bar nav#main-nav.open a { padding: 10px 12px; }
}
/* 2.105.4 : constructions / recherches probables (fiche joueur, page alliance, /GO) */
.bt-table td, .bt-table th { vertical-align: top; }
.bt-sort th[data-k] { cursor: pointer; user-select: none; }
.bt-sort th[aria-sort=ascending]::after { content: " ▲"; font-size: 10px; }
.bt-sort th[aria-sort=descending]::after { content: " ▼"; font-size: 10px; }
.bt-filter .chip.on { font-weight: 700; outline: 2px solid currentColor; }
.go-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.go-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.go-form input, .go-form select { min-width: 130px; }
.go-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.go-side h3 { margin: 0 0 6px; }
.go-warn { border-left: 4px solid #c62828; padding: 6px 10px; background: rgba(198, 40, 40, .08); }
.go-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.go-tools input[type=search] { min-width: min(320px, 100%); }
#go-import { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
#go-import p { flex-basis: 100%; margin: 4px 0; }

/* 2.105.7 : /GO : onglets ; niveaux des membres (une ligne par membre, une colonne par construction / recherche) */
.go-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.go-tab { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; text-decoration: none; font-weight: 600; margin-bottom: -1px; }
.go-tab.on { border-color: var(--line); background: var(--panel); }
.go-lv-scroll { max-height: 78vh; overflow: auto; }
.go-lv { font-size: 13px; }
.go-lv th, .go-lv td { padding: 4px 5px; }
.go-lv thead th { position: sticky; top: 0; z-index: 2; background: var(--panel); white-space: normal; vertical-align: bottom; font-size: 10.5px; letter-spacing: 0; line-height: 1.15; min-width: 34px; max-width: 76px; }
.go-lv tbody th, .go-lv tfoot th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); font-weight: 600; }
.go-lv tbody td.nowrap { font-size: 12px; }
.go-lv .go-lv-who { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; white-space: nowrap; }
.go-lv thead .go-lv-who { z-index: 3; }
.go-lv tfoot th, .go-lv tfoot td { font-weight: 600; border-top: 2px solid rgba(127,127,127,.35); }
.go-lv-c { background: rgba(46, 160, 67, calc(var(--lv, 0) * var(--lv, 0) * .42)); font-variant-numeric: tabular-nums; }
.go-lv-c.best { font-weight: 700; box-shadow: inset 0 0 0 1px rgba(46, 160, 67, .8); }
.go-lv-since { color: #d29922; font-weight: 700; }
.go-lv-old { color: #d29922; }
.go-lv th[data-k] { cursor: pointer; user-select: none; }
/* 2.107.4 : /GO : chantiers (rien en cours / pas de donnée), « Exporter tout », copies de l'Historique et des Convois en cours */
.go-eco td.go-act { min-width: 150px; }
.go-unk { color: #d29922; font-style: italic; }
.go-none { color: var(--muted, #8b949e); }
.go-export-all { margin-left: auto; align-self: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; }
.go-export-all:hover { background: var(--panel); }
.go-cv-card { margin-top: 18px; }
/* 2.107.5 : /GO › Historique des niveaux */
.gh-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.gh-filters label { display: inline-flex; gap: 6px; align-items: center; }
.gh-filters select { max-width: 230px; }
.gh-chk { font-size: 13px; }
.gh-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.gh-btns a { text-decoration: none; }
.gh-period { flex-basis: 100%; margin: 0; }
.gh-kpis { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.gh-kpi { flex: 1 1 130px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.gh-kpi b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.gh-kpi span { color: var(--muted, #8b949e); font-size: 12.5px; }
.go-hist-chart { --gh-cons: #3987e5; --gh-rech: #d95926; }
:root[data-theme="clair"] .go-hist-chart { --gh-cons: #2a78d6; --gh-rech: #eb6834; }
.gh-svg { width: 100%; height: auto; max-height: 260px; display: block; }
.gh-c1 { fill: var(--gh-cons); background: var(--gh-cons); }
.gh-c2 { fill: var(--gh-rech); background: var(--gh-rech); }
.gh-hit { fill: transparent; }
.gh-bar:hover .gh-hit { fill: rgba(127,127,127,.12); }
.gh-axis { stroke: var(--muted, #8b949e); stroke-width: 1; }
.gh-grid { stroke: rgba(127,127,127,.18); stroke-width: 1; }
.gh-tick { fill: var(--muted, #8b949e); font-size: 11px; }
.gh-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; font-size: 13px; }
.gh-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.gh-items { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-item { display: flex; flex-direction: column; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; min-width: 120px; }
.gh-item span { font-size: 12px; color: var(--muted, #8b949e); }
.gh-item.tdp { border-color: #d29922; }
.gh-table tr.gh-tdp td:nth-child(4) { font-weight: 700; }
.gh-table thead th { max-width: none; white-space: nowrap; }
.gh-up { color: #3fb950; }
.gh-down { color: #f85149; }
.go-cv-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 6px 0; }
.go-cv-scroll { max-height: 70vh; overflow: auto; }
.go-cv-table { font-size: 13px; }
.go-cv-table td, .go-cv-table th { padding: 4px 7px; vertical-align: top; }
.go-cv-btn { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: inherit; cursor: pointer; font-weight: 600; }
.go-cv-btn.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.go-cv-btn.ghost { background: transparent; }
.go-cv-x { border: 0; background: transparent; color: #f85149; cursor: pointer; font-size: 15px; padding: 0 4px; }
.go-cv-st { font-size: 12px; color: #d29922; }
.go-cv-st.road { color: #3fb950; }
.go-cv-report { white-space: pre-wrap; max-width: 420px; font-size: 11.5px; margin: 4px 0; }
#go-cv-regul { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
#go-cv-regul h3 { margin: 0 0 6px; font-size: 15px; }
.go-cv-table tr.p-top td:first-child b { color: #f85149; }
.go-cv-table tr.p-mid td:first-child b { color: #d29922; }
.go-lv th[aria-sort=ascending]::after { content: " ▲"; font-size: 10px; }
.go-lv th[aria-sort=descending]::after { content: " ▼"; font-size: 10px; }
/* 3.5 : Guerre : ennemis tués, focus, attaques en loge plus visuelles */
.gr-tbl tr.gr-dead td { opacity: .5; } .gr-tbl tr.gr-dead td .gr-p { text-decoration: line-through; } .gr-tbl tr.gr-dead td:has(.gr-killbox) { opacity: 1; }
.gr-tbl tr.gr-mine td { background: rgba(255, 193, 7, .12); } .gr-tbl tr.gr-mine td:first-child { box-shadow: inset 4px 0 0 #ffb300; }
.gr-killbox { display: inline-flex; align-items: center; gap: 2px; cursor: pointer; white-space: nowrap; } .gr-kill { width: 18px; height: 18px; accent-color: #c62828; cursor: pointer; }
.gr-myfocus { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid #ffb300; background: rgba(255, 193, 7, .12); }
.gr-fchips { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.gr-fchip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(127, 127, 127, .45); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.gr-fchip.me { border-color: #ffb300; background: rgba(255, 193, 7, .2); }
.gr-fwhat { font-weight: 600; opacity: .85; }                                                                   /* 3.6.33 : lieu et but d'une attribution */
.gr-flist { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.gr-frow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .gr-frow b { min-width: 110px; }
.gr-fsel { padding: 3px 6px; font-size: .85rem; }
.gr-fedit { border: 1px dashed rgba(127, 127, 127, .6); background: none; color: inherit; border-radius: 999px; padding: 0 7px; cursor: pointer; font: inherit; }
.gr-fpop { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.gr-fbox { width: min(440px, 100%); } .gr-fbox h3 { margin: 0 0 4px; } .gr-fbox .gr-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.gr-gj { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; display: flex; align-items: center; justify-content: center; transition: opacity .6s; }
.gr-gj.out { opacity: 0; } .gr-gj-c { position: absolute; inset: 0; width: 100%; height: 100%; }
.gr-gj-t { position: relative; text-align: center; animation: gr-gj-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.gr-gj-t b { display: block; font: 900 clamp(2.4rem, 9vw, 5.5rem)/1 Impact, "Arial Black", system-ui, sans-serif; letter-spacing: .04em; color: #fdd835; -webkit-text-stroke: 3px #b71c1c; text-shadow: 0 6px 0 #7f0000, 0 10px 30px rgba(0, 0, 0, .5); transform: rotate(-4deg); }
.gr-gj-t span { display: inline-block; margin-top: 10px; padding: 4px 14px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: #fff; font-weight: 800; }
.gr-gj.calm .gr-gj-t { animation: none; }
@keyframes gr-gj-pop { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.gr-lcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.gr-lcard { padding: 10px 12px; border-radius: 12px; border: 2px solid #8e24aa; background: rgba(142, 36, 170, .08); }
.gr-lcard.cool { border-color: #8e24aa; } .gr-lcard.warm { border-color: #fb8c00; background: rgba(251, 140, 0, .1); } .gr-lcard.hot { border-color: #e53935; background: rgba(229, 57, 53, .12); animation: gr-lpulse 1.2s ease-in-out infinite; }
@keyframes gr-lpulse { 50% { box-shadow: 0 0 0 4px rgba(229, 57, 53, .25); } }
@media (prefers-reduced-motion: reduce) { .gr-lcard.hot { animation: none; } }
.gr-lwho { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 700; } .gr-lic { font-size: 1.2rem; } .gr-larrow { opacity: .6; }
.gr-lwhen { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.gr-lclock { font: 800 1.9rem/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.gr-lleft { font-weight: 800; font-variant-numeric: tabular-nums; } .gr-lcard.hot .gr-lleft { color: #e53935; } .gr-lcard.warm .gr-lleft { color: #ef6c00; }
.gr-lbar { height: 6px; border-radius: 3px; background: rgba(127, 127, 127, .25); overflow: hidden; } .gr-lbar i { display: block; height: 100%; background: linear-gradient(90deg, #8e24aa, #e53935); }
.gr-lfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.gr-ldel { border: 1px solid rgba(127, 127, 127, .4); background: none; color: inherit; border-radius: 8px; padding: 1px 7px; cursor: pointer; margin-left: 6px; }
.gr-lst { font-weight: 700; } .gr-lst.back { color: #ef6c00; } .gr-lst.ok { color: var(--pos, #2e9e44); }
.gr-ltools { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; } .gr-ldone summary { cursor: pointer; font-weight: 700; margin: 6px 0; }

/* 3.6.34 : fiche d'un joueur : « ☠️ Poutré » et opti XP en dôme / loge sur l'armée connue */
.poutre-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.poutre-box label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-size: 1.05rem; }
.opti-xp { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.opti-xp h3 { margin: 0 0 4px; }
.opti-lv { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0; }
.opti-l { display: inline-flex; gap: 6px; align-items: center; } .opti-l input { width: 4.5rem; font: inherit; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.opti-table td:first-child { white-space: nowrap; } .opti-ok { color: #43a047; } .opti-ko { color: #e53935; font-weight: 600; }

/* 3.6.38 : ghosts en cours (onglet 👻 Ghost) */
.gr-ghlive { margin: 0 0 14px; }
.gr-ghcard { border: 1px solid var(--line, #c9b07a); border-left: 5px solid #e53935; border-radius: 10px; padding: 8px 12px; margin: 6px 0; background: rgba(229,57,53,.06); }
.gr-ghcard.can { border-left-color: #fb8c00; background: rgba(251,140,0,.1); }
.gr-ghcard.taken { border-left-color: #2e9e44; background: rgba(46,158,68,.08); }
.gr-ghcard.mine { border-left-color: #1e88e5; background: rgba(30,136,229,.08); }
.gr-ghact { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.gr-ghmine { display: inline-flex; gap: 4px; align-items: center; margin: 0 10px 4px 0; }
.gr-gsec { display: block; color: #1565c0; font-weight: 600; }
.gr-h3 { margin: 10px 0 4px; font-size: 1.02rem; }
.orc-lock { border: 1px solid #d9a441; background: rgba(255,193,7,.12); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.opti-simu { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; } .opti-simu small { flex-basis: 100%; }
.gr-efilt { margin: 6px 0; } .gr-os { color: #c62828; font-weight: 700; margin-left: 4px; } .gr-fplus { padding: 0 8px; }
.gr-plan { margin: 4px 0 8px; } .gr-planrow { margin: 3px 0; } .gr-plandet { border: 1px solid var(--line, #c9b07a); border-radius: 10px; padding: 6px 10px; margin: 6px 0; }
.gr-plandet summary { cursor: pointer; }

/* 3.6.40 : Map Guerre « en direct » */
.gr-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 4px 0 6px; }
@media (max-width: 900px) { .gr-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gr-tile { border: 1px solid var(--line, #c9b07a); border-radius: 10px; padding: 7px 10px; background: var(--card, rgba(0,0,0,.03)); min-width: 0; }
.gr-tl { font-size: .78rem; color: var(--muted, #777); line-height: 1.25; }
.gr-tv { font-size: 1.45rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.gr-ts { font-size: .72rem; color: var(--muted, #777); }
.gr-tile.t-att .gr-tv { color: #e65100; } .gr-tile.t-son .gr-tv { color: #f9a825; } .gr-tile.t-gh .gr-tv { color: #5c6bc0; }
.gr-tile.t-bal.pos .gr-tv { color: #2e9e44; } .gr-tile.t-bal.neg .gr-tv { color: #e53935; }
.gr-tile.t-food .gr-tv { color: #c62828; } .gr-tile.t-mat .gr-tv { color: #8d6e63; } .gr-tile.t-k1 .gr-tv { color: #2e7d32; } .gr-tile.t-k2 .gr-tv { color: #b71c1c; }
.gr-tfoot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gr-livegrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 10px; align-items: stretch; }
.gr-livegrid .gr-mapbox { min-width: 0; }
.gr-feedbox { border: 1px solid var(--line, #c9b07a); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; min-width: 0; max-height: max(520px, calc(100vh - 230px)); }
.gr-fh { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.gr-seg { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.gr-seg button { border: 1px solid var(--line, #c9b07a); background: transparent; border-radius: 999px; padding: 2px 9px; cursor: pointer; font: inherit; font-size: .8rem; color: inherit; }
.gr-seg button.on { background: #5a4410; color: #fff; border-color: #5a4410; }
.gr-feed { overflow-y: auto; flex: 1 1 auto; display: flex; flex-direction: column; gap: 5px; }
.gr-mv { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 5px 7px; border-radius: 8px; border-left: 4px solid #ff7043; background: rgba(0,0,0,.03); }
.gr-mv.sonde { border-left-color: #f9a825; } .gr-mv.loge { border-left-color: #8e24aa; } .gr-mv.ghost { border-left-color: #5c6bc0; } .gr-mv.flood { border-left-color: #1e88e5; }
.gr-mv .ic { font-size: 1.05rem; } .gr-mv .mv-b { min-width: 0; overflow: hidden; } .gr-mv .mv-b > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-mv .mv-w { font-size: .78rem; color: var(--muted, #777); } .gr-mv .mv-t { text-align: right; display: flex; flex-direction: column; font-size: .82rem; }
.gr-mv .cd, .gr-mv .cdx { font-size: .74rem; color: var(--muted, #777); font-variant-numeric: tabular-nums; }
.gr-mv .mv-p { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: rgba(0,0,0,.1); overflow: hidden; } .gr-mv .mv-p i { display: block; height: 100%; background: currentColor; opacity: .55; }
main.gr-widepage .gr-livegrid .gr-mapbox { height: max(520px, calc(100vh - 230px)); }
main.gr-widepage .gr-livegrid .gr-mapbox.gr-full { height: 100vh; height: 100dvh; }
@media (max-width: 900px) { .gr-livegrid { grid-template-columns: 1fr; } .gr-feedbox { max-height: 420px; } }
/* 3.6.40 : Ennemis : le tableau tient en largeur */
table.gr-tbl[data-t=ennemis] { width: 100%; }
table.gr-tbl[data-t=ennemis] td { white-space: normal; vertical-align: top; padding-left: 6px; padding-right: 6px; }
table.gr-tbl[data-t=ennemis] th { white-space: normal; padding-left: 6px; padding-right: 6px; }
table.gr-tbl[data-t=ennemis] td.num { white-space: nowrap; }
.gr-who2 { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gr-sub { color: var(--muted, #777); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.gr-army { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; font-size: .86rem; }
table.gr-tbl[data-t=ennemis] .gr-fchips { display: flex; flex-wrap: wrap; gap: 3px; max-width: 260px; }
table.gr-tbl[data-t=ennemis] .gr-fchip { white-space: normal; }
.gr-reachbox { display: flex; flex-direction: column; gap: 2px; text-align: left; white-space: normal; }
.gr-reach { font-weight: 700; } .gr-fixl { margin: 2px 0 0 16px; padding: 0; font-size: .8rem; text-align: left; }
tr.gr-plan-ko td { background: rgba(229,57,53,.06); }

/* 3.6.41 : page de notre alliance : consignes des administrateurs */
td.cons { min-width: 130px; max-width: 320px; white-space: normal; }
.cons-t { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .85rem; line-height: 1.35; background: var(--accent-soft); border: 1px solid var(--line); }
.cons-stop { background: rgba(229, 57, 53, .14); border-color: rgba(229, 57, 53, .5); }
.cons-down { background: rgba(255, 152, 48, .14); border-color: rgba(255, 152, 48, .5); }
.cons-up, .cons-goal { background: rgba(46, 158, 68, .14); border-color: rgba(46, 158, 68, .5); }
.cons-target { background: rgba(156, 39, 176, .12); border-color: rgba(156, 39, 176, .45); }
.cons-flood { background: rgba(33, 150, 243, .13); border-color: rgba(33, 150, 243, .45); }
.cons-pause { background: rgba(128, 128, 128, .14); }
.cons-ed { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; cursor: pointer; font-size: .8rem; opacity: .6; }
.cons-ed:hover, .cons-ed:focus-visible { opacity: 1; }
.cons-pop { position: absolute; z-index: 60; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius, 10px); box-shadow: 0 8px 28px rgba(0, 0, 0, .35); padding: 10px 12px; box-sizing: border-box; }
.cons-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.cons-chip { padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font: inherit; font-size: .82rem; color: var(--text); }
.cons-in { width: 100%; box-sizing: border-box; padding: 6px 8px; font: inherit; }
.cons-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cons-del { background: transparent; } .cons-msg { font-size: .85rem; color: var(--neg); }
/* 3.6.44 : joueur parti de l'alliance ennemie pendant la guerre */
.gr-ex { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; font-size: .72rem; background: rgba(229, 57, 53, .15); color: var(--neg); border: 1px solid rgba(229, 57, 53, .4); }
.gr-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.gr-histlink { text-decoration: none; margin-left: auto; margin-right: 6px; }
/* 3.6.46 : bouton ⚔️ attaquer, portée manuelle, niveaux */
.gr-atk { margin-left: 2px; }
input.gr-pman { width: 110px; padding: 2px 6px; }
.gr-lv span { white-space: nowrap; }
/* 3.6.48 : 🏆 Plus beaux RC : temps de ponte des fourmis tombées, rapport à coller */
.gr-ponte { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted, #9aa3b2); white-space: nowrap; }
.gr-pastebox { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; white-space: normal; }
.gr-pastebox small, .gr-pastebox .gr-msg { white-space: normal; }
.gr-rcpaste { width: 100%; min-height: 110px; font: 12.5px/1.4 ui-monospace, Menlo, Consolas, monospace; resize: vertical; box-sizing: border-box; }
pre.gr-rcfull { white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; }
