/**
 * Catalogue bouteilles — plein écran, glass, scroll lié détail → liste.
 */

.gx-chercher {
    --hub-ink: #0d1b2a;
    --hub-muted: #64748b;
    --hub-accent: #f97316;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: calc(100dvh - 24px);
}

.gx-chercher__chrome {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.gx-chercher__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gx-chercher__back {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(13, 27, 42, 0.12);
    color: var(--hub-ink);
    font-size: 18px;
    text-decoration: none;
}

.gx-chercher__bc {
    flex: 1;
    min-width: 0;
}

.gx-chercher__bc ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-muted);
}

.gx-chercher__bc a {
    color: var(--hub-accent);
    text-decoration: none;
}

.gx-chercher__bc strong {
    color: var(--hub-ink);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 28ch;
    display: inline-block;
    vertical-align: bottom;
}

.gx-chercher__bc-sep { color: #cbd5e1; }

.gx-chercher__bc-product {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.gx-chercher__addr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(249, 115, 22, 0.28);
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-ink);
}

.gx-chercher__addr i { color: var(--hub-accent); flex-shrink: 0; }
.gx-chercher__addr span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gx-chercher__cart {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    margin-left: auto;
    border-radius: 50%;
    background: rgba(13, 27, 42, 0.88);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
}

.gx-chercher__cart span {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--hub-accent);
    font-size: 10px;
    font-weight: 800;
    display: grid;
    place-items: center;
}

/* ——— Search dock (toujours en haut) ——— */
.gx-chercher__search-dock {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 22px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.gx-chercher__eyebrow {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-accent);
}

.gx-chercher__title {
    margin: 0;
    font-size: clamp(24px, 5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--hub-ink);
}

.gx-chercher__title span { color: var(--hub-accent); }

.gx-chercher__field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 6px 8px 6px 12px;
    border-radius: 18px;
    /* fond glass : gx-app-bg.css */
    border: 1.5px solid rgba(249, 115, 22, 0.2);
    box-sizing: border-box;
}

.gx-chercher__field:focus-within {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.16);
}

.gx-chercher__field-ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff7ed, #ffedd5);
    flex-shrink: 0;
}

.gx-chercher__field-ico img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.gx-chercher__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    font-size: 16px;
    font-weight: 800;
    color: var(--hub-ink);
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.gx-chercher__input:focus,
.gx-chercher__input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
}

.gx-chercher__input::placeholder {
    font-weight: 500;
    color: var(--hub-muted);
}

.gx-chercher__clear {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(241, 245, 249, 0.9);
    color: var(--hub-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.gx-chercher__field-go {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hub-ink);
    color: #fff;
    flex-shrink: 0;
    font-size: 14px;
}

.gx-chercher__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gx-chercher__chip {
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.55);
    color: var(--hub-ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gx-chercher__chip.is-active {
    background: var(--hub-accent);
    border-color: var(--hub-accent);
    color: #fff;
}

/* ——— Workspace (pas de conteneur blanc) ——— */
.gx-chercher__workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.gx-chercher__catalog,
.gx-chercher__pane {
    min-width: 0;
}

.gx-chercher__section {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hub-accent);
}

.gx-chercher__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gx-chercher__card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 88px;
    padding: 12px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.gx-chercher__card.is-selected {
    border-color: rgba(249, 115, 22, 0.55) !important;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.22), 0 12px 28px rgba(234, 88, 12, 0.12);
}

.gx-chercher__card-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255, 247, 237, 0.9), rgba(255, 237, 213, 0.7) 55%, rgba(255, 255, 255, 0.5));
    overflow: hidden;
}

.gx-chercher__card-visual img {
    max-width: 86%;
    max-height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(13, 27, 42, 0.16));
}

.gx-chercher__card-visual i {
    font-size: 28px;
    color: var(--hub-accent);
}

.gx-chercher__card-wt {
    position: absolute;
    left: 4px;
    bottom: 4px;
    max-width: calc(100% - 8px);
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(13, 27, 42, 0.88);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gx-chercher__card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gx-chercher__card-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--hub-ink);
    line-height: 1.2;
}

