.ks-wrapper {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    font-family: inherit;
    z-index: 999;
}

.ks-input-group {
    display: flex;
    align-items: center;
    height: 44px !important;
    background: #ffffff;
    border: 2px solid #11387d;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ks-input-group:focus-within {
    border-color: #fab60a;
    box-shadow: 0 0 0 3px rgba(250, 182, 10, 0.25);
}

.ks-icon-search {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    min-width: 38px !important;
    height: 100%;
    padding: 0 !important;
    color: #11387d;
    flex-shrink: 0;
}

.ks-icon-search svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block !important;
}

.ks-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 0 8px;
    height: 100%;
    font-size: 14px;
    color: #222222;
    background: transparent;
    min-width: 0;
}

.ks-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.ks-spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #e5e7eb;
    border-top-color: #11387d;
    border-radius: 50%;
    animation: ks-spin 0.6s linear infinite;
    flex-shrink: 0;
}

.ks-wrapper.is-loading .ks-spinner {
    display: inline-block;
}

@keyframes ks-spin {
    to { transform: rotate(360deg); }
}

.ks-clear-btn {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 20px;
    line-height: 1;
    padding: 0 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.ks-wrapper.has-value .ks-clear-btn {
    display: inline-block;
}

.ks-submit-btn {
    height: 100%;
    background: #11387d;
    color: #ffffff;
    border: none;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.ks-submit-btn:hover {
    background: #fab60a;
    color: #11387d;
}

/* Dropdown des résultats */
.ks-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 14px 35px rgba(17, 56, 125, 0.16);
    max-height: 75vh;
    overflow-y: auto;
    z-index: 1000;
    text-align: left;
}

.ks-section-title {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #f1f5f9;
}

.ks-cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.ks-cat-pill {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #11387d;
    background: #eef3fb;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ks-cat-pill:hover {
    background: #fab60a;
    color: #11387d;
}

.ks-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

.ks-item:hover,
.ks-item.is-active {
    background: #f4f7fc;
}

.ks-thumb {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.ks-info {
    flex: 1;
    min-width: 0;
}

.ks-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 3px;
}

.ks-name mark {
    background: #fef08a;
    color: #11387d;
    padding: 0 2px;
    border-radius: 3px;
}

.ks-meta {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ks-stock-ok {
    color: #15803d;
    font-weight: 600;
}

.ks-price {
    font-size: 15px;
    font-weight: 700;
    color: #11387d;
    white-space: nowrap;
}

.ks-footer {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: #11387d;
    text-decoration: none;
}

.ks-footer:hover {
    background: #fab60a;
    color: #11387d;
}

.ks-empty {
    padding: 20px 14px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

@media (max-width: 767px) {
    .ks-submit-btn {
        padding: 0 12px;
        font-size: 13px;
    }
    .ks-price {
        font-size: 13px;
    }
}