/* =========================================================
 * Navigation boutique : styles
 * Vert du site : #223F15 (survol : #355B26)
 * ========================================================= */

/* 1. Panier : « Poursuivre mes achats », en miroir de « Valider la commande » */
body #page-container .wc-proceed-to-checkout a.button.nb-poursuivre-achats,
.wc-proceed-to-checkout a.button.nb-poursuivre-achats {
	display: block !important;
	width: 100%;
	box-sizing: border-box;
	margin: 12px 0 0 !important;
	padding: 0.3em 1em !important;
	text-align: center;
	text-transform: uppercase;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.7em;
	color: #223F15 !important;
	background: #ffffff !important;
	border: 2px solid #223F15 !important;
	border-radius: 100px !important;
	transition: background-color .2s, color .2s;
}
body #page-container .wc-proceed-to-checkout a.button.nb-poursuivre-achats:hover,
.wc-proceed-to-checkout a.button.nb-poursuivre-achats:hover {
	color: #ffffff !important;
	background: #223F15 !important;
}
.wc-proceed-to-checkout a.button.nb-poursuivre-achats::after,
.wc-proceed-to-checkout a.button.nb-poursuivre-achats::before {
	display: none !important;
}

/* 3. Bandeau « ajouté au panier » : « Continuer mes achats »,
 *    en miroir de « Voir le panier » */
.woocommerce-message a.button.nb-continuer-achats {
	float: right;
	margin-left: 10px !important;
	padding: 6px 20px !important;
	text-transform: uppercase;
	font-weight: 600;
	color: #ffffff !important;
	background: #203F17 !important;
	border: none !important;
	border-radius: 100px !important;
	transition: background-color .2s;
}
.woocommerce-message a.button.nb-continuer-achats:hover {
	background: #355B26 !important;
}
.woocommerce-message a.button.nb-continuer-achats::after,
.woocommerce-message a.button.nb-continuer-achats::before {
	display: none !important;
}
@media (max-width: 767px) {
	/* Sur téléphone : boutons l'un sous l'autre, pleine largeur */
	.woocommerce-message a.button.nb-continuer-achats,
	.woocommerce-message a.button.wc-forward {
		float: none !important;
		display: block !important;
		margin: 10px 0 0 !important;
		text-align: center;
	}
}

/* 4. Boutons − / + autour du champ quantité */
.quantity.nb-qty {
	display: inline-flex !important;
	align-items: stretch;
	width: auto !important;
	max-width: none !important;
	white-space: nowrap;
}
.quantity.nb-qty input.qty {
	width: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	margin: 0 !important;
	padding: 6px 0 !important;
	text-align: center !important;
	color: #223F15 !important;
	background: #F8F4F1 !important;
	border: 1px solid #223F15 !important;
	border-left: none !important;
	border-right: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	-moz-appearance: textfield;
	appearance: textfield;
}
/* Page produit : le module « Ajouter au panier » du Theme Builder Divi
 * (règles « .et-db #et-boc .et-l … ») impose ses propres
 * styles au champ quantité (bordure supprimée, hauteur et marges intérieures
 * qui décentrent le chiffre). Ces règles, plus prioritaires, reprennent le
 * même rendu que les boutons − / +. */
html body #page-container #et-boc .quantity.nb-qty input.qty,
html body #page-container #et-boc .quantity.nb-qty input.qty:focus,
html body #page-container #et-boc .quantity.nb-qty input.qty:hover,
html body #page-container .quantity.nb-qty input.qty,
html body #page-container .quantity.nb-qty input.qty:focus,
html body #page-container .quantity.nb-qty input.qty:hover,
html body .quantity.nb-qty input.qty,
html body .quantity.nb-qty input.qty:focus {
	flex: 0 0 40px !important;
	width: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	height: auto !important;
	min-height: 36px !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: center !important;
	text-indent: 0 !important;
	letter-spacing: normal !important;
	line-height: normal !important;
	font-size: 16px !important;
	color: #223F15 !important;
	background: #F8F4F1 !important;
	border-style: solid !important;
	border-color: #223F15 !important;
	border-width: 1px 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	box-sizing: border-box !important;
	-moz-appearance: textfield !important;
	appearance: textfield !important;
}
.quantity.nb-qty input.qty::-webkit-outer-spin-button,
.quantity.nb-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.quantity.nb-qty .nb-qty-btn {
	flex: 0 0 auto;
	width: 30px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	font-weight: 500;
	color: #223F15;
	background: #F8F4F1;
	border: 1px solid #223F15;
	box-sizing: border-box;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}
