/* Empêche la coque de dépasser le viewport sur ordinateur. Le défilement
   reste confié aux panneaux internes définis dans column-scroll.css. */
@media (min-width: 861px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body {
    display: grid;
    grid-template-rows: 80px minmax(0, 1fr) 32px;
  }

  .topbar {
    height: 80px;
  }

  .page-shell.app-container {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .page-shell .workspace {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #route-pane .route-grid,
  #stop-pane .tool-layout,
  #line-pane .tool-layout {
    height: calc(100vh - 193px);
    min-height: 0;
  }

  .app-footer {
    position: relative;
    z-index: 850;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0 28px;
    align-items: center;
    background: #f5f8f6;
    border-top: 1px solid #dfe9e5;
  }
}

/* Sur les écrans étroits, les panneaux sont empilés : la page reprend
   donc son défilement naturel. */
@media (max-width: 860px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  body {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page-shell.app-container,
  .page-shell .workspace {
    height: auto;
    overflow: visible;
  }
}
