/* Ferravelli V3 — blocs WooCommerce réels (Panier, Commande) habillés comme la V3 validée,
 * et raccords avec le socle (ferravelli.css / woocommerce.css restent chargés pour le compte et la liste de souhaits).
 * Tout est limité à body.fv-v3. */

/* ------------------------------------------------------------------ Raccords socle */
body.fv-v3 { background: var(--ivory); color: var(--ink); letter-spacing: 0; font: 400 var(--fs-body) / 1.65 var(--sans); }
body.fv-v3 [hidden] { display: none !important; } /* filtres, panier : l'attribut hidden prime sur les display des composants */
body.fv-v3 .v-main { display: block; }
body.fv-v3 .wp-site-blocks > * { margin-block-start: 0; }
body.fv-v3 .wp-site-blocks { padding: 0; }
body.fv-v3 :focus-visible { outline: 1px solid var(--cognac); outline-offset: 3px; }
body.fv-v3 .v-co-ft { padding: 0 0 40px; display: flex; gap: 20px; flex-wrap: wrap; }
body.fv-v3 .v-search__bar--page { margin-top: 32px; max-width: 640px; }
body.fv-v3 .v-pagination { margin-top: 48px; font-size: var(--fs-ui); }
body.fv-v3 .v-pagination .nav-links { display: flex; gap: 18px; }
body.fv-v3 .v-pagination .current { text-decoration: underline; text-underline-offset: 4px; }
body.fv-v3 .v-prose details { border-bottom: 1px solid var(--line); padding: 18px 0; }
body.fv-v3 .v-prose summary { cursor: pointer; font-weight: 500; list-style: none; }
body.fv-v3 .v-prose summary::-webkit-details-marker { display: none; }
body.fv-v3 .v-prose summary::after { content: "+"; float: right; color: var(--muted); }
body.fv-v3 .v-prose details[open] summary::after { content: "−"; }
body.fv-v3 .v-prose details > p { margin: 12px 0 0; color: var(--muted); }

/* Pages non refondues (compte, liste de souhaits) : contenu du socle sous l'en-tête V3 */
body.fv-v3 .fv-main { background: var(--ivory); }

/* ------------------------------------------------------------------ Commun Panier / Commande */
body.fv-v3 .v-cartpage .v-wrap > .wp-block-post-content,
body.fv-v3 .v-copage .v-wrap > .wp-block-post-content { max-width: none; }
body.fv-v3 :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) { font-family: var(--sans); font-size: var(--fs-ui); color: var(--ink); letter-spacing: 0; }
body.fv-v3 :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout).alignwide { max-width: none; margin: 0; }
body.fv-v3 .wc-block-components-sidebar-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 120px); align-items: start; margin: 0; }
body.fv-v3 .wp-block-woocommerce-checkout .wc-block-components-sidebar-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 140px); }
body.fv-v3 .wc-block-components-sidebar-layout .wc-block-components-main,
body.fv-v3 .wc-block-components-sidebar-layout .wc-block-components-sidebar { width: auto; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; }
body.fv-v3 .wc-block-components-sidebar { position: sticky; top: calc(var(--header-h) + 32px); }
body.fv-v3 :is(.wc-block-components-title, .wc-block-cart__totals-title, .wc-block-components-checkout-order-summary__title-text) {
	font-family: var(--label); font-stretch: 125%; font-weight: 500; font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; padding: 0;
}
body.fv-v3 .wc-block-components-product-name { font-family: var(--sans); font-size: var(--fs-ui); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); line-height: 1.4; }
body.fv-v3 :is(.wc-block-components-product-metadata, .wc-block-components-product-details, .wc-block-components-order-summary-item__description) { color: var(--muted); font-size: var(--fs-ui); }
body.fv-v3 .wc-block-components-product-details { margin: 2px 0 0; padding: 0; list-style: none; }
body.fv-v3 .wc-block-components-product-metadata__description { display: none; } /* pas de description fournisseur dans le panier */
body.fv-v3 :is(.wc-block-cart-item__image img, .wc-block-components-order-summary-item__image img) { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper); mix-blend-mode: multiply; border: 0; border-radius: 0; }
body.fv-v3 .wc-block-components-sale-badge, body.fv-v3 .wc-block-components-product-badge { display: none; }

