/* Panier (page Panier seulement) : panier classique de WooCommerce (bloc « Shortcode classique ») présenté en deux
   cartes blanches sur fond crème, comme en production. Carte de gauche : titre de la page, articles, code promo,
   ventes croisées ; carte de droite : récapitulatif (totaux, livraison, bouton de commande) puis les blocs
   « Sous le récapitulatif » de la page. Les enveloppes de WooCommerce sont « display: contents » : leurs enfants
   se placent directement dans la grille ; les deux cartes sont les pseudo-éléments de la grille.
   Lignes : 1 messages ; 2 titre | récapitulatif ; 3 à 5 articles | 3 fin du récapitulatif, 4 « Sous le récapitulatif »
   (collé au récapitulatif, quelle que soit la longueur du panier), 5 ligne souple qui absorbe le reste de la liste
   d'articles ; 6 ventes croisées. */

.lb-main--ariane { padding-bottom: 0; }
.lb-main--ariane .woocommerce-breadcrumb { margin-bottom: 0; } /* bandeau gris directement sur le fond crème */
.lb-panier-fond { padding: 25px 16px; background: rgba(241, 195, 61, .06); }
/* Carrousel d’avis Avis Vérifiés (Skeepers), injecté par son script après le contenu de la page : sous les cartes, comme la prod. */
.lb-panier-fond .skeepers_carousel_container { margin-top: 25px !important; }
.lb-panier-page { display: grid; grid-template-columns: minmax(0, 690px) minmax(0, 460px); grid-template-rows: auto auto auto auto 1fr auto; column-gap: 20px; justify-content: center; align-items: start; max-width: 1170px; margin: 0 auto; }
.lb-panier-page::before, .lb-panier-page::after { content: ""; grid-row: 2 / -1; align-self: stretch; background: #fff; }
.lb-panier-page::before { grid-column: 1; }
.lb-panier-page::after { grid-column: 2; }
.lb-panier-page > *, .lb-panier-page .cart-collaterals > * { position: relative; z-index: 1; margin: 0 !important; }
.lb-panier-page > .woocommerce, .lb-panier-page .cart-collaterals { display: contents; }
.lb-panier-page .woocommerce-notices-wrapper { grid-column: 1 / -1; grid-row: 1; }
.lb-panier-page .woocommerce-notices-wrapper:not(:empty) { margin-bottom: 20px !important; }
.lb-panier-page__titre { grid-column: 1; grid-row: 2; padding: 27px; font-size: 36px; font-weight: 600; line-height: 1; }
.lb-panier-page .woocommerce-cart-form { grid-column: 1; grid-row: 3 / 6; padding: 0 20px 20px; }
.lb-panier-page .cross-sells { grid-column: 1; grid-row: 6; width: auto !important; float: none !important; min-width: 0; padding: 20px; }
.lb-panier-page .cart_totals { grid-column: 2; grid-row: 2 / 4; width: auto !important; float: none !important; padding: 20px 20px 0; }
.lb-panier-page__suite { grid-column: 2; grid-row: 4; padding: 0 20px 20px; }
.lb-panier-page__suite > * + * { margin-top: 12px; }

/* Articles : une ligne par article (photo, nom et quantité, prix), liens « Ajouter aux favoris | Supprimer » dessous. */
.lb-panier-page table.shop_table.cart { margin: 0; border: 1px solid var(--lb-trait); border-radius: 0; border-collapse: collapse; }
.lb-panier-page table.cart thead { display: none; }
.lb-panier-page table.cart tr.cart_item { display: grid; grid-template-columns: 90px 1fr auto; grid-template-areas: "photo nom prix" "photo qte qte" "liens liens liens"; column-gap: 20px; padding: 18px 16px; border-bottom: 1px solid var(--lb-trait); }
.lb-panier-page table.cart tr.cart_item td { display: block; width: auto !important; min-width: 0; padding: 0; border: 0; text-align: left !important; background: none !important; }
.lb-panier-page table.cart td::before { display: none; } /* libellés du tableau « responsive » de WooCommerce */
.lb-panier-page table.cart td.product-thumbnail { grid-area: photo; display: block !important; }
.lb-panier-page table.cart td.product-thumbnail img { width: 90px; height: auto; background: var(--lb-image); }
.lb-panier-page table.cart td.product-name { grid-area: nom; font-size: 14.4px; }
.lb-panier-page table.cart .lb-panier-page__marque { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 600; } /* comme la carte produit */
.lb-panier-page table.cart td.product-price { display: none !important; }
.lb-panier-page table.cart tr.cart_item td.product-subtotal { grid-area: prix; font-weight: 700; text-align: right !important; white-space: nowrap; }
.lb-panier-page table.cart td.product-subtotal small { font-weight: 400; }
.lb-panier-page table.cart tr.cart_item td.product-quantity { grid-area: qte; display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; }
.lb-panier-page table.cart td.product-quantity::before { display: inline; content: attr(data-title) " :"; float: none; font-weight: 400; }
.lb-panier-page table.cart .qty { width: 50px; padding: 6px; border: 1px solid var(--lb-trait); background: var(--lb-fond); text-align: center; }
.lb-panier-page table.cart tr.cart_item td.product-remove { text-align: right !important; grid-area: liens; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--lb-trait); font-size: 12px; text-align: right; }
.lb-panier-page table.cart td.product-remove a, .woocommerce .lb-panier-page table.cart a.remove { display: inline; width: auto; height: auto; color: var(--lb-texte) !important; font-size: 12px; font-weight: 400; line-height: 1.5; background: none !important; border-radius: 0; }
.lb-panier-page table.cart td.product-remove a:hover { color: var(--lb-orange) !important; }

