/* Main menu overlay — port fidèle du composant React VoxeliaSplash (biomes-game),
   en HTML/CSS vanilla par-dessus le canvas Babylon.js. */

:root {
  --ink: #33261a;
  --ink-soft: #6b5844;
  --panel: #f6f1e6;
  --panel-solid: #fbf8f1;
  --green: #66b23a;
  --green-dark: #4b8f28;
  --radius: 14px;
  --shadow: 0 6px 0 rgba(38, 26, 15, 0.28), 0 12px 28px rgba(20, 12, 4, 0.32);
}

#voxelia-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #7fc6f0;
  background-image: url(./textures/menu_bg.png);
  background-size: cover;
  background-position: center;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

#voxelia-menu.hidden {
  display: none;
}

/* Reste affiché (fond + vignette) pendant la connexion, pour ne jamais
   laisser voir la scène Babylon nue en dessous ; seuls les éléments
   interactifs du menu principal disparaissent. */
#voxelia-menu.vm-connecting .vm-topbar,
#voxelia-menu.vm-connecting .vm-column,
#voxelia-menu.vm-connecting .vm-socials,
#voxelia-menu.vm-connecting .vm-credits,
#voxelia-menu.vm-connecting .vm-news,
#voxelia-menu.vm-connecting .vm-version,
#voxelia-menu.vm-connecting .vm-skin-wrap {
  display: none;
}

#voxelia-menu * {
  box-sizing: border-box;
}

#voxelia-menu button,
#voxelia-menu a {
  font-family: inherit;
}

.vm-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      120% 90% at 30% 45%,
      rgba(0, 0, 0, 0) 40%,
      rgba(10, 6, 2, 0.32) 100%
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0) 30%);
}

/* ---------------------------------------------------------------- top bar */

.vm-topbar {
  position: absolute;
  top: clamp(0.75rem, 2vh, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.75rem);
  z-index: 3;
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.vm-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 4.4rem;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.vm-chip:hover {
  transform: translateY(-2px);
}

.vm-chip:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(38, 26, 15, 0.28);
}

.vm-chip-icon svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.vm-chip-discord {
  color: #5865f2;
}

.vm-lang {
  position: relative;
}

.vm-lang-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.vm-lang-caret {
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.vm-lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border-radius: 10px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  display: none;
}

.vm-lang-menu.open {
  display: block;
}

