:root {
    --lsp-cat-bordeaux: #74374d;
    --lsp-cat-bordeaux-dark: #4d2434;
    --lsp-cat-cream: #fffaf6;
    --lsp-cat-beige: #fbf6f3;
    --lsp-cat-blush: #efe2dd;
    --lsp-cat-gold: #c8a96b;
    --lsp-cat-text: #38262d;
}

body.lsp-cat-open {
    overflow: hidden;
}

/* Bouton ajouté au menu Astra. */
.lsp-cat-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    margin: 0;
    padding: 10px 16px;
    color: #fff !important;
    background: var(--lsp-cat-bordeaux) !important;
    border: 1px solid var(--lsp-cat-bordeaux) !important;
    border-radius: 14px !important;
    box-shadow: 0 7px 18px rgba(116, 55, 77, 0.16);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.lsp-cat-trigger.is-mounted {
    display: inline-flex;
}

.lsp-cat-trigger:hover,
.lsp-cat-trigger:focus-visible,
.lsp-cat-trigger[aria-expanded="true"] {
    color: #fff !important;
    background: var(--lsp-cat-bordeaux-dark) !important;
    border-color: var(--lsp-cat-bordeaux-dark) !important;
    box-shadow: 0 9px 22px rgba(77, 36, 52, 0.22);
}

.lsp-cat-trigger:focus-visible {
    outline: 2px solid var(--lsp-cat-gold) !important;
    outline-offset: 3px;
}

.lsp-cat-trigger__icon {
    display: inline-flex;
    flex: 0 0 20px;
    width: 20px;
    height: 16px;
    flex-direction: column;
    justify-content: space-between;
}

.lsp-cat-trigger__icon i {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0;
    background: currentColor;
    border-radius: 99px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.lsp-cat-trigger[aria-expanded="true"] .lsp-cat-trigger__icon i:first-child {
    transform: translateY(7px) rotate(45deg);
}

.lsp-cat-trigger[aria-expanded="true"] .lsp-cat-trigger__icon i:nth-child(2) {
    opacity: 0;
}

.lsp-cat-trigger[aria-expanded="true"] .lsp-cat-trigger__icon i:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

/* Placement ordinateur : à gauche du menu existant, sans le remplacer. */
@media (min-width: 922px) {
    #ast-desktop-header .site-below-header-wrap > .ast-builder-grid-row,
    #ast-desktop-header .site-header-below-section-center {
        width: 100% !important;
    }

    #ast-desktop-header .site-header-below-section-center {
        position: relative;
        justify-content: center !important;
    }

    #ast-desktop-header .lsp-cat-trigger {
        position: absolute;
        top: 50%;
        left: 0;
        z-index: 3;
        transform: translateY(-50%);
    }

    #ast-desktop-header .lsp-cat-trigger:hover,
    #ast-desktop-header .lsp-cat-trigger:focus-visible,
    #ast-desktop-header .lsp-cat-trigger[aria-expanded="true"] {
        transform: translateY(calc(-50% - 1px));
    }
}

/* Sur les écrans intermédiaires, l’icône seule évite de serrer le menu. */
@media (min-width: 922px) and (max-width: 1319px) {
    #ast-desktop-header .lsp-cat-trigger {
        width: 44px;
        min-width: 44px;
        padding: 9px;
    }

    #ast-desktop-header .lsp-cat-trigger__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

/* Panneau et fond assombri. */
.lsp-cat-drawer {
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease;
}

.lsp-cat-drawer[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.lsp-cat-drawer__backdrop {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(38, 24, 30, 0.58) !important;
    border: 0 !important;
    border-radius: 0 !important;
    cursor: default;
}

.lsp-cat-panel {
    position: relative;
    display: flex;
    width: min(460px, calc(100vw - 28px));
    height: 100%;
    max-height: 100dvh;
    flex-direction: column;
    overflow: hidden;
    color: var(--lsp-cat-text);
    background: var(--lsp-cat-cream);
    box-shadow: 22px 0 55px rgba(29, 14, 20, 0.24);
    transform: translateX(-104%);
    transition: transform 0.3s cubic-bezier(0.22, 0.75, 0.28, 1);
}

.lsp-cat-drawer[aria-hidden="false"] .lsp-cat-panel {
    transform: translateX(0);
}

.lsp-cat-panel__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 108px;
    padding: 22px 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--lsp-cat-bordeaux-dark), var(--lsp-cat-bordeaux));
    border-bottom: 2px solid var(--lsp-cat-gold);
}

