/* ==========================================================
   Ani!mo France - identité « serveur communautaire »
   Chargée en dernier sur toutes les pages publiques.
   1. Jetons            4. Composants partagés
   2. Coquille          5. Accueil (classes dc-*)
   3. Rail et onglets   6. Mobile et accessibilité
   Les couleurs suivent le thème actif via les jetons --t-*.
   ========================================================== */

/* ---------- 1. Jetons ---------- */

:root {
  --dc-bg: var(--t-bg);
  --dc-rail-bg: color-mix(in srgb, var(--t-bg) 78%, black);
  --dc-surface: color-mix(in srgb, var(--t-bg) 90%, white);
  --dc-surface-2: color-mix(in srgb, var(--t-bg) 84%, white);
  --dc-surface-3: color-mix(in srgb, var(--t-bg) 76%, white);
  --dc-border: rgba(255, 255, 255, 0.08);
  --dc-border-strong: rgba(255, 255, 255, 0.16);
  --dc-text: #f2f5ff;
  --dc-muted: color-mix(in srgb, var(--t-soft) 82%, var(--t-bg));
  --dc-blurple: #5865f2;
  --dc-blurple-2: #4752c4;
  --dc-green: #23a55a;
  --dc-yellow: #f0b232;
  --dc-red: #f23f43;
  --dc-accent: var(--t-accent);
  --dc-warm: var(--t-warm);
  --dc-radius: 16px;
  --dc-radius-sm: 10px;
  --dc-rail: 72px;
  --dc-tabs: 62px;
  --dc-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dc-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

/* ---------- 2. Coquille ---------- */

html body {
  color: var(--dc-text);
  background:
    linear-gradient(180deg, rgba(var(--t-bg-rgb), 0.74) 0, rgba(var(--t-bg-rgb), 0.94) 420px, var(--dc-bg) 760px),
    url("/assets/modules/background.png") center top / max(100%, 1400px) auto no-repeat;
  background-color: var(--dc-bg);
}

html body::before {
  opacity: 1;
  mix-blend-mode: normal;
  background:
    radial-gradient(720px 420px at 8% -4%, rgba(88, 101, 242, 0.22), transparent 70%),
    radial-gradient(640px 400px at 96% 2%, rgba(var(--t-tint-b), 0.14), transparent 70%);
}

html body .site-header {
  border-bottom: 1px solid var(--dc-border);
  background: color-mix(in srgb, var(--dc-bg) 90%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

html body .brand-mark {
  border-radius: 14px;
  transition: border-radius 220ms var(--dc-ease);
}

html body .brand-link:hover .brand-mark {
  border-radius: 50%;
}

html body .brand-kicker {
  color: var(--dc-muted);
}

/* Présence du serveur dans l'en-tête (remplie par aniimo-ui.js). */
.dc-presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--dc-border);
  border-radius: 999px;
  color: var(--dc-text);
  background: var(--dc-surface);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.dc-presence:hover {
  border-color: var(--dc-green);
  background: var(--dc-surface-2);
}

.dc-presence small {
  color: var(--dc-muted);
  font-size: inherit;
  font-weight: 600;
}

.dc-presence + .aniipote-global-trigger,
.dc-presence + .nav-toggle {
  margin-left: 0;
}

.dc-dot {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dc-green);
}

.dc-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--dc-green);
  opacity: 0;
  animation: dc-ping 2.4s ease-out infinite;
}

.dc-dot.is-idle {
  background: #80848e;
}

.dc-dot.is-idle::after {
  display: none;
}

@keyframes dc-ping {
  0% {
    opacity: 0.7;
    transform: scale(0.6);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

html body .aniipote-global-trigger,
html body .nav-toggle {
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  background: var(--dc-surface);
  box-shadow: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

html body .aniipote-global-trigger:hover,
html body .nav-toggle:hover {
  border-color: var(--dc-border-strong);
  background: var(--dc-surface-3);
}

/* Menu déroulant : une liste de salons. */
html body .site-header .primary-nav {
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
  box-shadow: var(--dc-shadow);
}

html body .site-header .primary-nav > a {
  border: 0;
  border-radius: 8px;
  color: var(--dc-muted);
  background: transparent;
  font-weight: 650;
  box-shadow: none;
  transition:
    color 140ms ease,
    background-color 140ms ease;
}

html body .site-header .primary-nav > a::before {
  content: "#";
  margin-right: 8px;
  color: color-mix(in srgb, var(--dc-muted) 60%, transparent);
  font-weight: 800;
}

html body .site-header .primary-nav > a:hover {
  color: var(--dc-text);
  background: var(--dc-surface-3);
}

html body .site-header .primary-nav > a[aria-current="page"] {
  color: #fff;
  background: color-mix(in srgb, var(--dc-blurple) 34%, var(--dc-surface));
}

html body .site-footer {
  margin-top: 0;
  border-top: 1px solid var(--dc-border);
  background: var(--dc-rail-bg);
}

html body .site-footer h2 {
  color: var(--dc-muted);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html body .site-footer nav a {
  color: var(--dc-text);
  opacity: 0.86;
  text-decoration: none;
}

html body .site-footer nav a:hover {
  color: var(--dc-accent);
  opacity: 1;
}

/* ---------- 3. Rail (bureau) et onglets (mobile) ---------- */

.dc-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: var(--dc-rail);
  padding: 12px 0;
  background: var(--dc-rail-bg);
  border-right: 1px solid var(--dc-border);
  overflow-y: auto;
  scrollbar-width: none;
}

.dc-rail::-webkit-scrollbar {
  display: none;
}

.dc-rail a {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--dc-text);
  background: var(--dc-surface-2);
  text-decoration: none;
  transition:
    border-radius 200ms var(--dc-ease),
    background-color 200ms ease,
    color 200ms ease;
}

.dc-rail a svg {
  width: 22px;
  height: 22px;
}

.dc-rail a img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.dc-rail a:hover,
.dc-rail a[aria-current="page"] {
  border-radius: 16px;
  color: #fff;
  background: var(--dc-blurple);
}

/* Pastille d'indication à gauche, comme la liste des serveurs. */
.dc-rail a::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 4px;
  height: 0;
  border-radius: 0 4px 4px 0;
  background: #fff;
  transform: translateY(-50%);
  transition: height 200ms var(--dc-ease);
}

.dc-rail a:hover::before {
  height: 20px;
}

.dc-rail a[aria-current="page"]::before {
  height: 36px;
}

.dc-rail a.dc-rail-join {
  margin-top: auto;
  color: var(--dc-green);
}

.dc-rail a.dc-rail-join:hover {
  color: #fff;
  background: var(--dc-green);
}

.dc-rail hr {
  flex: none;
  width: 32px;
  height: 2px;
  margin: 0;
  border: 0;
  border-radius: 2px;
  background: var(--dc-border-strong);
}

.dc-tip {
  position: fixed;
  z-index: 10002;
  padding: 7px 11px;
  border-radius: 8px;
  color: #fff;
  background: #111214;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.dc-tip.is-visible {
  opacity: 1;
  transform: none;
}

.dc-tabs {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--dc-tabs) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--dc-border);
  background: color-mix(in srgb, var(--dc-rail-bg) 94%, transparent);
  backdrop-filter: blur(16px);
}

.dc-tabs a {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  color: var(--dc-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

.dc-tabs a svg {
  width: 22px;
  height: 22px;
}

.dc-tabs a[aria-current="page"] {
  color: #fff;
}

.dc-tabs a[aria-current="page"] svg {
  color: var(--dc-accent);
}

.dc-tabs a.dc-tabs-join {
  color: var(--dc-green);
}

body.has-dc-nav {
  padding-bottom: calc(var(--dc-tabs) + env(safe-area-inset-bottom, 0px));
}

body.has-dc-nav .ui-top {
  bottom: calc(var(--dc-tabs) + 14px);
}

@media (min-width: 1100px) {
  .dc-rail {
    display: flex;
  }

  .dc-tabs {
    display: none;
  }

  body.has-dc-nav {
    padding-left: var(--dc-rail);
    padding-bottom: 0;
  }

  body.has-dc-nav .ui-top {
    bottom: 18px;
  }

  body.has-dc-nav .ui-ambient {
    left: var(--dc-rail);
    width: calc(100% - var(--dc-rail));
  }
}

/* ---------- 4. Composants partagés (toutes les pages) ---------- */

html body .button,
html body .login-button,
html body .header-admin,
html body .header-share {
  border-radius: 12px;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow: none;
}

html body .button-primary:not(.button-discord) {
  border: 1px solid transparent;
  color: var(--t-bg);
  background: var(--dc-accent);
}

html body .button-discord,
html body .login-button {
  border: 1px solid transparent;
  color: #fff;
  background: var(--dc-blurple);
}

html body .button-discord:hover,
html body .login-button:hover {
  background: var(--dc-blurple-2);
  filter: none;
}

html body .button-secondary,
html body .header-admin,
html body .header-share {
  border: 1px solid var(--dc-border-strong);
  color: var(--dc-text);
  background: var(--dc-surface-2);
}

html body .button-secondary:hover,
html body .header-admin:hover,
html body .header-share:hover {
  background: var(--dc-surface-3);
}

html body .user-pill {
  border: 1px solid var(--dc-border);
  border-radius: 999px;
  color: var(--dc-text);
  background: var(--dc-surface-2);
}

html body .user-pill::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--dc-green);
}

