/* Console (lot B) — préfixe cs-. Mêmes règles de perf que style.css : pas de backdrop-filter, animations
   transform / opacity seulement. Réutilise .btn, .btn-ico, .badge, .block.danger, .crew-av, .crew-ring, .lvl-hex, .aura. */

.cs-head { margin-bottom: 12px; }
.cs-sub { font-size: 14px; }
.cs-tabbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: stretch; gap: 6px;
  margin: 0 calc(-1 * clamp(22px, 3vw, 36px)) 14px; padding: 6px clamp(22px, 3vw, 36px) 0;
  background: rgba(4, 7, 18, 0.97); border-bottom: 1px solid var(--line);
}
.cs-tabs { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.cs-tabs::-webkit-scrollbar { display: none; }
.cs-tab {
  flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; min-width: 58px; padding: 6px 8px; background: none; border: 0; color: var(--mute);
  font: 600 12.5px/1.1 var(--f-body);
}
.cs-tab .ico { width: 19px; height: 19px; }
.cs-tab[aria-selected="true"] { color: var(--ice); box-shadow: inset 0 -2px var(--ice); text-shadow: 0 0 10px rgba(127, 240, 255, 0.5); }
.cs-tab:hover { color: var(--ink); }
.cs-help { align-self: center; width: 44px; height: 44px; flex: none; }
.cs-banner { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--gold); background: rgba(255, 210, 122, 0.08); color: var(--gold); font-size: 14px; }
.cs-banner.is-open { border-color: var(--red); color: #ffb3c1; background: rgba(255, 77, 109, 0.1); }
.cs-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cs-body p { margin: 4px 0; }
.cs-mute { color: var(--mute); }
.cs-small { font-size: 12.5px; }
.cs-note { color: var(--faint); font-size: 12.5px; margin: 0; }
.cs-red { color: var(--red); font-weight: 700; }
.cs-h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font: 600 13px/1.2 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; }
.cs-h3 .ico { width: 18px; height: 18px; color: var(--ice); }
.cs-h3 small { font: 500 12px/1 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--mute); }
.cs-block { padding: 14px; background: var(--card); border: 1px solid var(--line); }
.cs-card { position: relative; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-left: 2px solid var(--c); }
.cs-card.is-online { box-shadow: 0 0 12px color-mix(in srgb, var(--c) 30%, transparent); }
.cs-name { margin: 0; font: 700 17px/1.2 var(--f-display); color: var(--ink); overflow-wrap: anywhere; }
.cs-badge { display: inline-block; vertical-align: middle; padding: 2px 6px; font: 600 10.5px/1.2 var(--f-mono); letter-spacing: 0.06em; border: 1px solid var(--line2); color: var(--mute); }
.cs-badge.is-me { color: var(--c); border-color: var(--c); }
.cs-badge.is-admin { color: var(--ice); border-color: var(--ice); }
.cs-link { background: none; border: 0; padding: 4px 2px; color: var(--ice); text-decoration: underline; text-underline-offset: 3px; font: inherit; min-height: 32px; text-align: left; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cs-actions .btn, .cs-block .btn { min-height: 44px; text-transform: none; letter-spacing: 0; font: 600 13px/1.1 var(--f-body); }
.cs-actions .btn .ico, .cs-block .btn .ico { width: 18px; height: 18px; }
.cs-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

/* portrait */
.cs-av { position: relative; display: inline-grid; place-items: center; width: 48px; height: 56px; flex: none; }
.cs-av .av { width: 44px; height: 52px; }
.cs-av.is-big { width: 68px; height: 80px; }
.cs-av.is-big .av { width: 64px; height: 76px; }
.cs-hexwrap { position: absolute; right: -4px; top: -4px; width: 18px; height: 20px; }
.cs-hexwrap .lvl-hex { right: 0; top: 0; }
.cs-pv { background: none; border: 0; padding: 0; }

/* chiffres d'en-tête */
.cs-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-stat { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; min-width: 88px; background: var(--card); border: 1px solid var(--line); }
.cs-stat b { font: 700 18px/1 var(--f-display); color: var(--ice); }
.cs-stat b .ico { width: 18px; height: 18px; }
.cs-stat span { font: 500 11px/1.2 var(--f-body); color: var(--mute); }

/* puces de filtre */
.cs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 10px;
  background: none; border: 1px solid var(--line2); color: var(--mute); font: 600 13px/1 var(--f-body);
}
.cs-chip[aria-pressed="true"] { border-color: var(--ice); color: var(--ice); background: rgba(127, 240, 255, 0.08); }
.cs-chip-av { position: relative; display: inline-block; width: 20px; height: 24px; }
.cs-chip-av .av { width: 100%; height: 100%; display: block; }
.cs-frow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cs-flbl { flex: none; width: 52px; font: 600 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.cs-frow .cs-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.cs-frow .cs-chips::-webkit-scrollbar { display: none; }
.cs-search { flex-wrap: wrap; }
.cs-searchbox { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line2); background: rgba(2, 4, 12, 0.6); }
.cs-searchbox .ico { width: 18px; height: 18px; color: var(--mute); }
.cs-searchbox input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; outline: none; font-size: 16px; }

