/* ═══════════════════════════════════════════════════════════════════════════
   École 6% — Menu CSS — v2.0
   Header unifié sur toutes les pages — Logo image + nav harmonisée
   WCAG 2.1 AA / RGAA 4.1
═══════════════════════════════════════════════════════════════════════════ */

/* ── Wrapper principal ──────────────────────────────────────────────────── */
.e6m-header {
  position:      fixed;
  top:           0;
  left:          0;
  right:         0;
  z-index:       9999;
  background:    #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow:    0 2px 12px rgba(0, 0, 0, .06);
}

/* ── Nav ────────────────────────────────────────────────────────────────── */
.e6m-nav {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  max-width:       1200px;
  margin:          0 auto;
  padding:         0 24px;
  height:          120px;
  gap:             16px;
}

/* ── Logo ───────────────────────────────────────────────────────────────── */
.e6m-home-link {
  display:         inline-flex;
  align-items:     center;
  gap:             10px;
  text-decoration: none !important;
  color:           #0f172a !important;
  font-size:       1.1rem;
  font-weight:     700;
  white-space:     nowrap;
  flex-shrink:     0;
  min-height:      44px;
  padding:         0 6px;
  border-radius:   8px;
}
.e6m-home-link:focus-visible {
  outline:        3px solid #0ea5e9 !important;
  outline-offset: 3px !important;
  border-radius:  8px;
}
.e6m-logo-img {
  width:         100px;
  height:        100px;
  object-fit:    contain;
  border-radius: 8px;
  flex-shrink:   0;
}
.e6m-logo-fallback {
  display:     inline-flex;
  align-items: center;
}
.e6m-hex {
  font-size:  1.4rem;
  color:      #0ea5e9;
  line-height: 1;
}
.e6m-logo-text        { color: #0f172a; }
.e6m-logo-text strong { color: #0ea5e9; }

/* ── Liste de liens ─────────────────────────────────────────────────────── */
.e6m-links {
  display:     flex;
  align-items: center;
  gap:         8px;
  list-style:  none !important;
  margin:      0 !important;
  padding:     0 !important;
  flex-wrap:   nowrap;
}
.e6m-links li { margin: 0 !important; }

.e6m-links a {
  display:         inline-flex;
  align-items:     center;
  min-height:      44px;
  padding:         0 20px;
  font-size:       0.88rem;
  font-weight:     500;
  color:           #1e293b !important;
  text-decoration: none !important;
  white-space:     nowrap;
  border-radius:   8px;
  transition:      background .15s, color .15s;
}
.e6m-links a:hover {
  background: rgba(14, 165, 233, .08) !important;
  color:      #0369a1 !important;
}

/* Lien actif */
.e6m-links a.e6m-active,
.e6m-links a[aria-current="page"] {
  background:  rgba(3, 105, 161, .10) !important;
  color:       #0369a1 !important;
  font-weight: 600 !important;
}

/* ── CTA génériques ─────────────────────────────────────────────────────── */
.e6m-links a.e6m-cta {
  font-weight:     700 !important;
  padding:         0 24px !important;
  margin-left:     6px;
  border-radius:   50px !important;
  min-height:      48px !important;
  font-size:       0.95rem !important;
  text-decoration: none !important;
  transition:      background .15s, transform .12s;
  white-space:     nowrap;
  letter-spacing:  .01em;
}

/* CTA Postuler — fond sombre */
.e6m-links a.e6m-cta.e6m-cta-postuler,
.e6m-links a.e6m-cta.e6m-cta-postuler:link,
.e6m-links a.e6m-cta.e6m-cta-postuler:visited {
  background: #0f172a !important;
  color:      #ffffff !important;
}
.e6m-links a.e6m-cta.e6m-cta-postuler:hover,
.e6m-links a.e6m-cta.e6m-cta-postuler:focus {
  background: #1e293b !important;
  color:      #ffffff !important;
  transform:  translateY(-1px);
}

/* CTA Recruter — fond bleu */
.e6m-links a.e6m-cta.e6m-cta-recruter,
.e6m-links a.e6m-cta.e6m-cta-recruter:link,
.e6m-links a.e6m-cta.e6m-cta-recruter:visited {
  background: #0369a1 !important;
  color:      #ffffff !important;
  gap:        10px;
}
.e6m-links a.e6m-cta.e6m-cta-recruter:hover,
.e6m-links a.e6m-cta.e6m-cta-recruter:focus {
  background: #0284c7 !important;
  color:      #ffffff !important;
  transform:  translateY(-1px);
}
.e6m-links a.e6m-cta.e6m-cta-recruter span { transition: transform .15s; }
.e6m-links a.e6m-cta.e6m-cta-recruter:hover span { transform: translateX(3px); }

/* Focus clavier */
.e6m-links a:focus-visible {
  outline:        3px solid #0ea5e9 !important;
  outline-offset: 2px !important;
  border-radius:  8px !important;
}

/* ── Burger mobile ──────────────────────────────────────────────────────── */
.e6m-burger {
  display:         none;
  flex-direction:  column;
  justify-content: center;
  align-items:     center;
  gap:             5px;
  width:           44px;
  height:          44px;
  background:      none;
  border:          2px solid #e2e8f0;
  border-radius:   8px;
  cursor:          pointer;
  padding:         8px;
  flex-shrink:     0;
}
.e6m-burger span {
  display:       block;
  width:         20px;
  height:        2px;
  background:    #0f172a;
  border-radius: 2px;
  transition:    transform .2s, opacity .2s;
}
.e6m-burger:focus-visible {
  outline:        3px solid #0ea5e9 !important;
  outline-offset: 2px !important;
}
.e6m-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.e6m-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.e6m-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .e6m-links a { padding: 0 10px; font-size: .84rem; }
}

@media (max-width: 768px) {
  .e6m-burger { display: flex; }

  .e6m-links {
    display:        none;
    position:       fixed;
    top:            120px;
    left:           0;
    right:          0;
    background:     #ffffff;
    border-bottom:  1px solid #e2e8f0;
    box-shadow:     0 8px 24px rgba(0, 0, 0, .10);
    flex-direction: column;
    align-items:    stretch;
    padding:        8px 16px 16px;
    gap:            2px;
    z-index:        9998;
  }
  .e6m-links.is-open { display: flex; }

  .e6m-links a {
    width:     100%;
    padding:   12px 16px !important;
    font-size: .93rem !important;
  }
  .e6m-links a.e6m-cta,
  .e6m-cta-recruter,
  .e6m-cta-postuler {
    margin-left: 0 !important;
    margin-top:  4px;
    width:       100%;
    justify-content: center;
  }
}

/* ── Mode contraste forcé (RGAA) ────────────────────────────────────────── */
@media (forced-colors: active) {
  .e6m-header       { border-bottom: 1px solid ButtonText; background: Canvas; }
  .e6m-links a      { color: LinkText !important; forced-color-adjust: none; }
  .e6m-active       { background: Highlight !important; color: HighlightText !important; }
  .e6m-cta          { background: ButtonFace !important; color: ButtonText !important; }
  .e6m-burger span  { background: ButtonText; }
  .e6m-logo-img     { forced-color-adjust: none; }
}

/* ── Réduction de mouvement ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .e6m-links a,
  .e6m-burger span { transition: none; }
}

/* CTA Contact (pages secondaires) — sans flèche */
.e6m-links a.e6m-cta.e6m-cta-contact,
.e6m-links a.e6m-cta.e6m-cta-contact:link,
.e6m-links a.e6m-cta.e6m-cta-contact:visited {
  background:  #0f172a !important;
  color:       #ffffff !important;
  font-weight: 600 !important;
}
.e6m-links a.e6m-cta.e6m-cta-contact:hover,
.e6m-links a.e6m-cta.e6m-cta-contact:focus {
  background: #1e293b !important;
  color:      #ffffff !important;
  transform:  translateY(-1px);
}
