/* Admin Dashboard — Henry 24" zoom 0.75 sur coque (parité Vigikid) ; 32" ≥2560 inchangé */

/* Scroll actif, barre masquée (dashboard uniquement) */
html:has(.admin-dashboard-viewport) {
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 100%;
  overflow: hidden;
}

html:has(.admin-dashboard-viewport)::-webkit-scrollbar {
  display: none;
}

body:has(.admin-dashboard-viewport) {
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 100dvh;
  overflow: hidden;
}

body:has(.admin-dashboard-viewport)::-webkit-scrollbar {
  display: none;
}

.admin-dashboard-viewport {
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
}

.admin-dashboard-viewport::-webkit-scrollbar {
  display: none;
}

/* Header fixe — fond plein pour masquer le contenu au scroll */
.admin-dashboard-header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  width: 100%;
  box-sizing: border-box;
  padding: 3px 3px 0 3px;
  background: #f2eee6;
  pointer-events: none;
}

.admin-dashboard-header-fixed .header {
  pointer-events: auto;
  width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
  border-radius: 8px !important;
  padding: 12px 20px;
}

.admin-dashboard-header-spacer {
  height: 5.85rem;
  flex-shrink: 0;
}

@media (min-width: 1201px) and (max-width: 2559px) and (hover: hover) {
  html {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
    box-sizing: border-box;
    background: #f2eee6;
  }

  .admin-dashboard-viewport {
    width: 100%;
    box-sizing: border-box;
  }

  .admin-dashboard-header-fixed {
    zoom: 0.75;
    width: 100%;
  }

  .admin-dashboard-header-spacer {
    height: 4.85rem;
  }

  .admin-dashboard-scale {
    zoom: 0.75;
    width: 100%;
    max-width: 100%;
    min-height: calc(100dvh / 0.75);
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .admin-dashboard-scale .container {
    max-width: none;
    width: 100%;
    padding: 16px 12px 24px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .admin-dashboard-scale .section-title {
    margin: 14px 0 8px;
  }

  .admin-dashboard-scale .infrastructure-grid,
  .admin-dashboard-scale .security-grid,
  .admin-dashboard-scale .charts-grid,
  .admin-dashboard-scale .cards-grid {
    gap: 10px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
  }

  .admin-dashboard-scale .infrastructure-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-dashboard-scale .security-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-dashboard-scale .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  }

  .admin-dashboard-scale .charts-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  }
}
