/* art-felx.com — fusion de l'essai validé : 100 px, domaines en haut,
   lettres blanches au survol. Ce fichier NE change pas le lecteur vocal. */

/* Trois bandes dans le flux normal : elles ne doivent jamais se chevaucher. */
body > #header-langues {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* Le rotateur retrouve la place supérieure et la teinte du fichier index(6). */
#header-langues > .domain-rotator {
  order: -2;
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 90px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  background: #a47864 !important;
  color: #fff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
#header-langues #domainText {
  display: block !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  font: 500 clamp(1.35rem, 3vw, 2.5rem)/1.15 Arial, Helvetica, sans-serif !important;
  color: #fff !important;
  text-align: center !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .45s ease, transform .45s ease;
}
#header-langues #domainText.is-visible {
  opacity: 1 !important;
  transform: translateY(0);
}
#header-langues > .language-selector { order: -1; }
#header-langues > #menu-haut { order: 0; }
#header-langues > .menu-hover-display { order: 1; }

/* Seul le menu inférieur descend à 100 px : la voix grise reste compacte. */
body > #header-navigation.header-menu {
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  scroll-behavior: auto;
}
body > #af-lecture-header.af-lecture-header {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Survol et clavier : blanc sur un brun foncé, sur les DEUX menus. */
#menu-haut :is(.menu-link, .comment-link),
#header-navigation :is(.menu-link, .comment-link) {
  transition: background-color .15s ease, color .15s ease;
}
#menu-haut :is(.menu-link, .comment-link):is(:hover, :focus-visible),
#header-navigation :is(.menu-link, .comment-link):is(:hover, :focus-visible),
#menu-haut :is(.submenu, .sous-menu, .dropdown-menu, .menu-dropdown) a:is(:hover, :focus-visible),
#header-navigation :is(.submenu, .sous-menu, .dropdown-menu, .menu-dropdown) a:is(:hover, :focus-visible) {
  color: #fff !important;
  background-color: #50372f !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
#menu-haut :is(.menu-link, .comment-link):is(:hover, :focus-visible) svg,
#header-navigation :is(.menu-link, .comment-link):is(:hover, :focus-visible) svg {
  color: white !important;
  fill: currentColor !important;
}


/* ================================================================
   STABILITE AU SURVOL / CONTRASTE, 12 OCTOBRE 2026
   N'affecte pas le moteur vocal ni les liens.
   ================================================================ */
#header-langues .menu-hover-display {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  flex: 0 0 72px !important;
  overflow: hidden !important;
  pointer-events: none !important;
  contain: layout !important;
}
#header-langues #langue-nom-survol {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  line-height: 1.05 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  transform: none !important;
  margin: 0 !important;
}
body > #header-navigation.header-menu {
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  overflow: hidden !important; /* Évite les barres de défilement qui changent au survol */
  scrollbar-gutter: stable !important;
}
#header-navigation .menu,
#header-navigation .menu-container,
#header-navigation .menu-item {
  transform: none !important;
  animation: none !important;
}
/* Le texte ne grossit, ne maigrit ni ne bouge au passage de la souris. */
body #header-navigation .menu .menu-link,
body #header-navigation .menu .comment-link {
  box-sizing: border-box !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  transform: none !important;
  transition: color .12s linear, background-color .12s linear !important;
  text-decoration: none !important;
  outline-offset: 2px;
  text-shadow: none !important;
}
body #header-navigation .menu .menu-link:hover,
body #header-navigation .menu .menu-link:focus-visible,
body #header-navigation .menu .comment-link:hover,
body #header-navigation .menu .comment-link:focus-visible {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #765448 !important;
  font-weight: 500 !important;
  transform: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
body #header-navigation .menu a:hover *,
body #header-navigation .menu a:focus-visible * {
  color: #fff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* Préserver l'accès aux rubriques quand l'affichage est très agrandi. */
@media(max-width:780px) {
  body > #header-navigation.header-menu {
    height: auto !important;
    min-height: 100px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  #header-langues #langue-nom-survol {
    font-size: clamp(1.2rem, 6vw, 3rem) !important;
  }
}
