#imageSearchModal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,.6);
}
#imageSearchModal .modal-content {
    background: #fff;
    width: 400px;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
#imageSearchModal .close {
    float: right;
    cursor: pointer;
}

/* Webcam */
#webcamContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
#webcamVideo {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}
.webcam-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* Image preview */
#imagePreview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#imagePreviewImg {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.btn-remove-image {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.btn-remove-image:hover {
    color: #e33;
}

/* Wizard - Trouver ma pièce */
#wizardContainer {
    padding: 5px 0;
}
.wizard-step {
    animation: wizardFadeIn 0.2s ease;
}
@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}
.wizard-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.wizard-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.wizard-header small {
    color: #666;
    font-size: 13px;
}
.wizard-counter {
    margin-left: auto;
    color: #FF6B35;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    border-radius: 33554400px;
    padding: 3px 11.266px 5px 12px;
    background: rgba(255, 107, 53, 0.10);
}
.wizard-back {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.wizard-back:hover{
    color: #FFFFFF;
    background-color: #FF6B35;
}
.wizard-back:hover svg path{
    stroke: #FFFFFF;
}
.wizard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.wizard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    gap: 8px;
    min-height: 100px;
}
.wizard-card:hover {
    border-color: #FF6B35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
}
.wizard-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}
.wizard-card span {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

/* Wizard search */
.wizard-search {
    position: relative;
    margin-bottom: 12px;
}
.wizard-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}
.wizard-search input {
    width: 100%;
    padding: 10px 15px 10px 38px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}
.wizard-search input:focus {
    border-color: #FF6B35;
}

/* Wizard model list */
.wizard-list {
    max-height: 300px;
    overflow-y: auto;
}
.wizard-model-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}
.wizard-model-item:hover {
    border-color: #FF6B35;
    text-decoration: none;
    color: inherit;
}
.wizard-model-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}
.wizard-model-placeholder {
    width: 56px;
    height: 56px;
    background: #f5f5f5;
    border-radius: 8px;
}
.wizard-model-info {
    flex: 1;
}
.wizard-model-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}
.wizard-model-info small {
    color: #888;
    font-size: 12px;
}
.wizard-model-arrow {
    font-size: 24px;
    color: #ccc;
    line-height: 1;
}

/* Dropzone drag & drop */
#dropzoneDefault {
    transition: all 0.3s ease;
    border: 2px dashed transparent;
    border-radius: 12px;
    padding: 20px;
}

#dropzoneDefault.dropzone-highlight {
    border-color: #FF6B35;
    background-color: rgba(255, 107, 53, 0.08);
    transform: scale(1.02);
}

#dropzoneDefault.dropzone-highlight svg path {
    stroke: #FF6B35;
}

#dropzoneDefault.dropzone-highlight p {
    color: #FF6B35;
}

/* Range slider facette */
.range-facet .range-slider-wrapper {
    padding: 0 4px;
}
.range-facet .form-range {
    width: 100%;
    accent-color: #FF6B35;
    transition: accent-color 0.2s;
    background: linear-gradient(to right, #82CFD0 0%, #82CFD0 50%, #fff 50%, #fff 100%);
}
.range-facet .form-range.active {
    accent-color: #FF6B35;
}

.range-facet .form-range::-webkit-slider-runnable-track,
.range-facet .form-range::-webkit-slider-thumb,
.range-facet .form-range::-moz-range-progress,
.range-facet .form-range::-moz-range-track,
.range-facet .form-range::-ms-fill-lower,
.range-facet .form-range::-ms-fill-upper {
    accent-color: #FF6B35 !important;
}
.range-facet .range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.range-facet .range-current {
    font-weight: 600;
    color: #999;
    font-size: 14px;
    transition: color 0.2s;
}
.range-facet .form-range.active ~ .range-values .range-current {
    color: #FF6B35;
}

/* Custom dropdown facette */
.custom-dropdown {
    position: relative;
}
.custom-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}
.custom-dropdown-toggle:hover {
    border-color: #ccc;
}
.custom-dropdown.open .custom-dropdown-toggle {
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.custom-dropdown-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.custom-dropdown-arrow {
    flex-shrink: 0;
    color: #999;
    transition: transform 0.2s;
}
.custom-dropdown.open .custom-dropdown-arrow {
    transform: rotate(180deg);
    color: #FF6B35;
}
.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    background: #fff;
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 200px;
    overflow-y: auto;
    list-style: none;
    padding: 4px;
    margin: 0;
}
.custom-dropdown.open .custom-dropdown-menu {
    display: block;
}
.custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    font-size: 13px;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.custom-dropdown-item:hover {
    background: #f8f9fa;
    color: #333;
}
.custom-dropdown-item.active {
    background: #FFF3ED;
    color: #FF6B35;
    font-weight: 600;
}
.custom-dropdown-item small {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
}
.custom-dropdown-item.active small {
    color: #FF6B35;
    opacity: 0.7;
}
.custom-dropdown.disabled .custom-dropdown-toggle {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}
.list-facets .facets .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

/* Checkbox list (type-de-piece) */
.list-facets .facets .list-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}
.list-facets .facets .list-group-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    color: #555;
    background: #f8f9fa;
    border: 1px solid #e2e5e9;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.list-facets .facets .list-group-item:hover {
    border-color: #FF6B35;
    color: #FF6B35;
    background: #FFF3ED;
}
.list-facets .facets input[type=checkbox]:checked + .list-group-item {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
}
.list-facets .facets .border-top h5 {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    padding-top: 12px;
}
