/* Couche Telegram Mini App — n'altère pas le design, ajoute plein écran + safe areas. */
:root {
  --tg-safe-top: 0px;
  --tg-safe-bottom: 0px;
  --tg-vh: 100vh;
}
html.tg-app, html.tg-app body { min-height: var(--tg-vh); }
html.tg-app body { padding-top: var(--tg-safe-top); padding-bottom: var(--tg-safe-bottom); }
html.tg-app .topbar { position: sticky; top: 0; }
html.tg-app .toast { bottom: calc(18px + var(--tg-safe-bottom)); }
/* Barre d'onglets collée au-dessus de la zone sûre iOS/Telegram */
html.tg-app .tabbar { padding-bottom: var(--tg-safe-bottom); height: auto; }
html.tg-app.kb-open .tabbar { transform: translateY(120%); }
/* Scrollbars discrètes comme dans Telegram */
html.tg-app ::-webkit-scrollbar { width: 0; height: 0; }
/* Bandeau d'état Telegram (si présent) */
.tg-top-note {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 10px 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted, #93a0b4);
  font-size: 13px;
}
.tg-top-note.show { display: flex; }
.tg-top-note button {
  margin-left: auto;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
