/* Styles modernes pour les notifications */

/* Notifications toast */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px 24px;
    min-width: 320px;
    max-width: 400px;
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary-color);
    backdrop-filter: blur(20px);
}

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

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--danger-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-info {
    border-left-color: var(--info-color);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.notification-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.notification-message {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Dropdown des notifications */
.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 380px;
    max-height: 500px;
    overflow: hidden;
    z-index: 1000;
    display: none;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.notifications-dropdown.show {
    display: block;
    animation: slideInDown 0.3s ease-out;
}

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

.notifications-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.notifications-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifications-title::before {
    content: '🔔';
    font-size: 20px;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mark-all-read:hover {
    background: var(--bg-hover);
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Items de notification */
.notification-item {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: rgba(24, 119, 242, 0.05);
    border-left: 4px solid var(--primary-color);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    transition: var(--transition);
}

.notification-item:hover .notification-avatar {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 6px;
    font-weight: 500;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Types de notifications */
.notification-like .notification-icon {
    color: var(--primary-color);
}

.notification-comment .notification-icon {
    color: var(--success-color);
}

.notification-follow .notification-icon {
    color: var(--warning-color);
}

.notification-mention .notification-icon {
    color: var(--info-color);
}

.notification-message .notification-icon {
    color: var(--primary-color);
}

/* Badge de notification */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, var(--danger-color), #ff6b6b);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
    border: 2px solid var(--bg-primary);
}

.notification-badge.hidden {
    display: none;
}

/* Animation pour les nouvelles notifications */
@keyframes notificationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-item.new {
    animation: notificationPulse 0.6s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .notifications-dropdown {
        width: 100vw;
        right: -20px;
        left: -20px;
        border-radius: 0;
        max-height: 70vh;
    }
    
    .notification-item {
        padding: 12px 16px;
    }
    
    .notification-avatar {
        width: 40px;
        height: 40px;
    }
    
    .notification-text {
        font-size: 13px;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #242526;
        color: #e4e6ea;
        border-left-color: var(--primary-color);
    }
    
    .notification-title {
        color: #e4e6ea;
    }
    
    .notification-message {
        color: #b0b3b8;
    }
    
    .notifications-dropdown {
        background: #242526;
        border: 1px solid #3a3b3c;
    }
    
    .notifications-header {
        border-bottom-color: #3a3b3c;
        background: #3a3b3c;
    }
    
    .notifications-title {
        color: #e4e6ea;
    }
    
    .notification-item {
        border-bottom-color: #3a3b3c;
    }
    
    .notification-item:hover {
        background: #3a3b3c;
    }
    
    .notification-item.unread {
        background: rgba(24, 119, 242, 0.1);
    }
    
    .notification-text {
        color: #e4e6ea;
    }
    
    .notification-time {
        color: #b0b3b8;
    }
    
    .notification-avatar {
        border-color: #4a4b4c;
    }
    
    .notification-item:hover .notification-avatar {
        border-color: var(--primary-color);
    }
}
