/**
 * UNIVGA PWA — UGame embarqué (onglet « UGame »)
 * Remplace le style Netflix sombre (dégradé noir mobile) par des cartes
 * claires alignées sur le design de l'accueil premium.
 */

html.univga-pwa-standalone #tab-ugame {
  --uvg-blue: #0B4F8C;
  --uvg-blue-2: #1565C0;
  --uvg-ink: #16263a;
  --uvg-muted: #6b7a90;
  --uvg-bg: #f4f7fb;
  background: var(--uvg-bg) !important;
  padding: 0 !important;
}

/* Conteneur : pas de hack 100vw dans l'onglet */
html.univga-pwa-standalone #tab-ugame #ugame-app-container,
html.univga-pwa-standalone #tab-ugame .ugame-page-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  min-height: auto !important;
  background: var(--uvg-bg) !important;
  overflow-x: hidden;
}

/* Layout : sidebar masquée → pleine largeur mobile-first */
html.univga-pwa-standalone #tab-ugame .ugame-dashboard-layout {
  display: block !important;
  min-height: auto !important;
  background: var(--uvg-bg) !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-sidebar-nav {
  display: none !important;
}

html.univga-pwa-standalone #tab-ugame .ugame-main-scroll {
  width: 100% !important;
  padding-bottom: 24px;
}

/* Barre recherche épurée */
html.univga-pwa-standalone #tab-ugame .ugame-header-bar {
  padding: 14px 16px 8px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-search-wrapper {
  background: #fff !important;
  border: 1px solid rgba(11, 79, 140, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(11, 79, 140, 0.06) !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-user-profile {
  display: none !important;
}

/* Hero mission vedette */
html.univga-pwa-standalone #tab-ugame .ugame-hero-banner {
  margin: 8px 16px 20px !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  min-height: 200px !important;
  height: auto !important;
  box-shadow: 0 14px 32px rgba(11, 79, 140, 0.22) !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-hero-overlay {
  background: linear-gradient(180deg, rgba(11, 79, 140, 0.15) 0%, rgba(11, 79, 140, 0.82) 100%) !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-hero-content {
  padding: 28px 22px !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-title-hero {
  font-size: 1.35rem !important;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
html.univga-pwa-standalone #tab-ugame .ugame-subtitle-hero {
  font-size: 0.88rem !important;
  color: rgba(255, 255, 255, 0.92) !important;
  line-height: 1.5 !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-btn-play {
  background: #fff !important;
  color: var(--uvg-blue) !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  padding: 12px 22px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15) !important;
}

/* Titres de section */
html.univga-pwa-standalone #tab-ugame .ugame-section-title {
  margin: 18px 18px 12px !important;
  padding: 0 !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  color: var(--uvg-ink) !important;
  letter-spacing: -0.01em;
}

/* Grille de cartes */
html.univga-pwa-standalone #tab-ugame .ugame-scenario-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  padding: 0 16px 24px !important;
}

/* ── Cartes scénario (design app) ── */
html.univga-pwa-standalone #tab-ugame .ugame-scenario-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid rgba(11, 79, 140, 0.08) !important;
  box-shadow: 0 8px 22px rgba(11, 79, 140, 0.08) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-scenario-card:active {
  transform: scale(0.985);
}

html.univga-pwa-standalone #tab-ugame .ugame-card-image {
  width: 100% !important;
  height: 128px !important;
  object-fit: cover !important;
  filter: none !important;
  transform: none !important;
  flex-shrink: 0;
}

/* Corps blanc — annule le dégradé noir mobile hérité */
html.univga-pwa-standalone #tab-ugame .ugame-card-info {
  position: relative !important;
  flex: 1 1 auto !important;
  padding: 14px 16px 16px !important;
  background: #fff !important;
  background-image: none !important;
  color: var(--uvg-ink) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  transform: none !important;
  opacity: 1 !important;
}

html.univga-pwa-standalone #tab-ugame .ugame-card-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--uvg-ink) !important;
  text-shadow: none !important;
  margin: 0 !important;
  -webkit-line-clamp: 3;
}

html.univga-pwa-standalone #tab-ugame .ugame-card-meta {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
  justify-content: flex-end !important;
}

html.univga-pwa-standalone #tab-ugame .ugame-card-meta span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  background: rgba(11, 79, 140, 0.08) !important;
  color: var(--uvg-blue) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
}
html.univga-pwa-standalone #tab-ugame .ugame-card-meta span i {
  font-size: 0.95em;
}

@media (min-width: 520px) {
  html.univga-pwa-standalone #tab-ugame .ugame-scenario-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
