/* Télé (Android TV, box, grand écran couché). PC / iPhone / téléphones ne sont jamais concernés.
   Aucun rétrécissement de la page (l'ancien « zoom » de 62-68 % coinçait tout dans un coin sur les
   télés 1920 px) : la page occupe tout l'écran, à taille normale. */
html.is-tv{zoom:1!important;width:100%!important;height:100%!important;overflow:hidden!important;overscroll-behavior:none!important}
html.is-tv body{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
  overflow:hidden!important;overscroll-behavior:none!important;transform:none!important}

html.is-tv #particlesCanvas,
html.is-tv #installBanner,
html.is-tv .install-banner,
html.is-tv .history-card,
html.is-tv .pay-logos-strip{display:none!important}

/* Sélection à la télécommande : contour doré bien visible. */
html.is-tv button:focus-visible,
html.is-tv input:focus-visible,
html.is-tv .asset-chip:focus,
html.is-tv .btn-trade:focus,
html.is-tv .auth-tab:focus,
html.is-tv .dur-chip:focus,
html.is-tv .odds-chip:focus,
html.is-tv .mode-btn:focus{
  outline:3px solid #F5C518!important;outline-offset:2px!important}

/* Connexion / inscription : bloc de taille normale, centré ; la page défile si l'écran est bas. */
html.is-tv body #screenAuth.screen{
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;
  height:100%!important;max-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;
  padding:3vh 4vw!important;box-sizing:border-box!important}
html.is-tv body #screenAuth .auth-wrap{
  width:min(480px,92vw)!important;max-width:480px!important;max-height:none!important;margin:auto!important;
  overflow:visible!important;flex:0 0 auto!important;transform:none!important}
html.is-tv #screenAuth .auth-crypto-in-form,
html.is-tv #screenAuth .auth-crypto-after-card,
html.is-tv #screenAuth .auth-crypto-line{display:none!important}

/* Trading (vue normale) : graphique à gauche sur toute la hauteur, boutons à droite, indices lisibles. */
html.is-tv .screen,
html.is-tv #screenTrade{height:100%!important;max-height:100%!important;overflow:hidden!important}
html.is-tv .trade-shell{
  max-width:none!important;width:100%!important;height:100%!important;
  overflow:hidden!important;padding:10px 14px!important;box-sizing:border-box!important}
html.is-tv .trade-wrap{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(240px,22vw)!important;
  grid-template-rows:auto minmax(0,1fr)!important;gap:8px!important;padding:0!important;
  height:100%!important;min-height:0!important;overflow:hidden!important}
html.is-tv .asset-bar,
html.is-tv .markets-scroll{
  grid-column:1!important;grid-row:1!important;
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding:0 0 4px!important}
html.is-tv .asset-chip{
  flex:1 0 auto!important;min-width:112px!important;max-width:none!important;min-height:46px!important;padding:5px 8px!important}
html.is-tv .asset-chip .n{font-size:12px!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.is-tv .asset-chip .payout-live{font-size:11px!important}
html.is-tv .chart-card,
html.is-tv #chart{
  grid-column:1!important;grid-row:2!important;min-height:0!important;height:100%!important;overflow:hidden!important}
