/*
 * Feuille de style commune des sites communautaires.
 *
 * Tout passe par les variables --site-* posées par theme.css (un fichier par
 * site, généré à partir du thème et des réglages, palettes claire et sombre
 * comprises). Le CSS libre du propriétaire est servi après, préfixé par
 * .site-root : il ne peut donc pas atteindre .kotbo-bar, qui vit hors de la
 * racine.
 *
 * Esprit : site de communauté de jeu classique. Barre pleine, bannière
 * d'accueil, cartes nettes à ombre légère, pas d'effet verre ni de halo.
 */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: var(--site-font), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--site-accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: color-mix(in srgb, var(--site-accent) 30%, transparent); }
h1, h2, h3, h4 { font-family: var(--site-heading-font), var(--site-font), sans-serif; }

.icon { flex: none; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 8px 14px; background: var(--site-accent); color: var(--site-on-accent); border-radius: 6px; text-decoration: none; }
.skip-link:focus { top: 12px; }

.site-root { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.container { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }

/* ─── Surfaces ──────────────────────────────────────────────────────────── */

.surface,
.mod,
.card-grid > article,
.stack > article,
.toc,
.callout,
.side-nav {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
}
.mod,
.card-grid > article,
.stack > article { box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }

/* ─── Barre de navigation ───────────────────────────────────────────────── */

/* Pilule flottante : le bandeau ne touche plus les bords, le menu est centré. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 12px 0;
  background: transparent;
  color: var(--site-header-text);
  pointer-events: none;
}
.site-header .site-header-inner {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  max-width: min(1100px, 100%);
  margin: 0 auto;
  padding: 6px 8px 6px 14px;
  background: color-mix(in srgb, var(--site-header) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--site-border);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.14);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--site-heading-font), var(--site-font), sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  min-width: 0;
}
.brand img, .brand-fallback { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; }
.brand-fallback { display: inline-grid; place-items: center; background: var(--site-accent); color: var(--site-on-accent); font-weight: 700; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; align-items: center; justify-content: center; gap: 2px; flex: 1; min-width: 0; }
.nav a, .nav summary {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  color: inherit;
  opacity: 0.78;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.site-header .nav a[aria-current="page"], .site-header .nav details[data-current] > summary { opacity: 1; color: var(--site-accent); background: color-mix(in srgb, var(--site-accent) 12%, transparent); }
.nav details { position: relative; }
.nav details > div {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  padding: 6px;
  background: var(--site-surface);
  color: var(--site-text);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.18);
}
.nav details > div a { opacity: 1; font-weight: 500; }
.nav details > div a:hover { background: var(--site-surface-strong); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: calc(var(--site-radius) * 0.6);
  color: inherit;
  opacity: 0.8;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.icon-btn svg { width: 20px; height: 20px; }

/* La bascule montre la lune en clair, le soleil en sombre. */
.mode-toggle .icon-sun { display: none; }
:root[data-effective="dark"] .mode-toggle .icon-sun { display: inline-block; }
:root[data-effective="dark"] .mode-toggle .icon-moon { display: none; }

.menu-toggle { display: none; }
/* Trop d'onglets pour la pilule : le menu devient un panneau déroulant. Sous
   1180 px d'office, au-dessus dès que le script mesure un débordement. */
.site-header.nav-collapsed .menu-toggle { display: inline-grid; }
.site-header.nav-collapsed .nav {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 8px;
  background: var(--site-header);
  border: 1px solid var(--site-border);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.18);
}
.site-header.nav-collapsed .nav[data-open="1"] { display: flex; }
.site-header.nav-collapsed .nav details > div { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; background: transparent; color: inherit; }
@media (max-width: 1180px) {
  .menu-toggle { display: inline-grid; }
  .site-header .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 8px;
    background: var(--site-header);
    border: 1px solid var(--site-border);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.18);
  }
  .site-header .nav[data-open="1"] { display: flex; }
  .nav details > div { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; background: transparent; color: inherit; }
}

/* Menu latéral (thème Documentation) */
.layout-side { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0; width: 100%; }
.side-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 0;
  border-width: 0 1px 0 0;
  background: var(--site-header);
  color: var(--site-header-text);
}
.side-brand { display: flex; align-items: center; gap: 8px; }
.side-brand .brand { flex: 1; }
.side-nav .nav { flex-direction: column; align-items: stretch; flex: none; }
.side-nav .nav a[aria-current="page"] { opacity: 1; color: var(--site-accent); background: color-mix(in srgb, var(--site-accent) 10%, transparent); }
.side-nav .nav details > div { position: static; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 10px; color: inherit; }
.side-nav .search-form input { width: 100%; }
.layout-side-main { min-width: 0; display: flex; flex-direction: column; }
.layout-side .main { max-width: 980px; margin: 0; padding: 32px 40px 56px; }
.side-top { display: none; }
@media (max-width: 960px) {
  .layout-side { grid-template-columns: 1fr; }
  .side-nav { position: static; height: auto; display: none; border-width: 0 0 1px; }
  .side-nav[data-open="1"] { display: flex; }
  .side-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--site-header); color: var(--site-header-text); border-bottom: 1px solid var(--site-border); }
  .layout-side .main { padding: 24px 20px 48px; }
}

/* ─── Bannière d'accueil ────────────────────────────────────────────────── */

