/* Notifications : cloche, pastille et panneau déroulant. */
.notif-button {
    position: relative; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center;
    padding: 0; border: 1px solid #c8d1da; border-radius: 50%; background: #f3f6f9; color: #29445f; cursor: pointer;
}
.notif-button:hover { background: #e7eef5; }
.notif-button svg { width: 19px; height: 19px; }
.notif-badge {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box;
    border-radius: 999px; background: #dc3545; color: #fff; border: 2px solid #fff; font-size: 0.65rem; font-weight: 700;
    line-height: 14px; text-align: center; pointer-events: none;
}
.notif-badge[hidden] { display: none; }

.notif-panel {
    position: fixed; z-index: 3000; width: 380px; max-width: calc(100vw - 16px); max-height: min(70vh, 560px);
    display: flex; flex-direction: column; background: #fff; color: #1b2a3a; border: 1px solid #d5dbe1; border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25); overflow: hidden;
}
.notif-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e6e9ee; }
.notif-read-all { border: 0; background: none; color: #288eaf; font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 4px 0; }
.notif-read-all:hover { text-decoration: underline; }
.notif-read-all[hidden] { display: none; }
.notif-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.notif-empty { padding: 28px 16px; text-align: center; color: #5b6772; font-size: 0.9rem; }
.notif-item {
    display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid #eef1f4;
    background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.notif-item:hover { background: #f4f8fb; }
.notif-item.is-unread { background: #eef6fb; }
.notif-item.is-unread:hover { background: #e3f0f8; }
.notif-level { flex: 0 0 4px; align-self: stretch; border-radius: 2px; background: var(--notif-color, #288eaf); }
.notif-item.level-success { --notif-color: #2e9e5b; }
.notif-item.level-warning { --notif-color: #f0a000; }
.notif-item.level-important { --notif-color: #dc3545; }
.notif-content { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.notif-title { font-weight: 700; font-size: 0.92rem; overflow-wrap: anywhere; }
.notif-body { font-size: 0.85rem; color: #3d4b57; white-space: pre-line; overflow-wrap: anywhere; }
.notif-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; color: #6b7783; }
.notif-link { color: #288eaf; font-weight: 600; white-space: nowrap; }
.notif-unread-dot { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #288eaf; }

@media (max-width: 480px) {
    .notif-panel { left: 8px; right: 8px !important; width: auto; max-width: none; }
}

body.dark-mode .notif-button { background-color: #222832; color: #e6edf3; border-color: #505b68; }
body.dark-mode .notif-badge { border-color: #171b22; }
body.dark-mode .notif-panel { background: #171b22; color: #e6edf3; border-color: #333c47; }
body.dark-mode .notif-header { border-bottom-color: #2a323c; }
body.dark-mode .notif-item { background: #171b22; border-bottom-color: #232b34; }
body.dark-mode .notif-item:hover { background: #1d242d; }
body.dark-mode .notif-item.is-unread { background: #172a38; }
body.dark-mode .notif-body { color: #b8c4cf; }
body.dark-mode .notif-meta, body.dark-mode .notif-empty { color: #8a98a6; }
