/* ============================================================
   BLOC PERSONNALISATION — Design épuré (ref. 2.png)
   ============================================================ */

/* --- Override contraintes Oxygen sur form.cart --- */
.woocommerce .oxy-product-cart-button,
.woocommerce .oxy-woo-element div.product form.cart {
    width: 100% !important;
    max-width: 100% !important;
}

/* --- Convertir table en bloc --- */
table.extra-options.atelier-extra-options,
table.extra-options.atelier-extra-options tbody {
    display: block;
    width: 100%;
    max-width: 100%;
    border: none;
    background: transparent;
    border-spacing: 0;
    margin-bottom: 24px;
    box-sizing: border-box;
}

table.extra-options.atelier-extra-options tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* --- Cacher titre "Personnalisation" --- */
table.extra-options.atelier-extra-options tr:has(td.section-title),
table.extra-options.atelier-extra-options td.section-title {
    display: none !important;
}

/* --- Chaque champ = bloc --- */
table.extra-options.atelier-extra-options tr.atelier-extra-options__field-wrapper {
    display: block;
    margin-bottom: 26px;
}

table.extra-options.atelier-extra-options tr.atelier-extra-options__field-wrapper:last-child {
    margin-bottom: 0;
}

table.extra-options.atelier-extra-options tr.atelier-extra-options__field-wrapper td {
    display: block;
    width: 100% !important;
    padding: 0;
}

table.extra-options.atelier-extra-options tr.atelier-extra-options__field-wrapper td.label {
    margin-bottom: 7px;
}

/* --- Labels en majuscules gras --- */
.label-tag.atelier-extra-options__field-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

.label-tag.atelier-extra-options__field-title abbr {
    text-decoration: none;
    color: #1a1a1a;
}

/* --- Selects natifs (Select2 détruit par JS) --- */
select.atelier-extra-options__field-input,
.thwepo-select-field select {
    display: block !important;
    width: 100%;
    border: 1px solid #c5c5c5;
    border-radius: 3px;
    padding: 13px 40px 13px 14px;
    font-size: 16px;
    color: #1a1a1a;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

select.atelier-extra-options__field-input:focus,
.thwepo-select-field select:focus {
    border-color: #1a1a1a;
    outline: none;
}

/* Cacher le span Select2 résiduel */
.thwepo-select-field .select2-container {
    display: none !important;
}

/* --- Inputs texte --- */
input.atelier-extra-options__field-input[type="text"],
textarea.atelier-extra-options__field-input {
    display: block;
    width: 100%;
    border: 1px solid #c5c5c5;
    border-radius: 3px;
    padding: 13px 14px;
    font-size: 16px;
    color: #1a1a1a;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.15s;
}

input.atelier-extra-options__field-input[type="text"]:focus,
textarea.atelier-extra-options__field-input:focus {
    border-color: #1a1a1a;
}

/* --- Compteur de caractères --- */
.atelier-char-counter {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
    transition: color 0.15s;
}

.atelier-char-counter.warning { color: #e0a020; }
.atelier-char-counter.danger  { color: #d63f3f; }
