/*
 * Notifications WooCommerce. Le theme imprime le bandeau dans le flux, juste sous l'en-tete
 * collant : le message, le bouton « Voir le panier » et le menu se retrouvaient sur la meme
 * ligne. On sort la zone du flux et on la presente en vignette flottante.
 * Panier et commande sont exclus : sur ces pages les messages doivent rester dans la page.
 */

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 380px;
	max-width: calc(100% - 32px);
	margin: 0;
	padding: 0;
	pointer-events: none;
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper:empty {
	display: none;
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper > * {
	pointer-events: auto;
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-message,
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-info,
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-error {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0 !important;
	padding: 18px 44px 18px 52px !important;
	font-family: Outfit, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 21px;
	color: #3c3c3c;
	list-style: none;
	background: #ffffff !important;
	border: 1px solid #e6e4e4 !important;
	border-left: 4px solid #8d8888 !important;
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
	opacity: 1;
	transform: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-message {
	border-left-color: #3f8f5f !important;
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-error {
	border-left-color: #d05a5a !important;
}

/* Le theme dessine sa propre pastille en :before, calee sur une pleine largeur. */
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-message::before,
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-info::before,
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-error::before {
	content: "";
	position: absolute;
	top: 19px;
	left: 18px;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	background-color: #8d8888;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	font-size: 0;
	line-height: 0;
	animation: none;
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-message::before {
	background-color: #3f8f5f;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-error::before {
	background-color: #d05a5a;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .woocommerce-info::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E");
}

/* Le bouton « Voir le panier » flotte a droite par defaut et chevauchait le texte. */
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .button,
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .wc-forward {
	float: none !important;
	display: block !important;
	width: fit-content;
	margin: 12px 0 0 !important;
	padding: 9px 20px !important;
	font-family: inherit;
	font-size: 13px;
	line-height: 18px;
	letter-spacing: 0.03em;
	color: #ffffff !important;
	background: #111111 !important;
	border: 0 !important;
	border-radius: 5px;
	transition: background-color 0.18s ease;
}

body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .button:hover,
body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper .wc-forward:hover {
	background: #8d8888 !important;
}

.crf-notice-fermer {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 26px;
	height: 26px;
	padding: 0;
	font-size: 18px;
	line-height: 24px;
	color: #b0adad;
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.18s ease, background-color 0.18s ease;
}

.crf-notice-fermer:hover {
	color: #3c3c3c;
	background: #f2f1f1;
}

.crf-notice--sortie {
	opacity: 0 !important;
	transform: translateX(16px) !important;
}

@media (max-width: 767px) {
	body:not(.woocommerce-cart):not(.woocommerce-checkout) .woocommerce-notices-wrapper {
		top: 16px;
		right: 16px;
		left: 16px;
		width: auto;
		max-width: none;
	}
}
