/* DiyShirt : message d'ajout au panier en toast flottant */
body:not(.woocommerce-account) .woocommerce-message {
	position: fixed;
	top: auto;
	bottom: 20px;
	right: 20px;
	left: auto;
	overflow: hidden;
	z-index: 999990;
	width: min(420px, calc(100vw - 32px));
	margin: 0;
	padding: 16px 48px 16px 64px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: #1a1245;
	font-size: 15px;
	line-height: 1.45;
	font-weight: 500;
	box-shadow: 0 18px 50px rgba(26, 18, 69, .28), 0 0 0 1px rgba(115, 92, 252, .12);
	animation: diy-toast-in .35s cubic-bezier(.2, .8, .2, 1);
	list-style: none;
}

/* Icône coche */
body:not(.woocommerce-account) .woocommerce-message::before {
	content: "\2713";
	position: absolute;
	top: 16px;
	left: 16px;
	width: 34px;
	height: 34px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #735CFC;
	color: #fff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

/* Bouton "Voir le panier" */
body:not(.woocommerce-account) .woocommerce-message .button,
body:not(.woocommerce-account) .woocommerce-message a.wc-forward {
	float: none;
	order: 2;
	display: inline-block;
	padding: 10px 20px;
	border-radius: 999px;
	background: #cb1968;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background .2s ease, transform .2s ease;
}
body:not(.woocommerce-account) .woocommerce-message .button:hover,
body:not(.woocommerce-account) .woocommerce-message a.wc-forward:hover {
	background: #a8135a;
	color: #fff;
	transform: translateY(-1px);
}

/* Croix de fermeture */
.diy-toast-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b6590;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.diy-toast-close:hover { background: #f1eefe; color: #1a1245; }

/* Barre de temps */
body:not(.woocommerce-account) .woocommerce-message::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	height: 3px;
	width: 100%;
	border-radius: 0;
	background: linear-gradient(90deg, #735CFC, #cb1968);
	transform-origin: left;
	animation: diy-toast-time 8s linear forwards;
}
body:not(.woocommerce-account) .woocommerce-message:hover::after { animation-play-state: paused; }

.woocommerce-message.diy-toast-hide {
	opacity: 0;
	transform: translateY(12px) !important;
	transition: opacity .3s ease, transform .3s ease;
	pointer-events: none;
}

@keyframes diy-toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes diy-toast-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 575px) {
	body:not(.woocommerce-account) .woocommerce-message { bottom: 12px; right: 12px; left: 12px; width: auto; }
	body:not(.woocommerce-account) .woocommerce-message .button { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	body:not(.woocommerce-account) .woocommerce-message,
	body:not(.woocommerce-account) .woocommerce-message::after { animation: none; }
}

/* Pas de gros contour noir au focus/clic sur le toast */
.woocommerce-message,
.woocommerce-message:focus,
.woocommerce-message:focus-visible,
.woocommerce-message:active {
	outline: none !important;
}
.woocommerce-message .button:focus,
.woocommerce-message .button:active {
	outline: none;
	box-shadow: none;
}
.woocommerce-message .button:focus-visible {
	outline: 2px solid #735CFC;
	outline-offset: 2px;
}
.diy-toast-close:focus { outline: none; }
.diy-toast-close:focus-visible { outline: 2px solid #735CFC; outline-offset: 1px; }
