/* =========================================================
   UNIPAY FULLSCREEN STABILITY — 20260613E
   Stabilise le plein écran mobile sans modifier la dynamique normale.
   ========================================================= */
html.unipay-native-fullscreen,
html.unipay-root-fullscreen-active{
  overflow:hidden;
  overscroll-behavior:none;
  touch-action:manipulation;
}

html.unipay-native-fullscreen body,
html.unipay-root-fullscreen-active body{
  overscroll-behavior:none;
  -webkit-overflow-scrolling:touch;
}

/* Le bouton ne pulse plus en plein écran : sa pulsation donnait un effet de tremblement. */
html.unipay-native-fullscreen #unipayImmersiveToggle,
html.unipay-root-fullscreen-active #unipayImmersiveToggle{
  animation:none !important;
  transform:translateX(-50%) translateZ(0) !important;
  will-change:auto !important;
}
html.unipay-native-fullscreen #unipayImmersiveToggle::after,
html.unipay-root-fullscreen-active #unipayImmersiveToggle::after{
  animation:none !important;
  opacity:.32 !important;
  transform:scale(1) !important;
}

/* Quand une modale/lecteur demande son propre fullscreen alors que le fullscreen UniPay est déjà actif,
   on le transforme en fullscreen virtuel au lieu de quitter/rentrer dans le fullscreen natif. */
html.unipay-root-fullscreen-active .unipay-virtual-fullscreen,
html.unipay-native-fullscreen .unipay-virtual-fullscreen{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:calc(var(--unipay-vh, 1vh) * 100) !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  transform:none !important;
  z-index:2147483400 !important;
  contain:layout paint size;
}

html.unipay-root-fullscreen-active .unipay-virtual-fullscreen.hidden,
html.unipay-native-fullscreen .unipay-virtual-fullscreen.hidden{
  display:none !important;
}

html.unipay-root-fullscreen-active .unipay-media-player.unipay-virtual-fullscreen,
html.unipay-native-fullscreen .unipay-media-player.unipay-virtual-fullscreen,
html.unipay-root-fullscreen-active .unipay-gallery-viewer.unipay-virtual-fullscreen,
html.unipay-native-fullscreen .unipay-gallery-viewer.unipay-virtual-fullscreen,
html.unipay-root-fullscreen-active #statusImmersiveModal.unipay-virtual-fullscreen,
html.unipay-native-fullscreen #statusImmersiveModal.unipay-virtual-fullscreen{
  display:flex !important;
  background:rgba(0,5,16,.96) !important;
}

html.unipay-root-fullscreen-active .unipay-gallery-viewer.unipay-virtual-fullscreen .viewer-panel,
html.unipay-native-fullscreen .unipay-gallery-viewer.unipay-virtual-fullscreen .viewer-panel{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
}

html.unipay-root-fullscreen-active body.unipay-pub-page .news-container,
html.unipay-native-fullscreen body.unipay-pub-page .news-container{
  backface-visibility:hidden;
  transform:translateZ(0) !important;
  will-change:auto !important;
}

html.unipay-root-fullscreen-active,
html.unipay-root-fullscreen-active *{
  scroll-behavior:auto !important;
}


/* =========================================================
   CORRECTIF 20260613E — ANTI-TREMBLEMENT FULLSCREEN MOBILE
   Ce bloc ne touche pas aux barres. Il coupe seulement les transitions de
   géométrie des zones actives qui donnaient l'impression d'un rechargement.
   ========================================================= */
html.unipay-native-fullscreen.unipay-phone-portrait.unipay-page-chat .page-scope > main,
html.unipay-native-fullscreen.unipay-phone-portrait.unipay-page-pub .news-container,
html.unipay-native-fullscreen.unipay-phone-portrait.unipay-page-pub .control-panel{
  backface-visibility:hidden !important;
  -webkit-backface-visibility:hidden !important;
  will-change:auto !important;
}
html.unipay-native-fullscreen.unipay-phone-portrait.unipay-page-pub .news-container,
html.unipay-native-fullscreen.unipay-phone-portrait.unipay-page-pub .control-panel{
  transition:none !important;
}
html.unipay-native-fullscreen.unipay-phone-portrait.unipay-page-chat .smart-card,
html.unipay-native-fullscreen.unipay-phone-portrait.unipay-page-chat .profile-ai-card{
  transition:opacity .18s ease, box-shadow .22s ease, border-color .22s ease !important;
}

/* =========================================================
   CORRECTIF 20260613G — RESTAURATION DU DÉFILEMENT FULLSCREEN MOBILE
   Cause réelle : les correctifs anti-tremblement avaient verrouillé
   overflow sur le root fullscreen. En mobile, documentElement est l'élément
   fullscreen : s'il est hidden, le body peut être auto sans pouvoir défiler.
   Ce bloc réactive le scroll vertical sans relancer les transitions instables.
   ========================================================= */
html.unipay-native-fullscreen,
html.unipay-root-fullscreen-active,
html.unipay-native-fullscreen:fullscreen,
html.unipay-root-fullscreen-active:fullscreen{
  overflow-x:hidden !important;
  overflow-y:auto !important;
  height:auto !important;
  min-height:calc(var(--unipay-vh, 1vh) * 100) !important;
  overscroll-behavior-x:none !important;
  overscroll-behavior-y:contain !important;
  touch-action:pan-y !important;
  -webkit-overflow-scrolling:touch !important;
}

html.unipay-native-fullscreen body,
html.unipay-root-fullscreen-active body{
  overflow-x:hidden !important;
  overflow-y:auto !important;
  height:auto !important;
  min-height:calc(var(--unipay-vh, 1vh) * 100) !important;
  overscroll-behavior-x:none !important;
  overscroll-behavior-y:contain !important;
  touch-action:pan-y !important;
  -webkit-overflow-scrolling:touch !important;
}

html.unipay-native-fullscreen.unipay-phone-portrait body,
html.unipay-root-fullscreen-active.unipay-phone-portrait body{
  padding-bottom:calc(var(--unipay-content-bottom-reserve, 86px) + 26px) !important;
}

html.unipay-native-fullscreen.unipay-phone-portrait .page-scope,
html.unipay-root-fullscreen-active.unipay-phone-portrait .page-scope,
html.unipay-native-fullscreen.unipay-phone-portrait .page-scope > main,
html.unipay-root-fullscreen-active.unipay-phone-portrait .page-scope > main,
html.unipay-native-fullscreen.unipay-phone-portrait main.content,
html.unipay-root-fullscreen-active.unipay-phone-portrait main.content{
  max-height:none !important;
  overflow-y:visible !important;
  -webkit-overflow-scrolling:touch !important;
}

html.unipay-native-fullscreen.unipay-phone-portrait body.unipay-pub-page,
html.unipay-root-fullscreen-active.unipay-phone-portrait body.unipay-pub-page{
  min-height:var(--unipay-pub-scroll-height, 6200px) !important;
  padding-bottom:calc(var(--unipay-content-bottom-reserve, 86px) + 140px) !important;
}

html.unipay-native-fullscreen.unipay-phone-portrait :is(.news-overlay.active, .modal-overlay, .cyber-modal, .expanded-card, .live-modal, .unipay-immersive-modal, .unipay-immersive-panel, .conv-dialog),
html.unipay-root-fullscreen-active.unipay-phone-portrait :is(.news-overlay.active, .modal-overlay, .cyber-modal, .expanded-card, .live-modal, .unipay-immersive-modal, .unipay-immersive-panel, .conv-dialog){
  touch-action:pan-y !important;
  -webkit-overflow-scrolling:touch !important;
}
