/* Navigation « Graphique & Structuré » — règles limitées à l’en-tête.
   Le seuil de 960 px conserve le fonctionnement du menu existant. */
.nav-facets {
  display: none;
}

@media (min-width: 960px) {
  #site-header {
    height: 86px;
    border-bottom: 1px solid #e8edf2;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(15, 35, 65, .04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #site-header .site-nav {
    grid-template-columns: minmax(150px, 1fr) auto auto;
    gap: clamp(18px, 2.3vw, 36px);
    padding: 0 0 0 clamp(24px, 2.7vw, 52px);
  }

  #site-header .site-logo {
    width: clamp(180px, 15.3vw, 235px);
    transform: none;
  }

  #site-header .site-logo-img--white {
    opacity: 0;
  }

  #site-header .nav-facets {
    position: absolute;
    top: 50%;
    left: calc(100% + 2px);
    display: block;
    width: clamp(96px, 9.7vw, 140px);
    height: 85px;
    color: var(--signature-muted);
    transform: translateY(-50%);
    pointer-events: none;
  }

  #site-header .site-nav-links {
    gap: clamp(24px, 3.2vw, 48px);
  }

  #site-header .site-nav-links a {
    --nav-link-accent: var(--brand-blue);
    min-height: 44px;
    color: var(--blue-night);
    font-family: var(--font-signature);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .01em;
    transform: none;
  }

  #site-header .site-nav-links a::after {
    right: auto;
    bottom: 2px;
    left: calc(50% - 20px);
    width: 40px;
    height: 1px;
    border-radius: 0;
    background: var(--blue-sky);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 250ms ease;
  }

  #site-header .site-nav-links a:is(:hover, :focus-visible, [aria-current="location"])::after {
    transform: scaleX(1);
  }

  #site-header .site-nav-actions {
    height: 100%;
    gap: clamp(24px, 2.7vw, 42px);
  }

  #site-header .nav-phone {
    width: auto;
    height: 46px;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: visible;
    padding: 0 0 0 clamp(20px, 2.3vw, 36px);
    border: 0;
    border-left: 1px solid #e8edf2;
    border-radius: 0;
    clip-path: none;
    background: transparent;
    color: var(--blue-night);
    box-shadow: none;
    filter: none;
    transform: none;
    animation: none;
  }

  #site-header .nav-phone-icon {
    width: 22px;
    height: 22px;
    align-self: center;
    border: 0;
    border-radius: 0;
    clip-path: none;
    background: transparent;
    color: var(--brand-blue);
    box-shadow: none;
    transform: none;
  }

  #site-header .nav-phone-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: .5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  #site-header .nav-phone-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    font-family: var(--font-signature);
    white-space: nowrap;
  }

  #site-header .nav-phone-copy strong {
    color: var(--blue-night);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: .015em;
  }

  #site-header .nav-phone-copy small {
    display: block;
    color: var(--slate);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: .015em;
    text-transform: none;
    opacity: 1;
  }

  #site-header .nav-project {
    width: clamp(238px, 19.4vw, 296px);
    height: 68px;
    align-self: end;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 16px;
    padding: 0 24px 0 54px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    clip-path: none;
    isolation: isolate;
    background: transparent;
    color: var(--white);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: filter 250ms ease;
  }

  #site-header .nav-project::before,
  #site-header .nav-project::after {
    content: "";
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    pointer-events: none;
    transform: none;
    transition: none;
  }

  #site-header .nav-project::before {
    z-index: -1;
    border-radius: 0 8px 8px 0;
    clip-path: polygon(40px 0, 100% 0, 100% 100%, 0 100%);
    background:
      linear-gradient(130deg, transparent 94%, var(--blue-sky) 94%),
      linear-gradient(105deg, var(--navy-light) 12%, color-mix(in srgb, var(--brand-blue) 76%, var(--blue-night)));
  }

  #site-header .nav-project::after {
    z-index: -2;
    left: -18px;
    display: block;
    background: var(--blue-sky);
    opacity: .18;
    clip-path: polygon(25px 42%, 46px 42%, 23px 100%, 0 100%);
  }

  #site-header .nav-project-copy {
    gap: 7px;
    padding: 0;
  }

  #site-header .nav-project-copy strong {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .01em;
  }

  #site-header .nav-project-copy small {
    display: block;
    color: var(--white-a72);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: .07em;
  }

  #site-header .nav-project-action {
    width: 28px;
    padding: 0;
    overflow: visible;
    clip-path: none;
    background: transparent;
  }

  #site-header .nav-project-action i {
    font-size: 22px;
    transition: transform 250ms ease;
  }

  #site-header .nav-project:hover {
    filter: brightness(1.08);
  }

  #site-header .nav-project:hover .nav-project-action i {
    transform: translateX(4px);
  }

  #site-header .nav-project:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 3px var(--blue-sky);
  }
}

@media (min-width: 960px) and (max-width: 1279px) {
  #site-header .site-nav {
    gap: 18px;
  }

  #site-header .nav-facets {
    width: 80px;
  }

  #site-header .site-logo {
    width: clamp(145px, 15vw, 180px);
  }

  #site-header .site-nav-links {
    gap: 18px;
  }

  #site-header .site-nav-links a {
    font-size: 12px;
  }

  #site-header .site-nav-actions {
    gap: 18px;
  }

  #site-header .nav-phone {
    gap: 8px;
    padding-left: 18px;
  }

  #site-header .nav-phone-copy strong {
    font-size: 13px;
  }

  #site-header .nav-phone-copy small {
    font-size: 9px;
  }

  #site-header .nav-project {
    width: 212px;
    gap: 10px;
    padding-right: 16px;
    padding-left: 40px;
  }

  #site-header .nav-project-copy small {
    font-size: 7px;
  }
}

@media (min-width: 960px) and (max-width: 1050px) {
  #site-header .nav-facets {
    display: none;
  }
}

@media (max-width: 959px) {
  #site-header .nav-phone,
  #site-header .nav-project {
    display: none;
  }

  /*
   * Neutralise les anciens offsets du burger (top/right) qui le faisaient
   * sortir de l'en-tête entre 641 et 768 px. Les traits sont positionnés
   * depuis un centre commun pour obtenir une croix parfaitement symétrique,
   * indépendamment de la taille du bouton.
   */
  #site-header #burger {
    position: relative;
    inset: auto;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    margin: 0;
    overflow: hidden;
    place-content: initial;
    gap: 0;
  }

  #site-header #burger span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1px;
    margin: 0;
    transform: translate(-50%, -50%);
    transform-origin: center;
  }

  #site-header #burger span:nth-child(1) {
    transform: translate(-50%, calc(-50% - 5px));
  }

  #site-header #burger span:nth-child(3) {
    transform: translate(-50%, calc(-50% + 5px));
  }

  body.menu-open #site-header #burger span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  body.menu-open #site-header #burger span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open #site-header #burger span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}

@media (max-width: 768px) {
  #site-header #burger {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #site-header .site-nav-links a::after,
  #site-header .nav-project,
  #site-header .nav-project-action i {
    transition: none;
  }
}
