/**
 * BienHabillé - Header Mobile CSS
 * 
 * Navigation par panneaux style Celio
 */

/* ============================================== */
/* HIDE ON DESKTOP */
/* ============================================== */
.bh-header-mobile { display: none; }

@media (max-width: 991px) {
    .bh-header-mobile { display: block; }
}

/* ============================================== */
/* TOPBAR MOBILE */
/* ============================================== */
.bhm-topbar {
    overflow: hidden;
    padding: 8px 0;
    font-size: 12px;
}

.bhm-topbar__scroll {
    display: flex;
    width: max-content;
    animation: bhm-scroll 20s linear infinite;
}

.bhm-topbar__scroll span {
    white-space: nowrap;
    padding: 0 40px;
}

@keyframes bhm-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================== */
/* LOGO MOBILE */
/* ============================================== */
.bhm-logo {
    padding: 16px 0;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.bhm-logo a { display: inline-block; text-decoration: none; }
.bhm-logo__img { max-height: 36px; width: auto; }
.bhm-logo__text { font-size: 22px; font-weight: 400; letter-spacing: 0.15em; color: #1d2327; }

/* ============================================== */
/* MAIN BAR MOBILE */
/* ============================================== */
.bhm-bar {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.bhm-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bhm-bar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hamburger */
.bhm-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.bhm-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1d2327;
    transition: all 0.3s;
}

.bhm-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bhm-hamburger.is-active span:nth-child(2) { opacity: 0; }
.bhm-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HOMME */
.bhm-brand { display: flex; flex-direction: column; text-decoration: none; }
.bhm-brand strong { font-size: 16px; font-weight: 700; color: #1d2327; }
.bhm-brand span { font-size: 11px; color: #6b7280; }

/* Icons */
.bhm-bar__right { display: flex; align-items: center; gap: 4px; }

.bhm-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #1d2327;
    text-decoration: none;
}

.bhm-icon__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #dc2626;
    border-radius: 50%;
}

.bhm-icon__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    border-radius: 100px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.bhm-icon__badge.is-visible { opacity: 1; transform: scale(1); }

/* ============================================== */
/* SEARCH BAR MOBILE */
/* ============================================== */
.bhm-search {
    padding: 12px 0 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bhm-search__form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 100px;
    padding: 0 16px;
    height: 48px;
}

.bhm-search__form svg { color: #9ca3af; margin-right: 12px; flex-shrink: 0; }
.bhm-search__form input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #1d2327;
    outline: none;
}
.bhm-search__form input::placeholder { color: #9ca3af; }

/* ============================================== */
/* CONTAINER */
/* ============================================== */
@media (max-width: 991px) {
    .bh-container { padding: 0 16px; }
}

/* ============================================== */
/* OVERLAY */
/* ============================================== */
.bhm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
    cursor: pointer;
}

.bhm-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ============================================== */
/* MOBILE MENU CONTAINER */
/* ============================================== */
.bhm-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 60px);
    max-width: 380px;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow: hidden;
}

.bhm-menu.is-open {
    transform: translateX(0);
}

/* ============================================== */
/* PANELS CONTAINER */
/* ============================================== */
.bhm-panels {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ============================================== */
/* PANEL */
/* ============================================== */
.bhm-panel {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1;
}

/* Panel principal (panel 0) */
.bhm-panel[data-panel="0"] {
    transform: translateX(0);
    z-index: 2;
}

/* Panel actif */
.bhm-panel.is-active {
    transform: translateX(0);
    z-index: 10;
}

/* Panel qui sort (vers la gauche) */
.bhm-panel.is-hidden-left {
    transform: translateX(-30%);
    z-index: 5;
}

/* ============================================== */
/* PANEL HEADER */
/* ============================================== */
.bhm-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fff;
    min-height: 60px;
}

.bhm-panel__brand { display: flex; flex-direction: column; }
.bhm-panel__brand strong { font-size: 18px; color: #1d2327; font-weight: 700; }
.bhm-panel__brand span { font-size: 12px; color: #6b7280; }

.bhm-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #1d2327;
    cursor: pointer;
}

/* Header avec retour */
.bhm-panel__header--back {
    justify-content: space-between;
}

.bhm-panel__back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: transparent;
    border: none;
    font-size: 15px;
    color: #1d2327;
    cursor: pointer;
}

.bhm-panel__back svg { color: #1d2327; }

/* ============================================== */
/* PANEL TITLE */
/* ============================================== */
.bhm-panel__title {
    padding: 24px 20px 16px;
    flex-shrink: 0;
    background: #fff;
}

.bhm-panel__title h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
}

/* ============================================== */
/* PANEL SEARCH */
/* ============================================== */
.bhm-panel__search {
    padding: 12px 20px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fff;
}

.bhm-panel__search form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 100px;
    padding: 0 16px;
    height: 44px;
}

.bhm-panel__search svg { color: #9ca3af; margin-right: 12px; flex-shrink: 0; }
.bhm-panel__search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #1d2327;
    outline: none;
}
.bhm-panel__search input::placeholder { color: #9ca3af; }

/* ============================================== */
/* PANEL NAV */
/* ============================================== */
.bhm-panel__nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

/* ============================================== */
/* LIST */
/* ============================================== */
.bhm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bhm-list__item {
    border-bottom: 1px solid #e5e7eb;
}

.bhm-list__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 400;
    color: #1d2327;
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
}

.bhm-list__link:active { background: #f3f4f6; }
.bhm-list__link--bold { font-weight: 600; }

/* Arrow */
.bhm-list__arrow {
    color: #1d2327;
    flex-shrink: 0;
}

/* Highlight (Soldes) */
.bhm-list__item--highlight .bhm-list__link { color: #dc2626; }
.bhm-list__item--highlight .bhm-list__arrow { color: #dc2626; }

/* Badge */
.bhm-list__badge {
    display: inline-block;
    padding: 3px 10px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
    border-radius: 100px;
    margin-left: auto;
    margin-right: 10px;
}

/* ============================================== */
/* PANEL FOOTER */
/* ============================================== */
.bhm-panel__footer {
    flex-shrink: 0;
    padding: 12px 20px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.bhm-panel__footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 14px;
    color: #1d2327;
    text-decoration: none;
}

.bhm-panel__footer svg { color: #6b7280; flex-shrink: 0; }

/* ============================================== */
/* BODY STATE */
/* ============================================== */
body.mobile-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* ============================================== */
/* HIDE ON DESKTOP */
/* ============================================== */
@media (min-width: 992px) {
    .bhm-menu,
    .bhm-overlay {
        display: none !important;
    }
}