/* ── Notification centre — bell dropdown panel ──────────────────────────────
   The bell (fragments/notifications/bell.html) is a Bootstrap dropdown shared by both
   chromes; the menu drops down from under the topbar (Popper-anchored to the bell).
   Rows are mini-cards: a colour-chip icon (accent per NotificationTopic.Accent), a left
   accent bar for unread, and a two-line clamped body. Forward-compatible with Etap 2
   grouping — .notif-chip__count renders the digest/coalesce counter with no layout change. */
/* Qualified as .dropdown-menu.notif-menu (specificity 0,2,0) so these win over Bootstrap's
   `.dropdown-menu[data-bs-popper] { top:100%; left:0; margin-top:.125rem }` (same 0,2,0, but app.css
   loads after Bootstrap → later source wins the tie). data-bs-display="static" keeps Bootstrap's
   static drop (top:100% / right:0 under the bell on desktop) with no Popper inline transform. */
.dropdown-menu.notif-menu {
    width: min(384px, calc(100vw - 16px));
    max-width: 100vw;
    margin-top: 8px; /* small gap below the topbar */
    padding: 0;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(22, 32, 43, .06), 0 18px 40px -18px rgba(22, 32, 43, .35);
    overflow: hidden;
    /* Above Leaflet map controls (z-index 1000) so the +/− zoom + attribution never bleed through;
       below Bootstrap offcanvas (1045) / modal (1055). */
    z-index: 1040;
}
.notif-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 6px;
}
.notif-menu__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.notif-actions {
    display: flex;
    justify-content: flex-end;
    padding: 2px 12px 6px;
}
.notif-actions .btn {
    font-size: 12.5px;
    font-weight: 600;
}
.notif-scroll {
    max-height: min(68vh, 520px);
    overflow-y: auto;
}
.notif-empty {
    padding: 40px 20px;
    color: var(--c-text-muted);
}
.notif-empty .bi {
    font-size: 1.6rem;
    opacity: .5;
}
.notif-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.notif-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-radius: 12px;
}
.notif-row:hover {
    background: var(--c-bg-hover);
}
.notif-row.is-unread {
    background: var(--accent-bg);
}
.notif-row.is-unread::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 3px;
    background: var(--accent);
}
.notif-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 11px;
    align-items: start;
    min-width: 0;
    padding: 10px 6px 11px 11px;
    text-decoration: none;
    color: var(--c-text);
}
.notif-item:hover {
    color: var(--c-text);
}
.notif-chip {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}
.notif-chip__count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 2px solid var(--c-bg-card);
    font-variant-numeric: tabular-nums;
}
.notif-body {
    min-width: 0;
}
.notif-title {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.3;
    color: var(--c-text);
}
.notif-row:not(.is-unread) .notif-title {
    font-weight: 500;
}
.notif-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
    color: var(--c-text-muted);
    font-size: 12.5px;
    line-height: 1.35;
}
.notif-time {
    display: block;
    margin-top: 5px;
    color: var(--c-text-muted);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}
.notif-check {
    align-self: center;
    margin-right: 4px;
    padding: 4px 6px;
    color: var(--c-text-muted);
    opacity: .55;
}
.notif-row:hover .notif-check {
    opacity: 1;
}
.notif-check:hover,
.notif-check:focus-visible {
    color: var(--c-success);
    opacity: 1;
}
.notif-menu__foot {
    text-align: center;
    padding: 9px;
    border-top: 1px solid var(--c-border);
}
.notif-menu__foot a {
    color: var(--c-text-muted);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}
.notif-menu__foot a:hover {
    color: var(--c-primary);
}
/* Accent presets — map a topic group to the semantic tokens. */
.notif-a-pos {
    --accent: var(--c-success);
    --accent-bg: var(--c-success-bg);
}
.notif-a-neg {
    --accent: var(--c-error);
    --accent-bg: var(--c-error-bg);
}
.notif-a-info {
    --accent: var(--c-primary);
    --accent-bg: var(--c-primary-tint);
}
.notif-a-warn {
    --accent: var(--c-warn);
    --accent-bg: var(--c-warn-bg);
}
.notif-a-neutral {
    --accent: var(--c-text-muted);
    --accent-bg: #EEF1F4;
}
/* Mobile: fixed sheet under the bar, symmetric side gaps (was right-anchored → uneven).
   Fixed positioning also lifts it cleanly over the Leaflet controls on the home map. */
@media (max-width: 575.98px) {
    .dropdown-menu.notif-menu {
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: none;
        margin-top: 0;
        border-radius: 16px;
    }
    /* Keep the whole sheet within the viewport on short phones (header + actions + footer + gaps). */
    .notif-scroll {
        max-height: calc(100dvh - 210px);
    }
}
/* Full-page /notifications list reuses the same row cards, wider layout. */
.notif-page-list {
    max-width: 640px;
}

