/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Couleurs des toasts */
.toast-success {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    border-left: 5px solid #a5d6a7;
}

.toast-error {
    background: linear-gradient(135deg, #e53935, #c62828);
    border-left: 5px solid #ef9a9a;
}

.toast-warning {
    background: linear-gradient(135deg, #fb8c00, #ef6c00);
    border-left: 5px solid #ffcc80;
}

.toast-info {
    background: linear-gradient(135deg, #1e88e5, #0d47a1);
    border-left: 5px solid #90caf9;
}

/* Icônes des toasts */
.toast::before {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-success::before {
    content: '✅';
}

.toast-error::before {
    content: '❌';
}

.toast-warning::before {
    content: '⚠️';
}

.toast-info::before {
    content: 'ℹ️';
}

/* Barre de progression du toast */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.4);
    border-radius: 0 0 0 12px;
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ===== GLOBAL LOADER ===== */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.loader-container {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    min-width: 200px;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 5px solid #e0e0e0;
    border-top: 5px solid #4a6cf7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader-text {
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.loader-subtext {
    color: #888;
    font-size: 0.85rem;
    margin-top: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== LOADER BUTTON ===== */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== RESPONSIVE TOASTS ===== */
@media (max-width: 768px) {
    .toast-container {
        bottom: 20px;
        right: 15px;
        left: 15px;
        max-width: none;
        width: auto;
    }
    
    .toast {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 45px;
    }
    
    .loader-container {
        margin: 20px;
        padding: 30px 20px;
        min-width: unset;
        width: auto;
    }
    
    .loader-spinner {
        width: 45px;
        height: 45px;
    }
}