.site-hero {
  position: relative;
  background: var(--site-header);
  color: var(--site-header-text);
  border-bottom: 1px solid var(--site-border);
}
.site-hero.has-image {
  color: #fff;
  background:
    linear-gradient(rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.68)),
    var(--hero-image) center / cover no-repeat,
    #111;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 64px; padding-bottom: 64px; }
.site-hero.has-image .hero-inner { padding-top: 96px; padding-bottom: 88px; }
.hero-logo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid rgb(255 255 255 / 0.85); box-shadow: 0 6px 20px rgb(0 0 0 / 0.3); }
.hero-title { margin: 4px 0 0; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.01em; }
.hero-lead { margin: 0; max-width: 62ch; font-size: 1.12rem; opacity: 0.88; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 600; }
.hero-sep { opacity: 0.6; }
.hero-actions { margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-main { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }

/* Bannière avec le pouls : le texte à gauche, le serveur en direct à droite. */
.hero-with-pulse { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); align-items: center; gap: 48px; text-align: left; }
.hero-with-pulse .hero-main { align-items: flex-start; }
.hero-with-pulse .hero-actions { justify-content: flex-start; }
@media (max-width: 880px) {
  .hero-with-pulse { grid-template-columns: minmax(0, 1fr); gap: 28px; text-align: center; }
  .hero-with-pulse .hero-main { align-items: center; }
  .hero-with-pulse .hero-actions { justify-content: center; }
}

/* Carte de membre à partager. */
.member-share { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--site-border); }
.member-share h2 { margin: 0 0 12px; font-size: 1.1rem; }
.member-card { display: block; width: 100%; max-width: 600px; height: auto; border-radius: calc(var(--site-radius) * 0.7); border: 1px solid var(--site-border); }

/* Forum : solution, encart Rejoindre, sujets proches. */
.forum-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 20px; padding: 14px 16px; background: var(--site-surface); border: 1px solid var(--site-border); border-left: 3px solid var(--site-accent); border-radius: calc(var(--site-radius) * 0.7); }
.forum-cta p { margin: 0; }
.forum-cta-title { font-weight: 600; }
.forum-status, .forum-jump { margin: 0 0 12px; }
.forum-jump a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.forum-post.is-accepted { border-color: #22c55e; box-shadow: inset 3px 0 0 #22c55e; }
.forum-accepted-label { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; color: #15803d; }
[data-effective="dark"] .forum-accepted-label { color: #4ade80; }
.forum-related { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--site-border); }
.forum-related h2 { margin: 0 0 12px; font-size: 1.1rem; }
.forum-related ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.forum-related li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }

/* Aperçu privé d'un site pas encore en ligne. */
.preview-bar { background: #fef3c7; color: #422006; border-bottom: 1px solid #f59e0b; font-size: 0.92rem; }
.preview-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.preview-bar p { margin: 0; }
.layout-side > .preview-bar { grid-column: 1 / -1; }

/* ─── Pouls ─────────────────────────────────────────────────────────────── */

.pulse { display: grid; gap: 16px; padding: 18px 20px; text-align: left; background: var(--site-bg); color: var(--site-text); border: 1px solid var(--site-border); border-radius: var(--site-radius); box-shadow: 0 12px 32px rgb(0 0 0 / 0.22); }
.mod-pulse .pulse { box-shadow: none; }
.pulse-mood { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-weight: 600; line-height: 1.35; }
.pulse-live { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--site-muted); }
.pulse-dot { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse-ring 2s ease-out infinite; }
@keyframes pulse-ring { from { transform: scale(1); opacity: 0.55; } to { transform: scale(2.8); opacity: 0; } }
.pulse-mood-quiet .pulse-dot { background: var(--site-muted); }
.pulse-mood-quiet .pulse-dot::after { animation: none; }
.pulse-mood-busy .pulse-dot, .pulse-mood-peak .pulse-dot { background: #f97316; }
.pulse-mood-peak .pulse-dot::after { animation-duration: 1.1s; }
.pulse-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 12px; margin: 0; }
@media (max-width: 480px) { .pulse-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pulse-stat { display: flex; flex-direction: column-reverse; gap: 2px; min-width: 0; }
.pulse-stat dt { font-size: 0.8rem; line-height: 1.3; color: var(--site-muted); }
.pulse-stat dd { margin: 0; font-size: 1.65rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; transition: color 0.4s; }
.pulse-stat dd.pulse-bump { color: var(--site-accent); }
.pulse-chart { margin: 0; }
.pulse-chart svg { display: block; width: 100%; height: 44px; color: var(--site-accent); }
.pulse-bar { fill: currentColor; opacity: 0.32; }
.pulse-bar-now { opacity: 1; }
.pulse-chart figcaption { margin-top: 6px; font-size: 0.78rem; text-align: left; color: var(--site-muted); }
/* Une colonne dans la bannière ; deux quand le bloc a la largeur d'une page. */
.pulse-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px 24px; }
.pulse-label { margin: 0 0 6px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--site-muted); }
.pulse-hot, .pulse-rooms { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pulse-hot li, .pulse-rooms li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.92rem; }
.pulse-channel, .pulse-room { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pulse-room { display: inline-flex; align-items: center; gap: 4px; }
.pulse-muted { margin-left: auto; font-size: 0.85rem; white-space: nowrap; color: var(--site-muted); }
.pulse-faces { display: inline-flex; flex: none; }
.pulse-faces .avatar { margin-left: -8px; border: 2px solid var(--site-bg); }
.pulse-faces .avatar:first-child { margin-left: 0; }
.pulse-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding-top: 14px; border-top: 1px solid var(--site-border); }
.pulse-next .pulse-label { margin: 0; }
.pulse-next time { font-weight: 600; color: var(--site-accent); }