.gx-chercher__card-brand {
    font-size: 12.5px;
    color: var(--hub-muted);
}

.gx-chercher__card-price {
    margin-top: 4px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.gx-chercher__card-price em {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: var(--hub-muted);
}

.gx-chercher__card-price strong {
    font-size: 17px;
    font-weight: 800;
    color: var(--hub-ink);
}

.gx-chercher__card-price small {
    font-size: 11px;
    font-weight: 700;
    color: var(--hub-muted);
}

.gx-chercher__card-chevron {
    flex-shrink: 0;
    color: #94a3b8;
}

/* Révélation progressive au scroll (une carte après l'autre) */
.gx-chercher__card {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        border-color 0.22s ease;
    transition-delay: var(--gx-card-delay, 0ms);
    will-change: opacity, transform;
}

.gx-chercher__card.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.gx-chercher__empty {
    text-align: center;
    padding: 36px 16px;
    border-radius: 22px;
}

.gx-chercher__empty-ico {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255, 247, 237, 0.85);
    color: var(--hub-accent);
    font-size: 22px;
}

.gx-chercher__empty-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--hub-ink);
}

.gx-chercher__empty-text {
    margin: 0 auto;
    max-width: 32ch;
    font-size: 14px;
    color: var(--hub-muted);
}

.gx-chercher__pane-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 200px;
    padding: 28px 20px;
    text-align: center;
    color: var(--hub-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: 22px;
}

.gx-chercher__pane-idle-ico {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 247, 237, 0.85);
    color: var(--hub-accent);
    font-size: 22px;
}

.gx-chercher__footer {
    position: sticky;
    bottom: 8px;
    z-index: 8;
}

.gx-chercher__footer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb923c, #f97316 48%, #ea580c);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.gx-chercher__footer-cta strong {
    font-weight: 700;
    opacity: 0.92;
    font-size: 13px;
}

.gx-chercher__detail .gx-pd {
    max-width: none;
    margin: 0;
    padding-bottom: 8px;
    background: transparent;
}