.lsp-cat-panel__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #efd9ad;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.lsp-cat-panel__header h2 {
    margin: 0 !important;
    color: #fff !important;
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: 27px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
}

.lsp-cat-close {
    position: relative;
    flex: 0 0 44px;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    border-radius: 50% !important;
    cursor: pointer;
}

.lsp-cat-close:hover,
.lsp-cat-close:focus-visible {
    background: rgba(255, 255, 255, 0.19) !important;
}

.lsp-cat-close span::before,
.lsp-cat-close span::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 11px;
    width: 21px;
    height: 2px;
    background: currentColor;
    border-radius: 99px;
}

.lsp-cat-close span::before {
    transform: rotate(45deg);
}

.lsp-cat-close span::after {
    transform: rotate(-45deg);
}

.lsp-cat-panel__body {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--lsp-cat-bordeaux) var(--lsp-cat-blush);
    scrollbar-width: thin;
}

.lsp-cat-panel__body::-webkit-scrollbar {
    width: 8px;
}

.lsp-cat-panel__body::-webkit-scrollbar-track {
    background: var(--lsp-cat-blush);
}

.lsp-cat-panel__body::-webkit-scrollbar-thumb {
    background: var(--lsp-cat-bordeaux);
    border-radius: 99px;
}

.lsp-cat-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 16px;
    background: var(--lsp-cat-blush);
    border-bottom: 1px solid rgba(116, 55, 77, 0.10);
}

.lsp-cat-quick a {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: var(--lsp-cat-bordeaux-dark) !important;
    background: var(--lsp-cat-cream);
    border: 1px solid rgba(116, 55, 77, 0.16);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none !important;
}

.lsp-cat-quick a:hover,
.lsp-cat-quick a:focus-visible {
    color: #fff !important;
    background: var(--lsp-cat-bordeaux);
}

.lsp-cat-search {
    position: relative;
    display: block;
    margin: 16px;
}

.lsp-cat-search input[type="search"] {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 17px 0 44px !important;
    color: var(--lsp-cat-text) !important;
    background: #fff !important;
    border: 1px solid rgba(116, 55, 77, 0.22) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-size: 14px;
}

.lsp-cat-search input[type="search"]:focus {
    border-color: var(--lsp-cat-bordeaux) !important;
    outline: 2px solid rgba(116, 55, 77, 0.12) !important;
}

.lsp-cat-search__icon {
    position: absolute;
    top: 14px;
    left: 17px;
    z-index: 2;
    width: 14px;
    height: 14px;
    border: 2px solid var(--lsp-cat-bordeaux);
    border-radius: 50%;
    pointer-events: none;
}

.lsp-cat-search__icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -3px;
    width: 7px;
    height: 2px;
    background: var(--lsp-cat-bordeaux);
    border-radius: 99px;
    transform: rotate(45deg);
}

.lsp-cat-no-results {
    margin: 20px 22px !important;
    color: #76666c;
    font-size: 14px;
    text-align: center;
}

.lsp-cat-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.lsp-cat-list--root {
    border-top: 1px solid rgba(116, 55, 77, 0.10);
}

.lsp-cat-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.lsp-cat-item[hidden],
.lsp-cat-children[hidden],
.lsp-cat-no-results[hidden] {
    display: none !important;
}

.lsp-cat-row {
    display: flex !important;
    width: 100% !important;
    min-height: 62px;
    align-items: center;
    gap: 13px;
    margin: 0 !important;
    padding: 9px 18px !important;
    color: var(--lsp-cat-text) !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(116, 55, 77, 0.12) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    text-align: left;
    text-decoration: none !important;
    text-transform: none;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.lsp-cat-row:hover,
.lsp-cat-row:focus-visible,
.lsp-cat-toggle[aria-expanded="true"] {
    color: var(--lsp-cat-bordeaux) !important;
    background: var(--lsp-cat-beige) !important;
}

.lsp-cat-row:focus-visible,
.lsp-cat-see-all:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--lsp-cat-gold) !important;
    outline-offset: -3px;
}

