/* toast.css - Design moderne & harmonisé */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 320px;
    max-width: 420px;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px 20px 16px 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 5px solid #0077c0;
    overflow: hidden;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.toast.active {
    transform: translateX(0%);
    opacity: 1;
}

.toast .toast-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.toast-content .check {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    min-width: 32px;
    color: #ffffff;
    font-size: 14px;
    border-radius: 50%;
    margin-top: 1px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.toast-content .message {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.message .text {
    line-height: 1.4;
}

.message .text.text-1 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.message .text.text-2 {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    word-break: break-word;
}

.toast .close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.45;
    color: #64748b;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toast .close:hover {
    opacity: 1;
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}

.toast .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
}

.toast .progress:before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: 100%;
}

.progress.active:before {
    animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
    100% {
        right: 100%;
    }
}

/* Types de notifications */
.toast.success {
    border-left-color: #10b981;
}
.toast.success .check {
    background: linear-gradient(135deg, #10b981, #059669);
}
.toast.success .progress:before {
    background-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}
.toast.error .check {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.toast.error .progress:before {
    background-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}
.toast.warning .check {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.toast.warning .progress:before {
    background-color: #f59e0b;
}

.toast.info {
    border-left-color: #0077c0;
}
.toast.info .check {
    background: linear-gradient(135deg, #0077c0, #005a92);
}
.toast.info .progress:before {
    background-color: #0077c0;
}

/* Compatibilité Mode Sombre (night-dim) */
html.night-dim .toast,
body.night-dim .toast {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
}

html.night-dim .message .text.text-1,
body.night-dim .message .text.text-1 {
    color: #f8fafc;
}

html.night-dim .message .text.text-2,
body.night-dim .message .text.text-2 {
    color: #94a3b8;
}

html.night-dim .toast .close,
body.night-dim .toast .close {
    color: #94a3b8;
}

html.night-dim .toast .close:hover,
body.night-dim .toast .close:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.1);
}

html.night-dim .toast .progress,
body.night-dim .toast .progress {
    background: rgba(255, 255, 255, 0.08);
}