.kwhd {
  --kwhd-gold: #c9a650;
  --kwhd-text: #f2f4ff;
  --kwhd-muted: #b9c0e0;
  --kwhd-h: 84px;
  position: sticky;
  top: 0;
  z-index: 999;
  color: var(--kwhd-text);
  background: rgba(7, 11, 31, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(120, 140, 255, .14);
  font-family: inherit;
  transition: box-shadow .3s ease, background .3s ease;
}
.admin-bar .kwhd { top: 32px; }
@media (max-width: 782px) { .admin-bar .kwhd { top: 46px; } }
@media (max-width: 600px) { .admin-bar .kwhd { top: 0; } }

.kwhd *, .kwhd *::before, .kwhd *::after { box-sizing: border-box; }
.kwhd ul { list-style: none; margin: 0; padding: 0; }
.kwhd a { color: inherit; text-decoration: none; }

.kwhd.is-scrolled { --kwhd-h: 66px; background: rgba(7, 11, 31, .94); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

.kwhd .kwhd__bar {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1240px;
  height: var(--kwhd-h);
  margin: 0 auto;
  padding: 0 24px;
  transition: height .3s ease;
}

/* ---------- Logo ---------- */
.kwhd .kwhd__logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.kwhd .kwhd__badge {
  display: inline-flex;
  width: 46px;
  height: 46px;
  padding: 5px;
  border-radius: 12px;
  background: #f4efe4;
  transition: width .3s ease, height .3s ease;
}
.kwhd.is-scrolled .kwhd__badge { width: 40px; height: 40px; }
.kwhd .kwhd__badge img { width: 100%; height: 100%; object-fit: contain; }
.kwhd .kwhd__name { font-size: 20px; font-weight: 700; letter-spacing: .1em; color: var(--kwhd-text); }

/* ---------- Menu ---------- */
.kwhd .kwhd__nav { margin-left: auto; }
.kwhd .kwhd__nav > ul { display: flex; align-items: center; gap: 6px; }
.kwhd .kwhd__nav > ul > li { position: relative; }
.kwhd .kwhd__nav > ul > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--kwhd-text);
  white-space: nowrap;
  transition: color .2s;
}
.kwhd .kwhd__nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--kwhd-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.kwhd .kwhd__nav > ul > li > a:hover,
.kwhd .kwhd__nav > ul > li > a:focus-visible,
.kwhd .kwhd__nav a.is-current { color: var(--kwhd-gold); }
.kwhd .kwhd__nav > ul > li > a:hover::after,
.kwhd .kwhd__nav > ul > li > a.is-current::after { transform: scaleX(1); }

.kwhd .kwhd__caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.kwhd .kwhd__sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  padding: 8px;
  border-radius: 12px;
  background: #0d1338;
  border: 1px solid rgba(201, 166, 80, .35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.kwhd .kwhd__has-sub:hover .kwhd__sub,
.kwhd .kwhd__has-sub:focus-within .kwhd__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .2s ease, transform .2s ease;
}
.kwhd .kwhd__sub a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--kwhd-text); }
.kwhd .kwhd__sub a:hover, .kwhd .kwhd__sub a:focus-visible, .kwhd .kwhd__sub a.is-current { background: rgba(60, 80, 230, .25); color: var(--kwhd-gold); }

/* ---------- Actions ---------- */
.kwhd .kwhd__actions { display: flex; align-items: center; gap: 16px; flex: none; }
.kwhd .kwhd__phone { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--kwhd-text); white-space: nowrap; }
.kwhd .kwhd__phone:hover { color: var(--kwhd-gold); }
.kwhd .kwhd__phone svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--kwhd-gold);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kwhd .kwhd__cta {
  display: inline-block;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  color: #0b1029;
  background: var(--kwhd-gold);
  border: 2px solid var(--kwhd-gold);
  transition: background .2s, transform .2s;
}
.kwhd .kwhd__cta:hover, .kwhd .kwhd__cta:focus { background: #dcbb66; border-color: #dcbb66; color: #0b1029; transform: translateY(-1px); }

.kwhd .kwhd__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  border: 1px solid rgba(201, 166, 80, .55);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.kwhd .kwhd__toggle span { display: block; height: 2px; background: var(--kwhd-text); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.kwhd .kwhd__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.kwhd .kwhd__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.kwhd .kwhd__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Panneau mobile ---------- */
/* Ancré sous l'en-tête (le flou d'arrière-plan de l'en-tête empêche un position: fixed fiable) */
.kwhd .kwhd__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: calc(100vh - var(--kwhd-h));
  height: calc(100dvh - var(--kwhd-h));
  overflow-y: auto;
  padding: 24px 20px 32px;
  background: #070b1f;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.kwhd .kwhd__panel[hidden] { display: none; }
.kwhd .kwhd__panel li { border-bottom: 1px solid rgba(120, 140, 255, .14); }
.kwhd .kwhd__panel li a { display: block; padding: 16px 4px; font-size: 20px; font-weight: 600; color: var(--kwhd-text); }
.kwhd .kwhd__panel li a.is-current { color: var(--kwhd-gold); }
.kwhd .kwhd__panel-actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.kwhd .kwhd__panel-actions .kwhd__cta { text-align: center; padding: 16px; font-size: 16px; }
.kwhd .kwhd__call {
  display: block;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  border: 2px solid rgba(242, 244, 255, .7);
  color: var(--kwhd-text);
}
html.kwhd-lock, html.kwhd-lock body { overflow: hidden; }

/* ---------- Petit ordinateur : on masque le numéro ---------- */
@media (max-width: 1200px) {
  .kwhd .kwhd__phone span { display: none; }
  .kwhd .kwhd__phone {
    width: 42px;
    height: 42px;
    justify-content: center;
    border: 1px solid rgba(201, 166, 80, .55);
    border-radius: 10px;
  }
}

/* ---------- Tablette et téléphone : menu repliable ---------- */
@media (max-width: 1100px) {
  .kwhd { --kwhd-h: 72px; }
  .kwhd .kwhd__bar { padding: 0 20px; gap: 16px; }
  .kwhd .kwhd__nav { display: none; }
  .kwhd .kwhd__actions { margin-left: auto; gap: 10px; }
  .kwhd .kwhd__toggle { display: inline-flex; }
}
@media (max-width: 600px) {
  .kwhd .kwhd__bar { padding: 0 14px; }
  .kwhd .kwhd__actions > .kwhd__cta { display: none; }
  .kwhd .kwhd__name { font-size: 18px; }
  .kwhd .kwhd__badge { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .kwhd, .kwhd *, .kwhd *::after { transition: none !important; }
}
