/* =================================================================
   EACB — Header + footer (chargé sur tout le site)
   ================================================================= */
:root {
    --eacb: rgb(24, 82, 127);
    --eacb-dark: #0A2A42;
    --eacb-ink: #0D1F2D;
    --eacb-yellow: #FFCE2E;
    --eacb-light: rgba(24, 82, 127, .08);
    --eacb-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
    --eacb-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --nav-h: 68px;
}

/* lien d'évitement clavier */
.eacb-skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 1200;
    padding: .6rem 1rem; background: var(--eacb-yellow); color: var(--eacb-ink);
    font: 700 1rem var(--eacb-body); border-radius: 6px; text-decoration: none;
}
.eacb-skip:focus { top: 1rem; }

/* =================================================================
   HEADER
   ================================================================= */
.eacb-header {
    position: sticky; top: 0; z-index: 1000;
    background: #fff;
    border-bottom: 3px solid var(--eacb);
    font-family: var(--eacb-body);
    transition: box-shadow .3s ease;
}
.admin-bar .eacb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .eacb-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .eacb-header { top: 0; } } /* la barre admin n'est plus fixe */
.eacb-header.is-scrolled { box-shadow: 0 8px 24px -12px rgba(10, 42, 66, .45); }

.eacb-header__inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    height: var(--nav-h); transition: height .3s ease;
}

.eacb-header__logo a {
    font: 900 1.5rem/1 var(--eacb-display); text-transform: uppercase;
    color: var(--eacb-dark); text-decoration: none;
}
.eacb-header__logo img,
.eacb-header__logo .custom-logo {
    max-height: 46px; width: auto; display: block; transition: max-height .3s ease;
}

.eacb-header :focus-visible,
.eacb-drawer :focus-visible,
.eacb-footer :focus-visible { outline: 3px solid var(--eacb-yellow); outline-offset: 2px; }
.eacb-header :focus-visible { outline-color: var(--eacb); }

/* ----- Menu desktop ----- */
.eacb-nav { display: none; }
.eacb-nav ul { list-style: none; margin: 0; padding: 0; }
.eacb-nav > ul { display: flex; align-items: center; gap: 2px; }
.eacb-nav li { position: relative; }

.eacb-nav > ul > li > a {
    position: relative; display: flex; align-items: center; gap: 6px;
    padding: 10px 12px;
    font-weight: 600; font-size: .9375rem; white-space: nowrap;
    color: var(--eacb-ink); text-decoration: none;
    transition: color .2s;
}
/* ligne de terrain sous le lien actif */
.eacb-nav > ul > li > a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 3px; background: var(--eacb-yellow);
    transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.eacb-nav > ul > li > a:hover { color: var(--eacb); }
.eacb-nav > ul > li > a:hover::after,
.eacb-nav > ul > li.current-menu-item > a::after,
.eacb-nav > ul > li.current-menu-ancestor > a::after { transform: scaleX(1); }
.eacb-nav > ul > li.current-menu-item > a,
.eacb-nav > ul > li.current-menu-ancestor > a { color: var(--eacb); }

