/* Retained chat palette; site button and field redesign reverted. */
.crisp-client, .crisp-client [data-full-view] {
    --crisp-color-theme-100: 255, 243, 232 !important;
    --crisp-color-theme-500: 243, 112, 33 !important;
    --crisp-color-theme-600: 212, 82, 13 !important;
    --crisp-color-theme-700: 169, 61, 8 !important;
    --crisp-color-theme-800: 123, 44, 8 !important;
    --crisp-color-theme-900: 78, 30, 10 !important;
}

/* Clear the floated product grid before centering the Nouveautés call to action. */
body.home .sm-voir-tout:has(> a.sm-btn-voir-tout[href*="orderby=date"]) {
    clear: both;
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}
body.home .sm-voir-tout > a.sm-btn-voir-tout[href*="orderby=date"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    margin-inline: auto;
    text-align: center;
    line-height: 1.4;
}

#payment .wc_payment_methods > li > label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    vertical-align: middle;
}
#payment .sm-payment-icons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    vertical-align: middle;
}
#payment .sm-payment-icons img {
    display: inline-block;
    float: none !important;
    height: 22px !important;
    max-height: 24px !important;
    width: auto !important;
    max-width: 76px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    box-shadow: none;
    object-fit: contain;
}

/* Mobile text buttons need a line box that can grow when the label wraps. */
@media (max-width: 767px) {
    body :is(.checkout-button, .single_add_to_cart_button, #place_order,
        .nasa-switch-step, .nasa-back-step, .nasa-buy-now, .sm-btn-voir-tout,
        .woocommerce-form-login__submit, .woocommerce-form-register__submit,
        .woocommerce-ResetPassword .button, .woocommerce-EditAccountForm .button,
        .woocommerce-address-fields .button, .coupon .button, .cart .actions .button,
        .woocommerce-mini-cart__buttons .button, .woocommerce-thankyou-order-failed-actions .button,
        .order-actions-button, .wpcf7-submit) {
        box-sizing: border-box;
        line-height: 1.45 !important;
        height: auto !important;
        min-height: 44px;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        white-space: normal !important;
        text-align: center;
        vertical-align: middle;
    }
}

/* Failed-payment actions: preserve native links and button styling, fix layout. */
body.woocommerce-order-received .woocommerce-thankyou-order-failed-actions {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 32px;
}
body.woocommerce-order-received .woocommerce-thankyou-order-failed-actions > a.button,
body.woocommerce-order-received .sm-order-action-buttons > a.order-actions-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 112px;
    max-width: 100%;
    float: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 12px 20px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
}
body.woocommerce-order-received .sm-order-action-buttons {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
body.woocommerce-order-received .woocommerce-table--order-details tfoot tr:has(.sm-order-action-buttons) > th,
body.woocommerce-order-received .woocommerce-table--order-details tfoot tr:has(.sm-order-action-buttons) > td {
    vertical-align: middle;
}
@media (max-width: 480px) {
    body.woocommerce-order-received .woocommerce-table--order-details:has(.sm-order-action-buttons) {
        table-layout: fixed;
        width: 100%;
    }
    body.woocommerce-order-received .woocommerce-thankyou-order-failed-actions > a.button {
        flex: 1 1 100%;
        width: 100%;
    }
    body.woocommerce-order-received .sm-order-action-buttons > a.order-actions-button {
        width: 100%;
        min-width: 0;
        padding-inline: 10px;
        overflow-wrap: anywhere;
    }
}
