/* =========================================================
   Trelfortglomvash HEADER (PILL / OVERLAY) — CSS GLOBAL MERGÉ
   Objectifs :
   - Header overlay (pas de bande blanche / pas de padding-top global)
   - CTA visible desktop + mobile (compact sur mobile)
   - Logo plus petit sur mobile
   - Burger : anti bleu Astra + animation croix via aria-expanded
   - Menu mobile : animation d’ouverture via .wd-header.is-open
   ========================================================= */

/* ===== Base header overlay ===== */
.wd-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99999;

  padding: 14px 16px;
  background: transparent;
  box-shadow: none;

  pointer-events: none; /* overlay : clique à travers sauf la pill */
}

.wd-header-inner,
.wd-mobile{
  pointer-events: auto;
}

/* ===== Override Astra / WP liens (évite hover bleus globaux) ===== */
.wd-header a,
.wd-header a:visited{
  color: inherit;
  text-decoration: none;
}

.wd-header .wd-brand,
.wd-header .wd-brand:visited,
.wd-header .wd-brand:hover,
.wd-header .wd-brand:focus{
  color: #0f172a !important;
}

.wd-header .wd-menu > li > a,
.wd-header .wd-menu > li > a:visited{
  color: #0f172a !important;
}

.wd-header .wd-menu > li > a:hover,
.wd-header .wd-menu > li > a:focus{
  color: #2563eb !important;
}

.wd-header .wd-cta,
.wd-header .wd-cta:visited,
.wd-header .wd-cta:hover,
.wd-header .wd-cta:focus{
  color: #fff !important;
}

/* ===== Pill ===== */
.wd-header-inner{
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;

  position: relative;

  display: flex;
  align-items: center;

  padding: 18px 26px;
  border-radius: 999px;

  background: rgba(255,255,255,0);
  border: 1px solid rgba(0,0,0,0);
  box-shadow: none;

  transition: background .25s ease, box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

/* Etat "scroll" : pill flottante blanche */
.wd-header.is-floating .wd-header-inner{
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
  transform: translateY(0);
}

/* petit effet "pop" */
.wd-header.is-enter .wd-header-inner{
  transform: translateY(-6px);
}

/* ===== Logo ===== */
.wd-header .wd-brand img,
.wd-header .custom-logo,
.wd-header .custom-logo-link img{
  height: 40px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain;
}

.wd-brand{
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.wd-brand-text{
  font-weight: 900;
  letter-spacing: .2px;
  color: #0f172a;
}

/* ===== CTA (DESKTOP + MOBILE) ===== */
.wd-cta{
  margin-left: auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  color: #fff;

  background: #2563eb;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(37,99,235,.25);

  transition: transform .15s ease, box-shadow .15s ease;

  position: relative;
  z-index: 2;

  white-space: nowrap;
}

.wd-cta:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37,99,235,.30);
}

/* ===== Menu desktop (centré via absolute) ===== */
.wd-nav{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  white-space: nowrap;
}

.wd-menu{
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-menu > li{
  margin: 0 11px;
}

.wd-menu > li > a{
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  opacity: .90;

  padding: 10px 10px;
  border-radius: 999px;

  position: relative;
  transition: color .18s ease, opacity .18s ease, transform .18s ease;
}

/* underline */
.wd-menu > li > a:after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;

  width: 0;
  height: 2px;
  border-radius: 2px;
  background: #2563eb;

  transform: translateX(-50%);
  transition: width .20s ease;
}

.wd-menu > li > a:hover{
  opacity: 1;
}

.wd-menu > li > a:hover:after{
  width: calc(100% - 18px);
}

.wd-menu > li.current-menu-item > a,
.wd-menu > li.current-menu-ancestor > a{
  color: #2563eb !important;
  opacity: 1;
}

.wd-menu > li.current-menu-item > a:after,
.wd-menu > li.current-menu-ancestor > a:after{
  width: calc(100% - 18px);
}

/* ===== Burger (base) ===== */
.wd-burger{
  display: none;
  margin-left: 10px;

  width: 44px;
  height: 44px;

  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.7);

  position: relative;
  z-index: 2;

  -webkit-tap-highlight-color: transparent;
  outline: none;
  appearance: none;
}

/* FIX ASTRA : supprime focus/active bleus */
.wd-burger,
.wd-burger:focus,
.wd-burger:active,
.wd-burger:focus-visible{
  outline: none !important;
  box-shadow: none !important;
  background: rgba(255,255,255,.7) !important;
}

/* Etat ouvert : feedback léger (pas bleu thème) */
.wd-burger[aria-expanded="true"]{
  background: rgba(37,99,235,.12) !important;
  border-color: rgba(37,99,235,.35) !important;
}

/* Barres + animation */
.wd-burger span{
  display: block;
  height: 2px;
  width: 18px;
  margin: 4px auto;
  border-radius: 2px;

  background: #0f172a !important;
  transition: transform .25s ease, opacity .2s ease, background .2s ease;
}

/* Animation -> croix */
.wd-burger[aria-expanded="true"] span:nth-child(1){
  transform: translateY(6px) rotate(45deg);
}
.wd-burger[aria-expanded="true"] span:nth-child(2){
  opacity: 0;
}
.wd-burger[aria-expanded="true"] span:nth-child(3){
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== Mobile dropdown (anim) =====
   Ouvert via .wd-header.is-open  */
.wd-mobile{
  max-width: 1200px;
  margin: 10px auto 0;

  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
  border-radius: 18px;
  padding: 12px;

  position: relative;
  z-index: 999999;

  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  overflow: hidden;
  transition: max-height .28s ease, opacity .18s ease, transform .18s ease;
}

.wd-header.is-open .wd-mobile{
  max-height: 560px;
  opacity: 1;
  transform: translateY(0);
}

.wd-mobile-menu{
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-mobile-menu a{
  display: block;
  padding: 12px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a !important;
  font-weight: 750;
}

.wd-mobile-menu a:hover{
  background: #f1f5f9;
}

.wd-mobile-cta{
  display: block;
  margin-top: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 850;
  color: #fff !important;
  background: #2563eb;
  padding: 12px 14px;
  border-radius: 14px;
}

/* ===== Responsive (mobile) ===== */
@media (max-width: 980px){
  .wd-nav{ display:none; }       /* menu desktop caché */
  /* IMPORTANT : on NE cache PAS le CTA sur mobile */
  /* .wd-cta{ display:none; }  <-- supprimé */

  .wd-burger{
    display: block;
    margin-left: 0;              /* on gère l’alignement via le CTA */
    flex-shrink: 0;
  }

  .wd-header{
    padding: 10px 12px;
  }

  .wd-header-inner{
    padding: 12px 14px;
    gap: 8px;
  }

  /* LOGO mobile (réduit) */
  .wd-header .wd-brand img,
  .wd-header .custom-logo,
  .wd-header .custom-logo-link img{
    height: 30px !important;
    max-width: 130px !important;
  }

  .wd-brand-text{
    font-size: 18px !important;
    line-height: 1 !important;
  }

  /* CTA mobile compact + place pour burger */
  .wd-cta{
    padding: 8px 12px;
    font-size: 13px;
    margin-left: auto;           /* pousse CTA à droite */
    margin-right: 8px;           /* espace avant burger */
  }

  .wd-mobile{
    margin-top: 8px;
    border-radius: 16px;
  }
}

/* ✅ Header overlay : pas de décalage global */
body{
  padding-top: 0 !important;
  margin-top: 0 !important;
}