/* En-tête fixe : dégradé au repos, noir au scroll, masquage directionnel. */
.xl-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30000;
  isolation: isolate;
  color: var(--col-blanc);
  background: linear-gradient(180deg, rgba(var(--rgb-noir),.65), rgba(var(--rgb-noir),.25) 65%, transparent);
  transform: translateY(0);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  padding: 1.75rem clamp(1.25rem, 4vw, 5rem);
}
.xl-header--overlay { padding-bottom: 3.5rem; }
.xl-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--col-noir);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease-in-out;
}
.xl-header.xl-header-sticky::before { opacity: 1; }
.xl-header.xl-header-hidden { transform: translateY(calc(-100% - 48px)); }
.xl-header:focus-within { transform: translateY(0); }
.xl-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.xl-brand { flex: 0 1 50px; max-width: 32%; }
.xl-brand img { display: block; width: 100%; height: auto; }
.xl-menu { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.xl-menu li { display: flex; align-items: center; gap: 1.5rem; }
.xl-menu li + li::before { content: '|'; opacity: .55; }
.xl-menu a, .xl-menu-toggle {
  color: var(--col-blanc);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
}
.xl-menu a { display: inline-block; padding: .6rem 0; }
.xl-menu a:hover, .xl-menu .current-menu-item > a { color: var(--col-orange); }
.xl-menu-toggle { display: none; align-items: center; gap: .7rem; border: 0; padding: .65rem 0 .65rem .65rem; background: transparent; cursor: pointer; }
.xl-menu-toggle__icon { width: 1.25rem; height: .65rem; border-top: 1px solid; border-bottom: 1px solid; }
.xl-menu-toggle[aria-expanded='true'] .xl-menu-toggle__icon { transform: rotate(-45deg); }
.xl-skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 40000; transform: translateY(-200%); padding: .75rem 1rem; color: var(--col-noir); background: var(--col-blanc); }
.xl-skip-link:focus { transform: none; }
.xl-header a:focus-visible, .xl-header button:focus-visible, .xl-hero button:focus-visible { outline: 2px solid var(--col-orange); outline-offset: 5px; }
@media (max-width: 991px) {
  .xl-header { padding: 1.25rem; }
  .xl-header--overlay { padding-bottom: 2.5rem; }
  .xl-header__inner { flex-wrap: wrap; gap: 1rem; }

  .xl-menu-toggle:not([hidden]) { display: inline-flex; }
  .xl-navigation { flex-basis: 100%; width: 100%; background: var(--col-noir); padding: .75rem 1.25rem; }
  .xl-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .xl-menu li { display: block; }
  .xl-menu li + li::before { content: none; }
  .xl-menu a { display: block; padding: .75rem 0; }
  .xl-header[data-menu-ready] .xl-menu-toggle[aria-expanded='false'] + .xl-navigation { display: none; }
}

/* Balayage orange dans les lettres : aucun mouvement du texte ou des séparateurs. */
.xl-menu__label { display: inline-block; }
.xl-menu a:focus-visible { color: var(--col-orange); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .xl-menu__label {
    background-image: linear-gradient(90deg, var(--col-orange) 0%, var(--col-orange) 50%, var(--col-blanc) 50%, var(--col-blanc) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    transition: background-position .35s cubic-bezier(.4, 0, .2, 1);
  }
  .xl-menu .current-menu-item > a .xl-menu__label,
  .xl-menu a[aria-current="page"] .xl-menu__label,
  .xl-menu a:focus-visible .xl-menu__label {
    background-position: 0 0;
  }
  @media (hover: hover) and (pointer: fine) {
    .xl-menu a:hover .xl-menu__label { background-position: 0 0; }
  }
  @media (hover: none) {
    .xl-menu a:active .xl-menu__label { background-position: 0 0; transition: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .xl-menu__label, .xl-header, .xl-header::before { transition: none; }
}
@media (forced-colors: active) {
  .xl-menu__label {
    background: none;
    color: LinkText;
    -webkit-text-fill-color: currentColor;
  }
}

body.admin-bar .xl-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .xl-header { top: 46px; } }

.xl-theme-toggle { flex: 0 0 44px; margin-left: auto; margin-right: 1rem; padding: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--col-blanc); cursor: pointer; }
.xl-theme-toggle[hidden] { display: none; }
.xl-theme-toggle svg { display: block; }
.xl-theme-toggle .xl-theme-toggle__moon { display: none; }
[data-theme="light"] .xl-theme-toggle__sun { display: none; }
[data-theme="light"] .xl-theme-toggle .xl-theme-toggle__moon { display: block; }

@media (max-width: 991px) {
  .xl-theme-toggle { margin-right: 0; }

}

/* Deux fichiers distincts : aucun filtre appliqué aux couleurs du logo. */
.xl-brand .xl-brand__logo--light { display: none; }
html[data-theme="light"] .xl-brand .xl-brand__logo--dark { display: none; }
html[data-theme="light"] .xl-brand .xl-brand__logo--light { display: block; }

/* Principal / réseaux / Contact : même ordre dans le menu mobile. */
.xl-navigation { display: flex; align-items: center; gap: 30px; }
.xl-header .xl-header__socials { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.xl-header__socials a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 44px; color: var(--col-blanc); text-decoration: none; }
.xl-header .xl-header__socials .fa { color: inherit; font-size: 20px; opacity: 1; visibility: visible; }
.xl-header__socials a:hover { color: var(--col-orange); }
@media (max-width: 991px) {
 .xl-navigation { flex-direction: column; align-items: stretch; gap: 16px; }
 .xl-header .xl-header__socials { justify-content: flex-start; }
}

.xl-header__socials a { transition: color .45s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
 .xl-header__socials a { transition: none; }
}