html body .eyebrow {
  color: var(--dc-accent);
}

/* Surfaces communes des pages internes : mêmes panneaux arrondis partout. */
html body .tool-panel,
html body .state-card,
html body .aniipote-result,
html body .aniipote-block,
html body .aniipote-evidence-card,
html body .guide-card,
html body .news-card,
html body .object-card {
  border-color: var(--dc-border);
  border-radius: var(--dc-radius);
}

html body .state-card {
  background: var(--dc-surface);
  box-shadow: var(--dc-shadow);
}

html body :is(.aniipote-global-overlay, .invite-modal) :is(.aniipote-global-panel, .invite-card, [role="dialog"]) {
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
}

html body .breadcrumbs a {
  color: var(--dc-muted);
}

html body .breadcrumbs a:hover {
  color: var(--dc-text);
}

html body .empty-state {
  color: var(--dc-muted);
}

.ui-top {
  border-color: var(--dc-border-strong);
  background: var(--dc-surface-2);
}

/* ---------- 5. Accueil ---------- */

.dc-home main {
  overflow: hidden;
}

.dc-wrap {
  width: min(100% - 40px, 1180px);
  margin-inline: auto;
}

.dc-section {
  padding: clamp(48px, 7vw, 88px) 0;
}

.dc-section-alt {
  border-block: 1px solid var(--dc-border);
  background: color-mix(in srgb, var(--dc-rail-bg) 70%, transparent);
}

.dc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-bottom: 28px;
}

.dc-head > div {
  max-width: 640px;
}

.dc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--dc-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dc-home h2 {
  margin: 0;
  font-family: "Segoe UI", "Aptos", "Helvetica Neue", sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.dc-home h3 {
  margin: 0;
  font-family: inherit;
  font-weight: 800;
}

.dc-head p:not(.dc-kicker),
.dc-lead {
  margin: 12px 0 0;
  color: var(--dc-muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.dc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dc-accent);
  font-weight: 750;
  text-decoration: none;
}

.dc-link::after {
  content: "→";
  transition: transform 160ms var(--dc-ease);
}

.dc-link:hover::after {
  transform: translateX(4px);
}

.dc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms var(--dc-ease),
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.dc-btn:hover {
  transform: translateY(-2px);
}

.dc-btn:active {
  transform: scale(0.98);
}

.dc-btn svg {
  width: 22px;
  height: 22px;
}

.dc-btn-discord {
  color: #fff;
  background: var(--dc-blurple);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

.dc-btn-discord:hover {
  background: var(--dc-blurple-2);
  box-shadow: 0 14px 36px rgba(88, 101, 242, 0.5);
}

.dc-btn-green {
  color: #fff;
  background: var(--dc-green);
}

.dc-btn-green:hover {
  background: color-mix(in srgb, var(--dc-green) 84%, black);
}

.dc-btn-ghost {
  border-color: var(--dc-border-strong);
  color: var(--dc-text);
  background: var(--dc-surface-2);
}

.dc-btn-ghost:hover {
  background: var(--dc-surface-3);
}

/* Héros */

.dc-hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(36px, 5vw, 64px);
}

.dc-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.dc-hero h1 {
  margin: 0;
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(3rem, 8.4vw, 6.2rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.dc-hero h1 span {
  display: block;
  color: var(--dc-warm);
}

.dc-hero h1::after {
  content: "";
  display: block;
  width: min(280px, 60%);
  height: 6px;
  margin-top: 22px;
  border-radius: 6px;
  background: var(--t-ribbon);
}

.dc-hero .dc-lead {
  max-width: 34rem;
  margin-top: 22px;
  color: var(--dc-text);
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
}

.dc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.dc-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--dc-muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.dc-proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dc-proof li::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(var(--dc-bg), var(--dc-bg)) center / 6px 2px no-repeat,
    var(--dc-green);
  background: var(--dc-green);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2L6.4 12l1.4-1.4 2.8 2.8 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Carte d'invitation, comme un lien d'invitation Discord. */

.dc-invite-stage {
  position: relative;
}

.dc-invite {
  position: relative;
  border: 1px solid var(--dc-border);
  border-radius: 22px;
  background: var(--dc-surface);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(88, 101, 242, 0.14);
  overflow: hidden;
  transform: rotate(1.2deg);
  transition: transform 400ms var(--dc-ease);
}

.dc-invite:hover {
  transform: rotate(0deg) translateY(-4px);
}

.dc-invite-banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 30%;
}

.dc-invite-body {
  position: relative;
  padding: 44px 22px 22px;
}

.dc-invite-avatar {
  position: absolute;
  top: -40px;
  left: 20px;
  width: 80px;
  height: 80px;
  border: 6px solid var(--dc-surface);
  border-radius: 24px;
  object-fit: cover;
  background: var(--dc-surface-3);
}

.dc-invite-label {
  margin: 0;
  color: var(--dc-muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dc-invite-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.dc-invite-name svg {
  width: 22px;
  height: 22px;
  color: var(--dc-green);
}

.dc-invite-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 18px;
  color: var(--dc-muted);
  font-weight: 650;
}

.dc-invite-counts span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dc-invite-counts strong {
  color: var(--dc-text);
  font-variant-numeric: tabular-nums;
}

.dc-invite .dc-btn {
  width: 100%;
}

/* Bulles de discussion autour de la carte d'invitation. */
.dc-bubble {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 250px;
  padding: 9px 14px 9px 9px;
  border: 1px solid var(--dc-border);
  border-radius: 999px;
  background: var(--dc-surface-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  font-weight: 650;
  animation: dc-float 6s ease-in-out infinite;
}

.dc-bubble img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--dc-surface-3);
}

.dc-bubble-a {
  top: 12%;
  left: -34px;
}

.dc-bubble-b {
  right: -22px;
  bottom: 30%;
  animation-delay: -3s;
}

@keyframes dc-float {
  50% {
    transform: translateY(-10px);
  }
}

/* Chiffres du serveur */

.dc-stats {
  padding: 0 0 clamp(36px, 5vw, 64px);
}

.dc-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.dc-stat {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
  transition:
    transform 200ms var(--dc-ease),
    border-color 200ms ease;
}

.dc-stat:hover {
  transform: translateY(-3px);
  border-color: var(--dc-border-strong);
}

.dc-stat .stat-label {
  order: 2;
  color: var(--dc-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.dc-stat .stat-value {
  order: 1;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dc-stat .stat-note {
  order: 3;
  color: var(--dc-muted);
  font-size: 0.78rem;
}

.dc-stat.is-loading .stat-value {
  width: 4ch;
  border-radius: 8px;
  color: transparent;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.16) 42%, rgba(255, 255, 255, 0.06) 64%) 0 0 / 220% 100%;
  animation: ui-shimmer 1.3s linear infinite;
  user-select: none;
}

.dc-stat.is-unavailable .stat-value {
  color: var(--dc-muted);
  font-size: 1.05rem;
}

.dc-stat-main {
  border-color: rgba(35, 165, 90, 0.4);
  background: linear-gradient(140deg, rgba(35, 165, 90, 0.16), transparent 60%), var(--dc-surface);
}

/* Fenêtre « en direct » : une fenêtre de discussion. */

.dc-app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 460px;
  border: 1px solid var(--dc-border);
  border-radius: 20px;
  background: var(--dc-surface);
  box-shadow: var(--dc-shadow);
  overflow: hidden;
}

.dc-app-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 14px;
  border-right: 1px solid var(--dc-border);
  background: color-mix(in srgb, var(--dc-surface) 60%, var(--dc-rail-bg));
}

.dc-app-server {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin: 0 -10px 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--dc-border);
  font-weight: 800;
}