/* Flèche sous-menu */
.eacb-nav .menu-item-has-children > a::before {
    content: ""; order: 2; width: 7px; height: 7px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.eacb-nav .menu-item-has-children:hover > a::before { transform: rotate(-135deg) translateY(-2px); }

/* Dropdown */
.eacb-nav .sub-menu {
    position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px;
    background: #fff; border-radius: 4px; padding: 8px;
    box-shadow: 0 16px 36px -12px rgba(10, 42, 66, .4);
    border-top: 3px solid var(--eacb-yellow);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.eacb-nav .sub-menu::before { /* pont pour garder le hover */
    content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px;
}
.eacb-nav li:hover > .sub-menu,
.eacb-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.eacb-nav .sub-menu a {
    display: block; padding: 10px 14px; border-radius: 4px;
    color: var(--eacb-ink); text-decoration: none; font-size: .92rem; font-weight: 500;
    transition: background .2s, color .2s;
}
.eacb-nav .sub-menu a:hover,
.eacb-nav .sub-menu .current-menu-item > a { background: var(--eacb-light); color: var(--eacb); }

/* ----- Bouton menu (mobile) ----- */
.eacb-burger {
    display: inline-flex; align-items: center; gap: .6rem;
    height: 44px; padding: 0 .9rem; border: 0; border-radius: 6px;
    background: var(--eacb); color: #fff; cursor: pointer;
    font: 700 .9375rem var(--eacb-body);
}
.eacb-burger__bars,
.eacb-burger__bars::before,
.eacb-burger__bars::after {
    display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px;
}
.eacb-burger__bars { position: relative; }
.eacb-burger__bars::before, .eacb-burger__bars::after { content: ""; position: absolute; left: 0; }
.eacb-burger__bars::before { top: -6px; }
.eacb-burger__bars::after  { top: 6px; }

/* ----- Menu mobile (drawer) ----- */
.eacb-drawer {
    position: fixed; top: 0; right: 0; z-index: 1100;
    width: min(88vw, 380px); height: 100dvh;
    background: var(--eacb-dark); color: #fff;
    visibility: hidden;   /* fermé : ni ombre ni débordement sur la page */
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s .35s;
    display: flex; flex-direction: column;
    font-family: var(--eacb-body);
}
.eacb-drawer.is-open {
    visibility: visible;
    transform: translateX(0);
    box-shadow: -10px 0 40px rgba(0, 0, 0, .3);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s;
}
.eacb-drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
}
.eacb-drawer__head strong { font: 800 1.25rem/1 var(--eacb-display); color: var(--eacb-yellow); }
.eacb-drawer__close {
    width: 44px; height: 44px; border: 2px solid #fff; border-radius: 6px;
    background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.eacb-drawer__nav { overflow-y: auto; padding: 4px 20px 20px; flex: 1; }
.eacb-drawer__nav ul { list-style: none; margin: 0; padding: 0; }
.eacb-drawer__nav li { position: relative; }
.eacb-drawer__nav > ul > li + li { border-top: 2px solid rgba(255, 255, 255, .16); }
.eacb-drawer__nav a {
    display: block; padding: 14px 52px 14px 0;
    font: 800 1.9rem/1.05 var(--eacb-display);
    color: #fff; text-decoration: none;
}
.eacb-drawer__nav a:hover,
.eacb-drawer__nav .current-menu-item > a { color: var(--eacb-yellow); }

.eacb-drawer__nav .sub-menu { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.eacb-drawer__nav .sub-menu a { font: 500 1rem/1.3 var(--eacb-body); padding: 10px 0 10px 14px; color: #DCE8F1; }
.eacb-drawer__nav li.is-open > .sub-menu { max-height: 600px; padding-bottom: 8px; }

.eacb-subtoggle {
    position: absolute; top: 8px; right: 0; width: 44px; height: 44px;
    border: 0; border-radius: 6px; background: rgba(255, 255, 255, .12); cursor: pointer;
}
.eacb-subtoggle::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px;
    border-right: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: translate(-50%, -70%) rotate(45deg); transition: transform .25s;
}
li.is-open > .eacb-subtoggle::before { transform: translate(-50%, -30%) rotate(-135deg); }

/* filet en bas du menu et en haut du footer */
.eacb-drawer__net,
.eacb-footer__net {
    height: 22px;
    border-top: 5px solid var(--eacb-yellow);
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .45) 0 1px, transparent 1px 6px);
}

.eacb-overlay {
    position: fixed; inset: 0; z-index: 1050; background: rgba(10, 30, 50, .6);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.eacb-overlay.is-open { opacity: 1; visibility: visible; }
body.eacb-no-scroll { overflow: hidden; }

/* ----- Desktop : 8 entrées de menu tiennent sur une ligne à partir de 1200px ----- */
@media (min-width: 1200px) {
    :root { --nav-h: 84px; }
    .eacb-nav { display: block; }
    .eacb-burger, .eacb-drawer, .eacb-overlay { display: none; }
    .eacb-header.is-scrolled .eacb-header__inner { height: 68px; }
    .eacb-header__logo img, .eacb-header__logo .custom-logo { max-height: 58px; }
    .eacb-header.is-scrolled .eacb-header__logo img { max-height: 46px; }
}

/* =================================================================
   FOOTER
   ================================================================= */
.eacb-footer {
    background: var(--eacb-ink);
    color: #C9D6E0;
    font-family: var(--eacb-body);
    font-size: 1rem;
    line-height: 1.6;
}
.eacb-footer .container { padding-top: 3.5rem; padding-bottom: 1.5rem; }

.eacb-footer p { color: inherit; }

.eacb-footer__brand {
    font: 900 clamp(2.4rem, 10vw, 3.5rem)/.9 var(--eacb-display);
    text-transform: uppercase;
    color: #fff !important;
    max-width: 8em;
    margin: 0 0 1rem;
}
.eacb-footer__pitch { max-width: 24rem; margin: 0 0 1.5rem; font-family: var(--eacb-body); }

.eacb-footer__fb {
    display: inline-flex; align-items: center; gap: .6rem;
    min-height: 3rem; padding: .6rem 1.1rem;
    border: 2px solid #fff; border-radius: 6px;
    color: #fff; font-weight: 700; text-decoration: none;
    transition: background-color .15s, color .15s;
}
.eacb-footer__fb:hover { background: #fff; color: var(--eacb-ink); }

.eacb-footer__title {
    font: 800 1.5rem/1 var(--eacb-display);
    color: var(--eacb-yellow);
    margin: 0 0 1rem;
}

.eacb-footer__address { font-style: normal; margin: 0 0 1rem; color: #fff; }

.eacb-footer__contact,
.eacb-footer__links { margin: 0; padding: 0; list-style: none; }
.eacb-footer__contact li + li,
.eacb-footer__links li + li { margin-top: .15rem; }

.eacb-footer__contact a,
.eacb-footer__links a {
    display: inline-block; padding: .35rem 0;   /* zone tactile confortable */
    color: #C9D6E0; text-decoration: none; overflow-wrap: anywhere;
}
.eacb-footer__contact a:hover,
.eacb-footer__links a:hover,
.eacb-footer__links .current-menu-item > a { color: var(--eacb-yellow); }

.eacb-footer__copy {
    margin: 3rem 0 0; padding-top: 1.25rem;
    border-top: 2px solid rgba(255, 255, 255, .14);
    font-size: .875rem; color: #8FA3B4 !important;
}

@media (prefers-reduced-motion: reduce) {
    .eacb-header, .eacb-header *, .eacb-drawer, .eacb-drawer *, .eacb-overlay, .eacb-footer__fb { transition: none !important; }
}