html.is-tv .chart-stage{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
html.is-tv .pad{
  position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;
  grid-column:2!important;grid-row:1 / span 2!important;
  max-width:none!important;max-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;
  margin:0!important;padding:10px!important}
html.is-tv .pad .trade-row{margin-top:auto!important}

/* Plein écran télé : comme en v2139 (validé par le propriétaire) — page réduite à 62 %, les 10 indices
   sur une ligne, graphique au centre, gros boutons à droite. Seul le bouton QUITTER est agrandi. */
html.is-tv.fs-trade{zoom:.62!important}
html.is-tv .fs-trade-overlay.on{overflow:hidden!important}
html.is-tv .fs-trade-overlay.on .asset-bar{
  flex-direction:row!important;width:100%!important;max-width:none!important;height:auto!important;overflow:hidden!important}
html.is-tv body .fs-trade-close{height:46px!important;padding:0 16px 0 12px!important;gap:8px!important;border-radius:11px!important;border-width:2px!important}
html.is-tv body .fs-trade-close .fs-exit-ico{width:22px!important;height:22px!important}
html.is-tv body .fs-trade-close .fs-exit-txt{font-size:17px!important;max-width:none!important;letter-spacing:.05em!important}

/* Connexion / inscription télé : tout le formulaire tient dans l'écran, centré. */
html.is-tv body #screenAuth .auth-wrap{zoom:.64;width:560px!important;max-width:560px!important}
html.is-tv body #screenAuth.screen{justify-content:center!important}

/* Vue normale télé : les 10 indices visibles (2 rangées de 5), colonne de droite plus large et rangée. */
html.is-tv .trade-wrap{grid-template-columns:minmax(0,1fr) minmax(300px,30vw)!important}
html.is-tv .asset-bar,html.is-tv .markets-scroll{flex-wrap:wrap!important;overflow:hidden!important;gap:5px!important}
html.is-tv .asset-chip{flex:1 1 calc(20% - 5px)!important;min-width:0!important;min-height:38px!important;padding:3px 6px!important}
html.is-tv .asset-chip .n{font-size:11px!important}
html.is-tv .asset-chip .payout-live{font-size:10px!important}
html.is-tv .pad .dur-row{flex-wrap:wrap!important;gap:4px!important}
html.is-tv .pad .dur-chip{flex:1 1 calc(33% - 4px)!important;min-width:0!important;font-size:12px!important;padding:6px 2px!important}
html.is-tv .pad .stake-line{flex-wrap:wrap!important;gap:6px!important}
html.is-tv .pad .odds-row{gap:4px!important}
html.is-tv .pad .odds-chip{min-width:0!important;font-size:11px!important;padding:4px 2px!important;line-height:1.1!important}
html.is-tv .pad .btn-trade{min-height:64px!important;font-size:15px!important}
html.is-tv body #screenTrade .chart-card,html.is-tv body #screenTrade #chart{height:100%!important;max-height:100%!important;min-height:0!important}
html.is-tv body #screenTrade .chart-stage{height:auto!important;min-height:0!important;max-height:100%!important;flex:1 1 auto!important}
html.is-tv .asset-chip{min-height:32px!important;padding:2px 6px!important}
/* Vue normale télé : indices plus bas (plus de place pour le graphique) ; texte « Mise min » masqué (il se coupait en « M »). */
html.is-tv .asset-chip{min-height:26px!important;padding:1px 6px!important}
html.is-tv .asset-chip .n{font-size:10px!important;line-height:1.1!important}
html.is-tv .asset-chip .payout-live{font-size:9px!important;line-height:1.1!important}
html.is-tv .asset-chip img,html.is-tv .asset-chip svg{width:14px!important;height:14px!important}
html.is-tv .pad .stake-min-label{display:none!important}
/* Plein écran télé : la page réduite à 62 % remplit aussi toute la HAUTEUR (avant : coupée à mi-écran). */
html.is-tv.fs-trade body .fs-trade-overlay.on{height:calc(100vh / .62)!important;max-height:none!important;bottom:auto!important}
html.is-tv.fs-trade body .fs-trade-overlay.on .trade-wrap{height:auto!important;flex:1 1 auto!important;min-height:0!important}
html.is-tv body #assetBar .asset-chip{height:auto!important;max-height:30px!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:4px!important}
html.is-tv body #assetBar{align-content:flex-start!important}
html.is-tv body #assetBar .asset-chip .n{font-size:9.5px!important;letter-spacing:0!important}
/* Plein écran télé : ACHETER / VENDRE regroupés au milieu de la colonne, l'un sous l'autre (jamais écartés ni hors cadre). */
html.is-tv.fs-trade body .fs-trade-overlay.on .pad .trade-row{justify-content:center!important;gap:18px!important;flex:1 1 auto!important}
html.is-tv.fs-trade body .fs-trade-overlay.on .pad .btn-trade{flex:0 0 auto!important;min-height:200px!important;max-height:260px!important;width:100%!important}
/* Profil sur télé : le tiroir défile pour que tout soit atteignable, dont « Se déconnecter ». */
html.is-tv #drawerProfile{zoom:.66;height:calc(100vh / .66)!important;max-height:none!important;overflow:hidden!important}
html.is-tv #drawerProfile .drawer-nav{overflow:visible!important;max-height:none!important;flex:0 0 auto!important;height:auto!important}
html.is-tv #drawerProfile #btnLogout.tv-logout-top{flex:0 0 auto!important;margin:4px 12px 8px!important;width:auto!important;border:1px solid rgba(255,77,77,.6)!important;border-radius:10px!important}
/* Plein écran télé : colonne de droite plus large → ACHETER / VENDRE moins étroits. */
html.is-tv .fs-trade-overlay.on .trade-wrap{grid-template-columns:minmax(0,1fr) 230px!important}
/* Profil télé : « Se déconnecter » sous la croix (plus de chevauchement). */
html.is-tv #drawerProfile #btnLogout.tv-logout-top{margin-top:26px!important}
/* Plein écran télé : la colonne des boutons prend toute sa largeur (ACHETER / VENDRE plus larges). */
html.is-tv.fs-trade body .fs-trade-overlay.on .pad{width:100%!important;flex:1 1 auto!important;max-width:none!important;min-width:0!important}
html.is-tv.fs-trade body .fs-trade-overlay.on .pad .btn-trade{width:100%!important}
