/* FactoWiki — DA Factomancer (menus in-game : navy, or, pourpre) */

:root {
  --wiki-void: #070b18;
  --wiki-deep: #0e152b;
  --wiki-panel: #151c38;
  --wiki-panel-2: #1a2448;
  --wiki-raised: #222c52;
  --wiki-ink: #e6e2f2;
  --wiki-muted: #9aa3c7;
  --wiki-line: #c9a84c;
  --wiki-gold: #e8c56a;
  --wiki-gold-deep: #b8862e;
  --wiki-accent: #7c4dbb;
  --wiki-accent-2: #9b6dd4;
  --wiki-green: #5cdb7a;
  --wiki-sky: #6ec8ff;
  --wiki-pink: #e879b8;
  --wiki-surface: rgba(21, 28, 56, 0.92);
  --wiki-surface-solid: #151c38;
  --wiki-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --wiki-glow: 0 0 24px rgba(201, 168, 76, 0.22);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Josefin Sans", "Segoe UI", sans-serif;
}

body:has(.wiki-nav) {
  color: var(--wiki-ink);
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 70% 50% at 15% -10%, rgba(124, 77, 187, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 5%, rgba(201, 168, 76, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 45% at 70% 100%, rgba(94, 61, 160, 0.18), transparent 55%),
    linear-gradient(180deg, var(--wiki-void) 0%, var(--wiki-deep) 45%, #0a1020 100%) !important;
}

body:has(.wiki-nav)::before {
  opacity: 0.35 !important;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

body:has(.wiki-nav) .site {
  color: var(--wiki-ink);
}

/* ——— Chrome (barre style menu jeu) ——— */
.wiki-chrome {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1rem;
  padding: 0.4rem 0.7rem;
  min-height: 3.15rem;
  box-sizing: border-box;
  border: 1.5px solid var(--wiki-line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(34, 44, 82, 0.95) 0%, rgba(21, 28, 56, 0.98) 100%);
  box-shadow: var(--wiki-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0.35rem;
  z-index: 40;
  backdrop-filter: blur(12px);
}

.wiki-chrome .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wiki-gold);
  flex: 0 0 auto;
  white-space: nowrap;
}

.wiki-chrome .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--wiki-line);
  box-shadow: var(--wiki-glow);
  background: #05050a;
  display: block;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
  padding: 2px;
  box-sizing: border-box;
}

.wiki-chrome .wiki-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  position: static;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.wiki-chrome .wiki-nav::-webkit-scrollbar { display: none; }

.wiki-chrome .wiki-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--wiki-muted);
  box-shadow: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.wiki-chrome .chrome-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
  max-width: none;
}

.wiki-chrome .chrome-tools:has(input[type="search"]) {
  flex: 1 1 14rem;
  max-width: 22rem;
}

.wiki-chrome .chrome-tools input[type="search"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 2.05rem;
  padding: 0.3rem 0.85rem;
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  border-radius: 999px;
  background: rgba(10, 14, 32, 0.85);
  color: var(--wiki-ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  box-sizing: border-box;
}

.wiki-chrome .chrome-tools input::placeholder {
  color: var(--wiki-muted);
  font-weight: 500;
}

.wiki-chrome .chrome-tools input:focus {
  outline: none;
  border-color: var(--wiki-gold);
  box-shadow: 0 0 0 2px rgba(232, 197, 106, 0.2);
}

.lang-toggle {
  flex: 0 0 auto;
  height: 2.05rem;
  min-width: 2.65rem;
  padding: 0 0.7rem;
  border: 1.5px solid rgba(201, 168, 76, 0.55);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 44, 82, 0.95), rgba(21, 28, 56, 0.98));
  color: var(--wiki-gold);
  font: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.lang-toggle:hover {
  border-color: var(--wiki-gold);
  color: #1a1408;
  background: linear-gradient(180deg, var(--wiki-gold), var(--wiki-gold-deep));
  box-shadow: 0 0 14px rgba(232, 197, 106, 0.3);
}

