/* Styles pour les notifications */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #1877f2;
}

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

.notification-success {
    border-left-color: #42b883;
}

.notification-error {
    border-left-color: #e41e3f;
}

.notification-warning {
    border-left-color: #f39c12;
}

.notification-info {
    border-left-color: #3498db;
}

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

.notification-title {
    font-weight: 600;
    color: #1c1e21;
    font-size: 14px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #65676b;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #1c1e21;
}

.notification-message {
    color: #65676b;
    font-size: 13px;
    line-height: 1.4;
}

/* Notifications dans l'interface */
.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.notifications-dropdown.show {
    display: block;
}

.notifications-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dadde1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-title {
    font-weight: 600;
    color: #1c1e21;
    font-size: 16px;
}

.mark-all-read {
    background: none;
    border: none;
    color: #1877f2;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

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

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e3f2fd;
}

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

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.notification-text {
    font-size: 14px;
    color: #1c1e21;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
    color: #65676b;
}

.notification-unread-indicator {
    width: 8px;
    height: 8px;
    background: #1877f2;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-item.read .notification-unread-indicator {
    display: none;
}

/* Types de notifications */
.notification-like .notification-icon {
    color: #1877f2;
}

.notification-comment .notification-icon {
    color: #42b883;
}

.notification-follow .notification-icon {
    color: #f39c12;
}

.notification-mention .notification-icon {
    color: #9b59b6;
}

.notification-message .notification-icon {
    color: #3498db;
}

/* Badge de notification */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e41e3f;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    min-width: 18px;
}

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

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

.notification-item.new {
    animation: notificationPulse 0.5s ease;
}

/* 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;
    }
    
    .notification-item {
        padding: 12px 15px;
    }
    
    .notification-avatar {
        width: 35px;
        height: 35px;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #242526;
        color: #e4e6ea;
        border-left-color: #1877f2;
    }
    
    .notification-title {
        color: #e4e6ea;
    }
    
    .notification-message {
        color: #b0b3b8;
    }
    
    .notifications-dropdown {
        background: #242526;
        border: 1px solid #3a3b3c;
    }
    
    .notifications-header {
        border-bottom-color: #3a3b3c;
    }
    
    .notifications-title {
        color: #e4e6ea;
    }
    
    .notification-item {
        border-bottom-color: #3a3b3c;
    }
    
    .notification-item:hover {
        background: #3a3b3c;
    }
    
    .notification-item.unread {
        background: #1a1a1a;
    }
    
    .notification-text {
        color: #e4e6ea;
    }
    
    .notification-time {
        color: #b0b3b8;
    }
}