.dc-app-server img {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: cover;
}

.dc-app-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 2px;
  padding: 0 8px;
  color: var(--dc-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dc-app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dc-app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid var(--dc-border);
  font-weight: 800;
}

.dc-app-head > span:first-child {
  color: var(--dc-muted);
  font-size: 1.4rem;
  font-weight: 500;
}

.dc-app-head small {
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--dc-border-strong);
  overflow: hidden;
  color: var(--dc-muted);
  font-size: 0.86rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  padding: 14px 8px;
}

.dc-voice {
  display: grid;
  gap: 4px;
}

.dc-app-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--dc-muted);
  background: var(--dc-surface-3);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.dc-app-input:hover {
  background: color-mix(in srgb, var(--dc-blurple) 30%, var(--dc-surface-3));
  color: var(--dc-text);
}

.dc-app-input strong {
  flex: none;
  color: var(--dc-text);
}

/* Lignes générées par app.js, rendues comme des messages. */
.dc-home .live-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  animation: dc-row-in 320ms var(--dc-ease) both;
}

.dc-home .live-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

@keyframes dc-row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.dc-home .live-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--dc-blurple);
  font-size: 0.86rem;
  font-weight: 800;
  overflow: hidden;
}

.dc-home .live-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dc-home .live-row > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
}

.dc-home .live-row strong {
  order: 1;
  color: var(--dc-text);
  font-size: 0.98rem;
  font-weight: 750;
}

.dc-home .live-row-message:nth-child(3n + 1) strong {
  color: var(--dc-accent);
}

.dc-home .live-row-message:nth-child(3n + 2) strong {
  color: var(--dc-warm);
}

.dc-home .live-meta {
  order: 2;
  margin: 0;
  color: var(--dc-muted);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.dc-home .live-message {
  order: 3;
  flex-basis: 100%;
  margin: 0;
  color: color-mix(in srgb, var(--dc-text) 88%, var(--dc-bg));
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dc-home .live-row-voice {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
}

.dc-home .live-row-voice .live-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--dc-green);
  background: rgba(35, 165, 90, 0.16);
}

.dc-home .live-row-voice strong::before {
  content: "🔊";
  margin-right: 6px;
  font-size: 0.8em;
}

.dc-home .voice-avatars {
  display: flex;
  flex-basis: 100%;
  order: 4;
  margin-top: 4px;
}

.dc-home .voice-avatars img {
  width: 24px;
  height: 24px;
  margin-right: -6px;
  border: 2px solid var(--dc-surface);
  border-radius: 50%;
}

.dc-home .empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: auto 0;
  padding: 18px 14px;
  border: 0;
  background: transparent;
  color: var(--dc-muted);
  font-size: 0.94rem;
  text-align: left;
}

.dc-home .empty-state img {
  width: 54px;
  height: 54px;
  flex: none;
  object-fit: contain;
}

.dc-home .empty-state p {
  margin: 0;
}

/* Top Pipelettes */

.dc-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

.dc-board {
  padding: 18px;
  border: 1px solid var(--dc-border);
  border-radius: 20px;
  background: var(--dc-surface);
  box-shadow: var(--dc-shadow);
}

.dc-board .tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: var(--dc-rail-bg);
}

.dc-board .tab-button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: var(--dc-muted);
  background: transparent;
  font: inherit;
  font-weight: 750;
  box-shadow: none;
  cursor: pointer;
}

.dc-board .tab-button.is-active {
  color: #fff;
  background: var(--dc-blurple);
}

.dc-board .talkers-list {
  display: grid;
  gap: 6px;
  min-height: 150px;
}

.dc-board .talkers-list[hidden] {
  display: none;
}

.dc-home .talker-row {
  display: grid;
  grid-template-columns: 34px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--dc-surface-2);
  box-shadow: none;
  transition:
    transform 180ms var(--dc-ease),
    border-color 180ms ease;
}

.dc-home .talker-row:hover {
  transform: translateX(4px);
  border-color: var(--dc-border-strong);
}

.dc-home .talker-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--dc-muted);
  background: var(--dc-surface-3);
  font-size: 0.86rem;
  font-weight: 800;
}

.dc-home .talker-row:nth-child(1) .talker-rank {
  color: #3b2a00;
  background: #f5c542;
}

.dc-home .talker-row:nth-child(2) .talker-rank {
  color: #23272e;
  background: #c9d1dc;
}

.dc-home .talker-row:nth-child(3) .talker-rank {
  color: #2e1705;
  background: #d68a4a;
}

.dc-home .talker-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--dc-blurple);
  font-weight: 800;
}

.dc-home .talker-name {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-home .talker-meta {
  color: var(--dc-muted);
  font-size: 0.8rem;
}

.dc-home .talker-score {
  color: var(--dc-accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Salons du QG (modules) */

.dc-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.dc-channel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
  overflow: hidden;
  transition:
    transform 240ms var(--dc-ease),
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.dc-channel:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--dc-blurple) 70%, transparent);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
}

.dc-channel > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--dc-surface-3);
  transition: transform 500ms var(--dc-ease);
}

.dc-channel:hover > img {
  transform: scale(1.05);
}

.dc-channel-ai > img {
  object-fit: contain;
  padding: 10px;
}

.dc-channel-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  background: var(--dc-surface);
}

.dc-channel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dc-channel-tag {
  color: var(--dc-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.dc-channel .module-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 0;
  border-radius: 999px;
  color: var(--dc-muted);
  background: var(--dc-surface-3);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.dc-channel .module-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #80848e;
}

.dc-channel.is-available .module-state {
  color: #7ee2a8;
  background: rgba(35, 165, 90, 0.16);
}

.dc-channel.is-available .module-state::before {
  background: var(--dc-green);
}

.dc-channel.is-maintenance .module-state {
  color: #ffd27a;
  background: rgba(240, 178, 50, 0.16);
}

.dc-channel.is-maintenance .module-state::before {
  background: var(--dc-yellow);
}

.dc-channel.is-unavailable .module-state::before {
  background: var(--dc-red);
}

.dc-channel h3 {
  font-size: 1.16rem;
}

.dc-channel p {
  flex: 1;
  margin: 0;
  color: var(--dc-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.dc-channel a {
  align-self: flex-start;
  margin-top: 6px;
  color: var(--dc-accent);
  font-weight: 750;
  text-decoration: none;
}

/* Toute la carte est cliquable, le lien reste l'élément accessible. */
.dc-channel a::after {
  content: "";
  position: absolute;
  inset: -400px 0 0 0;
}

/* Actualités */

.dc-home .home-news-state {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px dashed var(--dc-border-strong);
  border-radius: var(--dc-radius);
  color: var(--dc-muted);
  background: transparent;
}

.dc-home .home-news-state img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.dc-home .home-news-state p {
  margin: 0;
}

.dc-news {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
}

.dc-news[hidden] {
  display: none;
}

.dc-home .home-news-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  background: var(--dc-surface);
  box-shadow: none;
  overflow: hidden;
  transition:
    transform 240ms var(--dc-ease),
    border-color 240ms ease;
}

.dc-home .home-news-card:hover {
  transform: translateY(-4px);
  border-color: var(--dc-border-strong);
}

.dc-home .home-news-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--dc-surface-3);
}

.dc-home .home-news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dc-home .home-news-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

.dc-home .home-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: var(--dc-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.dc-home .home-news-meta span {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--dc-surface-3);
}

.dc-home .home-news-card h3 {
  font-size: 1.1rem;
  line-height: 1.3;
}

.dc-home .home-news-card h3 a {
  color: inherit;
  text-decoration: none;
}

.dc-home .home-news-card p {
  margin: 0;
  color: var(--dc-muted);
  font-size: 0.94rem;
}

.dc-home .home-news-read {
  margin-top: auto;
  color: var(--dc-accent);
  font-weight: 750;
  text-decoration: none;
}

/* Bloc AniiPote et temps forts */

.dc-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dc-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--dc-border);
  border-radius: 20px;
  background: var(--dc-surface);
}

.dc-panel p {
  margin: 0;
  color: var(--dc-muted);
  line-height: 1.6;
}