/* Totaux : filets 1 px, total en serif */
body.fv-v3 .wc-block-components-totals-wrapper { border: 0; padding: 0; }
body.fv-v3 .wc-block-components-totals-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
body.fv-v3 .wc-block-components-totals-item__label { font: 400 var(--fs-ui) / 1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
body.fv-v3 .wc-block-components-totals-item__value { font-weight: 400; font-variant-numeric: tabular-nums; }
body.fv-v3 .wc-block-components-totals-item__description { color: var(--muted); font-size: var(--fs-small); width: 100%; }
body.fv-v3 .wc-block-components-totals-footer-item { border-bottom: 0; padding-block: 18px; }
body.fv-v3 .wc-block-components-totals-footer-item :is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value) { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
body.fv-v3 .wc-block-components-totals-footer-item-tax { color: var(--muted); font-size: var(--fs-small); }

/* Un seul bouton plein : Checkout / Place order */
body.fv-v3 :is(.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button, .wc-block-components-button:not(.is-link)) {
	display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: center; border: 0; border-radius: 0; box-shadow: none;
	background: var(--ink); color: var(--ivory); font-family: var(--label); font-stretch: 125%; font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; padding: 0 24px;
	transition: background-color 200ms var(--ease);
}
body.fv-v3 :is(.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button, .wc-block-components-button:not(.is-link)):hover { background: var(--espresso); color: var(--ivory); }
body.fv-v3 :is(.wc-block-components-button:not(.is-link))[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; }
body.fv-v3 .wc-block-cart__submit-container { margin-top: 22px; }
body.fv-v3 .wc-block-components-totals-coupon .wc-block-components-button:not(.is-link) { width: auto; min-height: 48px; background: none; color: var(--ink); border-bottom: 1px solid currentColor; padding: 0; }

/* Code : replié derrière « Have a code? » (panneau natif du bloc) */
body.fv-v3 :is(.wc-block-components-panel__button, .wc-block-components-totals-coupon-link) { font: 400 var(--fs-small) / 1.5 var(--sans); color: var(--muted); text-decoration: underline; text-underline-offset: 4px; letter-spacing: 0; text-transform: none; padding: 12px 0; }
body.fv-v3 .wc-block-components-panel__button-icon { display: none; }

/* Champs : ligne fine, sans boîte */
body.fv-v3 :is(.wc-block-components-text-input, .wc-blocks-components-select, .wc-block-components-combobox) { margin-top: 22px; }
body.fv-v3 .wc-block-components-form :is(.wc-block-components-text-input input, .wc-block-components-text-input textarea, .wc-blocks-components-select__select, .wc-block-components-combobox .components-combobox-control input, .wc-block-components-textarea),
body.fv-v3 .wc-block-components-totals-coupon .wc-block-components-text-input input {
	height: 52px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding: 18px 0 4px; font: 400 var(--fs-body) / 1.4 var(--sans); color: var(--ink); letter-spacing: 0;
}
body.fv-v3 .wc-blocks-components-select__container { border: 0; border-radius: 0; background: transparent; height: 52px; }
body.fv-v3 :is(.wc-block-components-text-input input, .wc-blocks-components-select__select):focus { border-bottom-color: var(--ink); outline: 0; box-shadow: none; }
body.fv-v3 :is(.wc-block-components-text-input label, .wc-blocks-components-select__label, .wc-block-components-combobox label) { left: 0; color: var(--muted); font-size: var(--fs-small); letter-spacing: 0; text-transform: none; }
body.fv-v3 .wc-block-components-text-input.is-active label, body.fv-v3 .wc-block-components-text-input input:focus + label { transform: translateY(2px) scale(0.92); }
body.fv-v3 .wc-block-components-checkbox { font-size: var(--fs-small); color: var(--muted); }
body.fv-v3 .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] { border: 1px solid var(--ink); border-radius: 0; background: transparent; width: 16px; height: 16px; min-width: 16px; }