/* cartes joueurs */
.cs-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cs-pcard-top { display: flex; gap: 12px; align-items: center; }
.cs-pcard-main { min-width: 0; flex: 1; }
.cs-status { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 13.5px; }
.cs-status .crew-status { display: inline-flex; }
.cs-prow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cs-today { font-size: 13.5px; }
.cs-more-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.cs-eggdots { display: inline-flex; flex-wrap: wrap; gap: 1px; }
.cs-eggdot { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; background: none; border: 0; }
.cs-shape { width: 16px; height: 16px; color: var(--sc); stroke: var(--sc); stroke-width: 2; opacity: 0.55; }
.cs-shape.is-on { opacity: 1; filter: drop-shadow(0 0 4px var(--sc)); }
.cs-medals { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--mute); }
.cs-medal { display: inline-flex; align-items: center; gap: 5px; }
.cs-medal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.cs-medal.is-bronze .cs-medal-dot { background: #d48a4f; }
.cs-medal.is-argent .cs-medal-dot { background: #cfd8e8; }
.cs-medal.is-or .cs-medal-dot { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.cs-crown { display: inline-block; width: 14px; height: 14px; color: var(--gold); vertical-align: -2px; }
.cs-crown .ico { width: 14px; height: 14px; }

/* Moi */
.cs-me-card { display: flex; gap: 14px; align-items: center; }
.cs-sealed { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.cs-sealed .cs-h3 .ico { color: var(--gold); }
.cs-private { margin-left: auto; }
.cs-ghost { color: var(--faint); }
.cs-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-barrow { display: grid; grid-template-columns: minmax(96px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; }
.cs-bar { display: block; height: 6px; background: var(--line); overflow: hidden; }
.cs-bar i { display: block; height: 100%; background: var(--ice); transform-origin: left; }
.cs-barrow.is-full .cs-bar i { background: var(--faint); }
.cs-barrow b { font: 600 12px/1 var(--f-mono); color: var(--mute); }
.cs-brake { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 10px !important; font-size: 13px; color: var(--mute); }
.cs-brake .cs-bar i { background: var(--gold); }
.cs-days { display: flex; align-items: flex-end; gap: 4px; height: 60px; }
.cs-day { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.cs-day i { display: block; width: 100%; height: 100%; background: var(--ice); opacity: 0.75; transform-origin: bottom; }
.cs-details summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; color: var(--mute); }

/* journal */
.cs-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cs-daysep { margin: 12px 0 4px; font: 600 11px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.cs-log-row {
  width: 100%; display: grid; grid-template-columns: 32px 22px minmax(0, 1fr) auto 20px; align-items: center; gap: 8px;
  min-height: 46px; padding: 6px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink);
}
.cs-log-row:hover { background: rgba(127, 240, 255, 0.05); }
.cs-log-row.is-mini { grid-template-columns: 26px 20px minmax(0, 1fr) auto; min-height: 36px; font-size: 13.5px; }
.cs-who { position: relative; display: inline-grid; place-items: center; width: 28px; height: 32px; }
.cs-who .av { width: 26px; height: 30px; }
.cs-who .ico { width: 22px; height: 22px; color: var(--faint); }
.cs-sys { color: var(--ice); font-size: 18px; }
.cs-act .ico, .cs-act .cs-shape { width: 18px; height: 18px; }
.cs-act { display: inline-grid; place-items: center; color: var(--mute); }
.cs-act.g-souhaits { color: var(--c); }
.cs-act.g-jeu { color: var(--gold); }
.cs-act.g-compte { color: var(--rose); }
.cs-act.g-systeme { color: var(--ice); }
.cs-act.is-bad { color: var(--red); }
.cs-txt { overflow-wrap: anywhere; font-size: 14px; }
.cs-time { font: 500 11px/1.2 var(--f-mono); color: var(--faint); white-space: nowrap; }
.cs-dev { display: inline-grid; place-items: center; color: var(--faint); }
.cs-dev .ico { width: 16px; height: 16px; }
.cs-log-detail { padding: 6px 4px 10px 62px; font-size: 13px; color: var(--mute); border-bottom: 1px solid var(--line); }
.cs-log-detail code, .cs-devcard code { font: 500 12px/1 var(--f-mono); color: var(--ink); }
.cs-ua { white-space: pre-wrap; overflow-wrap: anywhere; font: 500 11.5px/1.4 var(--f-mono); }
.cs-newpill { position: sticky; top: 64px; z-index: 1; align-self: center; padding: 8px 14px; background: var(--ice); color: var(--bg); border: 0; font-weight: 700; }
.cs-more { align-self: center; }
.cs-end, .cs-empty { text-align: center; padding: 12px; }
.cs-devlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cs-devline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* règles & secrets */
.cs-rtools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-rcount { color: var(--mute); font-size: 13px; }
.cs-toc ol, .cs-toc ul { list-style: none; margin: 0; padding: 0; }
.cs-toc > ol > li { display: grid; grid-template-columns: 130px 1fr; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.cs-toc-g { font: 600 12px/1.6 var(--f-body); color: var(--faint); }
.cs-sec { padding: 16px 0 6px; border-top: 1px solid var(--line2); scroll-margin-top: 70px; }
.cs-sec-t { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 700 18px/1.25 var(--f-display); color: var(--ice); }
.cs-sec-t .ico { width: 20px; height: 20px; }
.cs-resume { color: var(--mute); font-style: italic; }
.cs-puces { margin: 6px 0; padding-left: 20px; }
.cs-puces li { margin: 3px 0; }
.cs-table-wrap { overflow-x: auto; max-width: 100%; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cs-table th, .cs-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cs-table th { font: 600 11.5px/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.cs-table tr.is-here td { background: rgba(127, 240, 255, 0.1); color: var(--ice); }
.cs-table tr.is-done td:first-child::after { content: ' ✓'; color: var(--ice); }
.cs-encadre { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--ice); background: rgba(127, 240, 255, 0.05); }
.cs-encadre.is-secret { border-color: var(--gold); background: rgba(255, 210, 122, 0.06); }
.cs-encadre.is-attention { border-color: var(--rose); background: rgba(255, 95, 174, 0.06); }
.cs-encadre .ico { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 6px; color: var(--gold); }
.cs-encadre p { margin: 4px 0 0; }
.cs-faq dt, .cs-lex dt { font-weight: 700; margin-top: 10px; }
.cs-faq dd, .cs-lex dd { margin: 4px 0 0 0; color: var(--ink); }
.cs-top { display: inline-flex; align-items: center; gap: 4px; color: var(--mute); font-size: 13px; }
.cs-top .ico { width: 14px; height: 14px; }
.cs-branch { margin-top: 14px; color: var(--mute); }
.cs-egg { margin: 6px 0; background: var(--card); border: 1px solid var(--line); scroll-margin-top: 70px; }
.cs-egg summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 46px; padding: 8px 10px; cursor: pointer; list-style: none; }
.cs-egg summary::-webkit-details-marker { display: none; }
.cs-egg-t { font-weight: 700; }
.cs-egg summary small { color: var(--mute); }
.cs-egg-state.is-found { color: var(--ice); }
.cs-finders { display: inline-flex; gap: 2px; margin-left: auto; }
.cs-finders .cs-crown { position: absolute; top: -8px; left: 4px; width: 12px; height: 12px; }
.cs-egg-body { padding: 0 12px 12px; font-size: 14px; }
.cs-sol { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--gold); background: rgba(255, 210, 122, 0.06); }
.cs-solbox { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-eggtools { display: flex; flex-direction: column; gap: 8px; }
.cs-revconfirm { padding: 10px; border: 1px solid var(--rose); }
mark.cs-hit { background: rgba(255, 210, 122, 0.35); color: inherit; }

/* réglages */
.cs-pw-form .field { margin-top: 8px; flex-wrap: nowrap; }
.cs-pw-form .field input { flex: 1; min-width: 0; font-size: 16px; }
.cs-pw-kick { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 6px; cursor: pointer; }
.cs-pw-kick input { width: 22px; height: 22px; flex: none; accent-color: var(--ice); }
.cs-pw-err { min-height: 1.2em; color: #ffb3c1; }
.cs-pw-save { margin-top: 8px; }
.cs-pw-rm { margin-top: 10px; }
.cs-devrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cs-devrow > .ico { width: 20px; height: 20px; color: var(--mute); flex: none; }
.cs-devrow > span:first-of-type { flex: 1; min-width: 0; }
.cs-admin.block.danger, .cs-block.danger { border-color: rgba(255, 77, 109, 0.4); }
.cs-block.danger .cs-h3 { color: #ff9fb1; }

/* téléphone */
@media (max-width: 900px) {
  .cs-tabbar { margin: 0 -16px 12px; padding: 4px 8px 0; }
  .cs-tab { min-width: 58px; padding: 4px 4px; font-size: 11px; }
  .cs-toc > ol > li { grid-template-columns: 1fr; }
  .cs-log-row { grid-template-columns: 28px 20px minmax(0, 1fr) auto; }
  .cs-log-row .cs-dev { display: none; }
  .cs-log-detail { padding-left: 8px; }
  .cs-barrow { grid-template-columns: minmax(84px, 40%) 1fr auto; }
}
@media (max-width: 560px) {
  .cs-table thead { display: none; }
  .cs-table, .cs-table tbody, .cs-table tr, .cs-table td { display: block; width: 100%; }
  .cs-table tr { padding: 6px 0; border-bottom: 1px solid var(--line2); }
  .cs-table td { border: 0; padding: 2px 4px; }
  .cs-table td::before { content: attr(data-col) ' : '; color: var(--faint); font-size: 12px; }
}
@media (max-height: 499.98px) and (orientation: landscape) {
  .cs-head .cs-sub { display: none; }
  .cs-tabbar { margin: 0 -16px 10px; padding: 2px 8px 0; }
  .cs-tab { min-height: 44px; }
  .cs-tab .cs-tab-lbl { font-size: 10.5px; }
  .cs-stats { display: none; }
}

/* (intégration) téléphone étroit : les 5 onglets + « ? » tiennent sans défiler ; « Règles & secrets » passe sur 2 lignes
   (sinon « Réglages » était coupé sous le bouton « ? ») */
@media (max-width: 560px) {
  .cs-tab { flex: 1 1 0; min-width: 0; padding: 4px 2px; }
  .cs-tab .cs-tab-lbl { white-space: normal; text-align: center; line-height: 1.1; }
}