.dc-panel-media {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dc-panel-media img {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
}

.dc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dc-chips button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 999px;
  color: var(--dc-text);
  background: var(--dc-surface-2);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.dc-chips button:hover {
  background: var(--dc-surface-3);
}

.dc-ask label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.dc-ask-row {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: var(--dc-surface-3);
}

.dc-ask-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  color: var(--dc-text);
  background: transparent;
  font: inherit;
}

.dc-ask-row input:focus {
  outline: none;
}

.dc-ask-row:focus-within {
  box-shadow: 0 0 0 2px var(--dc-blurple);
}

.dc-ask-row .dc-btn {
  min-height: 44px;
  padding: 0 18px;
}

.dc-home [data-ai-response] {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
}

.dc-home [data-ai-response] img {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--dc-surface-3);
}

.dc-home [data-ai-response] p {
  padding: 10px 14px;
  border-radius: 4px 14px 14px 14px;
  color: var(--dc-text);
  background: var(--dc-surface-2);
}

.dc-home [data-ai-response].is-thinking p {
  color: var(--dc-muted);
  font-style: italic;
}

/* Accès directs et FAQ */

.dc-paths {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.dc-paths a {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  color: inherit;
  background: var(--dc-surface);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.dc-paths a:hover {
  border-color: var(--dc-border-strong);
  background: var(--dc-surface-2);
}

.dc-paths span {
  font-weight: 750;
}

.dc-paths span::before {
  content: "# ";
  color: var(--dc-muted);
}

.dc-paths small {
  color: var(--dc-muted);
  font-size: 0.86rem;
}

.dc-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.dc-faq article {
  padding: 18px 20px;
  border-left: 3px solid var(--dc-blurple);
  border-radius: 4px 12px 12px 4px;
  background: var(--dc-surface);
}

.dc-faq h3 {
  font-size: 1rem;
}

.dc-faq p {
  margin: 8px 0 0;
  color: var(--dc-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* Appel final */

.dc-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 40px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(520px 300px at 100% 0, rgba(255, 255, 255, 0.2), transparent 70%),
    linear-gradient(135deg, var(--dc-blurple), var(--dc-blurple-2));
  overflow: hidden;
}

.dc-cta h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}

.dc-cta p {
  max-width: 36rem;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.06rem;
}

.dc-cta .dc-btn {
  color: var(--dc-blurple-2);
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.dc-cta-mascot {
  position: absolute;
  right: 24px;
  bottom: -30px;
  width: 190px;
  opacity: 0.22;
  pointer-events: none;
}

/* ---------- 6. Mobile et accessibilité ---------- */

@media (max-width: 980px) {
  .dc-hero-grid,
  .dc-board-grid,
  .dc-duo {
    grid-template-columns: 1fr;
  }

  .dc-invite-stage {
    max-width: 440px;
    margin-inline: auto;
  }

  .dc-bubble-a {
    left: -8px;
  }

  .dc-bubble-b {
    right: -8px;
  }

  .dc-news {
    grid-template-columns: 1fr;
  }

  .dc-cta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dc-presence {
    display: none;
  }

  .dc-app {
    grid-template-columns: 1fr;
  }

  .dc-app-side {
    order: 2;
    border-top: 1px solid var(--dc-border);
    border-right: 0;
  }

  .dc-app-server {
    display: none;
  }

  .dc-app-head small {
    display: none;
  }

  .dc-faq {
    grid-template-columns: 1fr;
  }

  .dc-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dc-stat-main {
    grid-column: 1 / -1;
  }

  .dc-actions .dc-btn {
    flex: 1 1 100%;
  }

  .dc-bubble {
    display: none;
  }

  .dc-invite {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-dot::after,
  .dc-bubble,
  .dc-home .live-row {
    animation: none;
  }

  .dc-invite,
  .dc-invite:hover,
  .dc-channel:hover,
  .dc-btn:hover {
    transform: none;
  }
}

@media print {
  .dc-rail,
  .dc-tabs,
  .dc-presence {
    display: none !important;
  }
}

/* ---------- Ajustements : en-tête sur une ligne, lignes en direct, chiffres ---------- */

html body .site-header .header-shell {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

html body .site-header .brand-link {
  margin-right: auto;
  min-width: 0;
}

.dc-presence {
  margin-left: 0;
}

.dc-home .live-row {
  opacity: 1;
  transform: none;
}

.dc-stat .stat-value,
.dc-stat .stat-label,
.dc-stat .stat-note {
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.dc-stat .stat-value {
  font-size: clamp(1.4rem, 2.1vw, 1.8rem);
  white-space: nowrap;
}

.dc-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
}

/* ---------- Une seule voix typographique sur tout le site ---------- */

/* Les pages internes mélangeaient serif et sans-serif : tous les titres passent sur la même famille. */
html body :is(h1, h2, h3, h4) {
  font-family: "Segoe UI", "Aptos", "Helvetica Neue", sans-serif !important;
  letter-spacing: -0.012em;
}

html body :is(h1, h2) {
  font-weight: 800;
}

html body .dc-hero h1 {
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif !important;
  letter-spacing: -0.03em;
}

html body main :is(input[type="text"], input[type="search"], input[type="url"], input[type="number"], select, textarea) {
  border-radius: 10px;
}

/* Codex : le sous-titre de la zone claire était presque invisible (texte pâle sur fond clair). */
html body .codex-browser > .shell > .section-heading p:not(.eyebrow) {
  color: #3d4f70;
}

/* ==========================================================
   7. Mise en page « salon » : liste des salons, barre de salon,
      introduction et panneau des membres, sur toutes les pages.
   ========================================================== */

:root {
  --dc-side: 240px;
  --dc-members: 252px;
  --dc-bar: 56px;
}

/* Le menu déroulant ne garde que le compte : la navigation est dans la liste des salons. */
html body .site-header .primary-nav > a {
  display: none !important;
}

html body .site-header .primary-nav {
  min-width: 260px;
}

/* ----- Liste des salons ----- */

.dc-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(var(--dc-side), 82vw);
  background: color-mix(in srgb, var(--dc-surface) 55%, var(--dc-rail-bg));
  border-right: 1px solid var(--dc-border);
  transform: translateX(-102%);
  transition: transform 240ms var(--dc-ease);
}

.dc-drawer-open .dc-side {
  transform: none;
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5);
}

.dc-scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.dc-drawer-open .dc-scrim {
  opacity: 1;
  pointer-events: auto;
}

.dc-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--dc-bar);
  padding: 0 16px;
  border-bottom: 1px solid var(--dc-border);
  color: var(--dc-text);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.dc-side-head strong {
  font-size: 1rem;
  font-weight: 800;
}

.dc-side-badge {
  padding: 2px 8px;
  border-radius: 999px;
  color: #7ee2a8;
  background: rgba(35, 165, 90, 0.16);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.dc-side-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-surface-3) transparent;
}

.dc-side-cat,
.dc-members-cat {
  margin: 16px 0 4px;
  padding: 0 8px;
  color: var(--dc-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dc-side-chan {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--dc-muted);
  font-weight: 600;
  text-decoration: none;
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.dc-side-chan svg {
  flex: none;
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.dc-side-chan span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-side-chan em {
  padding: 0 7px;
  border-radius: 999px;
  color: var(--dc-text);
  background: var(--dc-surface-3);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.dc-side-chan:hover {
  color: var(--dc-text);
  background: rgba(255, 255, 255, 0.06);
}

.dc-side-chan[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.dc-side-voice {
  display: grid;
  gap: 2px;
}

.dc-side-voice-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 34px;
  color: var(--dc-muted);
  font-size: 0.86rem;
}

.dc-avatar {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--dc-blurple);
  font-size: 0.82rem;
  font-weight: 800;
}

.dc-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.dc-avatar.is-online::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 3px solid var(--dc-rail-bg);
  border-radius: 50%;
  background: var(--dc-green);
}

.dc-side-voice-member .dc-avatar {
  width: 22px;
  height: 22px;
  font-size: 0.66rem;
}

.dc-side-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--dc-border);
  background: var(--dc-rail-bg);
}

.dc-side-user-id {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.dc-side-user-id strong,
.dc-side-user-id small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-side-user-id strong {
  font-size: 0.9rem;
}

.dc-side-user-id small {
  color: var(--dc-muted);
  font-size: 0.74rem;
}

.dc-side-user-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--dc-muted);
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.dc-side-user-btn svg {
  width: 18px;
  height: 18px;
}

.dc-side-user-btn:hover {
  color: var(--dc-text);
  background: rgba(255, 255, 255, 0.08);
}

/* ----- Barre de salon ----- */

.dc-chan {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-right: auto;
}

.dc-chan svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--dc-muted);
}

