/* Panier premium : mini-panier (tiroir), page panier et commande WooCommerce (blocs). Neutre : tout vient des variables --bp-* (charte du blueprint). */
:root {
	--bp-cart-accent: var(--bp-scheme-1-button, #c2410c);
	--bp-cart-accent-text: var(--bp-scheme-1-button-text, #fff);
	--bp-cart-ink: var(--bp-scheme-1-text, #2b2622);
	--bp-cart-brand: var(--bp-header-bg, #34439e);
	--bp-cart-line: rgba(43, 38, 34, .1);
	--bp-cart-soft: #f6f4f1;
}
.wc-block-mini-cart__drawer, .wc-block-mini-cart__drawer *, .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout, .wp-block-woocommerce-empty-cart-block {
	font-family: var(--bp-font-body, 'Nunito'), system-ui, sans-serif;
}
.wp-block-woocommerce-cart h1, .wp-block-woocommerce-cart h2, .wp-block-woocommerce-checkout h2, .wc-block-mini-cart__title, .wc-block-mini-cart__empty-cart-wrapper h2 {
	font-family: var(--bp-font-heading, 'Poppins'), system-ui, sans-serif; letter-spacing: -.01em; color: var(--bp-cart-ink);
}

/* ---- badge du panier dans l'en-tête ---- */
.bp-icons .wc-block-mini-cart__button { position: relative; }
.bp-header .bp-icons .wc-block-mini-cart__badge {
	display: flex; position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; margin: 0;
	border-radius: 999px; background: var(--bp-cart-accent); color: var(--bp-cart-accent-text); font: 800 11px/18px 'Nunito', sans-serif;
	align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bp-header-bg, #34439e);
}
.bp-header .bp-icons .wc-block-mini-cart__badge:empty { display: none; }

/* ---- tiroir ---- */
.wc-block-mini-cart__drawer.wc-block-components-drawer { border-radius: 24px 0 0 24px; background: #fff; color: var(--bp-cart-ink); box-shadow: -24px 0 60px -20px rgba(28, 33, 71, .35); }
.wc-block-components-drawer__screen-overlay { background: rgba(28, 33, 71, .45); backdrop-filter: blur(2px); }
.wc-block-mini-cart__drawer .components-modal__header { padding: 22px 24px 14px; border-bottom: 1px solid var(--bp-cart-line); }
.wc-block-mini-cart__title { font-size: 20px; font-weight: 700; margin: 0; }
.wc-block-mini-cart__title .wc-block-mini-cart__title-items-count { color: var(--bp-cart-brand); }
.wc-block-mini-cart__items { padding: 8px 24px; }
.wc-block-mini-cart__footer { padding: 18px 24px 22px; border-top: 1px solid var(--bp-cart-line); background: linear-gradient(180deg, #fff, var(--bp-cart-soft)); box-shadow: 0 -12px 24px -18px rgba(0, 0, 0, .18); }
.wc-block-mini-cart__footer .wc-block-components-totals-item__label { font-weight: 700; font-size: 15px; }
.wc-block-mini-cart__footer .wc-block-components-totals-item__value { font-weight: 800; font-size: 20px; color: var(--bp-cart-brand); }
.wc-block-mini-cart__footer-actions { gap: 10px; display: flex; flex-direction: column; margin-top: 14px; }
.wc-block-mini-cart__footer-actions .wc-block-components-button { margin: 0; width: 100%; }
.wc-block-mini-cart__empty-cart-wrapper { text-align: center; padding: 48px 24px; }

/* ---- boutons (tiroir, panier, commande) ---- */
.wc-block-components-button:not(.is-link), .wc-block-mini-cart__drawer .wp-block-button__link { box-sizing: border-box; }
.wc-block-components-button:not(.is-link), .wp-block-woocommerce-cart .wc-block-cart__submit-button, .wc-block-mini-cart__footer-checkout, .wp-block-woocommerce-empty-cart-block .wp-block-button__link, .wc-block-mini-cart__drawer .wp-block-button__link {
	border-radius: 999px; min-height: 48px; padding: 12px 24px; font: 800 15px/1.2 'Nunito', sans-serif; letter-spacing: .01em; text-transform: none;
	border: 2px solid var(--bp-cart-accent); background: var(--bp-cart-accent); color: var(--bp-cart-accent-text); box-shadow: 0 6px 16px -8px var(--bp-cart-accent);
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.wc-block-components-button:not(.is-link):hover, .wc-block-mini-cart__drawer .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px var(--bp-cart-accent); background: var(--bp-cart-accent); color: var(--bp-cart-accent-text); }
.wc-block-mini-cart__footer-cart.wc-block-components-button, .wc-block-components-button.outlined {
	background: #fff; color: var(--bp-cart-brand); border-color: var(--bp-cart-brand); box-shadow: none;
}
.wc-block-components-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--bp-cart-brand) 45%, transparent); outline-offset: 2px; }

/* ---- lignes produit ---- */
.wc-block-cart-items__row { border-bottom: 1px solid var(--bp-cart-line); }
.wc-block-cart-items__header th, .wc-block-cart-items__header { font: 700 12px 'Nunito', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #6b635b; }
.wc-block-cart-item__image img { border-radius: 14px; background: var(--bp-cart-soft); border: 1px solid var(--bp-cart-line); }
.wc-block-components-product-name { font: 700 15px/1.35 'Nunito', sans-serif; color: var(--bp-cart-ink); text-decoration: none; }
a.wc-block-components-product-name:hover { color: var(--bp-cart-brand); }
.wc-block-components-product-metadata, .wc-block-components-product-details { font-size: 13px; color: #6b635b; }
.wc-block-components-product-price__value, .wc-block-cart-item__total .wc-block-components-product-price { font-weight: 800; color: var(--bp-cart-ink); }
.wc-block-components-product-price__regular { color: #8c8379; font-weight: 600; }
.wc-block-components-sale-badge { border-radius: 999px; border: 0; background: #ffcd00; color: #2b2622; font-weight: 800; padding: 2px 10px; text-transform: none; }
.wc-block-components-quantity-selector { border-radius: 999px; border: 1.5px solid var(--bp-cart-line); background: #fff; overflow: hidden; }
.wc-block-components-quantity-selector::after { display: none; }
.wc-block-components-quantity-selector__input { font-weight: 800; }
.wc-block-components-quantity-selector__button { opacity: .8; }
.wc-block-components-quantity-selector__button:hover { background: var(--bp-cart-soft); opacity: 1; }
.wc-block-cart-item__remove-link { color: #8c8379; font-size: 13px; text-decoration: none; border-bottom: 1px dotted currentColor; }
.wc-block-cart-item__remove-link:hover { color: #b3261e; }

/* ---- totaux et formulaires ---- */
.wp-block-woocommerce-cart .wc-block-cart__sidebar, .wp-block-woocommerce-checkout .wc-block-checkout__sidebar {
	background: #fff; border: 1px solid var(--bp-cart-line); border-radius: 22px; padding: 22px 24px; box-shadow: 0 18px 40px -26px rgba(28, 33, 71, .35); align-self: start;
}
.wc-block-components-totals-wrapper { border-color: var(--bp-cart-line); }
.wc-block-components-totals-item__label { color: #6b635b; font-weight: 600; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label { color: var(--bp-cart-ink); font-weight: 800; font-size: 17px; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-weight: 800; font-size: 24px; color: var(--bp-cart-brand); }
.wc-block-components-totals-coupon__input input, .wc-block-components-text-input input, .wc-block-components-textarea {
	border-radius: 14px; border: 1.5px solid rgba(43, 38, 34, .2); font-family: 'Nunito', sans-serif;
}
.wc-block-components-text-input input:focus, .wc-block-components-textarea:focus { border-color: var(--bp-cart-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-cart-brand) 20%, transparent); outline: 0; }
.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option { border-radius: 14px; }
.wc-block-components-notice-banner { border-radius: 14px; }

/* ---- panier vide ---- */
.wp-block-woocommerce-empty-cart-block { text-align: center; padding: 56px 16px; }
.wp-block-woocommerce-empty-cart-block .wp-block-separator { display: none; }
.wp-block-woocommerce-empty-cart-block .with-empty-cart-icon:before { background-color: var(--bp-cart-brand); opacity: .9; }


/* ---- tiroir : bouton de fermeture rond ---- */
.wc-block-mini-cart__drawer .wc-block-components-drawer__close { top: 14px; right: 14px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--bp-cart-soft); color: var(--bp-cart-ink); display: flex; align-items: center; justify-content: center; box-shadow: none; transform: none; }
.wc-block-mini-cart__drawer .wc-block-components-drawer__close:hover { background: #ebe6df; }
.wc-block-mini-cart__drawer .wc-block-components-drawer__close:focus-visible { outline: 3px solid color-mix(in srgb, var(--bp-cart-brand) 45%, transparent); outline-offset: 2px; }
.wc-block-mini-cart__drawer .components-modal__header { padding-right: 64px; }

/* ---- pages Panier et Commande : même largeur que l'en-tête, titre à l'échelle de la charte ---- */
.woocommerce-cart .wp-block-post-title, .woocommerce-checkout .wp-block-post-title { font: 700 clamp(26px, 3.4vw, 36px)/1.15 var(--bp-font-heading, 'Poppins'), system-ui, sans-serif; letter-spacing: -.01em; color: var(--bp-cart-ink); margin-block: 28px 20px; max-width: 1180px; margin-inline: auto; }
.woocommerce-cart .entry-content.alignwide, .woocommerce-checkout .entry-content.alignwide { max-width: 1180px; margin-inline: auto; }
.wp-block-woocommerce-cart .wc-block-cart__main { min-width: 0; }

/* ---- champs de formulaire (surcharges plus spécifiques que celles de WooCommerce) ---- */
.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input:is([type=text], [type=email], [type=tel], [type=number], [type=password]),
.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
.wp-block-woocommerce-cart .wc-block-components-totals-coupon__input input {
	border-radius: 14px; border: 1.5px solid rgba(43, 38, 34, .2); font-family: var(--bp-font-body, 'Nunito'), system-ui, sans-serif; background-color: #fff;
}
.wp-block-woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input:focus,
.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus { border-color: var(--bp-cart-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-cart-brand) 20%, transparent); outline: 0; }
.wp-block-woocommerce-checkout .wc-block-components-checkout-step__title, .wp-block-woocommerce-checkout .wc-block-components-title { font-family: var(--bp-font-heading, 'Poppins'), system-ui, sans-serif; font-weight: 700; color: var(--bp-cart-ink); }

/* ---- panier vide : grille « Nouveautés » ---- */
.wp-block-woocommerce-empty-cart-block .wc-block-grid .wc-block-grid__products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid .wc-block-grid__products .wc-block-grid__product { width: auto !important; max-width: none !important; flex: none !important; margin: 0 !important; box-sizing: border-box; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product { border: 1px solid var(--bp-cart-line); border-radius: 20px; padding: 14px; background: #fff; box-shadow: 0 12px 30px -24px rgba(28, 33, 71, .4); }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img { border-radius: 14px; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-link, .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title { color: var(--bp-cart-ink); text-decoration: none; font: 700 14px/1.35 var(--bp-font-body, 'Nunito'), system-ui, sans-serif; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-link:hover .wc-block-grid__product-title { color: var(--bp-cart-brand); }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price { font-weight: 800; color: var(--bp-cart-ink); }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price del { color: #8c8379; font-weight: 600; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price ins { text-decoration: none; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-onsale { border-radius: 999px; border: 0; background: #ffcd00; color: var(--bp-cart-ink); font-weight: 800; text-transform: none; padding: 2px 12px; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link { font-size: 14px; min-height: 42px; padding: 8px 18px; }

@media (max-width: 749px) {
	.wc-block-mini-cart__drawer.wc-block-components-drawer { border-radius: 24px 24px 0 0; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid .wc-block-grid__products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product { padding: 10px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link { padding: 8px 12px; font-size: 13px; }
	.wc-block-mini-cart__items { padding: 4px 16px; }
	.wc-block-mini-cart__footer { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
	.wp-block-woocommerce-cart .wc-block-cart__sidebar, .wp-block-woocommerce-checkout .wc-block-checkout__sidebar { padding: 18px 16px; border-radius: 18px; }
}

/* ---- lien « Vider le panier » (assets/cart-extras.js) et image cliquable ---- */
.bp-cart-clear-wrap { margin: 14px 0 0; }
.bp-cart-clear-wrap--page { text-align: right; }
.bp-cart-clear-wrap--mini { text-align: center; margin-top: 12px; }
.bp-cart-clear { appearance: none; background: none; border: 0; padding: 4px 2px; margin: 0; cursor: pointer; font: 600 13px/1.3 var(--bp-font-body, 'Nunito'), system-ui, sans-serif; color: #8c8379; text-decoration: underline dotted; text-underline-offset: 3px; box-shadow: none; min-height: 0; }
.bp-cart-clear:hover { color: #b3261e; }
.bp-cart-clear:focus-visible { outline: 3px solid color-mix(in srgb, var(--bp-cart-brand) 45%, transparent); outline-offset: 2px; border-radius: 4px; }
.bp-cart-confirm { border: 0; border-radius: 22px; padding: 26px 26px 22px; width: min(420px, calc(100vw - 32px)); box-sizing: border-box; background: #fff; color: var(--bp-cart-ink); box-shadow: 0 30px 70px -20px rgba(28, 33, 71, .5); font-family: var(--bp-font-body, 'Nunito'), system-ui, sans-serif; }
.bp-cart-confirm::backdrop { background: rgba(28, 33, 71, .45); backdrop-filter: blur(2px); }
.bp-cart-confirm__text { margin: 0 0 20px; font: 700 17px/1.4 var(--bp-font-heading, 'Poppins'), system-ui, sans-serif; }
.bp-cart-confirm__error { margin: -8px 0 16px; color: #b3261e; font-size: 14px; }
.bp-cart-confirm__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.bp-cart-confirm__actions button { border-radius: 999px; min-height: 44px; padding: 10px 20px; font: 800 14px/1.2 var(--bp-font-body, 'Nunito'), system-ui, sans-serif; cursor: pointer; border: 2px solid var(--bp-cart-accent); }
.bp-cart-confirm__no { background: var(--bp-cart-accent); color: var(--bp-cart-accent-text); }
.bp-cart-confirm__yes { background: #fff; color: #b3261e; border-color: #b3261e !important; }
.bp-cart-confirm__actions button:disabled { opacity: .6; cursor: progress; }
.bp-cart-confirm__actions button:focus-visible { outline: 3px solid color-mix(in srgb, var(--bp-cart-brand) 45%, transparent); outline-offset: 2px; }
.wc-block-cart-item__image img { cursor: pointer; }
.bp-cart-imglink-off .wc-block-cart-item__image a { pointer-events: none; cursor: default; }
.bp-cart-imglink-off .wc-block-cart-item__image img { cursor: default; }
@media (max-width: 749px) {
	.bp-cart-clear-wrap--page { text-align: center; }
	.bp-cart-clear { padding: 10px 8px; }
	.bp-cart-confirm__actions { flex-direction: column-reverse; }
	.bp-cart-confirm__actions button { width: 100%; }
}

/* Modifier la livraison depuis le panier (cart-delivery.js) */
.bp-liv-wrap { margin: 4px 0 6px; }
.bp-liv-edit { background: none; border: 0; padding: 0; font: inherit; font-size: .85em; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; opacity: .85; }
.bp-liv-edit:hover { opacity: 1; }
.bp-liv-panel { margin: 8px 0 0; padding: 8px 10px; border: 1px solid rgba(0,0,0,.18); border-radius: 8px; display: grid; gap: 6px; }
.bp-liv-opt { display: flex; gap: 8px; align-items: flex-start; font-size: .9em; cursor: pointer; }
.bp-liv-opt input { margin-top: .2em; width: 18px; height: 18px; flex: none; }

/* Paiement : une seule méthode d'expédition (« Standard, gratuit ») = pas de sélecteur redondant avec le délai choisi sur la fiche (delivery.hide_single_method) */
.bp-ship-hide-single .wc-block-checkout__shipping-option:has(.wc-block-components-shipping-rates-control):not(:has(.wc-block-components-radio-control__option ~ .wc-block-components-radio-control__option)) { display: none; }

/* ===== Parcours d'achat épuré (CartFocus.php, assets/cart-focus.js) : panier, paiement et commande clairs, orientés conversion ===== */
/* Bannières vertes de succès supprimées (réglage cart.notices.hide_success) ; erreurs, avertissements et informations conservés. Compte client exclu. */
body.bp-no-success-notices:not(.woocommerce-account) .woocommerce-message,
body.bp-no-success-notices:not(.woocommerce-account) .wc-block-components-notice-banner.is-success { display: none !important; }

/* En-tête réduit : retour à la boutique, logo, mention de paiement sécurisé. */
.bp-focus-hdr { background: #fff; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.bp-focus-hdr__in { max-width: 1180px; margin: 0 auto; padding: 8px 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.bp-focus-hdr__back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 0.9rem; font-weight: 600; color: var(--bp-cart-brand, #c2410c); text-decoration: none; }
.bp-focus-hdr__back:hover { text-decoration: underline; }
.bp-focus-hdr__logo { justify-self: center; line-height: 0; }
.bp-focus-hdr__logo .bp-logo { color: var(--bp-cart-ink, #1f1d2b); text-decoration: none; display: inline-block; }
.bp-focus-hdr__logo .bp-logo img { display: block; max-height: 40px; width: auto; }
.bp-focus-hdr__logo .bp-logo-text { font: 700 1.25rem/1.2 var(--bp-font-heading, 'Poppins'), system-ui, sans-serif; }
.bp-focus-hdr__logo .bp-logo__tagline { display: none; }
.bp-focus-hdr__secure { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; opacity: 0.7; white-space: nowrap; }
@media (max-width: 600px) {
	.bp-focus-hdr__in { grid-template-columns: 1fr auto; padding: 6px 16px; }
	.bp-focus-hdr__secure { display: none; }
	.bp-focus-hdr__back span { max-width: 9.5em; line-height: 1.2; }
}

/* Paiement : récapitulatif replié (le total reste visible) et liens discrets. */
.bp-sum-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin: 0; padding: 12px 16px; background: none; border: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); color: var(--bp-cart-brand, #c2410c); font-family: inherit; font-size: 0.88rem; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; }
.bp-sum-toggle__chev { flex: none; width: 8px; height: 8px; margin-right: 4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.2s; }
body.bp-sum-open .bp-sum-toggle__chev { transform: rotate(-135deg) translate(-2px, -2px); }
body:not(.bp-sum-open) .bp-sum-managed .wc-block-components-order-summary { display: none; }
.bp-sum-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin: 0; padding: 12px 16px; font-size: 0.8rem; opacity: 0.75; }
.bp-sum-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bp-sum-toggle__chev { transition: none; } }

/* Panier : colonne « total » (prix + badge « Économisez ») jamais coupée, quelle que soit la largeur (mobile / conteneur étroit) */
.wp-block-woocommerce-cart .wc-block-cart-items, .wp-block-woocommerce-cart .wc-block-cart-items__row { max-width: 100%; box-sizing: border-box; }
.wp-block-woocommerce-cart .wc-block-cart-items td { min-width: 0; box-sizing: border-box; }
.wp-block-woocommerce-cart .wc-block-cart-item__product { min-width: 0; overflow-wrap: anywhere; }
.wp-block-woocommerce-cart .wc-block-cart-item__total { min-width: 0; text-align: right; }
.wp-block-woocommerce-cart .wc-block-cart-item__total .wc-block-cart-item__total-price-and-sale-badge-wrapper { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 100%; }
.wp-block-woocommerce-cart .wc-block-cart-item__total .wc-block-components-sale-badge { white-space: normal; text-align: center; max-width: 100%; box-sizing: border-box; }
.wp-block-woocommerce-cart .wc-block-cart-item__quantity { flex-wrap: wrap; }
@media (max-width: 749px) {
	.wp-block-woocommerce-cart .wc-block-cart-items { table-layout: fixed; width: 100%; }
	.wp-block-woocommerce-cart .wc-block-cart-items__row { grid-template-columns: 72px minmax(0, 1fr) auto; column-gap: 12px; }
	.wp-block-woocommerce-cart .wc-block-cart-item__total { padding-left: 0; }
}

/* Panier : badge « Économisez » au-dessus du titre, aligné à droite (la colonne du prix est trop étroite pour le contenir) */
.wp-block-woocommerce-cart .wc-block-cart-items__row { position: relative; }
.wp-block-woocommerce-cart .wc-block-cart-items__row:has(.wc-block-components-sale-badge) > * { margin-top: 30px; }
.wp-block-woocommerce-cart .wc-block-cart-item__total, .wp-block-woocommerce-cart .wc-block-cart-item__total .wc-block-cart-item__total-price-and-sale-badge-wrapper { position: static; }
.wp-block-woocommerce-cart .wc-block-cart-item__total .wc-block-components-sale-badge { position: absolute; top: 8px; right: 0; margin: 0; white-space: nowrap; width: auto; max-width: none; border-radius: 999px; }
