/**
 * Styles pour les popups de notifications
 */

.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transform: translateX(420px);
    transition: all 0.3s ease-in-out;
    border: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.notification-popup.hide {
    opacity: 0;
    transform: translateX(420px);
}

/* Header selon la priorité */
.notification-header {
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-weight: 600;
}

.notification-header.urgent {
    background: linear-gradient(135deg, #ff4757, #ff3838);
}

.notification-header.high {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.notification-header.medium {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.notification-header.low {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.priority-icon {
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Corps de la notification */
.notification-body {
    padding: 20px;
}

.notification-body h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.notification-message {
    color: #5a6c7d;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.notification-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #7f8c8d;
    border-top: 1px solid #ecf0f1;
    padding-top: 15px;
}

.time-info, .reminder-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Actions */
.notification-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #3498db;
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-outline {
    background: white;
    color: #7f8c8d;
    border: 1px solid #bdc3c7;
}

.btn-outline:hover {
    background: #ecf0f1;
    color: #5a6c7d;
}

/* Toast de succès */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    font-weight: 500;
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast.success {
    background: #27ae60;
}

.notification-toast.error {
    background: #e74c3c;
}

/* Responsive */
@media (max-width: 480px) {
    .notification-popup {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
    
    .notification-actions {
        flex-direction: column;
    }
    
    .notification-actions .btn {
        flex: none;
        width: 100%;
    }
}

/* Animation de pulsation pour notifications urgentes */
.notification-popup .notification-header.urgent {
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(255, 71, 87, 0.5); 
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.8); 
    }
}

/* Empilage de plusieurs popups */
.notification-popup:nth-child(n+2) {
    top: calc(20px + (n-1) * 180px);
    transform: translateX(420px) scale(0.95);
}

.notification-popup:nth-child(n+2).show {
    transform: translateX(0) scale(0.95);
}

/* Masquer les popups en dehors de l'écran */
.notification-popup:nth-child(n+4) {
    display: none;
}