/* ── Toast Notifications ──────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    min-width: 320px;
    max-width: 420px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    pointer-events: all;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.06),
        0 10px 28px rgba(0, 0, 0, 0.10);
}

.toast.removing {
    opacity: 0 !important;
    transform: translateX(40px) !important;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ── Variantes ── */
.toast.success {
    background: #f0fdf4;
    color: #14532d;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
}

.toast.error {
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
}

.toast.warning {
    background: #fffbeb;
    color: #78350f;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
}

.toast.info {
    background: #eff6ff;
    color: #1e3a5f;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
}

/* ── Icône ── */
.toast-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.toast.success .toast-icon {
    background: #dcfce7;
    color: #16a34a;
}

.toast.error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.toast.warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.toast.info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

/* ── Message ── */
.toast-message {
    flex: 1;
    padding-top: 5px;
    color: inherit;
}

/* ── Bouton fermer ── */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    opacity: 0.45;
    transition: opacity 0.15s, background 0.15s;
    color: inherit;
    margin-top: 2px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}

/* ── Confirmation Dialog ─────────────────────────────────────────────────── */
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.confirm-modal.show {
    opacity: 1;
    pointer-events: all;
}

.confirm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.confirm-dialog {
    position: relative;
    background: white;
    border-radius: 14px;
    padding: 32px 28px 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: confirmSlideUp 0.25s ease-out;
}

@keyframes confirmSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.confirm-dialog h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.confirm-dialog p {
    margin: 0 0 26px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-btn-cancel,
.confirm-btn-ok {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn-cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.confirm-btn-cancel:hover {
    background: #e5e7eb;
}

.confirm-btn-ok {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
}

.confirm-btn-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(220, 38, 38, 0.38);
}

.confirm-btn-ok:active {
    transform: translateY(0);
}
