/* ===== Scroll souris — correctifs globaux Electron ===== */

html,
body,
#dashboard-view,
.content-body,
.admin-scroll,
.demande-scroll,
.demande-view-body,
.office-page-scroll,
.ticket-view-scroll,
.hierarchie-scroll,
.aide-scroll,
.edt-scroll,
.registre-table-wrap,
.absence-week-scroll,
.accueil-wrap,
.page-accueil,
.reglement-page,
.reglement-body,
.donnees-sec-list,
.members-list,
.anim-list-scroll {
  -webkit-app-region: no-drag !important;
}

.content-body,
.admin-scroll,
.demande-scroll,
.demande-view-body,
#office-page-scroll,
.office-page-scroll,
.ticket-view-scroll,
.hierarchie-scroll,
.aide-scroll,
.registre-table-wrap,
.donnees-sec-list {
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* EDT : scroll vertical ET horizontal (jours de la semaine sur mobile) */
.edt-scroll {
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  overflow-y: auto;
}

.content-body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: auto !important;
}

.content-body.is-page-locked {
  overflow: hidden !important;
}

.admin-scroll,
.demande-view-body,
#office-page-scroll,
.office-page-scroll,
.hierarchie-scroll,
.aide-scroll,
.ticket-view-scroll {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}

/* Accueil / Règlement : hauteur naturelle, scroll via content-body */
.page-accueil,
.accueil-wrap,
.page[data-page-view="reglement"],
.page[data-page-view="notions-rp"],
.reglement-page {
  contain: none !important;
}

.page[data-page-view="reglement"].is-active,
.page[data-page-view="notions-rp"].is-active,
.page[data-page-view="accueil"].is-active,
.page[data-page-view="parametres"].is-active {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Admin : la zone interne scrolle, pas le parent */
.page[data-page-view="admin"].is-active .admin-panel.is-active {
  min-height: 0 !important;
  overflow: hidden !important;
}

.page[data-page-view="admin"].is-active .admin-scroll {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* Molette : ne pas bloquer via JS — le navigateur gère nativement */
* {
  scrollbar-width: thin;
}
