/* =========================================================
   UNIPAY PUB — défilement tactile sur les cartes de publication
   Le geste vertical doit rester natif, même lorsqu'il commence sur
   une carte, son image ou son contenu. Le slider horizontal est exclu.
========================================================= */

html.unipay-page-pub.unipay-pub-touch-scroll-rescue,
html.unipay-page-pub.unipay-pub-touch-scroll-rescue body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-y pinch-zoom !important;
  -webkit-overflow-scrolling: touch !important;
}

html.unipay-page-pub.unipay-pub-touch-scroll-rescue .page-scope,
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .page-scope > main,
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .news-container {
  touch-action: pan-y pinch-zoom !important;
}

/* Les conteneurs absolus ne doivent pas capturer les espaces transparents.
   Les cinq cartes restent interactives et conservent leur clic d'ouverture. */
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .news-container {
  pointer-events: none !important;
}

html.unipay-page-pub.unipay-pub-touch-scroll-rescue .news-container > .news-section,
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .news-section > *,
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .news-section .bg-img,
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .news-section .bg-video {
  pointer-events: auto !important;
  touch-action: pan-y pinch-zoom !important;
}

/* Le contrôle de navigation reste un geste horizontal dédié. */
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .pub-feed-slider {
  pointer-events: auto !important;
  touch-action: none !important;
}

html.unipay-page-pub.unipay-pub-touch-scroll-rescue .news-overlay.active,
html.unipay-page-pub.unipay-pub-touch-scroll-rescue .modal-overlay.active {
  touch-action: none !important;
}

html.unipay-page-pub.unipay-pub-touch-scroll-rescue :is(
  input, textarea, select, button, a, label, [contenteditable="true"]
) {
  touch-action: manipulation !important;
}
