/* ================================================================
   LBI Swatches — Vignettes couleur dans le loop WooCommerce
   ================================================================ */

.lbi-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0 2px;
    padding: 0;
    list-style: none;
    justify-content: center;
}

.lbi-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s, opacity .15s;
    position: relative;
    flex-shrink: 0;
}

.lbi-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.lbi-swatch:hover   { border-color: #00aed7; }
.lbi-swatch.active  { border-color: #00aed7; }

.lbi-swatch.unavailable {
    opacity: .35;
    cursor: not-allowed;
}

/* Spinner stock — affiché pendant le check AJAX lazy */
.stock.lbi-stock-loading {
    min-width: 16px;
    min-height: 16px;
}

.lbi-stock-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e5e7eb;
    border-top-color: #00aed7;
    border-radius: 50%;
    animation: lbi-spin .6s linear infinite;
    vertical-align: middle;
}

@keyframes lbi-spin {
    to { transform: rotate(360deg); }
}

.lbi-swatch.unavailable::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent, transparent 4px,
        rgba(255,255,255,.65) 4px, rgba(255,255,255,.65) 5px
    );
    pointer-events: none;
}
