/* Contextual publication links only; native navigation remains independent. */
/* IT Residence supplies a panoramic image even on internal archive pages. */
body.erc-module-archive #masthead #header-image { display:none; }
/* These classes are assigned only to the five HivePress module archives. */
body[class*="erc-module-archive--"] #masthead .branding-wrapper { display:none; }
/* Keep the account item in flow at tablet width so the existing navigation
   measurement includes it and can activate the native mobile drawer. */
@media (max-width:1024px) {
    body.erc-module-archive #masthead.default #primary-menu > .menu-item--last {
        position:static;
        margin-inline-start:auto;
    }
}
.erc-module-header {
    box-sizing:border-box;
    position:relative;
    isolation:isolate;
    display:grid;
    width:calc(100% - 2rem);
    max-width:1180px;
    margin:32px auto 28px;
    border-radius:16px;
    background:#183e64;
    color:#fff;
}
.erc-module-header__panorama {
    position:relative;
    grid-area:1 / 1;
    height:clamp(160px, 20vw, 240px);
    overflow:hidden;
    border-radius:16px 16px 0 0;
}
/* The existing 1920 x 880 artwork has lettering above and below the landscape.
   Show its y=400..680 strip; cover crops the sides on narrow screens only. */
.erc-module-header__image {
    position:absolute;
    top:-142.857143%;
    left:0;
    display:block;
    width:100%;
    max-width:100%;
    height:314.285714%;
    object-fit:cover;
    object-position:center;
    border-radius:0;
}
.erc-module-header::before {
    content:"";
    grid-area:1 / 1;
    z-index:1;
    pointer-events:none;
    border-radius:16px 16px 0 0;
    background:linear-gradient(to bottom, rgb(9 27 43 / 8%), rgb(9 27 43 / 25%));
}
.erc-module-header__content {
    box-sizing:border-box;
    grid-area:2 / 1;
    z-index:2;
    align-self:end;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:24px;
    padding:32px;
    min-width:0;
    border-radius:0 0 16px 16px;
    background:linear-gradient(120deg, #102c42, #183e64);
}
.erc-module-header__copy { flex:1 1 400px; min-width:0; }
.erc-module-header h1 {
    position:static;
    height:auto;
    max-height:none;
    margin:0 0 12px;
    padding:.1em 0;
    color:#fff;
    font-size:clamp(1.75rem, 3.5vw, 2.5rem);
    line-height:1.25;
    white-space:normal;
    overflow-wrap:anywhere;
    transform:none;
}
.erc-module-header p { margin:0; color:#fff; line-height:1.65; }
.erc-module-header :is(h1, p) { text-shadow:0 1px 3px rgb(0 0 0 / 50%); }
.erc-module-header .erc-publication-cta { flex:0 1 auto; width:auto; max-width:100%; margin:0; }
/* The new archive H1 replaces only the duplicate module titles. */
body[class*="erc-module-archive--"] .hp-page__title,
body.erc-module-archive--annuaire-professionnel .erc-local-directory__header,
body.erc-module-archive--annuaire-professionnel #primary > article > .entry-header { display:none; }
body[class*="erc-module-archive--"] #primary { padding-top:0; }
body[class*="erc-module-archive--"] .hp-page__content > .hp-form--listing-search,
body[class*="erc-module-archive--"] .hp-page__topbar,
body.erc-module-archive--annuaire-professionnel .erc-local-directory__filters { margin-bottom:28px; }
@media (max-width:991px) {
    .erc-module-header__content { grid-area:2 / 1; gap:20px; padding:24px; }
}
@media (max-width:600px) {
    /* The theme's floating shortcut covers the Events search submit control. */
    body.erc-module-archive--evenements #itre-back-to-top { display:none !important; }
    .erc-module-header { margin-top:20px; margin-bottom:24px; }
    .erc-module-header__content { padding:22px 18px; gap:18px; }
    .erc-module-header__copy { flex-basis:100%; }
    .erc-module-header .erc-publication-cta { width:100%; }
}

.erc-publication-cta > a,
.hp-form--listing-submit button.erc-quote-submit {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:13px 20px;
    border:0;
    border-radius:8px;
    background:#c95006;
    color:#fff;
    font:inherit;
    font-weight:700;
    line-height:1.5;
    text-align:center;
    text-decoration:none;
    cursor:pointer;
}
.erc-publication-cta > a:hover { background:#9e3c06; color:#fff; }
.hp-form--listing-submit button.erc-quote-submit:hover { background:#9e3c06; color:#fff; }
.hp-form--listing-submit button.erc-quote-submit:focus-visible { outline:3px solid #267b96; outline-offset:3px; }
.erc-publication-cta > a:focus-visible { outline:3px solid #267b96; outline-offset:3px; }
.erc-publication-cta {
    box-sizing:border-box;
    display:flex;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:14px;
    width:calc(100% - 2rem);
    max-width:1180px;
    margin:.75rem auto;
}
.erc-publication-cta > a { max-width:100%; overflow-wrap:anywhere; }
@media (max-width:600px) {
    .erc-publication-cta > a { width:100%; }
}