.report-chrome-btn {
  flex: 0 0 auto;
  height: 2.05rem;
  padding: 0 0.85rem;
  border: 1.5px solid rgba(201, 168, 76, 0.55);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 44, 82, 0.95), rgba(21, 28, 56, 0.98));
  color: var(--wiki-gold);
  font: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.report-chrome-btn:hover {
  border-color: var(--wiki-gold);
  color: #1a1408;
  background: linear-gradient(180deg, var(--wiki-gold), var(--wiki-gold-deep));
  box-shadow: 0 0 14px rgba(232, 197, 106, 0.3);
}

.lang-menu {
  position: relative;
  flex: 0 0 auto;
}

.lang-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 80;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  min-width: 8.5rem;
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, #1a2448 0%, #121833 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.lang-menu-list li { margin: 0; }

.lang-menu-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  background: transparent;
  color: var(--wiki-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.lang-menu-list button:hover {
  background: rgba(155, 109, 212, 0.2);
}

.lang-menu-list button.is-active {
  background: rgba(232, 197, 106, 0.18);
  color: var(--wiki-gold);
}

.wiki-chrome .wiki-nav a:hover {
  background: rgba(155, 109, 212, 0.15);
  color: var(--wiki-ink);
  transform: none;
}

.wiki-chrome .wiki-nav a.is-here {
  background: linear-gradient(180deg, var(--wiki-gold) 0%, var(--wiki-gold-deep) 100%);
  color: #1a1408;
  border-color: #f0d78c;
  box-shadow: 0 0 16px rgba(232, 197, 106, 0.35);
  font-weight: 700;
}

.wiki-topbar { justify-content: flex-start; }
.wiki-topbar .brand { gap: 0.55rem; }
.wiki-topbar .brand-mark {
  background: linear-gradient(145deg, #9b6dd4, #4a2878);
  color: var(--wiki-gold);
}

.wiki-shell { display: grid; gap: 1rem; flex: 1; }
.wiki-layout { display: grid; gap: 1.15rem; }

@media (min-width: 1100px) {
  .wiki-layout.has-aside {
    grid-template-columns: 1fr minmax(260px, 300px);
    align-items: start;
  }
}

.wiki-crumb {
  margin: 0 0 0.55rem;
  font-weight: 600;
  color: var(--wiki-muted);
  font-size: 0.88rem;
}

.wiki-crumb a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--wiki-gold);
}

.wiki-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.65rem;
  border: 1.5px solid var(--wiki-line);
  border-radius: 14px;
  background: var(--wiki-surface);
  box-shadow: var(--wiki-shadow);
}

body:not(:has(.wiki-chrome)) .wiki-nav {
  position: sticky;
  top: 4.6rem;
  z-index: 30;
  backdrop-filter: blur(10px);
}

.wiki-nav a {
  padding: 0.4rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--wiki-muted);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.wiki-nav a:hover {
  background: rgba(155, 109, 212, 0.18);
  color: var(--wiki-ink);
  transform: none;
}

.wiki-nav a.is-here {
  background: linear-gradient(180deg, var(--wiki-gold), var(--wiki-gold-deep));
  color: #1a1408;
  border-color: #f0d78c;
  box-shadow: 0 0 14px rgba(232, 197, 106, 0.3);
}

/* ——— Portail ——— */
.portal-hero {
  position: relative;
  border: 1.5px solid var(--wiki-line);
  border-radius: 16px;
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(124, 77, 187, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 70% at 100% 20%, rgba(201, 168, 76, 0.18), transparent 55%),
    linear-gradient(165deg, #1a2448 0%, #121833 55%, #0e152b 100%);
  box-shadow: var(--wiki-shadow), var(--wiki-glow);
  margin-bottom: 1.15rem;
}

.portal-hero--art {
  min-height: 0;
  height: clamp(240px, 42vw, 420px);
  padding: 0;
  display: block;
  background: #0a1020;
}

.portal-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.portal-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wiki-gold-deep), var(--wiki-gold), var(--wiki-gold-deep));
}

.portal-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--wiki-gold);
  text-shadow: 0 0 28px rgba(232, 197, 106, 0.35);
}

.portal-hero p {
  margin: 0.85rem 0 0;
  font-weight: 500;
  max-width: 52rem;
  color: var(--wiki-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.portal-hero-copy p { margin-top: 0; }

.portal-hero strong { color: var(--wiki-green); font-weight: 700; }

.status {
  color: var(--wiki-muted);
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: 0.04em;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.95rem;
}

.portal-tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 155px;
  padding: 1.05rem;
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(34, 44, 82, 0.9) 0%, rgba(21, 28, 56, 0.95) 100%);
  box-shadow: var(--wiki-shadow);
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}

