/* Retours QUAL du 23/07/2026.
   Cette couche volontairement tardive corrige le shell sans réintroduire le
   verrou historique « tout doit tenir dans 100vh ». */

@media (min-width: 801px) {
  body.ui-revolution:not(.phone-mode) {
    min-height: 100dvh;
    overflow-x: clip;
    overflow-y: auto;
  }

  body.ui-revolution:not(.phone-mode) .layout {
    min-height: 100dvh;
    height: auto;
    align-items: start;
  }

  body.ui-revolution:not(.phone-mode) .sidebar {
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  body.ui-revolution:not(.phone-mode) main {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    padding-bottom: clamp(32px, 6vh, 72px);
    overflow: visible;
  }

  body.ui-revolution:not(.phone-mode) .tab-panel.active,
  body.ui-revolution:not(.phone-mode) .tab-panel[data-panel="overview"].active {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
}

/* L'action support doit se lire immédiatement, tout en restant compacte lorsque
   la largeur devient rare. */
body .topbar-report-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 12px;
  color: var(--carillon-rouge, #c9202e);
  border-color: color-mix(in srgb, var(--carillon-rouge, #c9202e) 42%, white);
  background: #fff;
  white-space: nowrap;
}

body.ui-revolution .topbar-actions .btn.secondary.icon-action.topbar-report-action {
  width: auto;
  padding-inline: 12px;
  justify-content: center;
}

body .topbar-actions .btn.secondary.icon-action.topbar-report-action span {
  display: inline;
  color: inherit;
}

body .topbar-report-action:hover,
body .topbar-report-action:focus-visible {
  color: #a31320;
  background: #fff3f4;
  border-color: #c9202e;
}

@media (max-width: 1240px) and (min-width: 801px) {
  body.ui-revolution .topbar-actions .btn.secondary.icon-action.topbar-report-action {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  body .topbar-actions .btn.secondary.icon-action.topbar-report-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 800px) {
  body.phone-mode .topbar {
    position: relative;
  }

  body.phone-mode .topbar-actions {
    display: flex;
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
  }

  body.phone-mode .topbar-actions > :not(.topbar-report-action) {
    display: none !important;
  }

  body.ui-revolution .topbar-actions .btn.secondary.icon-action.topbar-report-action {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  body .topbar-actions .btn.secondary.icon-action.topbar-report-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}