.gx-chercher__detail .gx-pd__hero,
.gx-chercher__detail .gx-pd__summary {
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.gx-chercher__detail .gx-pd__bar {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ——— Mobile ——— */
@media (max-width: 991.98px) {
    .gx-chercher.is-detail .gx-chercher__search-dock,
    .gx-chercher.is-detail .gx-chercher__catalog,
    .gx-chercher.is-detail .gx-chercher__addr {
        display: none;
    }

    .gx-chercher.is-search .gx-chercher__pane {
        display: none;
    }

    .gx-chercher.is-detail .gx-chercher__search-head {
        display: none;
    }
}

/* ——— Desktop : plein écran, catalogue unifié (moins de boîtes séparées) ——— */
@media (min-width: 992px) {
    .gx-public-body.gx-page-commander:has(.gx-chercher) .gx-public-main--commander {
        max-width: none !important;
        width: 100%;
        margin: 0;
        padding: 12px 24px 24px;
    }

    .gx-chercher {
        gap: 10px;
        min-height: calc(100dvh - 16px);
    }

    .gx-chercher__chrome {
        gap: 8px;
    }

    .gx-chercher__search-dock {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px 14px;
        padding: 10px 14px;
        border-radius: 20px;
    }

    .gx-chercher__search-head {
        grid-column: 1;
    }

    .gx-chercher.is-detail .gx-chercher__search-head {
        display: none;
    }

    .gx-chercher.is-detail .gx-chercher__search-dock {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .gx-chercher__title {
        font-size: 26px;
    }

    .gx-chercher__field {
        grid-column: 2;
        min-height: 50px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        justify-self: stretch;
    }

    .gx-chercher__field:focus-within,
    .gx-chercher__input:focus,
    .gx-chercher__input:focus-visible {
        outline: none !important;
        box-shadow: none !important;
    }

    .gx-chercher__field:focus-within {
        border-color: rgba(249, 115, 22, 0.55) !important;
        box-shadow: 0 10px 28px rgba(249, 115, 22, 0.16) !important;
    }

    .gx-chercher.is-detail .gx-chercher__field {
        grid-column: 1;
    }

    .gx-chercher__chips {
        grid-column: 3;
        margin: 0;
        justify-content: flex-end;
        gap: 6px;
    }

    .gx-chercher.is-detail .gx-chercher__chips {
        grid-column: 2;
    }

    .gx-chercher__workspace {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        gap: 14px;
        align-items: stretch;
        flex: 1;
        min-height: calc(100vh - 188px);
        height: calc(100vh - 188px);
    }

    .gx-chercher__catalog,
    .gx-chercher__pane {
        height: 100%;
        max-height: 100%;
        overflow: hidden;
        overscroll-behavior: contain;
        border-radius: 22px;
        background: var(--gx-glass) !important;
        background-color: rgba(255, 255, 255, 0.72) !important;
        border: 1px solid rgba(255, 255, 255, 0.9) !important;
        box-shadow: 0 12px 32px rgba(13, 27, 42, 0.08) !important;
        backdrop-filter: blur(18px) saturate(1.35) !important;
        -webkit-backdrop-filter: blur(18px) saturate(1.35) !important;
    }

    .gx-chercher__pane {
        outline: none;
        padding: 14px 16px;
    }

    .gx-chercher__catalog {
        overflow-y: auto;
        padding: 14px 14px 16px;
    }

    .gx-chercher__pane {
        overflow-y: auto;
    }

    /* Cartes intégrées dans le panneau (plus de boîtes flottantes) */
    .gx-chercher__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gx-chercher__card {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        min-height: 0;
        padding: 0;
        overflow: hidden;
        cursor: pointer;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.55) !important;
        border: 1px solid rgba(13, 27, 42, 0.06) !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        animation: none !important;
    }

    .gx-chercher__card.is-revealed:hover {
        transform: translateY(-2px);
        border-color: rgba(249, 115, 22, 0.28) !important;
        box-shadow: 0 8px 20px rgba(13, 27, 42, 0.08) !important;
        background: rgba(255, 255, 255, 0.82) !important;
    }

    .gx-chercher__card.is-selected {
        background: linear-gradient(145deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.9)) !important;
        border-color: rgba(249, 115, 22, 0.45) !important;
        box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.16) !important;
    }

    .gx-chercher__card-visual {
        width: 100%;
        height: 120px;
        border-radius: 0;
    }

    .gx-chercher__card-visual img {
        max-height: 96px;
    }

    .gx-chercher__card-body {
        padding: 10px 12px 12px;
    }

    .gx-chercher__card-chevron {
        display: none;
    }

    .gx-chercher__section {
        margin: 0 0 8px;
    }

    .gx-chercher__pane-idle {
        min-height: 240px;
        height: 100%;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .gx-chercher__empty {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .gx-chercher__detail .gx-pd__hero,
    .gx-chercher__detail .gx-pd__summary {
        background: rgba(255, 255, 255, 0.5) !important;
        box-shadow: none !important;
    }

    .gx-chercher.is-search .gx-chercher__detail[hidden] {
        display: block !important;
    }

    .gx-chercher.is-search .gx-chercher__detail[hidden] > .gx-pd {
        display: none;
    }

    .gx-chercher__detail .gx-pd__bar {
        position: static;
        margin-top: 16px;
        border: 0;
        box-shadow: none;
        padding: 0;
        background: transparent !important;
    }

    .gx-chercher__detail .gx-pd__bar-cta {
        border-radius: 999px;
        min-height: 52px;
    }

    .gx-chercher__footer-cta {
        max-width: 420px;
        margin-left: auto;
    }

    /* Adresse : moins de boîte séparée, plus intégrée */
    .gx-chercher__addr {
        max-width: 100%;
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gx-chercher__card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