/* Avis */
body.fv-v3 .wc-block-components-notice-banner { border: 0; border-top: 1px solid var(--cognac); border-radius: 0; background: transparent; padding: 18px 0 0; font-size: var(--fs-ui); color: var(--ink); box-shadow: none; }
body.fv-v3 .wc-block-components-notice-banner > svg { display: none; }

/* ------------------------------------------------------------------ Panier */
body.fv-v3 .v-cartpage { padding-bottom: var(--section-tight); }
body.fv-v3 .v-cartpage .v-wrap { padding-top: 16px; }
body.fv-v3 .wc-block-cart-items { width: 100%; border: 0; border-collapse: collapse; margin: 0; }
body.fv-v3 .wc-block-cart-items__header { display: none; }
body.fv-v3 .wc-block-cart-items__row { border-bottom: 1px solid var(--line); }
body.fv-v3 .wc-block-cart-items td { border: 0; padding: 20px 0; vertical-align: top; }
body.fv-v3 .wc-block-cart-items .wc-block-cart-item__image { width: 96px; padding-right: 20px; }
body.fv-v3 .wc-block-cart-item__prices { display: none; } /* prix unitaire : le prix de ligne suffit */
body.fv-v3 .wc-block-cart-item__total { text-align: right; font-variant-numeric: tabular-nums; }
body.fv-v3 .wc-block-cart-item__total .price { font-weight: 400; }
body.fv-v3 .wc-block-cart-item__quantity { display: flex; align-items: center; gap: 22px; margin-top: 16px; }
body.fv-v3 .wc-block-components-quantity-selector { width: auto; border: 0; border-radius: 0; background: none; display: inline-flex; align-items: center; gap: 4px; }
body.fv-v3 .wc-block-components-quantity-selector::after { display: none; }
body.fv-v3 .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { width: 28px; min-width: 0; border: 0; background: none; font-size: var(--fs-ui); text-align: center; padding: 0; box-shadow: none; }
body.fv-v3 .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button { min-width: 22px; width: 22px; height: 22px; border: 0; background: none; color: var(--muted); font-size: 0.9rem; opacity: 1; }
body.fv-v3 .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover { color: var(--ink); }
body.fv-v3 .wc-block-cart-item__remove-link { color: var(--muted) !important; text-decoration: underline !important; text-underline-offset: 4px; font-size: var(--fs-small) !important; text-transform: none; letter-spacing: 0; }
body.fv-v3 .wc-block-cart__totals-title { display: block; text-align: left; }
body.fv-v3 .wp-block-woocommerce-cart-order-summary-block { border: 0; }
body.fv-v3 .wc-block-cart .wc-block-components-shipping-calculator,
body.fv-v3 .wc-block-cart .wc-block-components-totals-shipping__change-address__link { display: none; }
body.fv-v3 .wp-block-woocommerce-empty-cart-block { text-align: left; }
body.fv-v3 .wc-block-cart__empty-cart__title { font: 400 var(--fs-h3) / 1.2 var(--serif); text-align: left; letter-spacing: 0; text-transform: none; margin: 24px 0; }
body.fv-v3 .wc-block-cart__empty-cart__title.with-empty-cart-icon::before { display: none; }
body.fv-v3 .wp-block-woocommerce-empty-cart-block .wp-block-separator,
body.fv-v3 .wp-block-woocommerce-empty-cart-block .wp-block-heading:not(.wc-block-cart__empty-cart__title),
body.fv-v3 .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new { display: none; }

