/* ============================================================
   UniHeberg — Menu Jeux (mega-menu desktop + grille mobile)
   Chargé après nav-uniheberg.css
   ============================================================ */

.gm-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: 'Syne', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
.gm-badge-pop  { background: rgba(155,109,255,0.18); color: #c4a6ff; border: 1px solid rgba(155,109,255,0.35); }
.gm-badge-new  { background: rgba(0,232,122,0.14);  color: #5cf0a5; border: 1px solid rgba(0,232,122,0.32); }
.gm-badge-soon { background: rgba(245,158,11,0.14); color: #fbbf24; border: 1px solid rgba(245,158,11,0.32); }

/* ─────────── Desktop mega-menu ─────────── */
/* le panneau s'ancre sur la gauche du bouton et ne sort jamais du viewport */
.nav-dropdown-menu.gm-panel { left: 0; right: auto; transform: none; }
@media (max-width: 1240px) {
  .nav-dropdown-menu.gm-panel { left: 50%; transform: translateX(-50%); }
}
.nav-dropdown-menu-inner.gm-mega {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  width: min(1020px, calc(100vw - 44px));
  min-width: 0;
  max-width: 94vw;
  padding: 20px;
}
.nav-dropdown-menu-inner.gm-mega::before { content: none !important; display: none !important; }

.gm-col-featured {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 22px;
  border-right: 1px solid rgba(155,109,255,0.16);
}
.gm-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9b6dff;
  margin: 2px 2px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gm-count {
  font-size: 9px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(155,109,255,0.16);
  color: #c4a6ff;
  letter-spacing: 0.04em;
}

/* Carte "à la une" avec visuel */
.gm-feature {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(.2,.8,.3,1), border-color 0.22s, box-shadow 0.22s;
}
.gm-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(155,109,255,0.45);
  box-shadow: 0 14px 34px rgba(0,0,0,0.45), 0 0 0 1px rgba(155,109,255,0.16);
}
.gm-feature-media { position: absolute; inset: 0; }
.gm-feature-media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.5; transform: scale(1.04);
  transition: opacity 0.3s, transform 0.5s cubic-bezier(.2,.8,.3,1);
}
.gm-feature:hover .gm-feature-media img { opacity: 0.72; transform: scale(1.1); }
.gm-feature-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(11,14,28,0.94) 12%, rgba(11,14,28,0.68) 62%, rgba(11,14,28,0.35));
}
.gm-feature-body {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
}
.gm-feature-icon,
.gm-card-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.gm-feature-icon img, .gm-card-icon img { width: 26px; height: 26px; object-fit: contain; }
.gm-feature-txt, .gm-card-txt { display: block; min-width: 0; flex: 1 1 auto; }
.gm-feature-name, .gm-card-name {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  overflow-wrap: anywhere;
  font-family: 'Syne', sans-serif;
  font-size: 13.5px; font-weight: 700; color: #fff;
  line-height: 1.25;
}
.gm-card-name {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
}
.gm-card-name .gm-badge { margin-left: 0; }
.gm-feature-desc, .gm-card-desc {
  display: block;
  font-size: 11.5px; line-height: 1.45;
  color: rgba(255,255,255,0.58);
  margin-top: 3px;
}
.gm-feature-desc { display: block; overflow-wrap: anywhere; }

/* Grille "tous nos jeux" — scalable à des dizaines de jeux */
.gm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(155,109,255,0.4) transparent;
}
.gm-grid::-webkit-scrollbar { width: 6px; }
.gm-grid::-webkit-scrollbar-thumb { background: rgba(155,109,255,0.35); border-radius: 99px; }
.gm-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}
.gm-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(155,109,255,0.28);
  transform: translateY(-1px);
}
.gm-card:hover .gm-card-name { color: #c4a6ff; }
.gm-card-desc { display: block; overflow-wrap: anywhere; }
.gm-card[data-status="soon"] .gm-card-icon img,
.gm-tile[data-status="soon"] .gm-tile-icon img { filter: saturate(0.65); }

.gm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.gm-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #6f42c1, #9b6dff);
  color: #fff; text-decoration: none;
  font-family: 'Syne', sans-serif; font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: filter 0.16s, transform 0.16s;
}
.gm-cta:hover { filter: brightness(1.12); transform: translateY(-1px); }
.gm-cta-ghost {
  color: rgba(255,255,255,0.62); text-decoration: none;
  font-size: 12px; font-weight: 600;
  transition: color 0.16s;
}
.gm-cta-ghost:hover { color: #c4a6ff; }

@media (max-width: 1100px) {
  .nav-dropdown-menu-inner.gm-mega { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gm-col-featured { border-right: 0; padding-right: 0; }
  .gm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 42vh; }
}

/* ─────────── Mobile ─────────── */
.gm-mobile { padding: 4px 12px 10px; }
.gm-mobile-search {
  position: relative;
  display: flex; align-items: center;
  margin-bottom: 10px;
}
.gm-mobile-search i {
  position: absolute; left: 12px;
  font-size: 12px; color: rgba(255,255,255,0.35);
  pointer-events: none;
}
.gm-mobile-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 32px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.gm-mobile-search input::placeholder { color: rgba(255,255,255,0.35); }
.gm-mobile-search input:focus {
  outline: none;
  border-color: rgba(155,109,255,0.55);
  box-shadow: 0 0 0 3px rgba(155,109,255,0.14);
}

.gm-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 2px;
}
@media (min-width: 520px) { .gm-mobile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gm-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: 92px;
  padding: 10px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.gm-tile:active { transform: scale(0.98); }
.gm-tile[hidden] { display: none; }
.gm-tile-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.42;
}
.gm-tile-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,14,28,0.35), rgba(11,14,28,0.92));
}
.gm-tile-icon {
  position: relative;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.gm-tile-icon img { width: 22px; height: 22px; object-fit: contain; }
.gm-tile-name {
  position: relative;
  font-family: 'Syne', sans-serif;
  font-size: 12.5px; font-weight: 700; color: #fff;
  line-height: 1.2;
}
.gm-tile .gm-badge {
  position: relative;
  margin-left: 0;
  align-self: flex-start;
  font-size: 8px;
  padding: 2px 6px;
}
.gm-empty {
  margin: 12px 2px 2px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.gm-card .gm-badge { white-space: normal; max-width: 100%; }
