/* Parcours d'achat Jobard : mêmes cartes et couleurs que le catalogue. */
body.jb-commerce {
 --wp--preset--font-size--small: 1rem;
 --wp--preset--font-size--medium: 1.125rem;
 --jb-panel: #fffef8;
}
body.jb-commerce main {
 box-sizing: border-box;
 width: min(1280px, 100%);
 margin-inline: auto;
 padding: 42px 28px 72px !important;
 color: var(--jb-ink);
 font-size: 17px;
 line-height: 1.6;
}
body.jb-commerce main > *,
body.jb-commerce main .entry-content > * { max-width: 100%; }
body.jb-commerce main .entry-content { width: 100%; margin-inline: auto; }
body.jb-commerce main .wp-block-post-title,
.jb-commerce-heading h1 { font-size: clamp(2.1rem, 4vw, 3rem); line-height: 1.12; margin: 0 0 18px; }
.jb-commerce-heading { margin-bottom: 26px; }
.jb-commerce-heading p { margin: 0; font-size: 18px; color: #685941; }
body.jb-commerce main h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.25; }
body.jb-commerce main :is(a, button, input, select, textarea):focus-visible { outline: 3px solid #79311f; outline-offset: 4px; }
body.jb-commerce .jb-cart-link .wc-block-mini-cart__button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
body.jb-commerce .jb-cart-link .wc-block-mini-cart__badge { position: absolute; display: block; text-align: center; }
body.jb-commerce .jb-cart-link .wc-block-mini-cart__badge[hidden] { display: none; }
.jb-order-progress { margin: 0 0 34px; }
.jb-order-progress ol { display: flex; flex-wrap: wrap; gap: 14px 30px; padding: 0; margin: 0; list-style: none; }
.jb-order-progress li { display: flex; align-items: center; gap: 10px; color: #685941; font-size: 16px; font-weight: 700; }
.jb-order-progress a { color: inherit; text-underline-offset: 4px; }
.jb-order-progress__number { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid #b6a789; border-radius: 50%; background: var(--jb-panel); }
.jb-order-progress [aria-current=step] { color: var(--jb-ink); }
.jb-order-progress [aria-current=step] .jb-order-progress__number { border: 2px solid var(--jb-ink); background: var(--jb-orange); box-shadow: 2px 2px 0 #d6c69d; }
.jb-empty-cart-intro { display: flex; align-items: center; gap: 28px; padding: 32px; margin-bottom: 48px; background: #fff0cd; border: 2px solid var(--jb-ink); border-radius: 12px 17px 10px 14px; box-shadow: 4px 5px 0 #d6c69d; }
.jb-empty-cart-intro > img { flex-shrink: 0; width: 72px; height: 72px; }
.jb-empty-cart-intro h2 { margin: 0 0 8px; }
.jb-empty-cart-intro p { margin: 0 0 20px; max-width: 65ch; }
body.jb-commerce .jb-empty-cart-products .jb-bd-section-heading { margin: 0 0 28px; }
body.jb-commerce .jb-empty-cart-products .jb-bd-section-heading h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); }
body.jb-commerce .jb-empty-cart-products .jb-bd-section-heading p { font-size: 17px; }
body.jb-commerce .jb-empty-cart-products,
body.jb-commerce .jb-empty-cart-products > .woocommerce { box-sizing: border-box; display: block; width: 100%; max-width: 1280px; margin-inline: auto; float: none; }
body.jb-commerce .jb-empty-cart-products ul.products { box-sizing: border-box; display: grid; width: 100%; max-width: 1280px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 0; margin: 0 auto; float: none; }
body.jb-commerce .jb-empty-cart-products .woocommerce-loop-product__title { font-size: 1.4rem; }
body.jb-commerce .jb-empty-cart-products .price { font-size: 1.4rem; }
body.jb-commerce .jb-empty-cart-products .button { font-size: 1.05rem; min-height: 48px; box-sizing: border-box; }
body.jb-commerce main .jb-bd-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; font-size: 17px; text-align: center; box-sizing: border-box; }

/* Conserver les conteneurs et le comportement responsive de WooCommerce. */
body.jb-commerce :is(.wc-block-cart, .wc-block-checkout) { font-size: 17px; margin-bottom: 0; }
/* Le total passe sous les articles sur mobile : conserver une vraie respiration. */
body.jb-commerce .wc-block-cart.wc-block-components-sidebar-layout { row-gap: 28px; }
body.jb-commerce :is(.wc-block-cart, .wc-block-checkout) :is(.wc-block-components-product-name, .wc-block-components-totals-item, .wc-block-components-product-price, .wc-block-components-product-metadata, .wc-block-components-shipping-rates-control, .wc-block-components-radio-control__label, .wc-block-components-address-card, .wc-block-components-checkbox__label, .wc-block-components-checkout-return-to-cart-button) { font-size: 16px; line-height: 1.55; }
body.jb-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-product-name { color: var(--jb-ink); font-weight: 800; font-size: 19px; line-height: 1.3; text-decoration: none; }
body.jb-commerce :is(.wc-block-cart, .wc-block-checkout) a.wc-block-components-product-name:hover { text-decoration: underline; text-underline-offset: 4px; }
body.jb-commerce .wc-block-components-totals-footer-item { font-weight: 800; font-size: 23px; }
body.jb-commerce .wc-block-components-totals-footer-item .wc-block-formatted-money-amount { font-family: var(--wp--preset--font-family--titre); font-size: 28px; color: #744b2c; }
body.jb-commerce :is(.wc-block-cart__sidebar, .wc-block-checkout__sidebar) { box-sizing: border-box; padding: 24px; border: 2px solid var(--jb-ink); border-radius: 12px 16px 10px 14px; background: #fff3d8; box-shadow: 4px 5px 0 #d6c69d; }
body.jb-commerce :is(.wc-block-cart__sidebar, .wc-block-checkout__sidebar) .wc-block-components-panel { padding-block: 16px; }
body.jb-commerce .wc-block-cart .wc-block-cart__totals-title,
body.jb-commerce .wc-block-components-checkout-order-summary__title-text { text-transform: none; font-family: var(--wp--preset--font-family--titre); font-weight: 800; font-size: 25px; line-height: 1.2; }
body.jb-commerce .wc-block-cart .wc-block-cart__totals-title { padding: 0 0 18px; }
body.jb-commerce .wc-block-checkout__order-notes { padding: 16px; background: var(--jb-panel); border-radius: 10px; }
body.jb-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-button:not(.is-link) { border: 2px solid var(--jb-ink); border-radius: 8px 12px 8px 10px; background: var(--jb-orange); color: var(--jb-ink); box-shadow: 3px 4px 0 var(--jb-ink); min-height: 54px; padding: 14px 20px; font-family: var(--wp--preset--font-family--titre); font-weight: 800; font-size: 19px; line-height: 1.3; text-align: center; text-decoration: none; }
body.jb-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-button:not(.is-link):hover { background: #ffdc6b; }
body.jb-commerce :is(.wc-block-cart, .wc-block-checkout) .wc-block-components-button:disabled { opacity: .55; cursor: not-allowed; }
body.jb-commerce .wc-block-cart__submit-container { padding-top: 18px; padding-bottom: 5px; }
body.jb-commerce .wc-block-cart__submit-container--sticky { background: var(--jb-panel); }

/* Lignes du panier : visuel complet, prix et quantité faciles à repérer. */
/* Tous les conteneurs du tableau utilisent la même mise en page. Un tbody
   grid dans un table natif serait réduit à la largeur de la première colonne. */
body.jb-commerce .wc-block-cart table.wc-block-cart-items { display: block; box-sizing: border-box; width: 100%; border: 0; margin: 0; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items thead { display: block; width: 100%; font-size: 16px; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header { display: flex; justify-content: space-between; width: 100%; box-sizing: border-box; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header th { display: block; width: auto; padding: 0 0 14px; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header-product { flex: 1; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items tbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; width: 100%; box-sizing: border-box; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row { display: grid; box-sizing: border-box; width: 100%; min-width: 0; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 20px; padding: 22px; background: var(--jb-panel); border: 2px solid var(--jb-ink); border-radius: 11px 15px 9px 13px; box-shadow: 3px 4px 0 #d6c69d; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > td { display: block; box-sizing: border-box; width: auto; min-width: 0; padding: 0; border: 0; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image { width: 100%; grid-area: 1 / 1 / 2 / 2; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; background: #f5eedb; border: 1px solid #d6c69d; border-radius: 8px; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__product { grid-area: 1 / 2 / 2 / 3; min-width: 0; width: auto; }
body.jb-commerce .wc-block-cart .wc-block-cart-item__wrap { width: 100%; min-width: 0; }
body.jb-commerce .wc-block-cart .wc-block-components-product-name { white-space: normal; word-break: normal; overflow-wrap: break-word; }
body.jb-commerce .wc-block-cart .wc-block-cart-item__quantity { flex-wrap: wrap; }
body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total { grid-area: 1 / 3 / 2 / 4; min-width: 0; font-size: 20px; font-weight: 800; color: #744b2c; }
body.jb-commerce .wc-block-cart .wc-block-components-product-details { margin-block: 8px; }
body.jb-commerce .wc-block-components-quantity-selector { min-height: 44px; width: 122px; background: #fff; border: 1px solid #9b8967; border-radius: 8px; }
body.jb-commerce .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button { min-width: 38px; }
body.jb-commerce .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { font-size: 16px; }
body.jb-commerce .wc-block-cart-item__remove-link { color: #744b2c; font-size: 15px; padding-block: 10px; text-underline-offset: 3px; min-height: 44px; }

/* Livraison / coordonnées / paiement : sections distinctes, champs natifs. */
body.jb-commerce .wc-block-checkout .wc-block-components-checkout-step { padding: 24px; margin-bottom: 24px; border: 2px solid #b6a789; border-radius: 11px 15px 9px 13px; background: var(--jb-panel); }
body.jb-commerce .wc-block-checkout .wc-block-components-checkout-step__heading { margin-bottom: 18px; }
body.jb-commerce .wc-block-checkout .wc-block-components-checkout-step__title { font-family: var(--wp--preset--font-family--titre); font-size: 25px; line-height: 1.25; }
body.jb-commerce .wc-block-components-checkout-step__description { font-size: 16px; line-height: 1.55; }
body.jb-commerce .wc-block-components-form .wc-block-components-text-input :is(input, label),
body.jb-commerce .wc-block-components-combobox .components-combobox-control__input,
body.jb-commerce .wc-block-components-textarea { font-size: 16px; }
body.jb-commerce .wc-block-components-form .wc-block-components-text-input input { border-color: #9b8967; border-radius: 8px; }
body.jb-commerce .wc-block-checkout .wc-block-components-order-summary-item__image { width: 64px; flex: 0 0 64px; }
body.jb-commerce .wc-block-checkout .wc-block-components-order-summary-item__image img { width: 64px; max-width: 64px; height: 82px; object-fit: contain; border: 1px solid #d6c69d; border-radius: 6px; background: #fff; }
body.jb-commerce .wc-block-checkout .wc-block-components-order-summary-item__description { min-width: 0; padding-left: 18px; }
body.jb-commerce .wc-block-checkout .wc-block-components-order-summary-item .wc-block-components-product-name { font-size: 17px; }
body.jb-commerce .wc-block-components-checkout-place-order-button { width: 100%; }
body.jb-commerce .wc-block-checkout__terms { font-size: 16px; line-height: 1.6; }

/* Confirmation : seuls les blocs WooCommerce autorisés affichent les données. */
body.jb-commerce .wc-block-order-confirmation-status { padding: 28px 32px; margin-bottom: 28px; border: 2px solid var(--jb-ink); border-radius: 12px 17px 10px 14px; background: #fff0cd; box-shadow: 4px 5px 0 #d6c69d; }
body.jb-commerce .wc-block-order-confirmation-status h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 14px; }
body.jb-commerce .wc-block-order-confirmation-status-description { font-size: 18px; }
body.jb-commerce .wc-block-order-confirmation-summary { margin-block: 30px; }
body.jb-commerce .wc-block-order-confirmation-summary-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0; }
body.jb-commerce .wc-block-order-confirmation-summary-list-item { min-width: 0; margin: 0; padding: 18px; background: var(--jb-panel); border: 1px solid #b6a789; border-radius: 10px; overflow-wrap: anywhere; }
body.jb-commerce .wc-block-order-confirmation-summary-list-item__key { display: block; font-size: 16px; color: #685941; }
body.jb-commerce .wc-block-order-confirmation-summary-list-item__value { display: block; font-size: 20px; font-weight: 800; }
body.jb-commerce :is(.wc-block-order-confirmation-totals-wrapper, .wc-block-order-confirmation-shipping-wrapper, .wc-block-order-confirmation-billing-wrapper, .wc-block-order-confirmation-additional-fields-wrapper, .wc-block-order-confirmation-downloads-wrapper) { box-sizing: border-box; padding: 26px; margin-block: 24px; background: var(--jb-panel); border: 2px solid var(--jb-ink); border-radius: 11px 15px 9px 13px; box-shadow: 3px 4px 0 #d6c69d; }
body.jb-commerce .wc-block-order-confirmation-address-wrapper { gap: 28px; margin-top: 0; }
body.jb-commerce .wc-block-order-confirmation-address-wrapper .wp-block-column > div { height: 100%; margin-block: 0; }
body.jb-commerce :is(.wc-block-order-confirmation-totals__table, .wc-block-order-confirmation-shipping-address, .wc-block-order-confirmation-billing-address) { font-size: 17px; line-height: 1.65; }
body.jb-commerce .wc-block-order-confirmation-totals__table { width: 100%; table-layout: fixed; border-collapse: collapse; }
body.jb-commerce .wc-block-order-confirmation-totals__table :is(th, td) { padding: 15px 10px; border-color: #d8ccb1; overflow-wrap: anywhere; }
body.jb-commerce .wc-block-order-confirmation-totals__table tr > :last-child { width: 32%; text-align: right; }
body.jb-commerce .wc-block-order-confirmation-totals__table tfoot tr:last-child { font-size: 21px; background: #fff0cd; }
.jb-order-help { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0 0; border-top: 1px dashed #9b8967; margin-top: 36px; }
.jb-order-help h2 { margin: 0 0 8px; }
.jb-order-help p { margin: 0; overflow-wrap: anywhere; }
.jb-order-help .jb-bd-button { flex-shrink: 0; }

/* Pages utilisant encore les codes courts WooCommerce. */
body.jb-commerce main .woocommerce :is(table.shop_table, .cart_totals, #order_review, .woocommerce-customer-details address) { background: var(--jb-panel); border: 2px solid var(--jb-ink); border-radius: 12px; font-size: 17px; }
body.jb-commerce main .woocommerce .cart_totals { padding: 22px; box-sizing: border-box; }
body.jb-commerce main .woocommerce table.shop_table :is(th, td) { padding: 16px; }
body.jb-commerce main .woocommerce .woocommerce-order-overview { display: flex; flex-wrap: wrap; gap: 18px; font-size: 17px; }
body.jb-commerce main .woocommerce .form-row :is(input.input-text, select, textarea) { font-size: 16px; min-height: 48px; padding: 12px; border: 1px solid #9b8967; border-radius: 8px; }

@media (min-width: 1000px) {
 body.jb-commerce .wc-block-checkout__sidebar.is-sticky { top: 125px; }
}
@media (max-width: 900px) {
 body.jb-commerce .jb-empty-cart-products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
 body.jb-commerce .wc-block-order-confirmation-summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row { grid-template-columns: 78px minmax(0, 1fr); padding: 18px; gap: 16px; }
 body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total { grid-area: 2 / 2 / 3 / 3; justify-self: start; }
 body.jb-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image { grid-row-end: 3; }
 .jb-order-help { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
 body.jb-commerce main { padding: 30px 18px 48px !important; }
 .jb-commerce-heading p { font-size: 17px; }
 .jb-order-progress { margin-bottom: 28px; }
 .jb-order-progress ol { display: grid; grid-template-columns: .8fr 1.35fr 1fr; gap: 8px; }
 .jb-order-progress li { flex-direction: column; align-items: flex-start; gap: 7px; font-size: 14px; line-height: 1.3; }
 .jb-order-progress__number { width: 30px; height: 30px; }
 .jb-empty-cart-intro { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px; margin-bottom: 36px; }
 body.jb-commerce .jb-empty-cart-products ul.products { grid-template-columns: minmax(0, 1fr); max-width: 420px; margin-inline: auto; }
 body.jb-commerce .jb-empty-cart-products .jb-bd-section-heading p { margin-top: 12px; }
 body.jb-commerce :is(.wc-block-cart__sidebar, .wc-block-checkout__sidebar) { padding: 18px; }
 body.jb-commerce .wc-block-checkout .wc-block-components-checkout-step { padding: 20px 16px; }
 body.jb-commerce .wc-block-checkout .wc-block-components-checkout-step__title { font-size: 23px; }
 body.jb-commerce .wc-block-order-confirmation-status { padding: 24px 20px; }
 body.jb-commerce :is(.wc-block-order-confirmation-totals-wrapper, .wc-block-order-confirmation-shipping-wrapper, .wc-block-order-confirmation-billing-wrapper, .wc-block-order-confirmation-additional-fields-wrapper, .wc-block-order-confirmation-downloads-wrapper) { padding: 20px 16px; }
 body.jb-commerce .wc-block-order-confirmation-summary-list { gap: 12px; }
 body.jb-commerce .wc-block-order-confirmation-summary-list-item { padding: 14px; }
 body.jb-commerce .wc-block-order-confirmation-totals__table :is(th, td) { padding: 12px 4px; }
 body.jb-commerce .wc-block-order-confirmation-totals__table tfoot tr:last-child { font-size: 19px; }
 body.jb-commerce .wc-block-order-confirmation-address-wrapper { gap: 24px; }
 body.jb-commerce .wc-block-order-confirmation-address-wrapper .wp-block-column > div { height: auto; }
 .jb-order-help .jb-bd-button { width: 100%; }
}

/* Neutraliser les styles mobiles natifs qui déborderaient des nouvelles cartes. */
body.jb-commerce .wc-block-order-confirmation-summary-list-item { box-sizing: border-box; width: auto; }
body.jb-commerce .wc-block-order-confirmation-summary ul li > .wc-block-order-confirmation-summary-list-item__key,
body.jb-commerce .wc-block-order-confirmation-summary ul li > .wc-block-order-confirmation-summary-list-item__value { display: block; }
body.jb-commerce .wc-block-order-confirmation-summary ul li > .wc-block-order-confirmation-summary-list-item__value { font-weight: 800; }
body.jb-commerce .wc-block-checkout .wc-block-components-checkout-step__heading-content { font-size: 16px; }
body.jb-commerce .wc-block-checkout .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::before { position: static; left: auto; top: auto; transform: none; content: counter(checkout-step) ". "; }
body.jb-commerce .wc-block-checkout .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__content::before,
body.jb-commerce .wc-block-checkout .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__description::before { display: none; }
body.jb-commerce .wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title { display: block; }
