/* === Audiology Worldnews : en-tête, les rubriques ne passent plus sur le burger ni sur le badge WORLD/UK ===
   À charger UNIQUEMENT sur l'instance AWN : le thème parresia-theme et ses classes sont les mêmes sur Dentaire365,
   et la réserve de 168 px est calculée pour le badge « WORLD » d'AWN.
   Validé sur preprod-new.audiology-worldnews.com (01/12/2026) de 1025 à 1920 px, en-tête normal et épinglé,
   pour la navigation actuelle (9 rubriques). À revérifier si on ajoute une rubrique. */

/* 1. En-tête normal : la nav est centrée dans l'espace laissé à droite du burger et du badge.
      Tant qu'il y a la place elle reste centrée sur la page ; sinon elle se cale juste après le badge. */
body:not(.is-nav-pinned) header .main-nav-row > .wp-block-navigation {
  --awn-nav-reserve: 168px; /* burger + badge WORLD/UK + espaces */
  left: var(--awn-nav-reserve);
  right: var(--awn-nav-reserve);
  width: max-content;
  margin-inline: auto;
  transform: translateY(-50%);
}

/* La liste porte aussi la classe .wp-block-navigation : la règle du thème
   (.main-nav-row .wp-block-navigation { position: absolute; left: 50%; transform: translate(-50%, -50%) })
   s'applique deux fois. On neutralise le centrage absolu de la liste, c'est la nav qui se positionne. */
body:not(.is-nav-pinned) header .main-nav-row > .wp-block-navigation > .wp-block-navigation__container {
  position: static;
  transform: none;
  width: auto;
}

/* Le badge du topic indique au lecteur dans quel univers il se trouve : le thème le masque
   sous 1064 px, on le garde visible tant que la navigation est affichée (dès 1025 px) */
@media (min-width: 1025px) and (max-width: 1063.98px) {
  body:not(.is-nav-pinned) header .main-nav-row > .parresia-topics-badge {
    display: inline-block;
  }
}

/* Sous 1300 px, police et espacement réduits progressivement :
   police 12,5 px à 1025 px, 14 px (valeur du thème) à partir de 1300 px ;
   espacement 18 px jusqu'à 1064 px, 26 px (valeur du thème) à partir de 1300 px */
@media (max-width: 1299.98px) {
  body:not(.is-nav-pinned) header .main-nav-row > .wp-block-navigation,
  body:not(.is-nav-pinned) header .main-nav-row > .wp-block-navigation > .wp-block-navigation__container {
    gap: clamp(18px, 3.39vw - 18.07px, 26px);
  }
  /* la classe de taille WordPress .has-px-14-font-size est en !important */
  body:not(.is-nav-pinned) header .main-nav-row > .wp-block-navigation.has-px-14-font-size,
  body:not(.is-nav-pinned) header .main-nav-row > .wp-block-navigation .has-px-14-font-size {
    font-size: clamp(12.5px, 0.5455vw + 6.91px, 14px) !important;
  }
}

/* 2. En-tête épinglé (après défilement) : rubriques sur une seule ligne, la loupe reste dans le cadre */
@media (min-width: 1064px) {
  body.is-nav-pinned header .main-nav-row > .wp-block-navigation {
    flex-shrink: 0;
  }
  body.is-nav-pinned header .main-nav-row > .wp-block-navigation .wp-block-navigation-item__label {
    white-space: nowrap;
  }
}

@media (min-width: 1064px) and (max-width: 1249.98px) {
  body.is-nav-pinned header .main-nav-row {
    column-gap: 10px;
  }
  body.is-nav-pinned header .main-nav-row > .wp-block-navigation,
  body.is-nav-pinned header .main-nav-row > .wp-block-navigation > .wp-block-navigation__container {
    gap: clamp(7px, 12.5vw - 126px, 26px);
  }
  /* le thème force 12,5 px en !important dans la barre épinglée ; 12 px = plancher de lisibilité */
  body.is-nav-pinned header .main-nav-row > .wp-block-navigation.has-px-14-font-size,
  body.is-nav-pinned header .main-nav-row > .wp-block-navigation .has-px-14-font-size {
    font-size: 12px !important;
  }
}
