/* ═══════════════════════════════════════════════════════════════
   NOTIFICATION CENTER — Panneau global de notifications
   ═══════════════════════════════════════════════════════════════ */

/* Badge sur le bouton */
.notif-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ec4899;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 9px;
    text-align: center;
    display: none;
    padding: 0 4px;
}

.notif-btn .badge.visible {
    display: block;
}

.notif-btn {
    position: relative;
}

/* Panel dropdown */
.notif-panel {
    position: fixed;
    z-index: 10000;
    width: 380px;
    max-height: 480px;
    background: #1a1d23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notif-panel.open {
    display: flex;
}

/* Header */
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-panel-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
}

.notif-mark-all-read {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.notif-mark-all-read:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Liste */
.notif-panel-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notif-panel-empty,
.notif-panel-loading {
    padding: 32px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* Item notification */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
    background: rgba(102, 126, 234, 0.06);
    border-left: 3px solid #667eea;
}

.notif-item-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
    padding-top: 2px;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.notif-item-message {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

/* Footer */
.notif-panel-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
}

.notif-footer-btn {
    width: 100%;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-radius: 8px;
    padding: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.notif-footer-btn:hover {
    background: rgba(102, 126, 234, 0.15);
}

/* Mobile */
@media (max-width: 480px) {
    .notif-panel {
        width: calc(100vw - 16px);
        right: 8px !important;
        left: 8px;
    }
}
