/* 🔔 NOTIFICATIONS STYLES */

/* Badge de notifications */
#notifications-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Bouton de notifications */
#notifications-button {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#notifications-button:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

#notifications-button .icon {
    font-size: 18px;
}

/* Panneau de notifications */
#notifications-panel {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

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

/* Header du panneau */
.notifications-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.notifications-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.notifications-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.notifications-actions .btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.notifications-actions .btn-small:hover:not(:disabled) {
    transform: translateY(-1px);
}

.notifications-actions .btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notifications-actions .btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
    transition: color 0.2s;
}

.notifications-actions .btn-close:hover {
    color: var(--text-primary);
}

/* Liste des notifications */
.notifications-list {
    overflow-y: auto;
    max-height: 520px;
    padding: 8px;
}

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

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

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

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

/* Item de notification */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.notification-item.notification-unread {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.1));
    border-left: 3px solid var(--primary-color);
    font-weight: 500;
}

/* Icône de notification */
.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 50%;
}

/* Contenu de notification */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Actions de notification */
.notification-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-self: flex-start;
}

.notification-actions .btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.notification-actions .btn-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* État vide */
.notification-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.notification-empty::before {
    content: '⚑';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    #notifications-panel {
        right: 10px;
        left: 10px;
        width: auto;
        top: 50px;
    }
    
    .notification-item {
        flex-direction: column;
    }
    
    .notification-actions {
        align-self: flex-end;
    }
}

/* Mode sombre */
body.dark-mode {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --border-color: #404040;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --hover-bg: #383838;
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
}

/* Animation de nouvelle notification */
@keyframes newNotification {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-item.notification-new {
    animation: newNotification 0.4s ease-out;
}