/*
 * LVV v2 — WooCommerce classique et modules Woo Divi déjà présents.
 * Contrat : section .lvv > module .lvv-woo + classe lvv-native-*.
 * Ne pas mettre .lvv-marketing sur un ancêtre des modules Woo.
 * Aucune règle pour Blocks, moyen de paiement, iframe ou champ caché.
 */

/* Texte, actions et focus : opt-in des seuls modules Woo refaits. */
.lvv .lvv-woo { color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
.lvv .lvv-woo :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 4px;
}
.lvv .lvv-woo :where(a) { text-underline-offset: .2em; }
.lvv .lvv-woo :is(a.button, button.button, input.button) {
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: var(--forest);
  color: var(--white);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
  box-sizing: border-box;
}
.lvv .lvv-woo :is(a.button, button.button, input.button):hover {
  background: #245540;
  border-color: #245540;
  color: var(--white);
}
.lvv .lvv-woo :is(button.button, input.button):is(:disabled, [disabled]),
.lvv .lvv-woo a.button.disabled {
  background: #dde1d9;
  border-color: #a8b0a4;
  color: #5c675b;
  cursor: not-allowed;
}
/* Ne jamais modifier les .loading/.blockUI, aria-live, hidden ou tabindex du moteur. */
.lvv .lvv-woo :is(input.input-text:not([type="hidden"]), textarea.input-text, select:not([multiple]):not(.select2-hidden-accessible):not([hidden]):not([aria-hidden="true"])) {
  border: 1px solid #98a68e;
  border-radius: 5px;
  min-height: 48px;
  padding: 12px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  box-sizing: border-box;
  max-width: 100%;
}
.lvv .lvv-woo textarea.input-text { min-height: 120px; }
.lvv .lvv-woo input.qty { width: 80px; max-width: 100%; text-align: center; }
.lvv .lvv-woo .woocommerce-invalid :is(input.input-text, textarea.input-text, select) {
  border-color: #9c342d;
  border-width: 2px;
}
.lvv .lvv-woo :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
  background: #eeefe4;
  color: var(--ink);
  border-top-color: var(--forest);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.lvv .lvv-woo .woocommerce-error {
  background: #fff1e9;
  color: #672e28;
  border-top-color: #9c342d;
}
/* Les notices Woo conservent leurs pseudo-icônes et leur retrait natif. */

/* Produits : shortcode [products], module Boutique, cross-sells natifs. */
.lvv .lvv-native-products { --lvv-product-columns: 3; }
.lvv .lvv-native-products.lvv-products-four { --lvv-product-columns: 4; }
.lvv .lvv-native-products.lvv-products-two { --lvv-product-columns: 2; }
.lvv .lvv-native-products ul.products {
  display: grid;
  grid-template-columns: repeat(var(--lvv-product-columns), minmax(0, 1fr));
  gap: 32px 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}
/* Les clearfix Woo ne doivent pas devenir des cellules de la grille. */
.lvv .lvv-native-products ul.products::before,
.lvv .lvv-native-products ul.products::after { content: none; }
.lvv .lvv-native-products ul.products li.product {
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
  text-align: left;
}
/* Les 4 !important ci-dessus neutralisent uniquement les largeurs/floats Divi du listing opt-in. */
.lvv .lvv-native-products ul.products li.product :is(.woocommerce-loop-product__link, .woocommerce-LoopProduct-link) {
  color: var(--ink);
  text-decoration: none;
}
.lvv .lvv-native-products ul.products li.product a img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.06;
  object-fit: contain;
  border: 1px solid #dce0d3;
  border-radius: var(--radius);
  background: #e8ecdf;
  margin: 0 0 16px;
  box-sizing: border-box;
}
.lvv .lvv-native-products ul.products li.product :is(.woocommerce-loop-product__title, h2, h3) {
  margin: 0 0 8px;
  padding: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.lvv .lvv-native-products ul.products li.product .price {
  display: block;
  color: var(--forest);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 12px;
}
.lvv .lvv-native-products ul.products li.product .price :is(del, ins) { background: transparent; }
.lvv .lvv-native-products ul.products li.product .price del { color: var(--muted); opacity: 1; font-size: 13px; }
.lvv .lvv-native-products ul.products li.product .price ins { text-decoration: none; }
.lvv .lvv-native-products ul.products li.product > .button { margin-top: auto; align-self: stretch; }
.lvv .lvv-native-products ul.products li.product .added_to_cart { margin-top: 10px; padding-block: 8px; text-decoration: underline; font-size: 13px; }
.lvv .lvv-native-products ul.products li.product .onsale {
  min-width: 0;
  min-height: 0;
  line-height: 1.4;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--forest);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
}
/* Ne pas recréer de remise, notation, stock ou nom de variante dans CSS. */
.lvv .lvv-native-products :is(.woocommerce-result-count, .woocommerce-ordering) { margin-bottom: 24px; }
.lvv .lvv-native-products .woocommerce-ordering select { width: auto; min-width: 210px; }
.lvv .lvv-native-products .woocommerce-pagination ul { border-color: var(--line); border-radius: 6px; }
.lvv .lvv-native-products .woocommerce-pagination ul li { border-color: var(--line); }
.lvv .lvv-native-products .woocommerce-pagination ul li :is(a, span) { min-width: 44px; min-height: 44px; padding: 13px; box-sizing: border-box; }
.lvv .lvv-native-products .woocommerce-pagination ul li span.current { background: var(--forest); color: var(--white); }