.lsp-cat-row__image,
.lsp-cat-row__placeholder {
    flex: 0 0 42px;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    border-radius: 10px;
}

.lsp-cat-row__image {
    object-fit: cover;
}

.lsp-cat-row__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lsp-cat-bordeaux);
    background: linear-gradient(145deg, var(--lsp-cat-blush), #f8eee9);
    border: 1px solid rgba(200, 169, 107, 0.42);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 18px;
    font-weight: 700;
}

.lsp-cat-row__name {
    flex: 1 1 auto;
}

.lsp-cat-chevron {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    margin-right: 3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}

.lsp-cat-toggle[aria-expanded="true"] .lsp-cat-chevron {
    transform: rotate(45deg) translate(-2px, -2px);
}

.lsp-cat-link-arrow {
    flex: 0 0 auto;
    color: var(--lsp-cat-bordeaux);
    font-size: 19px;
    font-weight: 400;
}

.lsp-cat-children {
    background: var(--lsp-cat-beige);
    border-left: 3px solid var(--lsp-cat-gold);
}

.lsp-cat-see-all {
    display: block;
    padding: 11px 18px 11px 30px;
    color: var(--lsp-cat-bordeaux) !important;
    background: var(--lsp-cat-blush);
    border-bottom: 1px solid rgba(116, 55, 77, 0.10);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.03em;
    text-decoration: none !important;
}

.lsp-cat-see-all:hover {
    color: var(--lsp-cat-bordeaux-dark) !important;
    text-decoration: underline !important;
}

.lsp-cat-item--depth-1 > .lsp-cat-row {
    padding-left: 28px !important;
}

.lsp-cat-item--depth-2 > .lsp-cat-row {
    padding-left: 38px !important;
}

.lsp-cat-item--depth-3 > .lsp-cat-row,
.lsp-cat-item--depth-4 > .lsp-cat-row,
.lsp-cat-item--depth-5 > .lsp-cat-row {
    padding-left: 48px !important;
}

.lsp-cat-item--depth-2 .lsp-cat-row__image,
.lsp-cat-item--depth-2 .lsp-cat-row__placeholder,
.lsp-cat-item--depth-3 .lsp-cat-row__image,
.lsp-cat-item--depth-3 .lsp-cat-row__placeholder,
.lsp-cat-item--depth-4 .lsp-cat-row__image,
.lsp-cat-item--depth-4 .lsp-cat-row__placeholder {
    flex-basis: 36px;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px;
    font-size: 15px;
}

.lsp-cat-panel__footer {
    flex: 0 0 auto;
    padding: 15px 20px 18px;
    color: #fff;
    background: var(--lsp-cat-bordeaux-dark);
    border-top: 2px solid var(--lsp-cat-gold);
}

.lsp-cat-panel__footer p {
    margin: 0 0 7px !important;
    color: #efd9dc;
    font-size: 12px;
}

.lsp-cat-panel__footer a {
    color: #fff !important;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline !important;
    text-decoration-color: var(--lsp-cat-gold) !important;
    text-underline-offset: 4px;
}

/* Bouton pleine largeur sur téléphone, placé sous l’en-tête Astra. */
@media (max-width: 921px) {
    #ast-mobile-header .lsp-cat-trigger {
        position: static;
        width: 100%;
        min-height: 46px;
        padding: 12px 18px;
        border-radius: 0 !important;
        box-shadow: none;
    }

    .lsp-cat-panel {
        width: min(430px, 100vw);
    }
}

@media (max-width: 480px) {
    .lsp-cat-panel {
        width: 100vw;
    }

    .lsp-cat-panel__header {
        min-height: 96px;
        padding: 18px;
    }

    .lsp-cat-panel__header h2 {
        font-size: 24px !important;
    }

    .lsp-cat-quick {
        padding: 11px;
    }

    .lsp-cat-search {
        margin: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lsp-cat-drawer,
    .lsp-cat-panel,
    .lsp-cat-trigger,
    .lsp-cat-trigger__icon i,
    .lsp-cat-chevron {
        transition: none !important;
    }
}