.dc-chan strong {
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
}

.dc-chan-topic {
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--dc-border-strong);
  overflow: hidden;
  color: var(--dc-muted);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-members-toggle {
  display: none;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  color: var(--dc-muted);
  background: var(--dc-surface);
  cursor: pointer;
}

.dc-members-toggle svg {
  width: 20px;
  height: 20px;
}

.dc-members-open .dc-members-toggle {
  color: var(--dc-text);
  background: var(--dc-surface-3);
}

/* ----- Introduction du salon ----- */

body:not(.dc-home) main > :is(.codex-hero, .objects-hero, .guides-hero, .news-hero, .aniipote-hero, .tool-hero) {
  display: none;
}

.dc-intro {
  padding: clamp(24px, 4vw, 40px) 0 clamp(16px, 2.4vw, 24px);
  border-bottom: 1px solid var(--dc-border);
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.1), transparent);
}

.dc-intro-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: min(100% - 40px, 1180px);
  margin-inline: auto;
}

.dc-intro-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  color: #fff;
  background: var(--dc-surface-3);
}

.dc-intro-badge svg {
  width: 34px;
  height: 34px;
}

.dc-intro-copy {
  min-width: 0;
}

.dc-intro-kicker {
  margin: 0 0 4px;
  color: var(--dc-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html body .dc-intro h1 {
  margin: 0;
  color: var(--dc-text);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
  text-shadow: none;
  text-transform: none;
}

.dc-intro-text {
  max-width: 70ch;
  margin: 8px 0 0;
  color: var(--dc-muted);
  line-height: 1.55;
}

.dc-intro-text strong {
  color: var(--dc-text);
}

html body .dc-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

html body .dc-intro-actions > * {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
}

/* ----- Panneau des membres ----- */

.dc-members {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  display: none;
  flex-direction: column;
  width: var(--dc-members);
  border-left: 1px solid var(--dc-border);
  background: color-mix(in srgb, var(--dc-surface) 55%, var(--dc-rail-bg));
}

.dc-members-body {
  flex: 1;
  padding: 8px 8px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-surface-3) transparent;
}

.dc-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
}

.dc-member:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dc-member-text {
  min-width: 0;
  line-height: 1.25;
}

.dc-member-text strong,
.dc-member-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-member-text strong {
  font-size: 0.92rem;
  font-weight: 650;
}

.dc-member-text small {
  color: var(--dc-muted);
  font-size: 0.76rem;
}

.dc-member.is-rank-1 strong {
  color: #f5c542;
}

.dc-member.is-rank-2 strong {
  color: #c9d1dc;
}

.dc-member.is-rank-3 strong {
  color: #d68a4a;
}

.dc-members-empty {
  margin: 16px 8px;
  color: var(--dc-muted);
  font-size: 0.88rem;
}

.dc-members-join {
  margin: 10px;
  padding: 10px;
  border-radius: 10px;
  color: #fff;
  background: var(--dc-green);
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.dc-members-join:hover {
  background: color-mix(in srgb, var(--dc-green) 84%, black);
}

/* ----- Onglets mobiles : bouton « Salons » ----- */

.dc-tabs button {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  border: 0;
  color: var(--dc-muted);
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.dc-tabs button svg {
  width: 22px;
  height: 22px;
}

.dc-drawer-open .dc-tabs button {
  color: #fff;
}

/* ----- Bureau : trois colonnes ----- */

@media (min-width: 1100px) {
  .dc-side {
    left: var(--dc-rail);
    z-index: 65;
    width: var(--dc-side);
    transform: none;
    box-shadow: none;
  }

  .dc-scrim {
    display: none;
  }

  body.has-dc-nav {
    padding-left: calc(var(--dc-rail) + var(--dc-side));
  }

  body.has-dc-nav .ui-ambient {
    left: calc(var(--dc-rail) + var(--dc-side));
    width: calc(100% - var(--dc-rail) - var(--dc-side));
  }

  .has-dc-nav .site-header .brand-link {
    display: none;
  }

  .has-dc-nav .dc-chan {
    display: flex;
  }

  html body.has-dc-nav .site-header .header-shell {
    width: auto;
    max-width: none;
    min-height: var(--dc-bar);
    margin: 0;
    padding: 0 16px;
  }
}

@media (min-width: 1500px) {
  .dc-members-toggle {
    display: grid;
  }

  .dc-members-open .dc-members {
    display: flex;
  }

  body.has-dc-nav.dc-members-open {
    padding-right: var(--dc-members);
  }

  body.has-dc-nav.dc-members-open .ui-top {
    right: calc(var(--dc-members) + 18px);
  }
}

@media (max-width: 760px) {
  .dc-intro-inner {
    gap: 14px;
  }

  .dc-intro-badge {
    width: 48px;
    height: 48px;
  }

  .dc-intro-badge svg {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-side {
    transition: none;
  }
}

@media print {
  .dc-side,
  .dc-members,
  .dc-scrim {
    display: none !important;
  }

  body.has-dc-nav {
    padding: 0 !important;
  }
}

html body .aniipote-global-trigger {
  flex: none;
  white-space: nowrap;
}

.dc-side-head strong {
  white-space: nowrap;
}

/* ==========================================================
   8. Atelier d'équipes : mes équipes, glisser-déposer, comparaison
   ========================================================== */

.team-drafts-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
}

.team-drafts-bar [data-team-draft-count] {
  margin-right: auto;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--dc-muted);
  background: var(--dc-surface-2);
  font-size: 0.84rem;
  font-weight: 750;
}

.team-drafts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.team-drafts > .empty-state {
  grid-column: 1 / -1;
}

.team-draft-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--dc-border);
  border-left: 4px solid var(--dc-surface-3);
  border-radius: 6px 14px 14px 6px;
  background: var(--dc-surface);
  transition:
    border-color 160ms ease,
    transform 200ms var(--dc-ease);
}

.team-draft-card:hover {
  transform: translateY(-2px);
  border-color: var(--dc-border-strong);
  border-left-color: var(--dc-blurple);
}

.team-draft-card.is-active {
  border-left-color: var(--dc-green);
}

.team-draft-card.is-compared {
  border-color: var(--dc-blurple);
  border-left-color: var(--dc-blurple);
  background: color-mix(in srgb, var(--dc-blurple) 12%, var(--dc-surface));
}

.team-draft-faces {
  display: flex;
  min-height: 52px;
}

.team-draft-faces img {
  width: 52px;
  height: 52px;
  margin-right: -10px;
  border: 3px solid var(--dc-surface);
  border-radius: 50%;
  object-fit: cover;
  background: var(--dc-surface-3);
}

.team-draft-body strong,
.team-draft-body span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-draft-body strong {
  font-size: 1.04rem;
}

.team-draft-body span {
  color: var(--dc-muted);
  font-size: 0.84rem;
}

.team-draft-actions,
.team-published-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-draft-actions button,
.team-published-list button,
.slot-move-bar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 8px;
  color: var(--dc-text);
  background: var(--dc-surface-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.team-draft-actions button:hover,
.team-published-list button:hover,
.slot-move-bar button:hover:not(:disabled) {
  background: var(--dc-surface-3);
}

.team-draft-actions [data-draft-open] {
  border-color: transparent;
  color: #fff;
  background: var(--dc-blurple);
}

.team-draft-actions [data-draft-compare][aria-pressed="true"] {
  border-color: var(--dc-blurple);
  color: #fff;
}

.team-draft-actions [data-draft-delete]:hover {
  border-color: var(--dc-red);
  color: #ffb3b5;
}

.team-published {
  margin-top: 20px;
}

.team-published h3,
.team-compare-title {
  margin: 28px 0 10px;
  font-size: 1.1rem;
}

.team-published-list {
  display: grid;
  gap: 6px;
}

.team-published-list div {
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  background: var(--dc-surface);
}

.team-published-list a {
  color: var(--dc-text);
  font-weight: 650;
}

.team-compare-scroll {
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  background: var(--dc-surface);
  overflow-x: auto;
}

.team-compare-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.team-compare-table th,
.team-compare-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--dc-border);
  text-align: right;
  vertical-align: top;
}

