/* ==========================================================================
   Les Hauts de Sanziers — Notifications WooCommerce & panier
   Terre de Pixels
   ========================================================================== */

:root {
	--tdp-taupe: #a28d71;
	--tdp-taupe-fonce: #8a755a;
	--tdp-texte: #3c3c3b;
	--tdp-erreur: #a3333d;
	--tdp-info: #3c3c3b;
	--tdp-ombre: 0 6px 24px rgba(60, 60, 59, .08);
}

/* --- Base commune (notices classiques + notices « bloc » de WooCommerce) --- */
body .wc-block-components-notice-banner,
body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	z-index: 1 !important;
	display: block;
	width: auto !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 0 24px !important;
	padding: 18px 22px 18px 68px !important;
	background: #fff !important;
	color: var(--tdp-texte) !important;
	border: 0 !important;
	border-left: 4px solid var(--tdp-taupe) !important;
	border-radius: 0 !important;
	box-shadow: var(--tdp-ombre);
	font-family: 'Open Sans', Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	list-style: none !important;
	text-align: left;
	overflow: hidden;
}
body .woocommerce-error li { list-style: none; margin: 0; padding: 0; }
body .woocommerce-error li + li { margin-top: 6px; }

/* Pastille icône — notices « bloc » (SVG fourni par WooCommerce) */
body .wc-block-components-notice-banner > svg {
	position: absolute;
	top: 50%;
	left: 20px;
	width: 32px;
	height: 32px;
	padding: 6px;
	margin: 0;
	transform: translateY(-50%);
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--tdp-taupe);
	fill: #fff;
}

/* Pastille icône — notices classiques */
body .woocommerce-message::before,
body .woocommerce-info::before,
body .woocommerce-error::before {
	content: "\2713" !important;
	position: absolute !important;
	top: 50% !important;
	left: 20px !important;
	width: 32px;
	height: 32px;
	transform: translateY(-50%);
	border-radius: 50%;
	background: var(--tdp-taupe);
	color: #fff !important;
	font-family: 'Open Sans', Arial, sans-serif !important;
	font-size: 16px;
	font-weight: 700;
	line-height: 32px;
	text-align: center;
}
body .woocommerce-info::before { content: "i" !important; font-family: Georgia, serif !important; font-style: italic; }
body .woocommerce-error::before { content: "!" !important; }

/* Variantes */
body .wc-block-components-notice-banner.is-error,
body .woocommerce-error { border-left-color: var(--tdp-erreur) !important; }
body .wc-block-components-notice-banner.is-error > svg,
body .woocommerce-error::before { background: var(--tdp-erreur); }

body .wc-block-components-notice-banner.is-info,
body .woocommerce-info { border-left-color: var(--tdp-info) !important; }
body .wc-block-components-notice-banner.is-info > svg,
body .woocommerce-info::before { background: var(--tdp-info); }

body .wc-block-components-notice-banner__content { display: block; }

/* Bouton (ex. « Voir le panier ») */
body .wc-block-components-notice-banner a.button,
body .woocommerce-message a.button,
body .woocommerce-info a.button,
body .woocommerce-error a.button {
	float: right;
	display: inline-block;
	margin: -4px 0 0 18px !important;
	padding: 8px 20px !important;
	background: var(--tdp-taupe) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-family: 'Fjalla One', 'Open Sans', sans-serif !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color .2s ease;
}
body .wc-block-components-notice-banner a.button:hover,
body .woocommerce-message a.button:hover,
body .woocommerce-info a.button:hover,
body .woocommerce-error a.button:hover { background: var(--tdp-texte) !important; }
body .wc-block-components-notice-banner a.button::after,
body .woocommerce-message a.button::after,
body .woocommerce-info a.button::after,
body .woocommerce-error a.button::after { display: none !important; }

/* Liens texte (« Annuler ? » après suppression, etc.) */
body .wc-block-components-notice-banner a:not(.button),
body .woocommerce-message a:not(.button),
body .woocommerce-info a:not(.button),
body .woocommerce-error a:not(.button) {
	position: static !important;
	padding: 0 !important;
	background: none !important;
	color: var(--tdp-taupe-fonce) !important;
	font-weight: 600;
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

/* --- Notifications flottantes (hors panier / commande / compte) --- */
.tdp-toasts {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: min(440px, calc(100vw - 32px));
	pointer-events: none;
}
.tdp-toasts .tdp-toast {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	margin: 0 !important;
	padding-right: 48px !important;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .3s ease;
	pointer-events: auto;
}
.tdp-toasts .tdp-toast.is-visible { opacity: 1; transform: none; }
.tdp-toasts .tdp-toast .wc-block-components-notice-banner__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.tdp-toasts .tdp-toast a.button {
	order: 2;
	float: none;
	margin: 12px 0 0 !important;
}
.tdp-toast__close {
	position: absolute;
	top: 8px;
	right: 10px;
	padding: 4px 6px;
	background: none;
	border: 0;
	color: #9a9a9a;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: color .2s ease;
}
.tdp-toast__close:hover,
.tdp-toast__close:focus-visible { color: var(--tdp-texte); }

@media (max-width: 600px) {
	.tdp-toasts { right: 12px; left: 12px; bottom: 12px; width: auto; }
	body .wc-block-components-notice-banner a.button,
	body .woocommerce-message a.button,
	body .woocommerce-info a.button,
	body .woocommerce-error a.button {
		float: none;
		margin: 12px 0 0 !important;
	}
}

/* --- Panier : récapitulatif pendant la mise à jour --- */
.tdp-cart-summary { transition: opacity .2s ease; }
.tdp-cart-summary.is-loading { opacity: .5; pointer-events: none; }
