.tbkss-form {
    position: relative !important;
}

.tkbss-form,
.tkbss-form * {
    box-sizing: border-box;
}

.tbkss-panel[hidden] {
    display: none !important;
}

.tbkss-panel {
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: min(760px, calc(100vw - 16px));
    max-height: min(74vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f7f7f7;
    background: #111;
    border: 1px solid rgba(255, 121, 0, .75);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
    text-align: left;
}

.tbkss-panel-top {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 50px;
    padding: 10px 14px;
    border-bottom: 1px solid #2c2c2c;
}

.tbkss-close {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #2b2b2b;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}


.tbkss-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.tbkss-section {
    padding: 10px 12px 4px;
}

.tbkss-section + .tbkss-section {
    border-top: 1px solid #292929;
}

.tbkss-section h3 {
    margin: 0 0 7px !important;
    color: #ff7900 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .08em;
    line-height: 1.3 !important;
    text-transform: uppercase;
}

.tbkss-items {
    display: grid;
    gap: 4px;
}

.tbkss-product,
.tbkss-entity,
.tbkss-all {
    color: inherit !important;
    text-decoration: none !important;
    outline: none;
}

.tbkss-product {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 68px;
    padding: 6px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 10px;
}

.tbkss-product:hover,
.tbkss-product.is-active,
.tbkss-entity:hover,
.tbkss-entity.is-active,
.tbkss-all:hover,
.tbkss-all.is-active {
    background: #242424;
}

.tbkss-product-image {
    position: relative;
    display: block;
    width: 62px;
    height: 62px;
    overflow: hidden;
    border-radius: 8px;
    background: #242424;
}

.tbkss-product-image img,
.tbkss-image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbkss-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    max-width: calc(100% - 8px);
    padding: 2px 5px;
    overflow: hidden;
    border-radius: 5px;
    color: #111;
    background: #ff7900;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.tbkss-badge.is-out {
    color: #eee;
    background: #555;
}

.tbkss-product-copy {
    min-width: 0;
}

.tbkss-product-copy strong,
.tbkss-entity strong {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tbkss-product-copy small,
.tbkss-entity small,
.tbkss-product-commerce small {
    display: block;
    margin-top: 4px;
    color: #bdbdbd;
    font-size: 11px;
    line-height: 1.25;
}

.tbkss-product-commerce {
    min-width: 80px;
    max-width: 170px;
    overflow: hidden;
    text-align: right;
}

.tbkss-price {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
    color: #ff7900;
    font-size: 14px;
    font-weight: 850;
    white-space: nowrap;
}

.tbkss-price-current {
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbkss-price-old {
    flex: 0 0 auto;
    color: #8f8f8f;
    font-size: 11px;
    font-weight: 650;
    text-decoration: line-through;
}

.tbkss-product-commerce .is-out {
    color: #999;
}

.tbkss-entity {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 5px 8px;
    border-radius: 9px;
}

.tbkss-entity-media {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
    background: #2a2a2a;
}

.tbkss-entity-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbkss-entity-icon {
    color: #ff7900;
    font-weight: 900;
}

.tbkss-footer[hidden] {
    display: none !important;
}

.tbkss-footer {
    flex: 0 0 auto;
    padding: 8px 12px 12px;
    border-top: 1px solid rgba(255, 121, 0, .38);
    background: #111;
    box-shadow: 0 -10px 24px rgba(0, 0, 0, .28);
}

.tbkss-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 121, 0, .72);
    border-radius: 10px;
    color: #fff !important;
    background: #181818;
    font-size: 13px;
    font-weight: 800;
}

.tbkss-all > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbkss-message,
.tbkss-loading {
    padding: 28px 18px;
    color: #ccc;
    text-align: center;
}

.tbkss-loading span {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 3px;
    border-radius: 50%;
    background: #ff7900;
    animation: tbkssPulse 1s infinite ease-in-out;
}

.tbkss-loading span:nth-child(2) { animation-delay: .13s; }
.tbkss-loading span:nth-child(3) { animation-delay: .26s; }
.tbkss-loading p { margin: 10px 0 0; }

@keyframes tbkssPulse {
    0%, 100% { opacity: .25; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 767px) {
    html.tbkss-mobile-open {
        overflow: hidden;
    }

    .tbkss-panel {
        position: fixed;
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: auto;
        max-height: none;
        border-radius: 13px;
    }

    .tbkss-panel-top {
        display: flex;
    }

    .tbkss-content {
        max-height: none;
    }

    .tbkss-footer {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .tbkss-product {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .tbkss-product-image {
        width: 56px;
        height: 56px;
    }

    .tbkss-product-commerce {
        grid-column: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        margin-top: -3px;
        text-align: left;
    }

    .tbkss-product-commerce small {
        margin: 0 0 0 8px;
    }
}

/* V0.2 — intention : résultat principal avant les produits. */
.tbkss-section-best {
    padding-top: 12px;
    padding-bottom: 9px;
    background: linear-gradient(180deg, rgba(255,121,0,.10), rgba(255,121,0,.025));
    border-bottom: 1px solid rgba(255,121,0,.34);
}

.tbkss-section-best .tbkss-entity,
.tbkss-section-best .tbkss-product {
    min-height: 76px;
    padding: 10px;
    border: 1px solid rgba(255,121,0,.55);
    background: #191919;
}

.tbkss-section-best .tbkss-entity-media {
    width: 46px;
    height: 46px;
}

.tbkss-section-best .tbkss-entity {
    grid-template-columns: 48px minmax(0, 1fr) auto;
}

.tbkss-section-best strong {
    font-size: 16px;
}

.tbkss-correction{padding:10px 14px;border-bottom:1px solid rgba(255,121,0,.35);background:rgba(255,121,0,.08);color:#fff;font-size:13px;font-weight:700}
.tbkss-correction span{color:#ff8a00}

/* ================================================================
 * V0.4.0 — finition premium, découverte et état vide
 * ================================================================ */
.tbkss-panel {
    background:
        radial-gradient(circle at 12% -10%, rgba(255,121,0,.16), transparent 34%),
        linear-gradient(180deg, #151515 0%, #0d0d0d 100%);
    border-color: rgba(255,121,0,.55);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.035) inset;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.tbkss-panel-top {
    min-height: 52px;
    padding: 11px 14px 10px 18px;
    background: rgba(8,8,8,.78);
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.tbkss-panel-query {
    max-width: calc(100% - 48px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 13px;
    letter-spacing: .02em;
}

.tbkss-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.11) !important;
    border-radius: 50% !important;
    color: #fff !important;
    background: rgba(255,255,255,.055) !important;
    font-size: 23px !important;
    line-height: 1 !important;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.tbkss-close:hover,
.tbkss-close:focus-visible {
    transform: rotate(90deg);
    border-color: rgba(255,121,0,.65) !important;
    background: rgba(255,121,0,.17) !important;
}

.tbkss-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,121,0,.55) transparent;
}

.tbkss-content::-webkit-scrollbar { width: 7px; }
.tbkss-content::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(255,121,0,.55);
}

.tbkss-section h3 {
    color: #ff9a3d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.tbkss-product,
.tbkss-entity {
    border-radius: 12px;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.tbkss-product:hover,
.tbkss-product.is-active,
.tbkss-entity:hover,
.tbkss-entity.is-active {
    transform: translateY(-1px);
    background: linear-gradient(90deg, rgba(255,121,0,.13), rgba(255,255,255,.045));
    box-shadow: 0 10px 24px rgba(0,0,0,.20);
}

.tbkss-section-best .tbkss-product,
.tbkss-section-best .tbkss-entity {
    background: linear-gradient(115deg, rgba(255,121,0,.18), rgba(255,121,0,.045));
    border: 1px solid rgba(255,121,0,.32);
    box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.tbkss-product-image,
.tbkss-entity-media {
    box-shadow: 0 8px 20px rgba(0,0,0,.28);
}

.tbkss-footer {
    background: rgba(8,8,8,.94);
    border-top: 1px solid rgba(255,121,0,.22);
    box-shadow: 0 -10px 26px rgba(0,0,0,.24);
}

.tbkss-all {
    border-radius: 12px;
    background: linear-gradient(135deg, #ff7900, #ff9b35);
    box-shadow: 0 8px 20px rgba(255,121,0,.20);
    font-weight: 800;
}

.tbkss-all:hover,
.tbkss-all.is-active {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.tbkss-discovery-hero {
    position: relative;
    margin: 14px 14px 6px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,121,0,.24);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,121,0,.18), rgba(255,255,255,.035));
}

.tbkss-discovery-hero::after {
    content: "⌕";
    position: absolute;
    right: 16px;
    top: 5px;
    color: rgba(255,121,0,.13);
    font-size: 76px;
    line-height: 1;
    transform: rotate(-12deg);
}

.tbkss-discovery-hero > * {
    position: relative;
    z-index: 1;
    display: block;
}

.tbkss-discovery-kicker {
    margin-bottom: 7px;
    color: #ff9a3d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.tbkss-discovery-hero strong {
    max-width: 440px;
    color: #fff;
    font-size: 19px;
    line-height: 1.2;
}

.tbkss-discovery-hero small {
    margin-top: 7px;
    color: rgba(255,255,255,.62);
    font-size: 12px;
}

.tbkss-section-chips {
    padding: 12px 14px 6px;
}

.tbkss-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tbkss-heading-row button {
    padding: 4px 0 !important;
    border: 0 !important;
    color: rgba(255,255,255,.52) !important;
    background: none !important;
    font-size: 11px !important;
    cursor: pointer;
}

.tbkss-heading-row button:hover { color: #ff9a3d !important; }

.tbkss-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.tbkss-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 999px !important;
    color: rgba(255,255,255,.90) !important;
    background: rgba(255,255,255,.055) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.tbkss-chip span { color: #ff8b22; }
.tbkss-chip:hover,
.tbkss-chip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255,121,0,.42) !important;
    background: rgba(255,121,0,.12) !important;
}

.tbkss-chip.is-popular {
    background: linear-gradient(110deg, rgba(255,121,0,.11), rgba(255,255,255,.04)) !important;
}

.tbkss-empty-state {
    display: flex;
    min-height: 250px;
    padding: 34px 20px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.tbkss-empty-icon {
    width: 62px;
    height: 62px;
    display: grid;
    margin-bottom: 15px;
    place-items: center;
    border: 1px solid rgba(255,121,0,.28);
    border-radius: 50%;
    color: #ff8b22;
    background: rgba(255,121,0,.10);
    font-size: 31px;
}

.tbkss-empty-state strong {
    color: #fff;
    font-size: 19px;
}

.tbkss-empty-state p {
    margin: 7px 0 3px;
    color: rgba(255,255,255,.77);
    font-size: 14px;
}

.tbkss-empty-state small {
    max-width: 430px;
    color: rgba(255,255,255,.48);
    line-height: 1.5;
}

.tbkss-correction-action {
    display: flex;
    width: min(100%, 430px);
    min-height: 46px;
    margin-top: 18px;
    padding: 11px 15px !important;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255,121,0,.35) !important;
    border-radius: 12px !important;
    color: #fff !important;
    background: linear-gradient(110deg, rgba(255,121,0,.18), rgba(255,121,0,.06)) !important;
    font-weight: 800 !important;
    cursor: pointer;
}

@media (max-width: 767px) {
    .tbkss-panel {
        border-radius: 16px;
        max-height: none;
    }

    .tbkss-panel-top {
        min-height: 50px;
        padding-left: 14px;
    }

    .tbkss-discovery-hero {
        margin: 10px 10px 4px;
        padding: 17px;
    }

    .tbkss-discovery-hero strong {
        max-width: 260px;
        font-size: 17px;
    }

    .tbkss-section-chips { padding: 12px 10px 5px; }
    .tbkss-chip { min-height: 42px; }
    .tbkss-product { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .tbkss-panel *, .tbkss-panel *::before, .tbkss-panel *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* ================================================================
 * V0.4.1 — intégration TBK Header & Footer et accessibilité
 * ================================================================ */

.tbkss-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.tbkss-close {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
}

.tbkss-chip,
.tbkss-correction-action {
    min-height: 44px !important;
}

@media (prefers-reduced-motion: reduce) {
    .tbkss-close,
    .tbkss-product,
    .tbkss-entity,
    .tbkss-all,
    .tbkss-chip,
    .tbkss-loading span {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