/* ------------------------------------------------------------------ Commande */
body.fv-v3.woocommerce-checkout .v-copage > .v-wrap { padding-block: clamp(40px, 6vw, 88px) var(--section); }
body.fv-v3 .wc-block-checkout__form { counter-reset: fvstep; }
body.fv-v3 .wc-block-components-checkout-step { padding: 0 0 44px; margin: 0 0 44px; border-bottom: 1px solid var(--line); }
body.fv-v3 .wc-block-components-checkout-step::after { display: none; }
body.fv-v3 .wc-block-components-checkout-step__heading { margin: 0 0 8px; }
body.fv-v3 .wc-block-components-checkout-step__title { counter-increment: fvstep; display: flex; gap: 14px; font-family: var(--label); font-stretch: 125%; font-weight: 500; font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
body.fv-v3 .wc-block-components-checkout-step__title::before { content: counter(fvstep, decimal-leading-zero); color: var(--muted); }
body.fv-v3 .wc-block-components-checkout-step__container { padding: 0; }
body.fv-v3 .wc-block-components-checkout-step__container::after { display: none; }
body.fv-v3 .wc-block-components-checkout-step__description { color: var(--muted); font-size: var(--fs-small); margin: 0 0 8px; }
body.fv-v3 .wc-block-checkout__no-payment-methods-notice,
body.fv-v3 .wc-block-checkout__no-shipping-placeholder,
body.fv-v3 .wc-block-components-checkout-step .wc-block-components-notice-banner { max-width: 34rem; }
body.fv-v3 .wc-block-checkout__terms { font-size: var(--fs-small); color: var(--muted); margin: 16px 0 0; padding: 0; border: 0; }
body.fv-v3 .wc-block-checkout__terms a { text-decoration: underline; text-underline-offset: 3px; }
body.fv-v3 .wc-block-checkout__actions { padding: 0; }
body.fv-v3 .wc-block-checkout__actions_row { display: flex; flex-direction: column-reverse; gap: 16px; align-items: stretch; }
body.fv-v3 .wc-block-checkout__actions_row .wc-block-components-checkout-return-to-cart-button { display: none; } /* « Back to bag » est dans l'en-tête */
body.fv-v3 .wc-block-components-sidebar-layout .wc-block-checkout__sidebar { background: var(--cream); padding: clamp(24px, 3vw, 40px); top: 32px; }
body.fv-v3 .wc-block-components-order-summary { padding: 0; }
body.fv-v3 .wc-block-components-order-summary .wc-block-components-panel__button { display: none; }
body.fv-v3 .wc-block-components-order-summary-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-ui); }
body.fv-v3 .wc-block-components-order-summary-item__image { width: 64px; margin: 0; padding: 0; position: relative; }
body.fv-v3 .wc-block-components-order-summary-item__image img { width: 64px; }
body.fv-v3 .wc-block-components-order-summary-item__quantity { background: var(--ink); color: var(--ivory); border: 0; box-shadow: none; font-size: 10px; min-width: 18px; height: 18px; line-height: 18px; }
body.fv-v3 .wc-block-components-order-summary-item__description { padding: 0; }
body.fv-v3 .wc-block-components-order-summary-item__total-price { font-weight: 400; }
body.fv-v3 .wc-block-components-order-summary-item__individual-prices { display: none; }

/* ------------------------------------------------------------------ Tablette / mobile */
@media (max-width: 899px) {
	body.fv-v3 .wc-block-components-sidebar-layout,
	body.fv-v3 .wp-block-woocommerce-checkout .wc-block-components-sidebar-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	body.fv-v3 .wc-block-components-sidebar { position: static; }
	body.fv-v3 .wp-block-woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-checkout__sidebar { order: -1; }
}
@media (max-width: 599px) {
	body.fv-v3 .wc-block-cart-items .wc-block-cart-item__image { width: 80px; padding-right: 14px; }
	body.fv-v3 .wc-block-cart-item__image img { width: 80px; }
	body.fv-v3 .v-co-hd .v-label:first-child { font-size: 0; }
	body.fv-v3 .v-co-hd .v-label:first-child::before { content: "←"; font-size: 0.9rem; }
}

/* ------------------------------------------------------------------ Newsletter réelle : consentement sous le champ */
body.fv-v3 .v-ft__form { flex-wrap: wrap; }
body.fv-v3 .v-ft__form input[type="email"] { flex: 1 1 200px; }
body.fv-v3 .v-ft__form .v-ft__consent { flex: 1 1 100%; display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.5; color: var(--on-dark-muted); cursor: pointer; }
body.fv-v3 .v-ft__form .v-ft__consent input[type="checkbox"] { flex: 0 0 auto; width: 14px; height: 14px; margin: 2px 0 0; accent-color: var(--camel); border: 1px solid var(--on-dark-muted); }
