/* MGD Core — Correctifs uniques de l'en-tête partagé.
   Charge APRES shell.css. Aucun sélecteur nav/a global, pas de styles du footer.
   Le header est dans le flux : pas de compensation de hauteur par page. */
body.mgd-core-body #mgd-shell-header {
  --mgd-shell-ink: var(--mgd-brand-ink, #12213b);
  --mgd-shell-accent: var(--mgd-brand-accent, #ff6700);
  z-index: 900;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  background: #fff !important;
  isolation: isolate;
}
body.mgd-core-body #mgd-shell-header .mgd-shell-header__inner {
  display: grid !important;
  grid-template-columns: max-content minmax(0,1fr);
  align-items: center;
  width: min(100%,var(--mgd-shell-max-width,1860px));
  max-width: 100%;
  min-width: 0;
  min-height: var(--mgd-header-min-height,112px);
  margin: 0 auto !important;
  padding: 12px var(--mgd-space-inline,clamp(20px,3.5vw,65px)) !important;
  gap: clamp(18px,2.6vw,54px);
}
body.mgd-core-body #mgd-shell-header .mgd-shell-brand__words,
body.mgd-core-body #mgd-shell-header nav#mgd-shell-nav {
  min-width: 0;
}
body.mgd-core-body #mgd-shell-header nav#mgd-shell-nav {
  justify-self: end;
  max-width: 100% !important;
}
body.mgd-core-body #mgd-shell-header ul#mgd-shell-menu {
  max-width: 100%;
}
body.mgd-core-body #mgd-shell-header ul#mgd-shell-menu > li > a:focus-visible,
body.mgd-core-body #mgd-shell-header button:focus-visible {
  outline: 2px solid var(--mgd-brand-accent, #ff6700);
  outline-offset: 3px;
}
/* Navigation ordinaire en desktop, sans hamburger ni déplacement hors écran. */
@media (min-width: 1101px) {
  body.mgd-core-body #mgd-shell-header button#mgd-shell-toggle { display: none !important; }
  body.mgd-core-body #mgd-shell-header nav#mgd-shell-nav {
    display: flex !important;
    position: static !important;
    width: 100% !important;
    visibility: visible !important;
  }
  body.mgd-core-body #mgd-shell-header nav#mgd-shell-nav ul#mgd-shell-menu {
    display: flex !important;
    flex-flow: row nowrap !important;
    gap: clamp(14px,1.6vw,32px);
    justify-content: flex-end;
  }
}
@media (min-width: 1101px) and (max-width: 1460px) {
  body.mgd-core-body #mgd-shell-header .mgd-shell-header__inner {
    gap: clamp(14px,1.8vw,28px);
  }
  body.mgd-core-body #mgd-shell-header ul#mgd-shell-menu > li > a {
    font-size: clamp(12px,.9vw,14px) !important;
  }
}
/* Sous le seuil desktop : le même menu et la même structure HTML sont conservés.
   --ready n'est ajouté qu'une fois le JavaScript initialisé. */
@media (max-width: 1100px) {
  body.mgd-core-body #mgd-shell-header .mgd-shell-header__inner {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
    padding: 12px var(--mgd-space-inline,24px) !important;
  }
  body.mgd-core-body #mgd-shell-header a.mgd-shell-brand {
    max-width: 100%;
    overflow: hidden;
  }
  body.mgd-core-body #mgd-shell-header .mgd-shell-brand__words strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.mgd-core-body #mgd-shell-header.mgd-shell-header--ready button#mgd-shell-toggle {
    display: block !important;
  }
  body.mgd-core-body #mgd-shell-header nav#mgd-shell-nav {
    position: absolute !important;
    z-index: 901;
    top: 100%;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - var(--mgd-header-min-height,85px));
    overflow-y: auto !important;
    overscroll-behavior: contain;
    background: #fff !important;
  }
  body.mgd-core-body #mgd-shell-header.mgd-shell-header--ready:not(.mgd-shell-header--open) nav#mgd-shell-nav {
    display: none !important;
  }
  body.mgd-core-body #mgd-shell-header.mgd-shell-header--open nav#mgd-shell-nav {
    display: block !important;
  }
  body.mgd-core-body #mgd-shell-header nav#mgd-shell-nav ul#mgd-shell-menu {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
  }
}
@media (max-width: 700px) {
  body.mgd-core-body #mgd-shell-header .mgd-shell-header__inner {
    padding: 10px var(--mgd-space-inline,20px) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.mgd-core-body #mgd-shell-header *,
  body.mgd-core-body #mgd-shell-header *::before,
  body.mgd-core-body #mgd-shell-header *::after { scroll-behavior: auto; }
}
