/* UNDERTHEGUN : barre d'onglets mobile + feuille « Jouer », partagée par le lobby et toutes les pages (injectée par tabs.js). */
.utg-tabs, .play-sheet { --gold: #F4B740; --gold-deep: #B9861F; --gold-fg: #241500; --ink: #F2EEE4; --muted: #93A0B8; --line: #22304A; --bg: #0B1322; --red: #E0504B;
  --body: 'Manrope', system-ui, sans-serif; font-family: var(--body); }
.utg-tabs a, .play-sheet a { text-decoration: none; }
.utg-tabs h2, .play-sheet h2 { text-transform: uppercase; }
/* ===== Barre d'onglets mobile v2 : 5 zones égales, « Jouer » or intégré, feuille d'actions ===== */
.utg-tabs, .play-sheet { display: none; }
@media (max-width: 860px) {
  html.has-tabs body { padding-bottom: calc(76px + max(0px, env(safe-area-inset-bottom, 0px) - 18px)); }
  html.has-tabs .utg-back { display: none !important; }
  html.has-tabs .acc-ico { margin-left: auto !important; }
  html.has-tabs .resume { bottom: calc(80px + env(safe-area-inset-bottom, 0px) - var(--vvb, 0px)) !important; }
  .utg-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; position: fixed; left: 0; right: 0; bottom: calc(0px - var(--vvb, 0px)); z-index: 30;
    background: #0A1220; border-top: 1px solid rgba(147,160,184,.14);
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) max(6px, calc(env(safe-area-inset-bottom, 0px) - 18px)) max(6px, env(safe-area-inset-left, 0px)); }
  .utg-tabs > a, .utg-tabs > button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; min-width: 0;
    padding: 4px 2px; border: 0; background: none; color: #7C8AA5; font: 700 11px/1 var(--body); letter-spacing: .01em; cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
  .utg-tabs svg { width: 24px; height: 24px; flex: none; }
  .utg-tabs span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .utg-tabs > a[aria-current] { color: var(--gold); }
  .utg-tabs > a[aria-current]::before { content: ""; position: absolute; top: -7px; left: 50%; width: 22px; height: 2px; margin-left: -11px; border-radius: 2px; background: var(--gold); }
  .utg-tabs > a:active { background: rgba(255,255,255,.04); }
  .tb-dot { position: absolute; top: 5px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #0A1220; }
  /* Jouer : pastille or de 40 px, dans la barre (pas flottante) */
  .tb-play { color: var(--ink) !important; }
  .tb-play b { width: 40px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: var(--gold-fg); box-shadow: 0 2px 0 var(--gold-deep); }
  .tb-play b svg { width: 20px; height: 20px; }
  .tb-play[aria-expanded="true"] b { background: #FFD27A; }
  .tb-play:focus-visible b, .utg-tabs > a:focus-visible, .tb-chat:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

  /* Feuille d'actions */
  .play-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 40; }
  .ps-back { position: absolute; inset: 0; background: rgba(3,7,14,.6); opacity: 0; transition: opacity .2s; }
  .ps-panel { position: absolute; left: 0; right: 0; bottom: calc(0px - var(--vvb, 0px)); background: #0F1A2E; border-top: 1px solid rgba(147,160,184,.18); border-radius: 20px 20px 0 0;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; transform: translateY(100%); transition: transform .22s ease-out; }
  .play-sheet.in .ps-back { opacity: 1; } .play-sheet.in .ps-panel { transform: none; }
  .ps-grip { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: rgba(147,160,184,.35); margin-bottom: 4px; }
  .ps-panel h2 { margin: 0 0 4px; font: 800 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .ps-opt { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 14px; border-radius: 14px; background: #152238; border: 1px solid rgba(147,160,184,.12); color: var(--ink); }
  .ps-opt > svg { width: 24px; height: 24px; flex: none; color: var(--gold); align-self: flex-start; margin-top: 2px; }
  .ps-opt > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .ps-opt b { font: 800 16px/1.2 var(--body); } .ps-opt small { font-size: 13px; color: var(--muted); }
  .ps-opt em { font-style: normal; font-size: 24px; color: var(--muted); }
  a.ps-opt:active { background: #1B2B47; }
  .ps-opt.is-off { opacity: .55; } .ps-opt.is-off > svg { color: var(--muted); }
  .ps-row { display: flex; gap: 8px; margin-top: 8px; }
  .ps-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 800 16px/1 var(--body); letter-spacing: .14em; }
  .ps-row input::placeholder { letter-spacing: .1em; color: #4A5872; }
  .ps-row button { height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(244,183,64,.5); background: none; color: var(--gold); font: 800 14px/1 var(--body); cursor: pointer; }
  .ps-err { color: #FF8A84 !important; }
  .ps-close { margin-top: 2px; height: 46px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: 700 15px/1 var(--body); cursor: pointer; }
  html.ps-open { overflow: hidden; }
  @media (prefers-reduced-motion: reduce) { .ps-back, .ps-panel { transition: none; } }
}
@media (max-width: 860px) {
  /* même boîte d'icône (32 px) pour les 5 onglets : libellés alignés sur une ligne */
  .utg-tabs svg { width: 24px; height: 24px; margin: 4px 0; }
  .tb-play b svg { margin: 0; }
  .utg-tabs > a[aria-current]::before { top: -6px; }
}
@media (max-width: 360px) { .utg-tabs > a, .utg-tabs > button { font-size: 10px; letter-spacing: 0; } }
@media (max-width: 340px) { .utg-tabs { padding-left: 2px; padding-right: 2px; } .utg-tabs > a, .utg-tabs > button { font-size: 9.5px; padding-inline: 0; } .tb-play b { width: 36px; } }

/* Passage d'une page à l'autre : fondu court, la barre d'onglets ne bouge pas (navigateurs récents ; ailleurs, rien ne change) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
@media (max-width: 860px) { .utg-tabs { view-transition-name: utg-tabs; } }
.utg-progress { position: fixed; z-index: 60; top: env(safe-area-inset-top, 0px); left: 0; height: 3px; width: 100%; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0); opacity: 0;
  background: linear-gradient(90deg, #B9861F, #F4B740); box-shadow: 0 0 8px rgba(244,183,64,.6); }
html.utg-nav .utg-progress { opacity: 1; animation: utg-load 2.4s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes utg-load { 0% { transform: scaleX(0); } 20% { transform: scaleX(.45); } 100% { transform: scaleX(.92); } }
.utg-tabs > a:active, .utg-tabs > button:active { transform: scale(.94); }
.utg-tabs > a, .utg-tabs > button { transition: transform .1s, color .12s; }
@media (prefers-reduced-motion: reduce) { html.utg-nav .utg-progress { animation: none; transform: scaleX(.6); } .utg-tabs > a, .utg-tabs > button { transition: none; } }
