/* EnfinLire – Navigation commune v0.1.11.
   Source unique des styles du menu, utilisée sur le site réel ET dans l'atelier.
   Pas de correctif superposé à une autre feuille ni de sélecteur Elementor. */
@font-face {
  font-family: "ELI OpenDyslexic";
  src: url("../../enfinlire-caa/assets/fonts/OpenDyslexic-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "ELI OpenDyslexic";
  src: url("../../enfinlire-caa/assets/fonts/OpenDyslexic-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
.eli-live-scope,
.eli-device-stage {
  /* Palette officielle EnfinLire. */
  --eli-cream: #FFF6DC;
  --eli-yellow: #FDC71B;
  --eli-turquoise: #12C6BA;
  --eli-navy: #113258;
  --eli-blue: #17A2F2;
  --eli-line: rgba(17, 50, 88, .15);
  --eli-menu-size: 17px;
  --eli-submenu-size: 15px;
  --eli-gap: 14px;
  --eli-logo-height: 52px;
  --eli-header-height: 72px;
  font-family: "ELI OpenDyslexic", "OpenDyslexicLocal", "OpenDyslexic", Arial, sans-serif;
  color: var(--eli-navy);
}
.eli-live-scope {
  width: 100%;
  container-type: inline-size;
  position: relative;
  z-index: 30;
}
.eli-live-scope *, .eli-live-scope *::before, .eli-live-scope *::after,
.eli-device-stage .eli-header *, .eli-device-stage .eli-header *::before, .eli-device-stage .eli-header *::after { box-sizing: border-box; }
.eli-live-scope [hidden], .eli-device-stage .eli-header [hidden] { display: none !important; }
.eli-live-scope :focus-visible, .eli-device-stage .eli-header :focus-visible {
  outline: 3px solid var(--eli-blue);
  outline-offset: 2px;
}
.eli-header {
  position: relative;
  z-index: 20;
  background: #fff;
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid var(--eli-line);
  box-shadow: 0 2px 9px rgba(17, 50, 88, .06);
}
.eli-live-scope .eli-header { border-radius: 0; }
.eli-header-inner {
  margin: 0 auto;
  min-height: var(--eli-header-height);
  padding: 0 clamp(12px, 2vw, 30px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}
.eli-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  text-decoration: none;
}
.eli-brand-img { display: block; max-width: 210px; max-height: var(--eli-logo-height); width: auto; height: auto; object-fit: contain; }
.eli-brand-text { font-size: 24px; font-weight: 700; line-height: 1; color: var(--eli-yellow); }
.eli-nav { min-width: 0; flex: 1 1 auto; }
.eli-nav[hidden] { display: none !important; }
.eli-menu-level {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--eli-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}
.eli-menu-level li { list-style: none; }
.eli-menu-item { position: relative; min-width: 0; }
.eli-menu-entry { display: flex; align-items: center; white-space: nowrap; position: relative; }
/* Toutes les rubriques principales utilisent exactement la même police et la même graisse.
   Le lien parent d'un sous-menu ne reçoit aucune exception typographique. */
.eli-header .eli-menu-link {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--eli-navy);
  font-family: "ELI OpenDyslexic", "OpenDyslexicLocal", "OpenDyslexic", Arial, sans-serif;
  font-size: var(--eli-menu-size);
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
/* Parent de menu = commande, jamais un lien vers une ancienne page Elementor.
   Même typographie et même état au survol que les autres rubriques. */
.eli-header .eli-menu-parent-trigger {
  appearance: none;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}
.eli-sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 38px;
  margin-left: 1px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--eli-navy);
  font-family: inherit;
  cursor: pointer;
}
.eli-sub-toggle:hover { background: transparent; color: var(--eli-navy); }
.eli-chevron {
  height: 8px;
  width: 8px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s;
}
.eli-sub-toggle[aria-expanded="true"] .eli-chevron { transform: translateY(2px) rotate(225deg); }
/* État de navigation sur PC uniquement : surbrillance EnfinLire, sans ancien trait.
   Le jaune plein indique la page active ; le crème distingue le survol / l'ouverture.
   Le halo extérieur est purement visuel : il n'agrandit pas le menu. */
@container (min-width: 1321px) {
  .eli-nav > .eli-menu-level > .eli-menu-item > .eli-menu-entry {
    border-radius: 4px;
    transition: background-color .15s ease, box-shadow .15s ease;
  }
  .eli-nav > .eli-menu-level > .eli-menu-item:is(.eli-is-current, .eli-is-current-section) > .eli-menu-entry {
    background: var(--eli-yellow);
    box-shadow: 0 0 0 5px var(--eli-yellow);
  }
  @media (hover: hover) and (pointer: fine) {
    .eli-nav > .eli-menu-level > .eli-menu-item:not(.eli-is-current, .eli-is-current-section):hover > .eli-menu-entry {
      background: var(--eli-cream);
      box-shadow: 0 0 0 5px var(--eli-cream);
    }
  }
  .eli-nav > .eli-menu-level > .eli-menu-item:not(.eli-is-current, .eli-is-current-section):focus-within > .eli-menu-entry,
  .eli-nav > .eli-menu-level > .eli-menu-item:not(.eli-is-current, .eli-is-current-section):has(> .eli-menu-entry .eli-sub-toggle[aria-expanded="true"]) > .eli-menu-entry {
    background: var(--eli-cream);
    box-shadow: 0 0 0 5px var(--eli-cream);
  }
  .eli-header .eli-submenu .eli-menu-item.eli-is-current > .eli-menu-entry > .eli-menu-link {
    background: var(--eli-yellow);
    color: var(--eli-navy);
  }
  .eli-header .eli-account.eli-is-current {
    background: var(--eli-yellow);
  }
}
.eli-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 245px;
  max-width: 320px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--eli-line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(17, 50, 88, .16);
}
.eli-submenu[hidden] { display: none !important; }
.eli-submenu .eli-menu-level { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
.eli-submenu .eli-menu-entry { justify-content: space-between; }
/* Sous-menu : même graisse OpenDyslexic, taille volontairement inférieure (15px). */
.eli-header .eli-submenu .eli-menu-link {
  display: flex;
  white-space: normal;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: var(--eli-submenu-size);
  line-height: 1.35;
}
.eli-header .eli-submenu .eli-menu-link:hover,
.eli-header .eli-submenu .eli-menu-link:focus-visible { background: var(--eli-cream); }
.eli-submenu .eli-submenu { top: 0; left: 100%; }
.eli-header-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.eli-header .eli-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid var(--eli-yellow);
  border-radius: 999px;
  background: #fff;
  color: var(--eli-navy);
  font-family: "ELI OpenDyslexic", "OpenDyslexicLocal", "OpenDyslexic", Arial, sans-serif;
  font-size: var(--eli-menu-size);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.eli-header .eli-account:hover, .eli-header .eli-account:focus-visible { background: var(--eli-cream); }
.eli-mobile-toggle { display: none; }
.eli-menu-missing { font-size: 13px; color: var(--eli-navy); text-align: center; }
@container (max-width: 1320px) {
  .eli-header-inner { min-height: 62px; gap: 12px; }
  .eli-brand-img { max-height: min(var(--eli-logo-height), 42px); max-width: 145px; }
  .eli-brand-text { font-size: 22px; }
  .eli-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%; width: 100%;
    max-height: calc(100dvh - 65px);
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid var(--eli-line);
    box-shadow: 0 12px 18px rgba(17, 50, 88, .15);
    padding: 12px 16px 20px;
    overscroll-behavior: contain;
  }
  .eli-nav.is-open { display: block; }
  .eli-nav > .eli-menu-level { max-width: 850px; margin: 0 auto; display: flex; flex-direction: column; gap: 2px; align-items: stretch; }
  .eli-menu-item { width: 100%; }
  .eli-menu-entry { white-space: normal; justify-content: space-between; }
  .eli-header .eli-menu-link { flex: 1; min-width: 0; min-height: 46px; padding: 10px 8px; white-space: normal; }
  .eli-sub-toggle { flex: 0 0 44px; min-height: 44px; width: 44px; }
  .eli-submenu { position: static; min-width: 0; max-width: none; width: 100%; box-shadow: none; border: 0; border-radius: 0; border-left: 2px solid var(--eli-yellow); margin: 0 0 6px 11px; padding: 0 0 0 9px; }
  .eli-header .eli-submenu .eli-menu-link { padding-left: 8px; min-height: 42px; font-size: var(--eli-submenu-size); }
  .eli-header-actions { margin-left: auto; }
  .eli-mobile-toggle { border: 1px solid var(--eli-line); background: #fff; border-radius: 9px; width: 43px; height: 43px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
  .eli-burger { width: 19px; display: flex; flex-direction: column; gap: 4px; }
  .eli-burger span { display: block; height: 2px; background: var(--eli-navy); width: 100%; border-radius: 99px; }
  .eli-mobile-toggle[aria-expanded="true"] .eli-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .eli-mobile-toggle[aria-expanded="true"] .eli-burger span:nth-child(2) { opacity: 0; }
  .eli-mobile-toggle[aria-expanded="true"] .eli-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@container (max-width: 560px) {
  .eli-header-inner { padding: 0 12px; min-height: 59px; }
  .eli-header .eli-account { width: 39px; min-height: 39px; border-radius: 9px; padding: 0; }
  .eli-account span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .eli-brand-img { max-width: 132px; max-height: min(var(--eli-logo-height), 39px); }
  .eli-brand-text { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .eli-header * { transition: none; } }
.eli-live-scope .eli-header-inner { width: 100%; max-width: none; }
.eli-live-scope .eli-nav, .eli-live-scope .eli-submenu { z-index: 32; }
/* Contrôle administrateur pendant la simulation. */
#wpadminbar #wp-admin-bar-eli-interface-test-mode > .ab-item { font-weight: 600; color: #FFF6DC; }
#wpadminbar #wp-admin-bar-eli-interface-test-mode:hover > .ab-item { color: #fff; }