.quantity.nb-qty .nb-qty-moins {
	border-radius: 100px 0 0 100px;
	border-right: none;
}
.quantity.nb-qty .nb-qty-plus {
	border-radius: 0 100px 100px 0;
	border-left: none;
}
.quantity.nb-qty .nb-qty-btn:hover,
.quantity.nb-qty .nb-qty-btn:active {
	color: #ffffff;
	background: #223F15;
}
.quantity.nb-qty .nb-qty-btn:disabled {
	opacity: .35;
	cursor: default;
}

/* 5. Page panier */

/* Panier vide : message + bouton, modules panier Divi masqués */
body.nb-panier-vide .et_pb_wc_cart_products,
body.nb-panier-vide .et_pb_wc_cart_totals,
body.nb-panier-vide .et_pb_section:has(.et_pb_wc_cart_products),
body.nb-panier-vide .et_pb_section:has(.et_pb_wc_cart_totals),
body.nb-panier-vide .nb-section-panier {
	display: none !important; /* la section des modules panier (cadres blancs vides) */
}
.nb-message-panier-vide {
	max-width: 600px;
	width: calc(100% - 40px);
	box-sizing: border-box;
	margin: 30px auto;
	padding: 30px 20px;
	text-align: center;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 2px 18px rgba(0, 0, 0, .12);
}
.nb-message-panier-vide .nb-panier-vide-texte {
	margin: 0 0 20px !important;
	padding: 0 !important;
	font-size: 20px;
	line-height: 1.4 !important;
	color: #223F15;
}
.nb-message-panier-vide .return-to-shop {
	margin: 0 !important;
	padding: 0 !important;
}
body #page-container .nb-message-panier-vide a.button.nb-btn-plein,
.nb-message-panier-vide a.button.nb-btn-plein {
	display: inline-block !important;
	padding: 0.3em 1.4em !important;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.7em;
	text-transform: uppercase;
	color: #ffffff !important;
	background: #223F15 !important;
	border: 2px solid #223F15 !important;
	border-radius: 100px !important;
	white-space: normal;
}
@media (max-width: 767px) {
	body #page-container .nb-message-panier-vide a.button.nb-btn-plein,
	.nb-message-panier-vide a.button.nb-btn-plein {
		font-size: 17px;
	}
}
body #page-container .nb-message-panier-vide a.button.nb-btn-plein:hover {
	background: #355B26 !important;
	border-color: #355B26 !important;
}
.nb-message-panier-vide a.button.nb-btn-plein::after,
.nb-message-panier-vide a.button.nb-btn-plein::before {
	display: none !important;
}

/* Code promo replié derrière un lien */
.woocommerce-cart-form.nb-coupon-ferme .coupon {
	display: none !important;
}
.nb-coupon-lien {
	display: inline-block;
	margin: 4px 0 8px;
	font-size: 14px;
	color: #223F15 !important;
	text-decoration: underline;
	cursor: pointer;
}

/* Bouton « Mettre à jour le panier » inutile : le panier se met à jour tout seul */
html body .et_pb_module form.woocommerce-cart-form.nb-maj-auto table.cart td.actions button[name="update_cart"],
html body form.woocommerce-cart-form.nb-maj-auto table.cart td.actions button[name="update_cart"] {
	display: none !important;
}

/* Téléphone : tableau du panier plus lisible */
@media (max-width: 767px) {
	body.woocommerce-cart table.cart th.product-price,
	body.woocommerce-cart table.cart td.product-price {
		display: none !important; /* le sous-total suffit */
	}
	body.woocommerce-cart table.cart td.product-name {
		text-align: left !important;
	}
}
