/* ============================================================
   Assembler — Bloc accessoires produit (front-office)
   ============================================================ */

/* ── Conteneur principal ───────────────────────────────────── */
.assembler-accessories {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Carte accessoire ──────────────────────────────────────── */
.assembler-accessory {
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* .assembler-accessory--required {
    border-left: 3px solid #555;
}

.assembler-accessory--optional {
    border-left: 3px solid #b0b0b0;
} */

/* ── En-tête : image + nom ─────────────────────────────────── */
.assembler-accessory__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #eee;
    margin: -1rem -1rem 0.75rem -1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px 4px 0 0;
}

.assembler-accessory__header:hover {
    background-color: #293E59;
    color: #fff;
}

.assembler-accessory__header:hover .assembler-accessory__name {
    color: #fff !important;
}

.assembler-accessory__cover {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    background-color: #fff;
}

.assembler-accessory__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assembler-accessory__name {
    margin: 0;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #e14210 !important;
    text-transform: uppercase;
}

/* ── Badges type ────────────────────────────────────────────── */
.assembler-accessory__badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.assembler-accessory__badge--optional {
    background: #f0f0f0;
    color: #666;
}

.assembler-accessory__badge--required {
    background: #e8f0e8;
    color: #3a6b3a;
}

/* ── Toggle Oui/Non ─────────────────────────────────────────── */
.assembler-accessory__toggle {
    margin-bottom: 0.75rem;
}

.assembler-accessory__toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0;
}

.assembler-accessory__toggle-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Bloc variantes ─────────────────────────────────────────── */
.assembler-accessory__variants {
    margin-top: 0.5rem;
}

/* ── Fond commun : bloc déclinaisons produit principal + bloc accessoires ── */
body#product .product-variants-item {
    background-color: #f5f5f5 !important;
}

body#product #assembler-accessories {
    /* background-color: #f5f5f5; */
    padding: 0.75rem 0;
    /* border: 1px solid #eee; */
    /* border-radius: 4px; */
}

/* ── Groupe d'attributs ─────────────────────────────────────── */
.assembler-accessory__variant-group {
    margin-bottom: 0.75rem;
}

.assembler-accessory__variant-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #444;
}

/* ── Liste attributs texte (boutons radio) ──────────────────── */
.assembler-accessory__attr-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.assembler-accessory__attr-item {
    margin: 0;
}

.assembler-accessory__attr-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.assembler-accessory__attr-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.assembler-accessory__attr-btn {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
    user-select: none;
}

.assembler-accessory__attr-label input[type="radio"]:checked + .assembler-accessory__attr-btn {
    border-color: #333;
    background-color: #333;
    color: #fff;
}

/* ── Liste couleurs ─────────────────────────────────────────── */
.assembler-accessory__color-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.assembler-accessory__color-item label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    font-size: 0.75rem;
    text-align: center;
}

.assembler-accessory__color-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.assembler-accessory__color-swatch {
    display: block;
    width: 85px;
    height: 85px;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}

.assembler-accessory__color-item label {
    position: relative;
}

.assembler-accessory__color-item input[type="radio"]:checked ~ .assembler-accessory__color-swatch,
.assembler-accessory__color-item input[type="radio"]:checked ~ .assembler-accessory__color-texture {
    outline: 2px solid #e14210;
    outline-offset: -2px;
}

/* ── Bordure orange au checked pour les variants natifs du produit principal  ── */
body#product .product-variants-item .input-container:has(input:checked) img.color.texture.img-responsive,
body#product .product-variants-item .input-container:has(input:checked) .color-alt {
    border: 2px solid #e14210 !important;
    border-radius: 4px;
}

.assembler-accessory__color-item .input-select-mark {
    display: none;
    top: 40%;
}

.assembler-accessory__color-item input[type="radio"]:checked ~ .input-select-mark {
    display: flex;
}

.assembler-accessory__color-texture {
    width: 85px;
    height: 85px;
    max-width: 85px;
    max-height: 85px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

/* ── Correctif variants PS natifs (dans contexte page assembler) ── */
body#product .input-container img.color.texture.img-responsive {
    width: 85px !important;
    max-width: 85px !important;
    height: 85px !important;
    object-fit: cover !important;
}

/* body#product .input-container {
    width: 85px !important;
} */

body#product .product-variants-item ul:has(.input-container-radio) {
    gap: 0;
}

body#product .product-variants-item .input-container-radio {
    margin-bottom: 0;
}
.radio-label {
    background-color: #f5f5f5;
}
/* ── Largeur fixe sur les items accessoire pour garantir l'alignement ── */
.assembler-accessory__color-item {
    width: 85px;
}

.assembler-accessory__color-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    /* white-space: nowrap; */
}

/* ── Prix ───────────────────────────────────────────────────── */
#assembler-accessories .assembler-accessory__price {
    font-size: 1rem;
    margin: 0.5rem 0 0;
    color: #e14210 !important;
    font-weight: 700;
    margin-left: auto;
}

/* ── Sélecteur quantité ─────────────────────────────────────── */
.assembler-accessory__qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.assembler-accessory__qty-label {
    font-size: 0.85rem;
    margin: 0;
    white-space: nowrap;
}

.assembler-accessory__qty-group {
    display: grid;
    grid-template-columns: 35px 90px 35px;
}

.assembler-accessory__qty-input {
    background: #fff;
    border: 1px solid #cccccc;
    border-radius: 5px;
    height: 33px;
    text-align: center;
    margin: 0;
}

.assembler-accessory__qty-btn {
    background: #081734;
    border-radius: 5px;
    line-height: 31px;
    font-size: 26px;
    font-weight: 400;
    color: #fff;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.assembler-accessory__qty-btn--minus {
    margin-right: 5px;
}

.assembler-accessory__qty-btn--plus {
    margin-left: 5px;
}

/* ── Erreurs de validation accessoire ───────────────────────── */
.assembler-validation-error {
    font-size: 0.85rem;
    color: #c0392b;
    margin: 0.5rem 0 0;
    padding: 0.3rem 0.5rem;
    background: #fdf3f2;
    border-left: 3px solid #c0392b;
    border-radius: 0 3px 3px 0;
}

/* ── Erreur globale panier (en-tête de section) ──────────────── */
.assembler-cart-error {
    font-size: 0.875rem;
    color: #fff !important;
    background: #c0392b;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

/* ── Utilitaire ─────────────────────────────────────────────── */
.d-none {
    display: none !important;
}

/* ── Historique commande : lignes accessoires assembleur ─────── */
.plici-assembler-accessory-row td,
.plici-assembler-accessory-item {
    background-color: #f7f7f7;
    color: #555;
    font-size: 0.9em;
}

.plici-assembler-accessory-name {
    padding-left: 1.5rem !important;
}

.plici-assembler-accessory-arrow {
    color: #999;
    margin-right: 0.35rem;
    font-style: normal;
}


body #add-to-quote-tpl .add-to-quote.disabled{
    background-color: #b3b3b3 !important;
    
}

body #add-to-quote-tpl:has(.add-to-quote.disabled) {
    cursor: not-allowed;
}