/* Local archive layout corrections; load AFTER archive-static.css.
   No source text, typography, images, or executable dependencies added. */

/* The original Hueloc theme masks body overflow. Expose rather than mask it. */
body.html:has(> #wrapper > #header) { overflow-x: visible; }

/* Original recruitment triangle is a fixed 1447px border, not content.
   Bound its horizontal leg; retain its height, colour and original maximum. */
.node-type-job #primary #content-wrap::before {
  border-left-width: min(1447px, 100vw);
}

/* Break only otherwise unbreakable text, without changing archived strings. */
.basic-page .page-title,
.node-type-agency .field-name-field-route-information {
  overflow-wrap: anywhere;
}

@media (max-width: 1279px) {
  /* Original grey itinerary wings extend a full column beyond BOTH edges.
     Keep the full-bleed background, bounded to the actual viewport gutters. */
  .node-type-agency .node-agency .group-agence-right .field-name-field-route-information::before,
  .node-type-agency .node-agency .group-agence-right .field-name-field-route-information::after {
    width: max(0px, calc((100vw - 100%) / 2));
  }
  .node-type-agency .node-agency .group-agence-right .field-name-field-route-information::before {
    right: min(0px, calc((100% - 100vw) / 2));
  }
  .node-type-agency .node-agency .group-agence-right .field-name-field-route-information::after {
    left: min(0px, calc((100% - 100vw) / 2));
  }
}

@media (max-width: 767px) {
  /* Duplicate unpadded Bootstrap row in the agency-directory title. */
  .page-espace-agences .page-title .row > .row {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Opt-in wrapper around an authentic legacy #page, never the body.
   Keep its 997px design and image-map geometry at 1:1; pan via touch/keyboard. */
@media (max-width: 997px) {
  .archive-legacy-viewport {
    max-width: 100%;
    overflow-x: auto;
  }
  .archive-legacy-viewport:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }
}
