/* Iotplace — notifications toast (vitrine + CRM + compte) */

.iot-toast-stack {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(420px, calc(100vw - 1.5rem));
    pointer-events: none;
}

.iot-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.9rem 0.85rem;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(12, 16, 28, 0.94);
    backdrop-filter: blur(14px);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #f4f7ff;
    font-size: 0.92rem;
    line-height: 1.45;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    animation: iot-toast-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.iot-toast.iot-toast-out {
    animation: iot-toast-out 0.35s ease forwards;
}

.iot-toast-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 700;
}

.iot-toast-body {
    flex: 1;
    min-width: 0;
}

.iot-toast-title {
    font-weight: 600;
    margin: 0 0 0.15rem;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.85;
}

.iot-toast-message {
    margin: 0;
}

.iot-toast-close {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.55;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.1rem 0.2rem;
    margin-top: -0.1rem;
}

.iot-toast-close:hover {
    opacity: 1;
}

.iot-toast--success {
    border-color: rgba(34, 197, 94, 0.45);
    background: linear-gradient(135deg, rgba(8, 28, 18, 0.96), rgba(10, 22, 16, 0.92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(34, 197, 94, 0.12), inset 0 1px 0 rgba(134, 239, 172, 0.08);
}

.iot-toast--success .iot-toast-icon {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
}

.iot-toast--info,
.iot-toast--warning {
    border-color: rgba(251, 146, 60, 0.45);
    background: linear-gradient(135deg, rgba(28, 18, 8, 0.96), rgba(24, 16, 8, 0.92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(251, 146, 60, 0.12), inset 0 1px 0 rgba(253, 186, 116, 0.08);
}

.iot-toast--info .iot-toast-icon,
.iot-toast--warning .iot-toast-icon {
    background: rgba(251, 146, 60, 0.18);
    color: #fb923c;
    box-shadow: 0 0 18px rgba(251, 146, 60, 0.3);
}

.iot-toast--error {
    border-color: rgba(248, 113, 113, 0.45);
    background: linear-gradient(135deg, rgba(28, 10, 12, 0.96), rgba(22, 8, 10, 0.92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(248, 113, 113, 0.12), inset 0 1px 0 rgba(252, 165, 165, 0.08);
}

.iot-toast--error .iot-toast-icon {
    background: rgba(248, 113, 113, 0.18);
    color: #f87171;
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.35);
}

@keyframes iot-toast-in {
    0% {
        transform: translateX(120%) scale(0.96);
        opacity: 0;
    }
    70% {
        transform: translateX(-4px) scale(1.01);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes iot-toast-out {
    to {
        transform: translateX(110%) scale(0.95);
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .iot-toast-stack {
        left: 0.75rem;
        right: 0.75rem;
        max-width: none;
    }
}