/* ─── Contenu ───────────────────────────────────────────────────────────── */

.main { padding-top: 36px; padding-bottom: 56px; flex: 1; }
.home-section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--site-border); }
.section-head h2 { margin: 0; font-size: 1.4rem; position: relative; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: -12px; width: 48px; height: 2px; background: var(--site-accent); }
.section-head a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 0.92rem; text-decoration: none; }

.page-hero { margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--site-border); }
.page-banner { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: var(--site-radius); margin-bottom: 20px; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.01em; }
.page-lead { color: var(--site-muted); font-size: 1.08rem; margin: 0; max-width: 70ch; }
.page-meta { color: var(--site-muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; font-size: 0.88rem; color: var(--site-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.breadcrumb a { color: var(--site-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--site-text); }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: start; }
.with-aside > aside { position: sticky; top: 88px; }
@media (max-width: 1080px) { .with-aside { grid-template-columns: 1fr; } .with-aside > aside { position: static; } }

.prose { max-width: 76ch; }
.prose.wide, .doc-wide .prose { max-width: none; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4, .prose h5 { line-height: 1.25; margin: 1.8em 0 0.5em; position: relative; scroll-margin-top: 88px; }
.prose .doc-h1 { font-size: 1.85rem; }
.prose .doc-h2 { font-size: 1.45rem; }
.prose .doc-h3 { font-size: 1.2rem; }
.prose .doc-h4 { font-size: 1.05rem; }
.anchor { margin-left: 8px; color: var(--site-muted); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor, .prose h5:hover .anchor { opacity: 1; }
.prose p { margin: 0.8em 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--site-accent); color: var(--site-muted); }
.prose hr { border: 0; border-top: 1px solid var(--site-border); margin: 2.2em 0; }
.prose code, .rich code, .rich .dc-code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; padding: 0.15em 0.4em; border-radius: 4px; background: var(--site-surface-strong); }
.prose pre, .rich .dc-pre { overflow-x: auto; padding: 14px 16px; border-radius: calc(var(--site-radius) * 0.7); background: var(--site-surface-strong); border: 1px solid var(--site-border); font-size: 0.88rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; }
.prose .ta-center { text-align: center; } .prose .ta-right { text-align: right; } .prose .ta-justify { text-align: justify; }
mark { color: inherit; padding: 0 0.15em; border-radius: 3px; }
.hl-accent { background: color-mix(in srgb, var(--site-accent) 30%, transparent); }
.hl-yellow { background: rgb(250 204 21 / 0.35); } .hl-green { background: rgb(34 197 94 / 0.3); } .hl-blue { background: rgb(59 130 246 / 0.3); }
.hl-pink { background: rgb(236 72 153 / 0.3); } .hl-red { background: rgb(239 68 68 / 0.3); }

.tasks { list-style: none; padding-left: 0 !important; }
.task { display: flex; gap: 10px; }
.task-box { flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 4px; border: 2px solid var(--site-border); }
.task.done .task-box { background: var(--site-accent); border-color: var(--site-accent); }
.task.done > div { color: var(--site-muted); text-decoration: line-through; }

.img { margin: 1.6em 0; }
.img img { display: block; border-radius: var(--site-radius); }
.img-small img { max-width: 360px; margin: 0 auto; } .img-medium img { max-width: 620px; margin: 0 auto; } .img-wide img, .img-full img { width: 100%; }
figcaption { color: var(--site-muted); font-size: 0.88rem; text-align: center; margin-top: 8px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--site-radius); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--site-border); border-radius: calc(var(--site-radius) * 0.7); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--site-border); text-align: left; vertical-align: top; }
.table-wrap th { background: var(--site-surface-strong); font-weight: 600; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td > p:first-child, .table-wrap th > p:first-child { margin-top: 0; }
.table-wrap td > p:last-child, .table-wrap th > p:last-child { margin-bottom: 0; }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-left: 4px solid var(--callout, var(--site-accent)); }
.callout-info { --callout: #3b82f6; } .callout-success { --callout: #22c55e; } .callout-warning { --callout: #f59e0b; } .callout-danger { --callout: #ef4444; } .callout-note { --callout: var(--site-muted); }
.callout-icon { flex: none; color: var(--callout, var(--site-accent)); line-height: 0; padding-top: 3px; }
.callout-icon svg { width: 20px; height: 20px; }
.callout-body > :first-child { margin-top: 0; } .callout-body > :last-child { margin-bottom: 0; }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border: 1px solid var(--site-border); border-radius: calc(var(--site-radius) * 0.7); background: var(--site-surface); }
.faq-item summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--site-muted); font-weight: 400; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 16px 14px; }
.faq-answer > :first-child { margin-top: 0; }