.portal-tile:hover {
  transform: translateY(-4px);
  border-color: var(--wiki-gold);
  box-shadow: var(--wiki-shadow), 0 0 28px rgba(124, 77, 187, 0.35);
}

.portal-tile .kind {
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-tile h2 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--wiki-ink);
  letter-spacing: 0.02em;
}

.portal-tile p {
  margin: 0;
  font-weight: 500;
  color: var(--wiki-muted);
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.45;
}

.kind-fiche { background: rgba(232, 121, 184, 0.25); color: #f9a8d4; border-color: #e879b8 !important; }
.kind-lore { background: rgba(92, 219, 122, 0.18); color: #86efac; border-color: #5cdb7a !important; }
.kind-guide { background: rgba(232, 197, 106, 0.2); color: #f5d76e; border-color: #c9a84c !important; }
.kind-db { background: rgba(110, 200, 255, 0.18); color: #7dd3fc; border-color: #6ec8ff !important; }
.kind-craft { background: rgba(155, 109, 212, 0.28); color: #d8b4fe; border-color: #9b6dd4 !important; }
.kind-map { background: rgba(251, 146, 60, 0.2); color: #fdba74; border-color: #fb923c !important; }
.kind-loot { background: rgba(244, 114, 182, 0.22); color: #f9a8d4; border-color: #f472b6 !important; }

/* ——— Infobox ——— */
.infobox {
  border: 1.5px solid var(--wiki-line);
  border-radius: 14px;
  background: var(--wiki-panel);
  box-shadow: var(--wiki-shadow);
  overflow: hidden;
}

.infobox-head {
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, var(--wiki-gold) 0%, var(--wiki-gold-deep) 100%);
  color: #1a1408;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.infobox-banner {
  height: auto;
  min-height: 160px;
  max-height: 280px;
  overflow: hidden;
  background: #05070f;
  border-bottom: 1px solid rgba(201, 168, 76, 0.35);
}

.infobox-banner img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center top;
}

.infobox-studio {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid rgba(201, 168, 76, 0.35);
  background: #05070f;
  text-align: center;
}

.infobox-studio img {
  max-width: 160px;
  width: 70%;
  height: auto;
  opacity: 0.95;
}

.infobox table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
}

.infobox th,
.infobox td {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.4);
  text-align: left;
  vertical-align: top;
  color: var(--wiki-ink);
}

.infobox th {
  width: 38%;
  font-weight: 700;
  background: rgba(124, 77, 187, 0.15);
  color: var(--wiki-gold);
}

.article-body h2 {
  margin: 1.35rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  color: var(--wiki-gold);
}

.article-body h3 {
  margin: 1rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--wiki-ink);
}

.article-body p,
.article-body li {
  font-weight: 500;
  line-height: 1.65;
  color: var(--wiki-muted);
  font-size: 1.02rem;
}

.article-body ul,
.article-body ol { padding-left: 1.2rem; }

.article-body a {
  font-weight: 700;
  color: var(--wiki-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body strong { color: var(--wiki-green); }

.panel {
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  border-radius: 14px;
  background: var(--wiki-panel);
  box-shadow: var(--wiki-shadow);
  padding: 1.1rem 1.2rem;
}

.callout {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  border-radius: 12px;
  background: rgba(34, 44, 82, 0.7);
  box-shadow: none;
  font-weight: 500;
  color: var(--wiki-ink);
}

.callout.tip {
  background: rgba(92, 219, 122, 0.1);
  border-color: rgba(92, 219, 122, 0.45);
}

.callout.warn {
  background: rgba(232, 197, 106, 0.1);
  border-color: rgba(232, 197, 106, 0.45);
}

.callout.lore {
  background: rgba(155, 109, 212, 0.12);
  border-color: rgba(155, 109, 212, 0.45);
}

.toc {
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  border-radius: 14px;
  background: var(--wiki-panel);
  box-shadow: var(--wiki-shadow);
  padding: 0.9rem 1rem;
  position: sticky;
  top: 5.5rem;
}

.toc strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wiki-gold);
  margin-bottom: 0.45rem;
}

.toc ol { margin: 0; padding-left: 1.2rem; }

.toc a {
  font-weight: 600;
  text-decoration: none;
  color: var(--wiki-muted);
}

.toc a:hover { color: var(--wiki-gold); text-decoration: underline; }

.steps {
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  border-radius: 14px;
  background: var(--wiki-panel);
  box-shadow: var(--wiki-shadow);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 0.95rem;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--wiki-line);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--wiki-gold), var(--wiki-gold-deep));
  color: #1a1408;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--font-display);
}

