/* Système de notifications réutilisable */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
    font-size: 14px;
    font-weight: 500;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-left: 4px solid #2E7D32;
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border-left: 4px solid #C62828;
}

.notification.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border-left: 4px solid #1565C0;
}

.notification.warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border-left: 4px solid #ef6c00;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.notification-icon {
    margin-right: 12px;
    font-size: 18px;
}

.notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-message {
    opacity: 0.9;
    font-size: 13px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    
    .notification-close {
        font-size: 18px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .notification-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    
    .notification-icon {
        font-size: 16px;
        margin-right: 8px;
    }
}

/* Variantes de notifications */
.notification.toast {
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 13px;
    min-width: 200px;
}

.notification.banner {
    border-radius: 0;
    margin: 0;
    position: relative;
    width: 100%;
    max-width: none;
}

.notification.banner .notification-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Animations supplémentaires */
.notification.bounce {
    animation: slideIn 0.3s ease-out, bounce 0.6s ease-out 0.3s;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.notification.fade {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour les notifications empilées */
.notification-container.stacked .notification {
    margin-bottom: 8px;
    transform-origin: top right;
}

.notification-container.stacked .notification:nth-child(1) {
    transform: scale(1);
}

.notification-container.stacked .notification:nth-child(2) {
    transform: scale(0.95);
    opacity: 0.9;
}

.notification-container.stacked .notification:nth-child(3) {
    transform: scale(0.9);
    opacity: 0.8;
}

/* Thème sombre */
@media (prefers-color-scheme: dark) {
    .notification {
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .notification.success {
        background: linear-gradient(135deg, #388e3c, #2e7d32);
    }
    
    .notification.error {
        background: linear-gradient(135deg, #d32f2f, #c62828);
    }
    
    .notification.info {
        background: linear-gradient(135deg, #1976d2, #1565c0);
    }
    
    .notification.warning {
        background: linear-gradient(135deg, #f57c00, #ef6c00);
    }
} 