/*
 * Pont d'identité DCVisuals pour Mini-Games.
 * Ne duplique jamais /assets/css/main.css ou components.css (chargés à part, chemins absolus).
 * Ne fait que : (1) réaligner les custom properties déjà utilisées par styles.css du jeu
 * (--pv-*) sur les tokens réels du site (--amber, --t1, --ffd, etc. définis par main.css),
 * (2) fournir les classes du shell compact jeu / hub / admin qui n'existent pas ailleurs.
 * Charger APRÈS main.css + components.css + styles.css du jeu.
 */

:root {
  --pv-bg: var(--void, #0b1016);
  --pv-panel: var(--panel, #111925);
  --pv-panel-2: var(--raised, #16202d);
  --pv-line: var(--b1, rgba(255, 255, 255, 0.08));
  --pv-ink: var(--t1, #f2efe8);
  --pv-ink-dim: var(--t2, #bcc4cf);
  --pv-amber: var(--amber, #c8912a);
  --pv-mono: var(--ffm, "DM Mono", monospace);
  --pv-sans: var(--ffb, "DM Sans", sans-serif);
}

.mini-shell-header .logo,
.mg-breadcrumb,
.mini-shell-primary nav a.active {
  font-family: var(--ffd, "Syne", sans-serif);
}

/* ---------- Compact game shell (hub / Pixelverse / Render Rush) ---------- */
/* Two explicit, non-overlapping rows: .mini-shell-primary (identity + nav + lang switcher)
 * and .mini-shell-secondary (back-to-tools + contextual actions incl. the profile button).
 * `position: sticky` keeps normal document flow (unlike `fixed`), so the header's real
 * (possibly wrapped, multi-line) height is always reserved — nothing needs a manual
 * "content starts after header height" compensation, and nothing can end up clipped or
 * hidden behind it. No `position: absolute`, no `overflow: hidden`, no negative `top`. */

.mini-shell-header {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--panel, #111925);
  border-bottom: 1px solid var(--b1, rgba(255, 255, 255, 0.08));
  position: sticky;
  top: 0;
  z-index: 200;
  font-family: var(--ffb, "DM Sans", sans-serif);
}
.mini-shell-primary,
.mini-shell-secondary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 20px;
}
.mini-shell-secondary {
  justify-content: space-between;
  border-top: 1px solid var(--b0, rgba(255, 255, 255, 0.05));
  padding-top: 6px;
  padding-bottom: 8px;
}
.mini-shell-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--t1, #f2efe8);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.mini-shell-header .logo-m {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--amber, #c8912a);
  color: #000;
  display: grid;
  place-items: center;
  font-family: var(--ffm, "DM Mono", monospace);
  font-size: 12px;
  font-weight: 700;
}
.mini-shell-primary nav {
  /* Overrides /assets/css/main.css's global `nav { position: fixed; ... }` (meant for the
   * full-site's own sticky nav) — without this, the bare <nav> tag here collides with that
   * site-wide rule, gets pulled out of flex flow into a full-width fixed overlay, and hides
   * whatever sits beside it (the lang switcher, then the profile button). This was the root
   * cause of the "buttons hidden behind the first row" bug. */
  position: static;
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  font-family: var(--ffm, "DM Mono", monospace);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.mini-shell-primary nav a {
  color: var(--t2, #bcc4cf);
  padding: 6px 9px;
  border-radius: 4px;
  text-decoration: none;
}
.mini-shell-primary nav a:hover,
.mini-shell-primary nav a:focus-visible {
  color: var(--t1, #f2efe8);
  background: var(--raised, #16202d);
}
.mini-shell-primary nav a.active {
  color: #000;
  background: var(--amber, #c8912a);
  font-weight: 600;
}
.mini-shell-langs {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  font-family: var(--ffm, "DM Mono", monospace);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}
.mini-shell-langs a {
  color: var(--t3, #8b96a5);
  text-decoration: none;
  padding: 5px 7px;
  border-radius: 4px;
}
.mini-shell-langs a:hover,
.mini-shell-langs a:focus-visible {
  color: var(--t1, #f2efe8);
  background: var(--raised, #16202d);
}
.mini-shell-langs a[aria-current="page"] {
  color: #000;
  background: var(--amber, #c8912a);
  font-weight: 600;
}
.mini-shell-back {
  color: var(--t2, #bcc4cf);
  text-decoration: none;
  font-family: var(--ffm, "DM Mono", monospace);
  font-size: 0.68rem;
}
.mini-shell-back:hover,
.mini-shell-back:focus-visible {
  color: var(--amber, #c8912a);
}
.mini-shell-secondary .actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.mini-shell-header a:focus-visible,
.mini-shell-header button:focus-visible {
  outline: 2px solid var(--amber, #c8912a);
  outline-offset: 1px;
}

.gshell-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--b0, rgba(255, 255, 255, 0.03));
  font-family: var(--ffm, "DM Mono", monospace);
  font-size: 0.62rem;
  color: var(--t3, #8b96a5);
}

/* ---------- Hub-only additions (full site header/footer already come from main.css) ---------- */

.mg-breadcrumb {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 42px 0;
  font-family: var(--ffm, "DM Mono", monospace);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t3, #8b96a5);
}
.mg-breadcrumb a {
  color: var(--t3, #8b96a5);
  text-decoration: none;
}
.mg-breadcrumb a:hover {
  color: var(--amber, #c8912a);
}

/* ---------- Admin (minimal, noindex) ---------- */

.admin-shell-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: var(--panel, #111925);
  border-bottom: 2px solid var(--red, #b04646);
}
.admin-shell-header .admin-tag {
  font-family: var(--ffm, "DM Mono", monospace);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-b, #d97b7b);
  border: 1px solid var(--red, #b04646);
  border-radius: 4px;
  padding: 3px 8px;
}