.toc { padding: 14px 16px; font-size: 0.92rem; }
.toc-title { margin: 0 0 8px; font-weight: 700; font-size: 0.95rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 4px 0; }
.toc a { color: var(--site-muted); text-decoration: none; }
.toc a:hover { color: var(--site-text); }
.toc .toc-l3 { padding-left: 12px; } .toc .toc-l4 { padding-left: 24px; }

/* Grille bento */
.bento { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 16px; margin: 1.4em 0; }
.bento.cols-1 { --cols: 1; } .bento.cols-2 { --cols: 2; } .bento.cols-3 { --cols: 3; } .bento.cols-4 { --cols: 4; }
.bento .cell { min-width: 0; }
.bento .cell.surface { padding: 20px; }
.bento .span-2 { grid-column: span 2; } .bento .span-3 { grid-column: span 3; } .bento .span-4 { grid-column: span 4; }
.bento .rows-2 { grid-row: span 2; } .bento .rows-3 { grid-row: span 3; }
.bento .cell > :first-child { margin-top: 0; } .bento .cell > :last-child { margin-bottom: 0; }
@media (max-width: 760px) { .bento { grid-template-columns: 1fr; } .bento .cell { grid-column: auto !important; grid-row: auto !important; } }

/* ─── Boutons, pastilles, formulaires ──────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: calc(var(--site-radius) * 0.6);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, filter 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--site-accent); color: var(--site-on-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--site-surface-strong); color: var(--site-text); border-color: var(--site-border); }
.btn-secondary:hover { border-color: var(--site-accent); }
.btn-ghost { background: transparent; color: var(--site-text); }
.btn-ghost:hover { background: var(--site-surface-strong); }
.btn-sm { padding: 7px 12px; font-size: 0.88rem; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-discord::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--discord-logo) center / contain no-repeat; mask: var(--discord-logo) center / contain no-repeat; }
.btn-row { margin: 1.2em 0; }
.btn-row.ta-center { text-align: center; } .btn-row.ta-right { text-align: right; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; background: var(--site-surface-strong); color: var(--site-muted); border: 1px solid var(--site-border); }
.pill-ok { color: #16a34a; background: rgb(34 197 94 / 0.12); border-color: rgb(34 197 94 / 0.3); }
.pill-muted { opacity: 0.85; }
.pill-live { color: #ef4444; background: rgb(239 68 68 / 0.12); border-color: rgb(239 68 68 / 0.3); }
.pill-status-approved, .pill-status-implemented { color: #16a34a; background: rgb(34 197 94 / 0.12); border-color: rgb(34 197 94 / 0.3); }
.pill-status-rejected { color: #dc2626; background: rgb(239 68 68 / 0.1); border-color: rgb(239 68 68 / 0.3); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 4px; background: var(--site-surface-strong); color: var(--site-muted); font-size: 0.8rem; text-decoration: none; margin: 0 6px 6px 0; }
.tag:hover { color: var(--site-text); }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.94rem; padding: 0; }
.field-help { margin: 0; color: var(--site-muted); font-size: 0.86rem; }
.req { color: #ef4444; margin-left: 3px; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--site-text);
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: calc(var(--site-radius) * 0.55);
  padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--site-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--site-accent) 22%, transparent); }
textarea { resize: vertical; min-height: 96px; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choice { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; cursor: pointer; }
.choice input { accent-color: var(--site-accent); width: 18px; height: 18px; }
.form-status { min-height: 1.4em; margin: 4px 0 10px; font-size: 0.92rem; color: var(--site-muted); }
.form-status.is-error { color: #ef4444; }
.form-status.is-ok { color: #16a34a; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.form-auth { padding: 10px 12px; border-radius: calc(var(--site-radius) * 0.55); background: var(--site-surface-strong); color: var(--site-muted); font-size: 0.92rem; }
.site-form, .suggest-form { max-width: 680px; }
.search-form { display: flex; gap: 8px; max-width: 560px; }

/* ─── Blocs de modules ─────────────────────────────────────────────────── */

