/* =========================================================
   LA PIEUVRE — EN-TETE
   Cotes reprises de la maquette Figma (frame Home 1440px)
   Barre : x 55 / y 34 / 1330 x 58 / radius 50
   Logo  : 144.26 x 41   |   Nav : Montserrat 18px, gap 42
   ========================================================= */

.lp-header,
.lp-header * { box-sizing: border-box; }

.lp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: 34px;
  font-family: var(--font-texte);
}

.lp-header__bar {
  width: calc(100% - 110px);
  height: 58px;
  margin: 0 auto;
  padding: 0 40.5px 0 34.5px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transition: box-shadow .25s ease;
}

/* Home : barre blanche | Pages interieures : barre jaune */
.lp-header--home .lp-header__bar  { background: var(--blanc); }
/* Fiches cas client : barre blanche. */
.lp-header--blanc .lp-header__bar { background: var(--blanc); }

/* Pages interieures : meme gabarit de barre que l'accueil, seule la couleur change. */
.lp-header--inner .lp-header__bar { background: var(--jaune); }

.lp-header.is-scrolled .lp-header__bar {
  box-shadow: 0 4px 20px rgba(27, 41, 88, .12);
}

/* ---------- Logo ---------- */
.lp-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.lp-header__brand img,
.lp-header__brand .custom-logo {
  display: block;
  width: auto;
  height: 41px;
  max-height: 41px;
}
/* Repli tant qu'aucun logo n'est charge dans WordPress */
.lp-header__nom {
  display: block;
  font-family: var(--font-titre);
  font-size: 22px;
  line-height: 41px;
  color: var(--marine);
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Navigation ---------- */
.lp-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 42px;
}
.lp-nav__list li { margin: 0; }
.lp-nav__list a {
  position: relative;
  display: inline-block;
  font-family: var(--font-texte);
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  color: var(--marine);
  text-decoration: none;
  white-space: nowrap;
}
.lp-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--jaune);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s ease;
}
.lp-header--inner .lp-nav__list a::after { background: var(--marine); }
.lp-nav__list a:hover::after,
.lp-nav__list a:focus-visible::after,
.lp-nav__list .current-menu-item > a::after,
.lp-nav__list .current_page_item > a::after,
.lp-nav__list .current-menu-ancestor > a::after { transform: scaleX(1); }


/* ---------- Sous-menus deroulants ---------- */
.lp-nav__list li { position: relative; }

/* Petit chevron sur les entrees qui ont un sous-menu */
.lp-nav__list .menu-item-has-children > a {
  padding-right: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B2958' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right center / 10px no-repeat;
}

.lp-nav__list .sub-menu {
  position: absolute;
  top: 100%;
  left: -24px;
  min-width: 268px;
  margin-top: 18px;
  padding: 12px 0;
  list-style: none;
  background: var(--blanc);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(27, 41, 88, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 20;
}
/* Passerelle invisible : le menu ne se ferme pas quand la souris descend. */
.lp-nav__list .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}
.lp-nav__list li:hover > .sub-menu,
.lp-nav__list li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.lp-nav__list .sub-menu li { width: 100%; }
.lp-nav__list .sub-menu a {
  display: block;
  padding: 11px 24px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--marine);
  background: none;
  white-space: normal;
  transition: background .18s ease;
}
.lp-nav__list .sub-menu a::after { display: none; }
.lp-nav__list .sub-menu a:hover,
.lp-nav__list .sub-menu a:focus-visible { background: rgba(254, 202, 1, .28); }
/* ---------- Bouton burger ---------- */
.lp-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.lp-burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--marine);
  transition: transform .22s ease, opacity .22s ease;
}
.lp-header.is-open .lp-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lp-header.is-open .lp-burger span:nth-child(2) { opacity: 0; }
.lp-header.is-open .lp-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Ecrans intermediaires ---------- */
@media (max-width: 1240px) {
  .lp-header__bar {
    width: calc(100% - 46px);
    padding: 0 24px;
  }
  .lp-nav__list { gap: 26px; }
  .lp-nav__list a { font-size: 16px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 940px) {
  .lp-header { padding-top: 16px; }
  .lp-header__bar {
    position: relative;
    width: calc(100% - 32px);
    padding: 0 16px;
  }
  .lp-burger { display: flex; }

  .lp-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    padding: 12px 24px 20px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(27, 41, 88, .14);
  }
  .lp-header.is-open .lp-nav { display: block; }
  .lp-header--home .lp-nav,
  .lp-header--blanc .lp-nav { background: var(--blanc); }
  .lp-header--inner .lp-nav { background: var(--jaune); }

  .lp-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .lp-nav__list li { width: 100%; }
  .lp-nav__list a {
    display: block;
    width: 100%;
    padding: 12px 0;
  }
  .lp-nav__list a::after { display: none; }
  .lp-nav__list .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    margin: 0;
    padding: 0 0 8px 18px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
  .lp-nav__list .sub-menu::before { display: none; }
  .lp-nav__list .sub-menu a { padding: 8px 0; }

  .lp-header__nom { font-size: 18px; }
}

/* ---------- Barre d'admin WordPress ---------- */
.admin-bar .lp-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .lp-header { top: 46px; }
}

/* ---------- Accessibilite ---------- */
.lp-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--marine);
  color: var(--blanc);
  font-family: var(--font-texte);
  font-size: 14px;
}
.lp-skip-link:focus { left: 0; }

.lp-header .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