.team-compare-table th:first-child {
  position: sticky;
  left: 0;
  color: var(--dc-muted);
  background: var(--dc-surface);
  font-weight: 650;
  text-align: left;
}

.team-compare-table thead th {
  color: var(--dc-text);
  background: var(--dc-surface-2);
  font-weight: 800;
}

.team-compare-table thead th:first-child {
  background: var(--dc-surface-2);
}

.team-compare-table tr:last-child td,
.team-compare-table tr:last-child th {
  border-bottom: 0;
}

.team-compare-group th {
  color: var(--dc-accent) !important;
  background: var(--dc-rail-bg) !important;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-align: left !important;
  text-transform: uppercase;
}

.team-compare-table td.is-best {
  color: #7ee2a8;
  background: rgba(35, 165, 90, 0.12);
  font-weight: 800;
}

.team-compare-note {
  margin: 8px 0 0;
  color: var(--dc-muted);
  font-size: 0.84rem;
}

/* Glisser-déposer des emplacements */

.slot-move-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.slot-move-bar .slot-drag-handle {
  flex: 1;
  cursor: grab;
  text-align: left;
}

.slot-move-bar .slot-drag-handle:active {
  cursor: grabbing;
}

.slot-move-bar button:disabled {
  opacity: 0.35;
  cursor: default;
}

.team-slot-card.is-dragging {
  opacity: 0.45;
}

.team-slot-card.is-drop-target {
  outline: 2px dashed var(--dc-blurple);
  outline-offset: 3px;
  background: color-mix(in srgb, var(--dc-blurple) 14%, transparent);
}

/* Piles d'avatars des salons vocaux */

.dc-side-voice-member,
.dc-member-faces {
  display: flex;
  align-items: center;
  gap: 0;
}

.dc-side-voice-member {
  padding: 2px 8px 6px 34px;
}

.dc-side-voice-member .dc-avatar,
.dc-member-faces .dc-avatar {
  width: 24px;
  height: 24px;
  margin-right: -6px;
  border: 2px solid var(--dc-rail-bg);
  font-size: 0.66rem;
}

.dc-avatar-more {
  margin-left: 12px;
  color: var(--dc-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.dc-member-voice {
  justify-content: space-between;
}

.dc-member-faces {
  flex: none;
  padding-right: 6px;
}

.dc-side-chan em {
  flex: none;
}

/* L'introduction du salon garde un fond plein : lisible même sur les pages à fond illustré. */
.dc-intro {
  background:
    linear-gradient(180deg, rgba(88, 101, 242, 0.14), transparent),
    color-mix(in srgb, var(--dc-bg) 92%, transparent);
  backdrop-filter: blur(6px);
}

.dc-side-chan span {
  min-width: 0;
}

.dc-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

/* ---------- Listes déroulantes lisibles sur tous les thèmes ---------- */

/* Le menu natif héritait d'un fond blanc avec un texte clair : on fixe les deux. */
html body select {
  color-scheme: dark;
}

html body select option,
html body select optgroup {
  color: #f2f5ff;
  background-color: var(--dc-surface-2);
}

html body select option:checked {
  color: #fff;
  background-color: var(--dc-blurple);
}

html body select option:disabled {
  color: #8a94ad;
}

/* ==========================================================
   9. Guides : éditeur par modules et rendu des modules
   ========================================================== */

.gb-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.gb-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 999px;
  color: var(--dc-muted);
  background: var(--dc-surface-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.gb-chip.is-active {
  border-color: transparent;
  color: #fff;
  background: var(--dc-blurple);
}

.gb-host[hidden] {
  display: none;
}

.gb-list {
  display: grid;
  gap: 12px;
}

.gb-empty,
.gb-note {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--dc-border-strong);
  border-radius: 12px;
  color: var(--dc-muted);
  text-align: center;
}

.gb-block {
  border: 1px solid var(--dc-border);
  border-left: 4px solid var(--dc-blurple);
  border-radius: 6px 12px 12px 6px;
  background: var(--dc-surface);
  transition:
    border-color 160ms ease,
    opacity 160ms ease;
}

.gb-block:focus-within {
  border-color: var(--dc-border-strong);
  border-left-color: var(--dc-accent);
}

.gb-block.is-dragging {
  opacity: 0.45;
}

.gb-block.is-drop-target {
  outline: 2px dashed var(--dc-blurple);
  outline-offset: 3px;
}

.gb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--dc-border);
}

.gb-handle {
  padding: 4px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--dc-text);
  background: var(--dc-surface-3);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: grab;
}

.gb-tools,
.gb-row,
.gb-format,
.gb-step-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gb-row {
  flex-wrap: wrap;
}

.gb-row > .gb-input,
.gb-row > .gb-rich {
  flex: 1 1 220px;
}

.gb-mini,
.gb-add {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  color: var(--dc-muted);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.gb-mini:hover,
.gb-add:hover {
  color: var(--dc-text);
  background: var(--dc-surface-3);
}

.gb-add {
  align-self: flex-start;
  border-style: dashed;
}

.gb-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

html body .gb-input,
.gb-rich {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  color: var(--dc-text);
  background: var(--dc-rail-bg);
  font: inherit;
}

.gb-rich {
  min-height: 72px;
  line-height: 1.55;
}

.gb-rich:empty::before {
  content: attr(data-placeholder);
  color: color-mix(in srgb, var(--dc-muted) 70%, transparent);
  pointer-events: none;
}

html body .gb-input:focus,
.gb-rich:focus {
  outline: none;
  border-color: var(--dc-blurple);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.28);
}

html body .gb-level {
  flex: 0 0 160px;
  width: auto;
}

.gb-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.gb-step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--dc-blurple);
  font-weight: 800;
}

.gb-step-fields {
  display: grid;
  gap: 8px;
}

.gb-step-tools {
  flex-direction: column;
}

.gb-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dc-muted);
  font-size: 0.9rem;
}

.gb-table {
  display: grid;
  grid-template-columns: repeat(var(--gb-cols, 3), minmax(90px, 1fr));
  gap: 6px;
  overflow-x: auto;
}

html body .gb-table .gb-input.is-head {
  font-weight: 800;
  background: var(--dc-surface-3);
}

.gb-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gb-preview {
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
}

.gb-palette {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--dc-border-strong);
  border-radius: 14px;
}