.vm-lang-menu button {
  display: block;
  width: 100%;
  padding: 0.4rem 1.2rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.vm-lang-menu button:hover {
  background: rgba(102, 178, 58, 0.18);
}

/* ------------------------------------------------------------------ brand */

.vm-column {
  position: absolute;
  top: 50%;
  left: clamp(1rem, 3vw, 3rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: min(34vw, 30rem);
  min-width: 18rem;
  transform: translateY(-50%);
}

.vm-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.vm-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}

.vm-logo text {
  fill: #fdfbf5;
  stroke: #2a1d12;
  stroke-width: 12;
  paint-order: stroke fill;
  stroke-linejoin: round;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-size: 110px;
  font-weight: 900;
}

.vm-tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.5rem 1.4rem;
  border: 3px solid #6b4a2a;
  border-radius: 10px;
  background: linear-gradient(#a9743f, #8a5a2c);
  box-shadow: inset 0 2px 0 rgba(255, 232, 196, 0.35), var(--shadow);
  color: #fff4dd;
  font-size: clamp(0.72rem, 1.35vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(60, 35, 12, 0.75);
}

.vm-tagline i {
  font-style: normal;
  color: #ffd88a;
}

/* ------------------------------------------------------------- menu items */

.vm-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.vm-entry {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.vm-entry:hover:not(:disabled) {
  transform: translateX(6px);
  filter: brightness(1.03);
}

.vm-entry:active:not(:disabled) {
  transform: translateY(3px) translateX(6px);
  box-shadow: 0 3px 0 rgba(38, 26, 15, 0.28);
}

.vm-entry:disabled {
  cursor: progress;
  opacity: 0.75;
}

.vm-entry-primary {
  background: linear-gradient(var(--green), var(--green-dark));
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.32), var(--shadow);
}

.vm-entry-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.vm-entry-primary .vm-entry-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.vm-entry-icon svg {
  width: 1.7rem;
  height: 1.7rem;
}

.vm-entry-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.vm-entry-title {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.vm-entry-primary .vm-entry-title {
  text-shadow: 0 2px 0 rgba(35, 70, 15, 0.5);
}

.vm-entry-sub {
  font-size: clamp(0.72rem, 1.1vw, 0.95rem);
  font-weight: 600;
  color: var(--ink-soft);
}

.vm-entry-primary .vm-entry-sub {
  color: rgba(255, 255, 255, 0.9);
}

/* ---------------------------------------------------------------- socials */

.vm-socials {
  position: absolute;
  left: clamp(1rem, 3vw, 3rem);
  bottom: clamp(1rem, 3vh, 2.25rem);
  z-index: 2;
  display: flex;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(24, 16, 8, 0.55);
  backdrop-filter: blur(3px);
}

.vm-social {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  color: #fdfbf5;
  transition: transform 0.12s ease, color 0.12s ease;
}

.vm-social:hover {
  transform: translateY(-2px);
  color: #8fe05a;
}

.vm-social svg {
  width: 1.35rem;
  height: 1.35rem;
}

/* ---------------------------------------------------------------- credits */

.vm-credits {
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 3vh, 2.25rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 1.4rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(24, 16, 8, 0.62);
  backdrop-filter: blur(3px);
  color: #fdfbf5;
  font-size: clamp(0.72rem, 1.05vw, 0.92rem);
  font-weight: 700;
  white-space: nowrap;
}

.vm-credits-heart {
  color: #ff5b5b;
}

.vm-version {
  position: absolute;
  right: clamp(0.9rem, 2vw, 1.75rem);
  bottom: clamp(0.6rem, 1.5vh, 1rem);
  z-index: 2;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------- news */

.vm-news {
  position: absolute;
  right: clamp(0.9rem, 2vw, 1.75rem);
  bottom: clamp(2.4rem, 5vh, 3.25rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(24rem, 30vw);
  min-width: 17rem;
  padding: 0.6rem;
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.vm-news-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.3rem 0.5rem;
}

.vm-news-star {
  color: #f0b429;
}

.vm-news-heading {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vm-news-more {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.vm-news-body {
  display: flex;
  gap: 0.7rem;
  align-items: stretch;
}

.vm-news-thumb {
  flex: 0 0 auto;
  width: 6.5rem;
  min-height: 5rem;
  border-radius: 10px;
  background-color: #d8c3a5;
  background-image: linear-gradient(140deg, #f2b8d0, #a8d98a 65%, #7fc6f0);
  background-size: cover;
  background-position: center;
}

.vm-news-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.vm-news-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
}

.vm-news-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.vm-news-cta {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.4rem 0.95rem;
  border-radius: 8px;
  background: linear-gradient(var(--green), var(--green-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

/* ---------------------------------------------------------- server modal */

.vm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(12, 8, 3, 0.66);
  backdrop-filter: blur(5px);
  animation: vm-modal-fade 0.16s ease-out;
}

.vm-modal-backdrop.hidden {
  display: none;
}

@keyframes vm-modal-fade {
  from {
    opacity: 0;
  }
}

@keyframes vm-modal-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.vm-modal {
  position: relative;
  width: min(30rem, 100%);
  padding: 1.9rem 2rem 2.1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel-solid), var(--panel));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), var(--shadow);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  animation: vm-modal-rise 0.18s ease-out;
}

.vm-modal-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}

.vm-modal-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: rgba(107, 88, 68, 0.14);
  font-size: 1.25rem;
}

.vm-modal-title {
  flex: 1;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.vm-modal-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(107, 88, 68, 0.12);
  color: var(--ink-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.vm-modal-close:hover {
  background: rgba(196, 62, 62, 0.16);
  color: #a32d2d;
  transform: rotate(90deg);
}

/* ---------------------------------------------- skin catalog (full screen) */

/* Étape à part entière du parcours, pas une fenêtre par-dessus le menu :
   #voxelia-menu garde son fond/vignette habituels, on empile juste un
   contenu différent par-dessus (voir openSkinCatalog, htmlMenu.ts). */
@keyframes vm-skin-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.vm-skin-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(68rem, 94vw);
  max-height: 90vh;
  margin: 5vh auto 0;
  animation: vm-skin-rise 0.22s ease-out;
}

.vm-skin-header {
  text-align: center;
  margin-bottom: 1.4rem;
}

.vm-skin-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
}

.vm-skin-intro {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.4;
}

/* Panneau qui encadre la grille, façon carte de menu (Options, Multijoueur)
   plutôt qu'une grille flottant directement sur le fond du menu. */
.vm-skin-panel {
  width: 100%;
  padding: 1.6rem;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-solid), var(--panel));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), var(--shadow);
}

.vm-skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.1rem;
  width: 100%;
  max-height: 56vh;
  overflow-y: auto;
  padding: 0.3rem;
}

.vm-skin-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 2rem 0;
}

.vm-skin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 0.8rem 0.9rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 3px 0 rgba(38, 26, 15, 0.16), 0 6px 14px rgba(20, 12, 4, 0.16);
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.vm-skin-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 0 rgba(38, 26, 15, 0.2), 0 14px 24px rgba(20, 12, 4, 0.24), 0 0 0 4px rgba(102, 178, 58, 0.16);
}

.vm-skin-card:active {
  transform: translateY(-1px) scale(1.01);
}

.vm-skin-card.vm-skin-selecting {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.vm-skin-card.vm-skin-current {
  border-color: var(--green);
}

.vm-skin-current-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 0 rgba(38, 26, 15, 0.2);
}

.vm-skin-thumb-frame {
  display: grid;
  place-items: center;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 50% 20%, rgba(102, 178, 58, 0.16), rgba(107, 88, 68, 0.06) 70%);
}

