/* =============================================
   TOAST NOTIFICATIONS — BC_Toast
   Préfixe CSS : ild-toast (règle ild_ CLAUDE.md)
   ============================================= */

/* ---- Conteneur fixe (empile les toasts du haut vers le bas) ---- */
.ild-toast__container {
	position: fixed;
	top: 50vh;
	right: 24px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	pointer-events: none;
	width: 320px;
	max-width: calc(100vw - 32px);
}

/* ---- Toast individuel ---- */
.ild-toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	border-left: 4px solid transparent;
	pointer-events: all;
	/* État initial : hors écran à droite */
	transform: translateX(calc(100% + 32px));
	opacity: 0;
	transition:
		transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
		opacity 0.3s ease;
}

/* ---- Entrée visible ---- */
.ild-toast--visible {
	transform: translateX(0);
	opacity: 1;
}

/* ---- Sortie ---- */
.ild-toast--hiding {
	transform: translateX(calc(100% + 32px));
	opacity: 0;
	transition:
		transform 0.3s ease-in,
		opacity 0.25s ease-in;
}

/* ---- Variantes de couleur ---- */
.ild-toast--success {
	border-left-color: #22c55e;
}
.ild-toast--error {
	border-left-color: #ef4444;
}
.ild-toast--warning {
	border-left-color: #f59e0b;
}
.ild-toast--info {
	border-left-color: #3b82f6;
}

/* ---- Icône ---- */
.ild-toast__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 1px;
}

.ild-toast__icon svg {
	width: 18px;
	height: 18px;
}

.ild-toast--success .ild-toast__icon {
	color: #22c55e;
}
.ild-toast--error .ild-toast__icon {
	color: #ef4444;
}
.ild-toast--warning .ild-toast__icon {
	color: #f59e0b;
}
.ild-toast--info .ild-toast__icon {
	color: #3b82f6;
}

/* ---- Texte ---- */
.ild-toast__msg {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	color: #1a1a1a;
	word-break: break-word;
}

/* ---- Bouton fermeture ---- */
.ild-toast__close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	padding: 0;
	margin-top: 1px;
	background: none;
	border: none;
	cursor: pointer;
	color: #999;
	border-radius: 4px;
	transition: color 0.2s ease;
}

.ild-toast__close:hover {
	color: #333;
}

.ild-toast__close svg {
	width: 14px;
	height: 14px;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
	.ild-toast__container {
		top: auto;
		bottom: 16px;
		right: 16px;
		left: 16px;
		width: auto;
	}
}