.gb-palette-title {
  margin: 0 0 10px;
  color: var(--dc-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gb-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.gb-palette-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  color: var(--dc-text);
  background: var(--dc-surface-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms var(--dc-ease),
    border-color 160ms ease;
}

.gb-palette-item:hover {
  transform: translateY(-2px);
  border-color: var(--dc-blurple);
}

.gb-palette-item small {
  color: var(--dc-muted);
  font-size: 0.78rem;
}

/* Rendu des modules dans un guide publié */

.guide-rich-content .guide-steps {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-rich-content .guide-steps > li {
  position: relative;
  padding: 14px 16px 14px 62px;
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  background: var(--dc-surface);
  counter-increment: guide-step;
}

.guide-rich-content .guide-steps > li::before {
  content: counter(guide-step);
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--dc-blurple);
  font-weight: 800;
}

.guide-rich-content .guide-steps h4 {
  margin: 4px 0 6px;
  font-size: 1.06rem;
}

.guide-rich-content .guide-steps p:last-child {
  margin-bottom: 0;
}

.guide-rich-content .guide-callout {
  margin: 18px 0;
  padding: 14px 16px;
  border: 0;
  border-left: 4px solid var(--dc-green);
  border-radius: 4px 12px 12px 4px;
  background: rgba(35, 165, 90, 0.12);
  font-style: normal;
}

.guide-rich-content .guide-callout-info {
  border-left-color: var(--dc-blurple);
  background: rgba(88, 101, 242, 0.14);
}

.guide-rich-content .guide-callout-warning {
  border-left-color: var(--dc-yellow);
  background: rgba(240, 178, 50, 0.14);
}

.guide-rich-content .guide-callout > :last-child {
  margin-bottom: 0;
}

.guide-rich-content .guide-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}

.guide-rich-content .guide-column {
  padding: 14px 16px;
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  background: var(--dc-surface);
}

@media (max-width: 720px) {
  .gb-columns,
  .guide-rich-content .guide-columns {
    grid-template-columns: 1fr;
  }

  .gb-step {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .gb-step-tools {
    grid-column: 2;
    flex-direction: row;
  }
}

/* ==========================================================
   10. Objets : fiche détaillée (formulaire contributeur et affichage)
   ========================================================== */

.os-sheet {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--dc-border);
  border-left: 4px solid var(--dc-blurple);
  border-radius: 6px 14px 14px 6px;
  background: var(--dc-surface);
}

.os-title {
  margin: 0;
  font-size: 1.05rem;
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.os-field,
.os-block {
  display: grid;
  gap: 8px;
}

.os-label {
  color: var(--dc-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.os-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.os-chip,
.os-add {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 999px;
  color: var(--dc-muted);
  background: var(--dc-surface-2);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.os-chip.is-active {
  border-color: transparent;
  color: #fff;
  background: var(--dc-blurple);
}

.os-add {
  justify-self: start;
  border-style: dashed;
  border-radius: 8px;
}

.os-add:hover {
  color: var(--dc-text);
  background: var(--dc-surface-3);
}

.os-level {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  background: var(--dc-rail-bg);
}

.os-level-stats {
  display: grid;
  gap: 6px;
}

.os-stat,
.os-recommended {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 6px;
}

.os-remove {
  width: 34px;
  height: 34px;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  color: var(--dc-muted);
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.os-remove:hover {
  border-color: var(--dc-red);
  color: #ffb3b5;
}

.os-detail {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.os-detail h3 {
  margin: 8px 0 0;
  font-size: 1rem;
}

.os-detail p {
  margin: 0;
}

.os-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.os-badge {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--dc-muted);
  background: var(--dc-surface-3);
  font-size: 0.8rem;
  font-weight: 750;
}

.os-badge.is-yes {
  color: #7ee2a8;
  background: rgba(35, 165, 90, 0.16);
}

.os-table-wrap {
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  overflow-x: auto;
}

.os-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.os-table th,
.os-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--dc-border);
  text-align: right;
  white-space: nowrap;
}

.os-table th:first-child {
  text-align: left;
}

.os-table thead th {
  color: var(--dc-text);
  background: var(--dc-surface-2);
}

.os-table tr:last-child > * {
  border-bottom: 0;
}

.os-recommended-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.os-recommended-list li {
  padding: 8px 12px;
  border-left: 3px solid var(--dc-blurple);
  border-radius: 4px 10px 10px 4px;
  background: var(--dc-surface);
}

@media (max-width: 640px) {
  .os-level {
    grid-template-columns: 1fr auto;
  }

  .os-level-stats {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .os-stat,
  .os-recommended {
    grid-template-columns: 1fr auto;
  }

  .os-stat input:nth-child(2),
  .os-recommended input:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
}

/* ==========================================================
   11. Forum du Foyer
   ========================================================== */

.fy-wrap {
  width: min(100% - 40px, 1180px);
  margin-inline: auto;
}

.fy-intro {
  padding: clamp(24px, 4vw, 40px) 0 clamp(16px, 2.4vw, 24px);
  border-bottom: 1px solid var(--dc-border);
  background:
    linear-gradient(180deg, rgba(88, 101, 242, 0.14), transparent),
    color-mix(in srgb, var(--dc-bg) 92%, transparent);
}

.fy-intro-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.fy-intro-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--dc-surface-3);
  font-size: 2rem;
}

.fy-kicker {
  margin: 0 0 4px;
  color: var(--dc-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fy-intro h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.fy-intro p:last-child {
  max-width: 70ch;
  margin: 8px 0 0;
  color: var(--dc-muted);
  line-height: 1.55;
}

.fy-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 24px 0 64px;
}

.fy-side {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 12px;
}

.fy-new,
.fy-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--dc-blurple);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.fy-new:hover,
.fy-primary:hover {
  background: var(--dc-blurple-2);
}

.fy-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.fy-ghost {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 10px;
  color: var(--dc-text);
  background: var(--dc-surface-2);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.fy-ghost:disabled {
  opacity: 0.4;
  cursor: default;
}

.fy-link {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--dc-accent);
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.fy-categories {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  background: var(--dc-surface);
}

.fy-category {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--dc-muted);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.fy-category:hover {
  color: var(--dc-text);
  background: rgba(255, 255, 255, 0.06);
}

.fy-category.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.fy-hash {
  color: var(--dc-muted);
  font-size: 1.15rem;
  font-weight: 700;
}

.fy-category-text strong,
.fy-category-text small {
  display: block;
}

.fy-category-text strong {
  font-size: 0.94rem;
  font-weight: 700;
}

.fy-category-text small {
  color: var(--dc-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.fy-category em {
  padding: 0 8px;
  border-radius: 999px;
  color: var(--dc-text);
  background: var(--dc-surface-3);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
}

.fy-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.fy-search {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: var(--dc-surface-2);
}

.fy-search[hidden],
.fy-composer[hidden],
.fy-thread[hidden],
.fy-topics[hidden],
.fy-pagination[hidden] {
  display: none;
}

.fy-search input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  color: var(--dc-text);
  background: transparent;
  font: inherit;
}

.fy-search input:focus {
  outline: none;
}

.fy-search:focus-within {
  box-shadow: 0 0 0 2px var(--dc-blurple);
}

.fy-search button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: var(--dc-text);
  background: var(--dc-surface-3);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.fy-composer,
.fy-thread {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--dc-border);
  border-radius: 16px;
  background: var(--dc-surface);
}

.fy-composer h2,
.fy-thread h2 {
  margin: 0;
  font-size: 1.3rem;
}

.fy-composer label {
  display: grid;
  gap: 6px;
  color: var(--dc-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

html body .fy-composer :is(input, select, textarea),
html body .fy-reply textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  color: var(--dc-text);
  background: var(--dc-rail-bg);
  font: inherit;
}

html body .fy-composer :is(input, select, textarea):focus,
html body .fy-reply textarea:focus {
  outline: none;
  border-color: var(--dc-blurple);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.28);
}

.fy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fy-feedback {
  min-height: 1.2em;
  margin: 0;
  color: var(--dc-muted);
  font-size: 0.9rem;
}

.fy-topics {
  display: grid;
  gap: 10px;
}

.fy-topic {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  color: inherit;
  background: var(--dc-surface);
  text-decoration: none;
  transition:
    transform 200ms var(--dc-ease),
    border-color 200ms ease,
    background-color 200ms ease;
}

.fy-topic:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--dc-blurple) 70%, transparent);
  background: var(--dc-surface-2);
}

.fy-topic.is-pinned {
  border-left: 4px solid var(--dc-yellow);
}

.fy-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--dc-blurple);
  font-weight: 800;
  overflow: hidden;
}

.fy-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fy-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}

.fy-tag {
  padding: 2px 10px;
  border-radius: 999px;
  color: var(--dc-muted);
  background: var(--dc-surface-3);
  font-size: 0.74rem;
  font-weight: 750;
}

.fy-tag.is-pin {
  color: #3b2a00;
  background: var(--dc-yellow);
}

.fy-topic h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.fy-topic-excerpt {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--dc-muted);
  font-size: 0.94rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.fy-topic-foot {
  margin: 8px 0 0;
  color: var(--dc-muted);
  font-size: 0.8rem;
}

.fy-count {
  display: grid;
  justify-items: center;
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--dc-rail-bg);
}

.fy-count strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.fy-count small {
  color: var(--dc-muted);
  font-size: 0.7rem;
}

.fy-empty {
  margin: 0;
  padding: 28px 18px;
  border: 1px dashed var(--dc-border-strong);
  border-radius: 14px;
  color: var(--dc-muted);
  text-align: center;
}

.fy-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--dc-muted);
  font-size: 0.88rem;
}

.fy-messages {
  display: grid;
  gap: 2px;
}

.fy-message {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 8px;
  border-radius: 10px;
}

.fy-message:hover {
  background: rgba(255, 255, 255, 0.04);
}

.fy-message.is-first {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dc-border);
  border-radius: 10px 10px 0 0;
  margin-bottom: 8px;
}

.fy-message-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.fy-message-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.fy-message-head time {
  color: var(--dc-muted);
  font-size: 0.78rem;
}

.fy-message-text {
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.fy-message-image {
  max-width: min(100%, 560px);
  border-radius: 12px;
}

.fy-reply {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--dc-border);
}

.fy-reply .fy-primary {
  justify-self: start;
}