.step h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--wiki-ink);
}

.step p {
  margin: 0;
  font-weight: 500;
  color: var(--wiki-muted);
}

.db-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  position: sticky;
  top: 5.2rem;
  z-index: 20;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  background: rgba(14, 21, 43, 0.88);
  backdrop-filter: blur(10px);
}

.db-filters button {
  cursor: pointer;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 8px;
  background: var(--wiki-raised);
  color: var(--wiki-muted);
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.db-filters button:hover {
  transform: none;
  background: rgba(155, 109, 212, 0.25);
  color: var(--wiki-ink);
  border-color: var(--wiki-accent-2);
}

.db-filters button.is-on {
  background: linear-gradient(180deg, var(--wiki-gold), var(--wiki-gold-deep));
  color: #1a1408;
  border-color: #f0d78c;
  box-shadow: 0 0 14px rgba(232, 197, 106, 0.3);
}

.page-lead {
  margin: -0.35rem 0 1.25rem;
  max-width: 42rem;
  color: var(--wiki-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.db-section-title {
  margin: 1.75rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wiki-gold);
}

.db-section-title:first-of-type {
  margin-top: 0.35rem;
}

.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.95rem;
}

.db-card {
  border: 1.5px solid rgba(155, 109, 212, 0.55);
  border-radius: 14px;
  background: linear-gradient(165deg, #1a2448 0%, #121833 100%);
  box-shadow: var(--wiki-shadow);
  padding: 0.75rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 250px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.db-card:hover,
.db-card:focus-visible {
  transform: none;
  border-color: var(--wiki-gold);
  box-shadow: var(--wiki-shadow), 0 0 22px rgba(155, 109, 212, 0.35);
}

.db-card[hidden] { display: none !important; }

.db-card .cat {
  align-self: flex-start;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(155, 109, 212, 0.55);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(124, 77, 187, 0.45);
  color: #f0e8ff;
}

.db-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wiki-ink);
  position: relative;
  z-index: 2;
}

.db-stage {
  position: relative;
  flex: 1;
  min-height: 150px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(201, 168, 76, 0.18);
}

.db-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78%;
  height: 78%;
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
  transition: opacity 0.28s ease, transform 0.35s ease;
  pointer-events: none;
}

.db-desc {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0.85rem 0.8rem;
  display: flex;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--wiki-ink);
  background: linear-gradient(180deg, rgba(18, 24, 51, 0.96) 0%, rgba(12, 16, 36, 0.98) 100%);
  transform: translateY(105%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.db-card:hover .db-icon,
.db-card:focus-visible .db-icon {
  opacity: 0;
  transform: translateY(-18%) scale(0.92);
}

.db-card:hover .db-desc,
.db-card:focus-visible .db-desc {
  transform: translateY(0);
}

/* ——— Guide path (cartes + fil de lecture) ——— */
.guide-path {
  position: relative;
  max-width: 980px;
  margin: 0 auto 1.5rem;
  padding: 0.5rem 0 1.5rem;
}

.guide-thread {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.guide-thread-glow {
  fill: none;
  stroke: rgba(155, 109, 212, 0.35);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: blur(0.35px);
}

.guide-thread-line {
  fill: none;
  stroke: #c9a84c;
  stroke-width: 0.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2.2 1.6;
  opacity: 0.85;
}

.guide-scatter {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem 0;
  padding: 0.25rem 0;
}

@media (min-width: 820px) {
  .guide-scatter {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.25rem;
    row-gap: 2rem;
    padding: 0.75rem 1.25rem 1.5rem;
  }

  .guide-card:nth-child(odd) {
    justify-self: end;
    width: min(100%, 460px);
  }

  .guide-card:nth-child(even) {
    justify-self: start;
    width: min(100%, 460px);
    margin-top: 2.75rem;
  }
}

.guide-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.4rem 1rem;
  align-items: start;
  padding: 1.2rem 1.25rem;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(26, 36, 72, 0.97) 0%, rgba(18, 24, 51, 0.98) 100%);
  box-shadow: var(--wiki-shadow), 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.guide-card img {
  grid-row: 1 / span 2;
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(201, 168, 76, 0.22);
  padding: 0.3rem;
}

.guide-card img.guide-card-dark-icon {
  filter: brightness(2.2) contrast(1.1);
  background: #0a0c14;
}

.guide-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wiki-gold);
}