.vm-skin-thumb {
  width: 6rem;
  height: 6rem;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 2px rgba(20, 12, 4, 0.25));
}

.vm-skin-name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.vm-skin-back {
  margin-top: 1.6rem;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(107, 88, 68, 0.14);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s ease;
}

.vm-skin-back:hover {
  background: rgba(107, 88, 68, 0.24);
}

.vm-server-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 3px 0 rgba(38, 26, 15, 0.16), 0 6px 16px rgba(20, 12, 4, 0.14);
}

.vm-server-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 12px;
  background: linear-gradient(var(--green), var(--green-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
  font-size: 1.5rem;
}

.vm-server-text {
  flex: 1;
  min-width: 0;
}

.vm-server-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.vm-server-status {
  margin: 0.3rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(102, 178, 58, 0.16);
  color: #3d9140;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vm-server-status i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3d9140;
  font-style: normal;
  box-shadow: 0 0 0 3px rgba(61, 145, 64, 0.18);
}

.vm-server-join {
  flex: 0 0 auto;
  padding: 0.65rem 1.3rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(var(--green), var(--green-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 3px 0 rgba(38, 90, 20, 0.45);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  text-shadow: 0 1px 0 rgba(35, 70, 15, 0.5);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.vm-server-join:hover {
  transform: translateY(-2px);
}

.vm-server-join:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 1px 0 rgba(38, 90, 20, 0.45);
}

.vm-v2-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    135deg,
    rgba(107, 88, 68, 0.08),
    rgba(107, 88, 68, 0.08) 10px,
    rgba(107, 88, 68, 0.04) 10px,
    rgba(107, 88, 68, 0.04) 20px
  );
  box-shadow: inset 0 0 0 2px rgba(107, 88, 68, 0.18);
}

.vm-v2-lock {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: rgba(107, 88, 68, 0.16);
  font-size: 1rem;
}

.vm-v2-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
}

.vm-v2-text b {
  color: var(--ink);
}

/* ------------------------------------------------------------- loading toast */

.vm-loading-toast {
  position: absolute;
  right: clamp(0.9rem, 2vw, 1.75rem);
  bottom: clamp(0.6rem, 1.5vh, 1rem);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(24, 16, 8, 0.62);
  backdrop-filter: blur(3px);
  color: #fdfbf5;
  font-size: 0.78rem;
  font-weight: 700;
  transition: opacity 0.25s ease;
}

.vm-loading-toast.vm-fade-out {
  opacity: 0;
  pointer-events: none;
}

.vm-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #8fe05a;
  animation: vm-spin 0.7s linear infinite;
}

@keyframes vm-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Squelette affiché avant que le vrai menu (auth, textes traduits) ne soit
   prêt : mêmes cartes, sans contenu, pour qu'aucun flash de canvas Babylon
   ne soit visible entre le premier paint et l'hydratation JS. */
.vm-skeleton .vm-entry-title,
.vm-skeleton .vm-entry-sub {
  border-radius: 4px;
  background: rgba(107, 88, 68, 0.18);
  color: transparent;
}

/* --------------------------------------------------------- options modal */

.vm-options-modal {
  width: min(30rem, 100%);
  max-height: 82vh;
  overflow-y: auto;
}

.vm-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 2px solid rgba(107, 88, 68, 0.14);
}

.vm-opt-row:first-of-type {
  border-top: 0;
}

.vm-opt-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.vm-opt-control {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
}

.vm-opt-value {
  min-width: 2.4rem;
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink-soft);
}

.vm-slider {
  width: 8.5rem;
  accent-color: var(--green);
}

.vm-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 3.1rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d6ccbd;
  cursor: pointer;
  transition: background 0.15s ease;
}

.vm-toggle.vm-on {
  background: var(--green);
}

.vm-toggle-knob {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.vm-toggle.vm-on .vm-toggle-knob {
  transform: translateX(1.4rem);
}

.vm-opt-advanced {
  display: block;
  width: 100%;
  margin-top: 1.1rem;
  padding: 0.7rem 1rem;
  border: 2px dashed rgba(107, 88, 68, 0.3);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.vm-opt-advanced:hover {
  background: rgba(107, 88, 68, 0.08);
  color: var(--ink);
}

.vm-opt-section {
  margin: 1.1rem 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.vm-keybind-btn {
  min-width: 8rem;
  padding: 0.4rem 0.8rem;
  border: 2px solid rgba(107, 88, 68, 0.25);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.vm-keybind-btn:hover {
  border-color: var(--green);
}

.vm-keybind-btn.vm-capturing {
  border-color: var(--green);
  background: rgba(102, 178, 58, 0.15);
  color: var(--green-dark);
}

@media (max-width: 900px) {
  .vm-column {
    top: auto;
    bottom: 8.5rem;
    width: calc(100% - 2rem);
    transform: none;
  }

  .vm-news {
    display: none;
  }

  .vm-credits {
    font-size: 0.68rem;
  }
}
