/* ========== NOTIFICATIONS MODERNES ========== */

.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 350px;
    max-width: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.custom-notification-show {
    opacity: 1;
    transform: translateX(0);
}

.custom-notification-content {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    gap: 15px;
    position: relative;
}

.custom-notification-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.custom-notification-message {
    flex: 1;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    font-weight: 500;
    padding-right: 10px;
}

.custom-notification-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.custom-notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.custom-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    animation: notificationProgress 5s linear forwards;
}

@keyframes notificationProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Notification Success */
.custom-notification-success {
    border-left: 5px solid #10b981;
}

.custom-notification-success .custom-notification-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.custom-notification-success .custom-notification-icon {
    color: #10b981;
}

/* Notification Error */
.custom-notification-error {
    border-left: 5px solid #ef4444;
}

.custom-notification-error .custom-notification-progress {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.custom-notification-error .custom-notification-icon {
    color: #ef4444;
}

/* Loader pour les boutons */
.button-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive pour les notifications */
@media (max-width: 768px) {
    .custom-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-150px);
    }
    
    .custom-notification-show {
        transform: translateY(0);
    }
    
    .custom-notification-content {
        padding: 16px;
    }
    
    .custom-notification-icon {
        font-size: 24px;
    }
    
    .custom-notification-message {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .custom-notification-content {
        padding: 14px;
        gap: 12px;
    }
    
    .custom-notification-icon {
        font-size: 22px;
    }
    
    .custom-notification-message {
        font-size: 13px;
    }
    
    .custom-notification-close {
        top: 12px;
        right: 12px;
    }
}

/* Animation pulse pour le succès */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.custom-notification-success .custom-notification-icon {
    animation: pulse 0.5s ease-in-out;
}

/* Animation shake pour l'erreur */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.custom-notification-error .custom-notification-icon {
    animation: shake 0.5s ease-in-out;
}

/* Style pour les champs avec erreur */
input.error, textarea.error, select.error {
    border-color: #ef4444 !important;
    animation: shake 0.3s ease-in-out;
}

/* Overlay sombre quand notification apparaît (optionnel) */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.notification-overlay.active {
    opacity: 1;
    pointer-events: auto;
}