.guide-card p {
  margin: 0;
  grid-column: 2;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--wiki-muted);
  font-weight: 500;
}

.guide-card strong { color: var(--wiki-green); }

.db-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.db-stats span:first-child { color: var(--wiki-gold); }
.db-stats span:last-child { color: var(--wiki-sky); }

/* ——— Lore page ——— */
.lore-page {
  max-width: 52rem;
  margin: 0 auto 2rem;
  padding-bottom: 1.75rem;
}

.lore-hero {
  margin: 0 0 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  box-shadow: var(--wiki-shadow);
}

.lore-hero img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
}

.lore-split {
  display: grid;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 700px) {
  .lore-split {
    grid-template-columns: 1fr minmax(140px, 180px);
  }
}

.lore-mark {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 0 14px rgba(232, 197, 106, 0.35));
}

.recipe-table-wrap {
  overflow-x: auto;
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  border-radius: 14px;
  background: var(--wiki-panel);
  box-shadow: var(--wiki-shadow);
}

.recipe-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.recipe-table th,
.recipe-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  text-align: left;
  font-weight: 500;
  vertical-align: top;
  color: var(--wiki-ink);
}

.recipe-table th {
  background: linear-gradient(180deg, #3d2a6b, #2a1848);
  color: var(--wiki-gold);
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.recipe-table tr:nth-child(even) td {
  background: rgba(124, 77, 187, 0.06);
}

.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.75rem 0;
  font-weight: 600;
}

.chain .node {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 8px;
  background: var(--wiki-raised);
  color: var(--wiki-ink);
}

.chain .arrow {
  color: var(--wiki-accent-2);
  font-weight: 800;
}

.biome-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
}

.biome-card {
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  border-radius: 14px;
  overflow: hidden;
  background: var(--wiki-panel);
  box-shadow: var(--wiki-shadow);
}

.biome-card .banner {
  padding: 1.1rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.35);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--wiki-gold);
}

.biome-card .body { padding: 0.9rem 1rem 1.1rem; }

.biome-card .body p {
  margin: 0 0 0.65rem;
  font-weight: 500;
  color: var(--wiki-muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-row span {
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(34, 44, 82, 0.8);
  color: var(--wiki-ink);
}

.locked {
  opacity: 0.65;
  filter: grayscale(0.25);
}

.source {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--wiki-muted);
}

body:has(.wiki-nav) .page-head h1 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--wiki-gold);
}

body:has(.wiki-nav) .page-head p {
  color: var(--wiki-muted);
  max-width: 56rem;
  font-weight: 500;
}

body:has(.wiki-nav) .page-head p strong,
body:has(.wiki-nav) .page-head p code {
  color: var(--wiki-green);
}

body:has(.wiki-nav) .footer {
  margin-top: 1.75rem;
  background: var(--wiki-panel);
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  border-radius: 12px;
  box-shadow: var(--wiki-shadow);
  color: var(--wiki-muted);
}

body:has(.wiki-nav) .footer a { color: var(--wiki-gold); }

.legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.online { color: var(--wiki-muted); font-weight: 600; }

.online .dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--wiki-green);
  box-shadow: 0 0 10px rgba(92, 219, 122, 0.8);
  vertical-align: middle;
}

@media (max-width: 760px) {
  .wiki-chrome {
    flex-wrap: wrap;
    position: static;
    min-height: 0;
  }

  .wiki-chrome .wiki-nav {
    flex: 1 1 100%;
    order: 2;
  }

  .wiki-chrome .chrome-tools {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }

  .wiki-nav { position: static; }
  .db-filters,
  .toc { position: static; }
}

