/**
 * Toast : notification flottante minimaliste (partagée par les widgets Trésor).
 */
.tresor-toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	max-width: 340px;
	padding: 14px 16px 16px;
	background: #fff;
	border: 1px solid rgba(34, 30, 26, 0.08);
	border-radius: 14px;
	box-shadow: 0 18px 40px -20px rgba(34, 30, 26, 0.45), 0 2px 8px -4px rgba(34, 30, 26, 0.12);
	font-size: 14px;
	line-height: 1.45;
	color: #2b2724;
	opacity: 0;
	transform: translateY(14px) scale(0.98);
	transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

.tresor-toast.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.tresor-toast__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #eaf4ec;
	color: #2e7d32;
}

.tresor-toast.is-error .tresor-toast__icon {
	background: #fdeceb;
	color: #b3261e;
}

.tresor-toast__body {
	min-width: 0;
}

.tresor-toast__text {
	margin: 0;
	font-weight: 500;
}

.tresor-toast__link {
	display: inline-block;
	margin-top: 3px;
	font-size: 13px;
	font-weight: 400;
	color: #8a827a;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 160ms ease, border-color 160ms ease;
}

.tresor-toast__link::after {
	content: "\2192";
	margin-left: 4px;
}

.tresor-toast__link:hover {
	color: #2b2724;
	border-bottom-color: currentColor;
}

.tresor-toast__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	border-radius: 0 0 14px 14px;
	background: rgba(46, 125, 50, 0.3);
	transform-origin: left center;
}

.tresor-toast.is-error .tresor-toast__bar {
	background: rgba(179, 38, 30, 0.3);
}

.tresor-toast__bar.is-running {
	animation: tresor-toast-progress var(--tresor-toast-duration, 5000ms) linear forwards;
}

.tresor-toast.is-paused .tresor-toast__bar {
	animation-play-state: paused;
}

@keyframes tresor-toast-progress {
	from {
		transform: scaleX(1);
	}

	to {
		transform: scaleX(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tresor-toast {
		transform: none;
		transition: opacity 120ms linear;
	}

	.tresor-toast__bar {
		display: none;
	}
}

@media screen and (max-width: 768px) {
	.tresor-toast {
		left: 16px;
		right: 16px;
		bottom: 16px;
		max-width: none;
	}
}