.mod { padding: 22px; margin: 1.4em 0; }
.bento .mod { margin: 0; }
.cell > .mod:only-child { border: 0; background: transparent; padding: 0; box-shadow: none; }
.mod-title { font-weight: 700; font-size: 1.15rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; font-family: var(--site-heading-font), var(--site-font), sans-serif; }
.mod-lead { color: var(--site-muted); margin: -6px 0 14px; }
.mod-meta { color: var(--site-muted); font-size: 0.88rem; margin: 0 0 12px; }
.empty { color: var(--site-muted); margin: 0; padding: 8px 0; }
.group-title { font-size: 1rem; margin: 0 0 12px; color: var(--group, var(--site-text)); display: flex; align-items: center; gap: 8px; }
.staff-group + .staff-group { margin-top: 28px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card-grid-sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card-grid > article, .stack > article { overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: border-color 0.15s, transform 0.15s; }
.card-grid > article:hover { border-color: color-mix(in srgb, var(--site-accent) 45%, var(--site-border)); }
.mod .card-grid > article, .mod .stack > article { background: var(--site-surface-strong); box-shadow: none; }
.stack > article { flex-direction: row; }
.stack > article .card-cover { width: 180px; aspect-ratio: auto; height: 100%; flex: none; }
@media (max-width: 600px) { .stack > article { flex-direction: column; } .stack > article .card-cover { width: 100%; aspect-ratio: 16 / 9; } }
.card-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--site-surface-strong); }
.card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.card-kicker { margin: 0; font-size: 0.84rem; font-weight: 600; color: var(--site-muted); }
.card-title { margin: 0; font-size: 1.08rem; line-height: 1.3; font-family: var(--site-heading-font), var(--site-font), sans-serif; display: flex; align-items: center; gap: 8px; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--site-accent); }
.card-text { margin: 0; color: var(--site-muted); font-size: 0.94rem; }
.card-meta { margin: 0; color: var(--site-muted); font-size: 0.86rem; display: flex; align-items: center; gap: 6px; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.news-more summary { cursor: pointer; color: var(--site-accent); font-weight: 600; font-size: 0.9rem; }
.rich { white-space: pre-line; overflow-wrap: anywhere; }
.rich .dc-heading { white-space: normal; }
.rich .dc-mention { color: var(--site-accent); background: color-mix(in srgb, var(--site-accent) 14%, transparent); border-radius: 3px; padding: 0 4px; }
.rich .dc-emoji { height: 1.3em; width: auto; vertical-align: -0.25em; }
.rich .dc-quote { border-left: 3px solid var(--site-border); padding-left: 10px; color: var(--site-muted); }
.rich .dc-subtext { color: var(--site-muted); font-size: 0.85em; }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; background: var(--site-surface-strong); }
.avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar-fallback { background: color-mix(in srgb, var(--site-accent) 22%, var(--site-surface)); color: var(--site-text); font-weight: 700; }

.staff-card { flex-direction: row !important; gap: 14px; padding: 16px; align-items: flex-start; }
.staff-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.staff-name { margin: 0; font-size: 1.02rem; }
.staff-grade { margin: 0; font-size: 0.86rem; font-weight: 600; color: var(--grade, var(--site-accent)); }
.staff-bio { margin: 4px 0 0; font-size: 0.92rem; color: var(--site-text); }
.staff-meta { margin: 0; font-size: 0.82rem; color: var(--site-muted); }
.staff-card .pill { align-self: flex-start; }
.org { display: flex; flex-direction: column; gap: 18px; }
.org-grade { margin: 0 0 8px; font-weight: 700; font-size: 0.95rem; color: var(--site-muted); text-align: center; }
.org-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.org-row .staff-card { width: min(320px, 100%); background: var(--site-surface-strong); border: 1px solid var(--site-border); border-radius: var(--site-radius); }

.rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; gap: 14px; padding: 14px 16px; background: var(--site-surface-strong); border: 1px solid var(--site-border); border-radius: calc(var(--site-radius) * 0.7); scroll-margin-top: 88px; }
.rule-num { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--site-accent); color: var(--site-on-accent); font-weight: 700; }
.rule-title { margin: 0 0 4px; font-size: 1rem; }
.rule-desc { color: var(--site-muted); font-size: 0.94rem; }

.leaderboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: calc(var(--site-radius) * 0.6); background: var(--site-surface-strong); }
.lb-rank { flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 6px; font-weight: 700; font-size: 0.85rem; color: var(--site-muted); }
.lb-top-1 .lb-rank { background: #eab308; color: #1a1300; } .lb-top-2 .lb-rank { background: #94a3b8; color: #0b1220; } .lb-top-3 .lb-rank { background: #c2773e; color: #1f0f03; }
.lb-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; }
.lb-name small { font-weight: 400; color: var(--site-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-level, .lb-meta { color: var(--site-muted); font-size: 0.85rem; white-space: nowrap; }
.lb-value { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.clan-icon { flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--site-accent) 18%, transparent); font-weight: 700; }
@media (max-width: 520px) { .lb-meta { display: none; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; border-radius: calc(var(--site-radius) * 0.7); background: var(--site-surface-strong); border: 1px solid var(--site-border); border-top: 3px solid var(--site-accent); }
.stat-value { margin: 0; font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--site-heading-font), var(--site-font), sans-serif; }
.stat-label { margin: 0; color: var(--site-muted); font-size: 0.88rem; }

.presence { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.presence-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.presence-sep { color: var(--site-muted); }

.voice { display: flex; flex-direction: column; gap: 12px; }
.voice-channel { margin: 0 0 6px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.voice-members { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.voice-members li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--site-surface-strong); font-size: 0.86rem; }
.voice-more { padding: 4px 10px !important; color: var(--site-muted); }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feed-item { display: flex; gap: 12px; }
.feed-body { min-width: 0; flex: 1; }
.feed-head { margin: 0 0 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-time { color: var(--site-muted); font-size: 0.8rem; text-decoration: none; }
.feed-content { font-size: 0.95rem; }
.feed-image { display: block; max-height: 280px; width: auto; margin-top: 8px; border-radius: calc(var(--site-radius) * 0.6); }
.star-score { margin-left: auto; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.star-score svg { color: #eab308; }

.suggestions { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.suggest { display: flex; gap: 14px; padding: 14px; border-radius: calc(var(--site-radius) * 0.7); background: var(--site-surface-strong); border: 1px solid var(--site-border); }
.suggest-votes { display: flex; flex-direction: column; gap: 6px; }
.vote { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--site-border); background: var(--site-surface); color: var(--site-muted); font: inherit; font-size: 0.85rem; cursor: pointer; }
.vote svg { width: 16px; height: 16px; }
span.vote { cursor: default; }
.vote.is-active.vote-up { color: #16a34a; border-color: #16a34a; }
.vote.is-active.vote-down { color: #dc2626; border-color: #dc2626; }
.suggest-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.suggest-response { margin-top: 6px; padding: 10px 12px; border-left: 3px solid var(--site-accent); background: var(--site-surface); border-radius: 0 6px 6px 0; }
.suggest-response-title { margin: 0 0 4px; font-weight: 600; font-size: 0.86rem; }

.market-item { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.market-emoji { font-size: 1.3rem; line-height: 1; }
.market-emoji svg { color: var(--site-muted); }
.market-qty { color: var(--site-muted); font-weight: 400; }
.market-price { margin: 0; font-weight: 700; font-size: 1.05rem; }
.market-price small { font-weight: 400; color: var(--site-muted); font-size: 0.8rem; }
.rarity-uncommon { box-shadow: inset 3px 0 0 #22c55e; } .rarity-rare { box-shadow: inset 3px 0 0 #3b82f6; }
.rarity-epic { box-shadow: inset 3px 0 0 #a855f7; } .rarity-legendary { box-shadow: inset 3px 0 0 #f59e0b; }

.profile { display: flex; flex-direction: column; gap: 16px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-name { margin: 0; font-size: 1.2rem; font-weight: 700; }

.wiki-tree { list-style: none; margin: 0; padding: 0; }
.wiki-tree .wiki-tree { padding-left: 14px; border-left: 1px solid var(--site-border); margin-left: 8px; }
.wiki-tree a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--site-muted); text-decoration: none; font-size: 0.94rem; }
.wiki-tree a:hover { color: var(--site-text); background: var(--site-surface-strong); }
.wiki-tree a[aria-current="page"] { color: var(--site-accent); background: color-mix(in srgb, var(--site-accent) 12%, transparent); font-weight: 600; }
.wiki-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.wiki-layout > nav { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; }
@media (max-width: 900px) { .wiki-layout { grid-template-columns: 1fr; } .wiki-layout > nav { position: static; max-height: none; } }

.tags { margin: 6px 0 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; }
.pager a { flex: 1; padding: 14px 16px; border: 1px solid var(--site-border); border-radius: var(--site-radius); text-decoration: none; color: var(--site-text); background: var(--site-surface); }
.pager a:hover { border-color: var(--site-accent); }
.pager small { display: block; color: var(--site-muted); font-size: 0.82rem; }
.pager .next { text-align: right; }

.comments { margin-top: 48px; max-width: 76ch; }
.comment-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 12px; }

.search-results { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 12px; }
.search-results li { padding: 14px 16px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); }
.search-results a { font-weight: 600; text-decoration: none; }
.search-results p { margin: 4px 0 0; color: var(--site-muted); font-size: 0.92rem; }
.search-results mark { background: color-mix(in srgb, var(--site-accent) 25%, transparent); }

.notice { padding: 12px 16px; border-radius: var(--site-radius); border: 1px solid color-mix(in srgb, var(--site-accent) 40%, var(--site-border)); background: color-mix(in srgb, var(--site-accent) 10%, var(--site-surface)); margin-bottom: 20px; }
.state-page { text-align: center; padding: 72px 16px; max-width: 560px; margin: 0 auto; }
.state-page h1 { font-size: 2rem; margin: 0 0 8px; }
.state-page p { color: var(--site-muted); }

.ticket-thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; padding: 4px; margin-bottom: 12px; }
.ticket-msg { max-width: 80%; padding: 8px 12px; border-radius: 10px; background: var(--site-surface-strong); }
.ticket-msg.is-mine { align-self: flex-end; background: color-mix(in srgb, var(--site-accent) 18%, var(--site-surface)); }
.ticket-msg small { display: block; color: var(--site-muted); font-size: 0.75rem; }

/* ─── Pied de page ─────────────────────────────────────────────────────── */

.site-footer { background: var(--site-footer); color: var(--site-footer-text); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; padding-top: 44px; padding-bottom: 36px; }
.footer-about .brand { color: inherit; filter: brightness(1.25); }
.footer-about .brand img, .footer-about .brand-fallback { width: 32px; height: 32px; }
.footer-about p { margin: 12px 0 0; max-width: 46ch; font-size: 0.94rem; }
.footer-col h2 { margin: 0 0 12px; font-size: 0.98rem; font-family: var(--site-heading-font), var(--site-font), sans-serif; color: inherit; filter: brightness(1.3); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-col a { color: inherit; text-decoration: none; font-size: 0.94rem; display: inline-flex; padding: 0; opacity: 1; font-weight: 400; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { padding-top: 16px; padding-bottom: 18px; border-top: 1px solid color-mix(in srgb, var(--site-footer-text) 18%, transparent); font-size: 0.86rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; } }

/* Habillage Kotbo : hors de .site-root, hors de portée du CSS libre. */
.kotbo-bar {
  position: relative;
  z-index: 2147483647;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  padding: 10px 16px 14px;
  font: 500 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--site-footer-text);
  background: var(--site-footer);
}
.kotbo-bar a, .kotbo-bar button { color: var(--site-footer-text); background: none; border: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.kotbo-bar a:hover, .kotbo-bar button:hover { filter: brightness(1.3); }
.kotbo-mark { display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; font-weight: 600; }

dialog.kotbo-dialog {
  width: min(480px, calc(100vw - 32px));
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: var(--site-surface);
  color: var(--site-text);
  padding: 20px;
  font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
dialog.kotbo-dialog::backdrop { background: rgb(0 0 0 / 0.55); }
dialog.kotbo-dialog h2 { margin: 0 0 6px; font-size: 1.2rem; }
dialog.kotbo-dialog p { margin: 0 0 14px; color: var(--site-muted); }

.viewer-slot { display: inline-flex; }
/* Connexion en un rond (logo Discord) ; le pseudo n'est plus affiché, seule la photo reste. */
.viewer-login { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--site-accent); color: var(--site-on-accent); text-decoration: none; }
.viewer-login::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--discord-logo) center / contain no-repeat; mask: var(--discord-logo) center / contain no-repeat; }
.viewer-slot .viewer-chip { padding: 3px; }
.viewer-slot .viewer-chip span { display: none; }
.viewer-slot .viewer-chip .avatar-sm { width: 32px; height: 32px; }
.viewer-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; text-decoration: none; font-size: 0.9rem; font-weight: 600; }

@media print {
  .site-header, .side-nav, .kotbo-bar, .site-footer, .side-top, .site-hero { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

.panel { padding: 14px 16px; margin-bottom: 16px; background: var(--site-surface-strong); border: 1px solid var(--site-border); border-radius: calc(var(--site-radius) * 0.7); }
.mod-title-spaced { margin-top: 20px; }
.appeal-sanction { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--site-border); }
.appeal-sanction:last-child { border-bottom: 0; }
.appeal-sanction textarea { min-height: 56px; }

/* Agent MCP en train de modifier le site (visible des seuls gérants) */
.kotbo-agent { position: fixed; right: 16px; bottom: 16px; z-index: 2147483647; display: flex; align-items: center; gap: 10px; max-width: min(460px, calc(100vw - 32px)); padding: 10px 12px; border-radius: 8px; background: #1b1f26; color: #eef1f5; border: 1px solid #39414d; box-shadow: 0 10px 24px rgb(0 0 0 / 0.35); font: 500 14px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif; }
.kotbo-agent-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; }
.kotbo-agent-stop { flex: none; margin-left: auto; padding: 6px 10px; border-radius: 6px; border: 0; background: #ef4444; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }

/* ─── Sections prêtes à l'emploi ───────────────────────────────────────── */

/* Bannière d'appel : texte éditable sur fond uni, couleur d'accent ou image. */
.sec-banner { margin: 1.6em 0; border-radius: var(--site-radius); overflow: hidden; border: 1px solid var(--site-border); background: var(--site-surface-strong); color: var(--site-text); }
.sec-banner.tone-accent { background: var(--site-accent); color: var(--site-on-accent); border-color: transparent; }
.sec-banner.tone-dark { background: #14171c; color: #f1f3f6; border-color: transparent; }
.sec-banner.has-image { color: #fff; border-color: transparent; background: linear-gradient(rgb(0 0 0 / 0.45), rgb(0 0 0 / 0.65)), var(--banner-image) center / cover no-repeat, #111; }
.sec-banner-inner { padding: 44px 32px; max-width: 760px; }
.sec-banner.align-center .sec-banner-inner { margin: 0 auto; text-align: center; }
.sec-banner.is-tall .sec-banner-inner { padding-top: 96px; padding-bottom: 96px; }
.sec-banner-inner > :first-child { margin-top: 0; }
.sec-banner-inner > :last-child { margin-bottom: 0; }
.sec-banner h2, .sec-banner h3 { margin-top: 0; }
.sec-banner a:not(.btn) { color: inherit; }
.sec-banner.tone-accent .btn-primary, .sec-banner.has-image .btn-primary, .sec-banner.tone-dark .btn-primary { background: #fff; color: #111; }
.sec-banner.tone-accent .btn-secondary, .sec-banner.has-image .btn-secondary, .sec-banner.tone-dark .btn-secondary { background: transparent; color: inherit; border-color: currentColor; }
@media (max-width: 600px) { .sec-banner-inner { padding: 32px 20px; } }

/* Chiffres clés : une bande de grands nombres. */
.key-stats { display: grid; grid-template-columns: repeat(min(var(--count, 3), 4), minmax(0, 1fr)); gap: 0; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); }
.key-stat { padding: 22px 16px; text-align: center; }
.key-stat + .key-stat { border-left: 1px solid var(--site-border); }
.key-stat-value { margin: 0; font-family: var(--site-heading-font), var(--site-font), sans-serif; font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; line-height: 1.1; color: var(--site-accent); font-variant-numeric: tabular-nums; }
.key-stat-label { margin: 6px 0 0; color: var(--site-muted); font-size: 0.92rem; }
.mod-keyStats { padding: 0; border: 0; background: none; box-shadow: none; }
@media (max-width: 700px) { .key-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .key-stat:nth-child(odd) { border-left: 0; } .key-stat:nth-child(n + 3) { border-top: 1px solid var(--site-border); } }

/* Galerie : grille ou défilement horizontal aimanté (sans script). */
.gallery { margin: 1.6em 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px; }
.gallery-grid.cols-2 { --cols: 2; } .gallery-grid.cols-3 { --cols: 3; } .gallery-grid.cols-4 { --cols: 4; }
.gallery-item { margin: 0; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--site-radius) * 0.7); background: var(--site-surface-strong); }
.gallery-item figcaption { text-align: left; margin-top: 6px; }
.gallery-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.gallery-carousel .gallery-item { flex: 0 0 min(78%, 520px); scroll-snap-align: start; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Témoignages */
.testimonials { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; margin: 1.6em 0; }
.testimonials.cols-1 { --cols: 1; } .testimonials.cols-2 { --cols: 2; } .testimonials.cols-3 { --cols: 3; }
.testimonial { margin: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--site-surface); border: 1px solid var(--site-border); border-radius: var(--site-radius); }
.testimonial blockquote { margin: 0; padding: 0; border: 0; color: var(--site-text); font-size: 1rem; }
.testimonial blockquote > :first-child { margin-top: 0; }
.testimonial blockquote > :last-child { margin-bottom: 0; }
.testimonial figcaption { display: flex; align-items: center; gap: 10px; margin-top: auto; text-align: left; color: var(--site-text); font-size: 0.92rem; }
.testimonial figcaption > span { display: flex; flex-direction: column; line-height: 1.3; }
.testimonial figcaption span span { color: var(--site-muted); font-size: 0.85rem; }
.testimonial-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: var(--site-accent); color: var(--site-on-accent); font-weight: 700; }
@media (max-width: 860px) { .testimonials { grid-template-columns: 1fr; } }

/* Votes */
.vote-card .card-meta svg { color: var(--site-muted); }
.vote-ready { color: #16a34a; font-weight: 600; }
.vote-ready svg { color: currentColor !important; }
.vote-card.is-waiting { opacity: 0.85; }
.lb-name a { color: inherit; text-decoration: none; }
.lb-name a:hover { color: var(--site-accent); }

/* Boutique */
.status-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--site-border); border-radius: var(--site-radius, 8px); }
.status-line-main { min-width: 0; }
.status-line .tag { margin: 0; flex: none; }

/* Forum */
.forum-cats, .forum-topics, .forum-posts { list-style: none; margin: 0; padding: 0; }
.forum-cats { display: flex; flex-direction: column; gap: 10px; }
.forum-cat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); color: inherit; text-decoration: none; transition: border-color 0.15s; }
.forum-cat:hover { border-color: color-mix(in srgb, var(--site-accent) 45%, var(--site-border)); }
.forum-cat-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--site-surface-strong); color: var(--site-accent); }
.forum-cat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forum-cat-desc { color: var(--site-muted); font-size: 0.92rem; }
.forum-cat-stats { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 0.88rem; }
.forum-cat-stats .tag { margin: 2px 0 0; }
.forum-toolbar { margin-bottom: 16px; }
.forum-new > summary { list-style: none; display: inline-flex; cursor: pointer; }
.forum-new > summary::-webkit-details-marker { display: none; }
.forum-new[open] > summary { margin-bottom: 12px; }
.forum-form { padding: 16px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); }
.forum-topics { border: 1px solid var(--site-border); border-radius: var(--site-radius); overflow: hidden; }
.forum-topic { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--site-border); }
.forum-topic:first-child { border-top: 0; }
.forum-topic.is-pinned { background: var(--site-surface); }
.forum-topic-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forum-topic-title { font-weight: 600; color: var(--site-text); text-decoration: none; overflow-wrap: anywhere; }
.forum-topic-title:hover { color: var(--site-accent); }
.forum-topic-title svg { vertical-align: -2px; color: var(--site-muted); }
.forum-topic-count { font-size: 0.88rem; color: var(--site-muted); white-space: nowrap; }
.forum-topic-last { text-align: right; }
.forum-posts { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.forum-post { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); }
.forum-post-body { flex: 1; min-width: 0; }
.forum-post-head { margin: 0 0 6px; }
.forum-post-head a { color: inherit; text-decoration: none; }
.forum-post-actions { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
.forum-post-actions:empty { display: none; }
.forum-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.forum-pager-pos { color: var(--site-muted); font-size: 0.9rem; }
.forum-locked { margin-top: 12px; }
@media (max-width: 640px) {
  .forum-topic { grid-template-columns: minmax(0, 1fr) auto; }
  .forum-topic-last { display: none; }
  .forum-cat-stats { display: none; }
}

/* Nouveautés */
.changelog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.changelog-date { margin: 0 0 6px; font-size: 0.85rem; font-weight: 600; color: var(--site-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.changelog-day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.changelog-day li { display: flex; align-items: center; gap: 8px; }
.changelog-icon { flex: none; display: inline-grid; place-items: center; color: var(--site-accent); }

/* Quêtes et candidatures */
.quests { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quest { padding: 12px 14px; border: 1px solid var(--site-border); border-radius: var(--site-radius); display: flex; flex-direction: column; gap: 6px; }
.quest-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quest-head .tag { margin: 0; }
.quest-bar { height: 8px; border-radius: 999px; background: var(--site-surface-strong); overflow: hidden; }
.quest-bar span { display: block; height: 100%; background: var(--site-accent); border-radius: inherit; }
.quest.is-done .quest-bar span { background: #16a34a; }
.application-approved { color: #16a34a; }
.application-rejected, .application-auto_rejected { color: #ef4444; }