/* Fiche produit : modules natifs Title / Price / Add to Cart / Tabs. */
.lvv .lvv-native-product :is(.product_title, .et_pb_module_header) {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(34px, 3.5vw, 48px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.04em;
  margin: 0 0 22px;
}
.lvv .lvv-native-product :is(p.price, span.price) { color: var(--forest); font-size: 26px; line-height: 1.5; }
.lvv .lvv-native-product :is(p.price, span.price) del { color: var(--muted); font-size: 16px; opacity: 1; }
.lvv .lvv-native-product :is(p.price, span.price) ins { text-decoration: none; background: transparent; }
.lvv .lvv-native-product .woocommerce-product-details__short-description { color: var(--muted); font-size: 16px; line-height: 1.75; }
.lvv .lvv-native-product .woocommerce-product-gallery img { border-radius: var(--radius); }
.lvv .lvv-native-product form.cart { margin-block: 24px; }
.lvv .lvv-native-product form.cart .quantity { margin-right: 12px; margin-bottom: 12px; }
.lvv .lvv-native-product form.cart .single_add_to_cart_button { min-width: 190px; }
.lvv .lvv-native-product .variations { width: 100%; margin-bottom: 20px; border-collapse: collapse; }
.lvv .lvv-native-product .variations :is(th, td) { padding: 8px 0; vertical-align: top; }
.lvv .lvv-native-product .variations th.label { padding-right: 12px; font-size: 13px; }
.lvv .lvv-native-product .variations td.value select:not(.select2-hidden-accessible):not([hidden]) { width: 100%; max-width: 100%; }
.lvv .lvv-native-product .reset_variations { display: inline-block; padding: 10px 0; font-size: 13px; text-decoration: underline; }
.lvv .lvv-native-product .product_meta { border-top: 1px solid var(--line); padding-top: 18px; font-size: 13px; }
.lvv .lvv-native-product .woocommerce-tabs :is(h2, h3) { color: var(--ink); font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.2; }
.lvv .lvv-native-product .woocommerce-tabs ul.tabs li a { min-height: 44px; padding: 12px 16px; box-sizing: border-box; }
/* Aucun display sur .woocommerce-variation ou .single_variation_wrap : Woo gère leurs états. */

/* Panier classique, qu'il soit rendu par shortcode ou modules Divi. */
.lvv .lvv-native-cart table.shop_table {
  width: 100%;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.lvv .lvv-native-cart table.shop_table :is(th, td) { padding: 16px 12px; border-top-color: var(--line); }
.lvv .lvv-native-cart table.shop_table th { color: var(--ink); font-size: 12px; font-weight: 600; }
.lvv .lvv-native-cart table.shop_table td.product-name { overflow-wrap: anywhere; }
.lvv .lvv-native-cart table.shop_table td.product-name a { color: var(--ink); font-weight: 600; }
.lvv .lvv-native-cart table.shop_table td.product-thumbnail img { width: 90px; height: 110px; object-fit: contain; border-radius: 5px; }
.lvv .lvv-native-cart table.shop_table td.product-remove a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  line-height: 1;
  border-radius: 50%;
  font-size: 24px;
}
/* Aucun changement de texte ou data-title des cellules ; garder leur adaptation Woo native. */
.lvv .lvv-native-cart .coupon { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.lvv .lvv-native-cart .coupon input.input-text { width: 170px; margin: 0; }
.lvv .lvv-native-cart .coupon button { flex: 0 1 auto; }
.lvv .lvv-native-cart :is(.cart_totals, .cart-collaterals .cart_totals) {
  background: #e6ebdd;
  padding: 28px;
  border: 1px solid #d3dbc9;
  border-radius: var(--radius);
  box-sizing: border-box;
}
.lvv .lvv-native-cart .cart_totals h2 { font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.2; margin: 0 0 20px; }
.lvv .lvv-native-cart .cart_totals table.shop_table { border: 0; background: transparent; }
.lvv .lvv-native-cart .cart_totals table.shop_table :is(th, td) { padding: 14px 0; }
.lvv .lvv-native-cart .wc-proceed-to-checkout { padding: 12px 0 0; }
.lvv .lvv-native-cart .wc-proceed-to-checkout .checkout-button { width: 100%; margin: 0; }
/* Option explicite : uniquement module Divi Cart Totals, pas les shortcodes pleins. */
.lvv .lvv-native-cart.lvv-divi-cart-totals .cart_totals { float: none; width: 100%; }

/* Commande classique : en-têtes, champs natifs et détail récapitulatif. */
.lvv .lvv-native-checkout :is(h2, h3) { color: var(--ink); font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.25; margin: 0 0 20px; }
.lvv .lvv-native-checkout .form-row { margin: 0 0 16px; padding: 0; }
.lvv .lvv-native-checkout .form-row label { color: var(--ink); font-size: 13px; line-height: 1.6; margin-bottom: 6px; }
.lvv .lvv-native-checkout .form-row :is(input.input-text, textarea.input-text) { width: 100%; }
.lvv .lvv-native-checkout .woocommerce-checkout-review-order-table {
  width: 100%;
  border: 1px solid #d3dbc9;
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  background: #e6ebdd;
  font-size: 14px;
}
.lvv .lvv-native-checkout .woocommerce-checkout-review-order-table :is(th, td) { border-top-color: #b9c6af; padding: 16px 18px; vertical-align: top; }
.lvv .lvv-native-checkout .woocommerce-checkout-review-order-table .product-name { overflow-wrap: anywhere; }
.lvv .lvv-native-checkout .woocommerce-checkout-review-order-table .product-total { min-width: 90px; }
.lvv .lvv-native-checkout .woocommerce-terms-and-conditions-wrapper { font-size: 13px; line-height: 1.75; }
.lvv .lvv-native-checkout #place_order { min-height: 52px; max-width: 100%; }
/* IMPORTANT : aucune règle #payment, payment_box, iframe, input[type=radio], Select2 ou hidden.
 * Garder les contrôles, sélecteurs de pays, conditions et nonces des plugins, y compris leur ordre DOM.
 */

/* Grilles Divi opt-in. Les paramètres de colonnes se retirent dans le constructeur. */
.lvv .lvv-divi-two-columns.et_pb_row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.lvv .lvv-divi-two-columns.et_pb_row > .et_pb_column {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  min-width: 0;
}
.lvv .lvv-divi-two-columns.et_pb_row::after { content: none; }
.lvv .lvv-divi-product-row.et_pb_row { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
/* Pas de règle de grille pour form.checkout : ses hooks et sa structure restent natifs. */

@media (max-width: 980px) {
  /* Aligne la bascule des colonnes Woo avec le breakpoint tablette Divi. */
  .lvv .lvv-divi-two-columns.et_pb_row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lvv .lvv-native-products { --lvv-product-columns: 2; }
  .lvv .lvv-native-products.lvv-products-four { --lvv-product-columns: 2; }
}
@media (max-width: 780px) {
  .lvv .lvv-native-products ul.products { gap: 24px 12px; }
  .lvv .lvv-native-products ul.products li.product :is(.woocommerce-loop-product__title, h2, h3) { font-size: 14px; }
  .lvv .lvv-native-products ul.products li.product .price { font-size: 14px; }
  .lvv .lvv-native-products ul.products li.product .price del { font-size: 12px; }
  .lvv .lvv-native-products ul.products li.product > .button { font-size: 13px; padding-inline: 10px; }
  .lvv .lvv-native-products .woocommerce-ordering { float: none; }
  .lvv .lvv-native-products .woocommerce-ordering select { width: 100%; }
  .lvv .lvv-native-product form.cart .single_add_to_cart_button { min-width: 0; }
  .lvv .lvv-native-cart table.shop_table :is(th, td) { padding: 14px 12px; }
  .lvv .lvv-native-cart .coupon { float: none; margin-bottom: 12px; }
  .lvv .lvv-native-cart .coupon input.input-text { width: 100%; }
  .lvv .lvv-native-cart .coupon button { width: 100%; }
  .lvv .lvv-native-cart :is(.cart_totals, .cart-collaterals .cart_totals) { padding: 22px; }
  .lvv .lvv-native-checkout .form-row-first,
  .lvv .lvv-native-checkout .form-row-last { float: none; width: 100%; }
  .lvv .lvv-native-checkout .woocommerce-checkout-review-order-table :is(th, td) { padding: 13px 10px; }
  .lvv .lvv-native-checkout #place_order { width: 100%; }
}
@media (max-width: 340px) {
  .lvv .lvv-native-products,
  .lvv .lvv-native-products.lvv-products-two,
  .lvv .lvv-native-products.lvv-products-four { --lvv-product-columns: 1; }
}
.lvv .lvv-woo > h1,
.lvv .lvv-native-products .woocommerce-products-header h1 { color: var(--ink); font-family: var(--serif); font-size: clamp(38px,4.6vw,60px); font-weight: 400; line-height: 1.12; letter-spacing: -.04em; margin: 0 0 24px; padding: 0; }
.lvv .lvv-native-products .woocommerce-products-header { max-width: 800px; margin-bottom: 36px; }
.lvv .lvv-native-products .woocommerce-products-header p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.lvv .lvv-woo .woocommerce-breadcrumb { color: var(--muted); font-family: var(--sans); font-size: 12px; line-height: 1.7; margin: 0 0 25px; }
.lvv .lvv-woo .woocommerce-breadcrumb a { color: var(--forest); text-underline-offset: 4px; }