@media (max-width: 900px) {
  .fy-layout {
    grid-template-columns: 1fr;
  }

  .fy-side {
    position: static;
  }

  .fy-category-text small {
    display: none;
  }

  .fy-topic {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .fy-count {
    grid-column: 2;
    grid-auto-flow: column;
    justify-content: start;
    gap: 6px;
    align-items: baseline;
  }
}

/* ==========================================================
   12. Codex : interface façon jeu (apparitions, survols, ouverture de fiche)
   ========================================================== */

/* Les cartes apparaissent en cascade, comme une collection qui se dévoile. */
.codex-page :is(.codex-card, .codex-discovery-card, .codex-locked-card) {
  animation: cx-card-in 460ms var(--dc-ease) both;
  transition:
    transform 260ms var(--dc-ease),
    box-shadow 260ms ease,
    border-color 260ms ease;
}

.codex-page :is(.codex-card, .codex-discovery-card):nth-child(2n) {
  animation-delay: 50ms;
}

.codex-page :is(.codex-card, .codex-discovery-card):nth-child(3n) {
  animation-delay: 100ms;
}

.codex-page :is(.codex-card, .codex-discovery-card):nth-child(4n) {
  animation-delay: 150ms;
}

@keyframes cx-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
}

.codex-page :is(.codex-card, .codex-discovery-card):hover {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--dc-accent);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.4),
    0 0 0 2px color-mix(in srgb, var(--dc-accent) 50%, transparent),
    0 0 34px color-mix(in srgb, var(--dc-accent) 30%, transparent);
}

/* L'Aniimo « respire » au repos et bondit au survol de sa carte. */
.codex-page :is(.codex-card-media, .codex-discovery-media) img {
  transition: transform 420ms var(--dc-ease), filter 420ms ease;
  will-change: transform;
}

.codex-page :is(.codex-card, .codex-discovery-card):hover :is(.codex-card-media, .codex-discovery-media) img {
  transform: translateY(-8px) scale(1.09);
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.45));
}

/* Reflet qui balaie la carte au survol. */
.codex-page :is(.codex-card-media, .codex-discovery-media)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.34) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}

.codex-page :is(.codex-card, .codex-discovery-card):hover :is(.codex-card-media, .codex-discovery-media)::before {
  transform: translateX(130%);
  transition: transform 700ms ease;
}

/* Jauges de statistiques qui se remplissent à l'affichage. */
.codex-page :is(.codex-stat-meter, .codex-modal-stat) :is(b, i, span[style*="width"]) {
  animation: cx-meter 900ms var(--dc-ease) both;
  transform-origin: left;
}

@keyframes cx-meter {
  from {
    transform: scaleX(0);
  }
}

/* Ouverture de la fiche : le fond s'assombrit, la fiche surgit, le portrait entre en dernier. */
.codex-page .codex-modal:not([hidden]) {
  animation: cx-backdrop 260ms ease both;
}

@keyframes cx-backdrop {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
}

.codex-page .codex-modal:not([hidden]) :is(.codex-modal-card, .codex-modal-dossier, .codex-modal-panel) {
  animation: cx-open 520ms cubic-bezier(0.16, 1.2, 0.3, 1) both;
}

@keyframes cx-open {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.9);
  }
}

.codex-page .codex-modal:not([hidden]) :is(.codex-modal-portrait, .codex-modal-art) img {
  animation: cx-portrait 760ms cubic-bezier(0.16, 1.3, 0.3, 1) 140ms both;
}

@keyframes cx-portrait {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.72) rotate(-4deg);
  }
}

.codex-page .codex-modal:not([hidden]) :is(.codex-modal-stat, .codex-modal-ability, .codex-modal-place) {
  animation: cx-row 420ms var(--dc-ease) both;
  animation-delay: 240ms;
}

@keyframes cx-row {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
}

.codex-page .codex-modal-close {
  transition: transform 220ms var(--dc-ease);
}

.codex-page .codex-modal-close:hover {
  transform: rotate(90deg) scale(1.1);
}

.codex-page :is(.codex-badge, .codex-stage-pill, .codex-number-pill) {
  transition: transform 180ms var(--dc-ease);
}

.codex-page :is(.codex-card, .codex-discovery-card):hover :is(.codex-badge, .codex-stage-pill) {
  transform: translateY(-2px);
}

/* Cartes verrouillées : le point d'interrogation oscille. */
.codex-page .codex-locked-question {
  animation: cx-wobble 3.2s ease-in-out infinite;
}

@keyframes cx-wobble {
  50% {
    transform: translateY(-4px) rotate(4deg);
  }
}

.codex-page .codex-page-button {
  transition:
    transform 160ms var(--dc-ease),
    background-color 160ms ease;
}

.codex-page .codex-page-button:hover {
  transform: translateY(-2px);
}

/* ==========================================================
   13. Carte interactive : changement rapide et habillage
   ========================================================== */

.map-switcher {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 500;
  display: grid;
  gap: 6px;
  justify-items: center;
  max-width: min(92%, 900px);
  transform: translateX(-50%);
  pointer-events: none;
}

.map-switch-row {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--dc-border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--dc-bg) 88%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
}

.map-switch-row::-webkit-scrollbar {
  display: none;
}

.map-switch-row[hidden] {
  display: none;
}

.map-switch-label {
  flex: none;
  padding: 0 8px 0 10px;
  color: var(--dc-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-switch-chip {
  flex: none;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--dc-muted);
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease;
}

.map-switch-chip:hover {
  color: var(--dc-text);
  background: rgba(255, 255, 255, 0.08);
}

.map-switch-chip.is-active {
  color: #fff;
  background: var(--dc-blurple);
}

.map-switch-regions .map-switch-chip {
  min-height: 28px;
  padding: 0 11px;
  font-size: 0.8rem;
}

.map-page .map-stage {
  position: relative;
}

/* Panneaux de la carte aux couleurs du thème actif. */
html body.map-page .map-sidebar,
html body.map-page .map-detail {
  border-color: var(--dc-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--dc-surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

html body.map-page .map-tabs button[aria-selected="true"] {
  color: #fff;
  border-color: var(--dc-accent);
}

html body.map-page :is(.map-search-form, .map-field select, .map-field input) {
  border-color: var(--dc-border-strong);
  border-radius: 10px;
}

html body.map-page .map-search-form:focus-within {
  border-color: var(--dc-blurple);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.28);
}

html body.map-page progress {
  height: 8px;
  border-radius: 999px;
  accent-color: var(--dc-accent);
}

html body.map-page .leaflet-container {
  background: var(--dc-rail-bg);
}

/* Les repères grossissent au survol pour être plus faciles à viser. */
html body.map-page .leaflet-marker-icon {
  transition: filter 160ms ease;
}

html body.map-page .leaflet-marker-icon:hover {
  z-index: 1000 !important;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)) brightness(1.1);
}

html body.map-page .leaflet-popup-content-wrapper,
html body.map-page .leaflet-popup-tip {
  color: var(--dc-text);
  background: var(--dc-surface-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

html body.map-page .leaflet-popup-content-wrapper {
  border: 1px solid var(--dc-border-strong);
  border-radius: 14px;
}

html body.map-page .leaflet-bar a {
  color: var(--dc-text);
  border-color: var(--dc-border);
  background: var(--dc-surface-2);
}

html body.map-page .leaflet-bar a:hover {
  background: var(--dc-surface-3);
}

@media (max-width: 760px) {
  .map-switcher {
    top: 8px;
    max-width: 96%;
  }

  .map-switch-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .codex-page :is(.codex-card, .codex-discovery-card, .codex-locked-card, .codex-locked-question),
  .codex-page .codex-modal:not([hidden]),
  .codex-page .codex-modal:not([hidden]) * {
    animation: none !important;
  }

  .codex-page :is(.codex-card, .codex-discovery-card):hover,
  .codex-page :is(.codex-card, .codex-discovery-card):hover img {
    transform: none;
  }
}

/* ---------- AniiPote : modules « J'ai compris » et « Comment j'ai raisonné » ---------- */

.aniipote-reply-understood {
  justify-self: start;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--dc-muted) !important;
  background: var(--dc-surface-3);
  font-size: 0.84rem !important;
}

.aniipote-reply-why {
  border: 1px solid var(--dc-border);
  border-left: 3px solid var(--dc-blurple);
  border-radius: 4px 12px 12px 4px;
  background: var(--dc-surface);
}

.aniipote-reply-why summary {
  padding: 10px 14px;
  font-weight: 750;
  cursor: pointer;
}

.aniipote-reply-why ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 14px 12px 32px;
  color: var(--dc-muted);
  font-size: 0.94rem;
}
