/**
 * Header mobile flottant (style pill) — Lusinage
 * Visible ≤ 991.98px (aligné sur .show-on-mobile)
 */
:root {
  --lx-pill-top: 10px;
  --lx-pill-side: 12px;
  --lx-pill-height: 56px;
  --lx-pill-radius: 18px;
  --lx-pill-ico: 40px;
  --lx-pill-shadow: 0 10px 28px rgba(17, 35, 100, 0.14);
}

@media (max-width: 991.98px) {
  /* Espace réservé : la barre est toujours fixed */
  body.lx-has-bottom-nav {
    padding-top: calc(var(--lx-pill-top) + var(--lx-pill-height) + 8px);
  }

  .header-two.header--sticky {
    position: fixed !important;
    top: var(--lx-pill-top);
    left: var(--lx-pill-side);
    right: var(--lx-pill-side);
    width: auto;
    max-width: none;
    z-index: 1100;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    transition: transform 0.35s ease, opacity 0.28s ease;
    will-change: transform, opacity;
  }

  .header-two.header--sticky.sticky {
    top: var(--lx-pill-top);
    background: transparent !important;
    box-shadow: none !important;
  }

  .header-two.header--sticky.is-pill-hidden {
    transform: translateY(calc(-100% - var(--lx-pill-top) - 8px));
    opacity: 0;
    pointer-events: none;
  }

  .header-two .header-top {
    display: none !important;
  }

  .header-two .main-header {
    display: block;
    background: #fff;
    border-radius: var(--lx-pill-radius);
    box-shadow: var(--lx-pill-shadow);
    border: 1px solid rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }

  .header-two .main-header .content {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    min-height: var(--lx-pill-height);
    padding: 0 8px 0 14px;
    box-sizing: border-box;
  }

  .header-two .main-header .content .header-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-two .main-header .content .header-left a.thumbnail,
  .header-two .main-header .content .header-left a {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    display: inline-flex;
    align-items: center;
  }

  .header-two .main-header .content .header-left a.thumbnail img {
    width: auto !important;
    height: 28px;
    max-width: 140px;
    object-fit: contain;
  }

  .header-two .main-header .content .header-right {
    margin-left: auto;
    padding-right: 0 !important;
    gap: 0;
  }

  .header-two .nav-area {
    display: none !important;
  }

  /* Groupe d’icônes */
  .lx-pill-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .lx-pill-ico {
    box-sizing: border-box;
    width: var(--lx-pill-ico);
    height: var(--lx-pill-ico);
    min-width: var(--lx-pill-ico);
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px;
    background: #f3f6fb !important;
    color: #0f172a;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .lx-pill-ico:hover,
  .lx-pill-ico:focus-visible {
    background: #e8eef8 !important;
    color: #0229d6;
    outline: none;
  }

  .lx-pill-ico:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
  }

  .lx-pill-ico i {
    font-size: 16px;
    line-height: 1;
  }

  .lx-pill-ico__avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
  }

  /* Burger 3 traits (remplace le SVG thème) */
  #menu-btn.lx-pill-ico {
    background: #f3f6fb !important;
  }

  #menu-btn.lx-pill-ico img {
    display: none !important;
  }

  .lx-pill-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 16px;
    height: 14px;
  }

  .lx-pill-burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #0f172a;
  }

  /* Overlay menu ouvert : barre reste au-dessus */
  body.mobile-nav-open .header-two.header--sticky {
    z-index: 2000;
  }
}

@media (min-width: 992px) {
  .lx-pill-actions {
    display: none !important;
  }
}

@media (max-width: 380px) {
  :root {
    --lx-pill-side: 8px;
    --lx-pill-ico: 36px;
    --lx-pill-height: 52px;
  }

  .header-two .main-header .content .header-left a.thumbnail img {
    height: 24px;
    max-width: 120px;
  }
}