/* —— Report widget —— */
.fw-report-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(4, 8, 20, 0.72);
  cursor: pointer;
}

.fw-report-dialog {
  position: fixed;
  z-index: 200;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(28rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
  border-radius: 14px;
  background: linear-gradient(180deg, #1a2448 0%, #121833 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  color: var(--wiki-ink, #e6e2f2);
}

.fw-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.28);
  background: linear-gradient(180deg, rgba(232, 197, 106, 0.16), transparent);
}

.fw-report-head h2 {
  margin: 0;
  font-family: var(--font-display, Cinzel, serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--wiki-gold, #e8c56a);
}

.fw-report-x {
  width: 2.1rem;
  height: 2.1rem;
  border: none;
  border-radius: 8px;
  background: rgba(155, 109, 212, 0.35);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.fw-report-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.fw-report-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--wiki-muted, #9aa3c7);
}

.fw-report-label textarea,
.fw-report-label input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid rgba(201, 168, 76, 0.35);
  border-radius: 10px;
  background: rgba(10, 14, 32, 0.85);
  color: var(--wiki-ink, #e6e2f2);
  font: inherit;
  font-weight: 500;
  resize: vertical;
}

.fw-report-label textarea:focus,
.fw-report-label input:focus {
  outline: none;
  border-color: var(--wiki-gold, #e8c56a);
  box-shadow: 0 0 0 2px rgba(232, 197, 106, 0.2);
}

.fw-report-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fw-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.fw-report-cancel,
.fw-report-submit {
  height: 2.3rem;
  padding: 0 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.fw-report-cancel {
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: transparent;
  color: var(--wiki-muted, #9aa3c7);
}

.fw-report-submit {
  border: none;
  background: linear-gradient(180deg, #9b6dd4 0%, #5a2d8a 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(90, 45, 138, 0.45);
}

.fw-report-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.fw-report-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--wiki-muted, #9aa3c7);
}

.fw-report-status.is-ok { color: #5cdb7a; }
.fw-report-status.is-err { color: #f07178; }

.fw-report-legal {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--wiki-muted, #9aa3c7);
}

.fw-report-legal a { color: var(--wiki-gold, #c9a84c); }

body.fw-report-open {
  overflow: hidden;
}

/* ——— Guide board (pannable topic map) ——— */
.site--guide-board {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-head--guide {
  margin-bottom: 0.35rem;
}

.guide-board {
  position: relative;
  flex: 1;
  min-height: min(70vh, 720px);
  margin: 0 0 1rem;
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  border-radius: 18px;
  overflow: hidden;
  cursor: grab;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(124, 77, 187, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(201, 168, 76, 0.12), transparent 50%),
    linear-gradient(165deg, #141c38 0%, #0c1228 55%, #10182f 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
  touch-action: none;
  user-select: none;
}

.guide-board.is-panning {
  cursor: grabbing;
}

.guide-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1900px;
  height: 1200px;
  transform-origin: 0 0;
  will-change: transform;
}

.guide-world::before {
  content: "";
  position: absolute;
  inset: 40px;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  border-radius: 12px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 78%);
}

.guide-pan-hint {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: rgba(12, 16, 36, 0.75);
  color: var(--wiki-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 2;
}

.guide-tile {
  position: absolute;
  width: 220px;
  min-height: 148px;
  padding: 0.85rem 0.9rem 1rem;
  border: 1.5px solid rgba(155, 109, 212, 0.55);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(26, 36, 72, 0.97) 0%, rgba(18, 24, 51, 0.98) 100%);
  box-shadow: var(--wiki-shadow);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.guide-tile:hover,
.guide-tile:focus-visible {
  border-color: var(--wiki-gold);
  box-shadow: var(--wiki-shadow), 0 0 22px rgba(155, 109, 212, 0.35);
  outline: none;
  transform: translateY(-2px);
}

.guide-tile.is-hint {
  border-color: #f0d78c;
  box-shadow: var(--wiki-shadow), 0 0 28px rgba(232, 197, 106, 0.45);
  animation: guide-tile-pulse 1.8s ease-in-out infinite;
}

.guide-tile.is-visited {
  border-color: rgba(92, 219, 122, 0.45);
}

@keyframes guide-tile-pulse {
  0%, 100% { box-shadow: var(--wiki-shadow), 0 0 18px rgba(232, 197, 106, 0.3); }
  50% { box-shadow: var(--wiki-shadow), 0 0 32px rgba(232, 197, 106, 0.55); }
}

.guide-tile-tag {
  align-self: flex-start;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(155, 109, 212, 0.5);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(124, 77, 187, 0.4);
  color: #f0e8ff;
}

.guide-tile-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  align-self: center;
  margin: 0.15rem 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.guide-tile-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wiki-ink);
  line-height: 1.2;
}

.guide-tile-profit {
  position: absolute;
  top: -28px;
  right: -22px;
  z-index: 3;
  pointer-events: none;
}

.guide-hint {
  position: absolute;
  z-index: 4;
  width: 150px;
  pointer-events: none;
}

/* PROF-IT — sprites only from /img/PROF-IT */
.profit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.profit-sprite {
  position: relative;
  width: 120px;
  line-height: 0;
}

.profit-body-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  user-select: none;
}

/* Oeil unique, centre sur l'ecran turquoise (~34–70%x, 14–56%y sur les deux corps).
   left/top designent le centre de l'oeil, d'ou le translate(-50%, -50%). */
.profit-eyes {
  position: absolute;
  left: 51.5%;
  top: 33%;
  width: 20%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  box-sizing: border-box;
}

.profit-eye {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.08s linear;
  will-change: transform;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.profit--sm .profit-sprite {
  width: 64px;
}

/* A petite taille l'oeil doit rester lisible, donc un poil plus large. */
.profit--sm .profit-eyes {
  width: 24%;
}

.profit--lg .profit-sprite {
  width: 160px;
}

.profit--lg .profit-eyes {
  width: 21%;
}

.guide-hint {
  width: 180px;
}

.profit-bubble {
  margin-top: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: rgba(18, 24, 51, 0.95);
  color: var(--wiki-gold);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  line-height: 1.2;
}

.guide-dev-reset {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 5;
  height: 1.85rem;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1px dashed rgba(240, 113, 120, 0.65);
  background: rgba(40, 12, 18, 0.85);
  color: #f07178;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.guide-dev-reset:hover {
  background: rgba(80, 20, 28, 0.95);
  border-style: solid;
}

.guide-dev-reset[hidden] {
  display: none !important;
}

/* Detail panel */
.guide-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 8, 18, 0.72);
  backdrop-filter: blur(4px);
}

.guide-panel[hidden] {
  display: none !important;
}

.guide-panel-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: 1.4rem 1.5rem 1.5rem;
  border-radius: 18px;
  border: 1.5px solid rgba(201, 168, 76, 0.55);
  background: linear-gradient(165deg, #1a2448 0%, #121833 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.guide-panel-card h2 {
  margin: 0 2.5rem 0.85rem 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wiki-gold);
}

.guide-panel-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  background: rgba(0, 0, 0, 0.25);
  color: var(--wiki-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.guide-panel-close:hover {
  color: var(--wiki-ink);
  border-color: var(--wiki-gold);
}

.guide-panel-body {
  display: grid;
  gap: 0.75rem;
}

.guide-panel-body p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--wiki-muted);
  font-weight: 500;
}

.guide-panel-body strong {
  color: var(--wiki-green);
}

.guide-panel-shots {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.guide-shot {
  margin: 0;
}

.guide-shot-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1.5px dashed rgba(201, 168, 76, 0.4);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
    rgba(0, 0, 0, 0.35);
  background-size: 18px 18px;
}

.guide-shot figcaption {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--wiki-sky);
  font-style: italic;
}

@media (max-width: 720px) {
  .guide-board {
    min-height: 62vh;
    border-radius: 12px;
  }

  .guide-tile {
    width: 180px;
    min-height: 130px;
    padding: 0.7rem;
  }

  .guide-tile-icon {
    width: 48px;
    height: 48px;
  }

  .guide-tile-title {
    font-size: 0.9rem;
  }

  .guide-panel-card {
    padding: 1.1rem;
  }
}