/* Code promo (ligne d'actions) : champ bordé et bouton doré ; le bouton « Mettre à jour » est déclenché par lb.js
   au changement de quantité. */
.lb-panier-page table.cart td.actions { display: block; padding: 16px; border: 0; background: none !important; }
.lb-panier-page td.actions .coupon { display: flex; float: none; width: 100%; margin-bottom: 1rem; }
.lb-panier-page td.actions .coupon .input-text { flex: 1; width: auto; height: 42px; margin: 0; padding: 0 14px; border: 1px solid var(--lb-fonce); border-radius: 0; }
.lb-panier-page td.actions .coupon .button, .lb-panier-page .cart_totals .checkout-button { border: 0; border-radius: 0; background: var(--lb-dore); color: #fff; font-weight: 600; }
.lb-panier-page td.actions .coupon .button { height: 42px; padding: 0 22px; }
.lb-panier-page td.actions .button[name="update_cart"] { display: none !important; }

/* Récapitulatif */
.lb-panier-page .cart_totals h2 { margin: 0; padding: 23px 0; font-size: 34.56px; font-weight: 500; line-height: 1; }
.lb-panier-page .cart_totals table.shop_table { border: 1px solid var(--lb-trait); border-radius: 0; }
.lb-panier-page .cart_totals th, .lb-panier-page .cart_totals td { padding: 18px 12px; border-top: 1px solid var(--lb-trait); font-size: 13px; font-weight: 400; vertical-align: middle; }
.lb-panier-page .cart_totals td { text-align: right; }
.lb-panier-page .cart_totals .order-total th { font-size: 14.4px; font-weight: 700; text-transform: uppercase; }
.lb-panier-page .cart_totals .order-total td strong { font-size: 14.4px; }
.lb-panier-page .cart_totals .wc-proceed-to-checkout { padding: 20px 0 0; }
.lb-panier-page .cart_totals .checkout-button { display: block; margin: 0 !important; padding: 15px !important; font-size: 18.72px !important; text-align: center; text-transform: uppercase; }
.lb-panier-page .cart_totals .checkout-button:hover, .lb-panier-page td.actions .coupon .button:hover { background: var(--lb-orange); color: #fff; }

/* Ventes croisées (« Entretenir votre sélection ») : carrousel de cartes de la boutique, 2 visibles (1 sous 768 px :
   moins serré que les 3 / 2 du carrousel Elementor de la prod, demande de Fabien) ; flèches et défilement automatique par lb.js. */
.lb-panier-page .cross-sells > h2 { margin: 0 0 16px; font-size: 21.6px; font-weight: 500; text-align: center; }
.lb-panier-page .cross-sells ul.products { grid-auto-flow: column; grid-template-columns: none !important; grid-auto-columns: calc((100% - 11px) / 2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-panier-page .cross-sells ul.products::-webkit-scrollbar { display: none; }
.lb-panier-page .cross-sells .lb-carte { scroll-snap-align: start; }
.lb-panier-page .cross-sells .lb-defiler { top: calc(50% + 10px); }
.lb-panier-page .cross-sells.lb-sans-defilement .lb-defiler { display: none; }
@media (max-width: 767px) { .lb-panier-page .cross-sells ul.products { grid-auto-columns: 100%; } }

/* Panier vide : une seule colonne. */
.lb-panier-page:has(.wc-empty-cart-message) { display: block; max-width: 690px; padding-bottom: 30px; background: #fff; }
.lb-panier-page:has(.wc-empty-cart-message)::before, .lb-panier-page:has(.wc-empty-cart-message)::after, .lb-panier-page:has(.wc-empty-cart-message) .lb-panier-page__suite { display: none; }
.lb-panier-page .wc-empty-cart-message, .lb-panier-page .return-to-shop { margin: 0 20px 20px !important; text-align: center; }

@media (max-width: 900px) {
	.lb-panier-fond { padding: 10px 5px; }
	.lb-panier-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 10px; }
	.lb-panier-page::before, .lb-panier-page::after { display: none; }
	.lb-panier-page > *, .lb-panier-page .cart-collaterals > * { grid-column: 1 !important; grid-row: auto !important; }
	.lb-panier-page__titre, .lb-panier-page .woocommerce-cart-form, .lb-panier-page .cross-sells, .lb-panier-page .cart_totals, .lb-panier-page__suite { background: #fff; }
	.lb-panier-page .woocommerce-cart-form, .lb-panier-page .cart_totals { padding: 0 12px 12px; }
	.lb-panier-page table.cart tr.cart_item { grid-template-columns: 80px 1fr auto; column-gap: 12px; padding: 14px 10px; }
	.lb-panier-page table.cart td.product-thumbnail img { width: 80px; }
	/* Code promo : champ et bouton l'un sous l'autre, pleine largeur, même hauteur (le bouton passait sur deux lignes, 42 px
	   contre 50 pour le champ ; recette [107]). */
	.lb-panier-page td.actions .coupon { flex-direction: column; gap: 10px; }
	.lb-panier-page td.actions .coupon :is(.input-text, .button) { box-sizing: border-box; flex: none; width: 100% !important; height: 46px !important; margin: 0 !important; }
	.lb-panier-page td.actions .coupon .button { padding: 0 14px; font-size: 13px; white-space: nowrap; }
	.lb-panier-page .cart_totals h2 { padding: 18px 0; font-size: 28.8px; }
	.lb-panier-page__titre { padding: 20px; font-size: 28.8px; }
}

/* Pied réduit (partie « checkout-footer », assets/pied-commande.css), comme la prod : bandeau fixé en bas de l'écran sur
   ordinateur, place réservée sous le contenu (25 px + 90 px). */
@media (min-width: 769px) {
	.lb-page-panier .lb-panier-fond { padding-bottom: 115px; }
}

/* Mobile (MHTML poc/maquettes/panier-mobile) : « Choisir la livraison » et « Retirer en magasin » fixés en bas de l'écran,
   l'un au-dessus de l'autre sur fond blanc ; place réservée sous la page (le pied reste visible au bout du défilement).
   Sans « Retirer en magasin » (panier anglais), « Choisir la livraison » seul tout en bas. */
@media (max-width: 767px) {
	.lb-panier-page .cart_totals, .lb-panier-page__suite { z-index: auto !important; } /* sinon les boutons fixés restent sous le reste de la page (contexte d’empilement des cartes, inutile ici) */
	body:has(.lb-panier-page .wc-proceed-to-checkout) { --lb-boutons-fixes: 64px; }
	body:has(.lb-panier-page .wc-proceed-to-checkout):has(.lb-panier-page__suite > .wp-block-buttons) { --lb-boutons-fixes: 124px; }
	body:has(.lb-panier-page .wc-proceed-to-checkout) .wp-site-blocks { padding-bottom: var(--lb-boutons-fixes); }
	.lb-panier-page .cart_totals .wc-proceed-to-checkout { position: fixed; inset: auto 0 0; z-index: 1000; padding: 10px; background: #fff; }
	.lb-panier-page:has(.lb-panier-page__suite > .wp-block-buttons) .cart_totals .wc-proceed-to-checkout { bottom: 60px; }
	.lb-panier-page .cart_totals .checkout-button { padding: 8px 30px !important; font-size: 17.28px !important; line-height: 28px; }
	.lb-panier-page__suite > .wp-block-buttons { position: fixed; inset: auto 0 0; z-index: 1001; margin: 0 !important; padding: 10px; background: #fff; }
	.lb-panier-page__suite > .wp-block-buttons .wp-block-button__link { padding: 13px; font-size: 17.28px; font-weight: 600; line-height: 17.28px; text-transform: uppercase; }
}

/* Retouches de l'intégrateur (custom.css « en direct » jusqu'au 20/10, reprises telles quelles en 0.9.31). */
.woocommerce-cart footer { margin-bottom: 2em; }
.cart_totals tr.cart-discount { color: var(--lb-orange); }
.lb-panier-page td.actions .coupon .button { height: 50px; }
.lb-panier-page__suite .wp-block-paragraph { margin-block-start: .5em; }
.lb-panier-page td.actions .coupon { position: relative; }
.woocommerce-page .woocommerce-cart-form #coupon_code { width: 100%; margin-right: 0; font-size: 1em; }
/* Bouton « Appliquer » du code promo : lien souligné posé dans le champ. */
.woocommerce table.cart td.actions .coupon .input-text + .button { position: absolute; right: 0; background: inherit; color: var(--lb-texte); text-decoration: underline; }
@media (max-width: 767px) {
	.woocommerce table.cart td.actions .coupon { margin-bottom: 0; padding-bottom: 0; }
	.woocommerce table.cart td.actions .coupon .input-text + .button { position: relative; right: inherit; }
	html:lang(en-US) .lb-panier-page:has(.lb-panier-page__suite > .wp-block-buttons) .cart_totals .wc-proceed-to-checkout { bottom: 0; z-index: 9999; padding: 12px 10px; }
}
