/* Notifications : cloche de l'en-tête, toasts en direct (pile en haut à droite), centre de notifications */
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--ambre); color: var(--graphite); font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--porcelaine); }
.bell.has-unread svg.icon { color: var(--graphite); }

.notif-toasts { position: fixed; top: 16px; right: 16px; z-index: 70; display: flex; flex-direction: column; gap: var(--sp-2); width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.notif-toasts .notif-toast { position: static; translate: none; pointer-events: auto; padding: 0; max-width: none; box-shadow: 0 12px 30px -12px rgb(0 0 0 / .45); }
.notif-toast-link { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; color: inherit; }
.notif-toast.alert .notif-toast-link svg.icon { color: #fff; }
.notif-toast-link svg.icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ambre); }
.notif-toast-link b { display: block; font-weight: 500; }
.notif-toast-body { display: block; margin-top: 2px; opacity: .8; font-size: 12.5px; }

.notifications-page { margin-top: var(--sp-5); }
.notifications-page.mails-layout { max-width: none; }
.notif-list.card { padding: 4px; }
.notif + .notif { border-top: 1px solid var(--trait); }
.notif-link { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 10px 10px; border-radius: 8px; color: var(--ardoise); }
.notif-link:hover { background: var(--surface-2); }
.notif.unread .notif-link { color: var(--graphite); }
.notif-icon { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); flex: none; }
.notif-icon svg.icon { width: 16px; height: 16px; }
.notif.unread .notif-icon::after { content: ""; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--ambre); box-shadow: 0 0 0 2px var(--surface); }
.notif-text { flex: 1; min-width: 0; font-size: 14px; }
.notif.unread .notif-text b { font-weight: 600; }
.notif-text b { font-weight: 500; overflow-wrap: anywhere; }
.notif-body { display: block; margin-top: 2px; font-size: 13px; color: var(--ardoise); overflow-wrap: anywhere; }
.notif-time { flex: none; font-size: 11.5px; color: var(--ardoise); }

/* Réglages › Notifications */
.notif-prefs { width: 100%; border-collapse: collapse; font-size: 14px; }
.notif-prefs th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ardoise); padding: 6px 8px; }
.notif-prefs td { padding: 8px; border-top: 1px solid var(--trait); vertical-align: middle; }
.notif-prefs td:not(:first-child), .notif-prefs th:not(:first-child) { text-align: center; width: 90px; }
.notif-prefs .lead { width: 70px; text-align: center; }
.notif-prefs td:last-child, .notif-prefs th:last-child { white-space: nowrap; width: 130px; }
.quiet-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.quiet-row .field { width: auto; }
@media (max-width: 767px) {
  .notif-toasts { top: auto; bottom: calc(96px + env(safe-area-inset-bottom)); }
  .notif-prefs td:not(:first-child), .notif-prefs th:not(:first-child) { width: 64px; }
}

/* Appareils abonnés au push */
.push-enable { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3); }
.push-enable .btn { gap: 6px; }
.devices > li { flex-wrap: wrap; }
.devices > li form { display: contents; }
.device-rename { position: relative; }
.device-rename summary { list-style: none; cursor: pointer; }
.device-rename summary::-webkit-details-marker { display: none; }
.device-rename-form { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); display: flex !important; gap: 6px; padding: 8px; border-radius: var(--r-ctrl); background: var(--surface); box-shadow: 0 12px 30px -14px rgb(0 0 0 / .4), inset 0 0 0 1px var(--trait); }
.device-rename-form .field { width: 200px; }

.notif-kind { display: block; margin-top: 4px; font-size: 11.5px; color: var(--ardoise); }
.cat-row svg.icon { width: 14px; height: 14px; color: var(--ardoise); flex: none; }
.notif-count { padding: 0 6px; border-radius: 99px; background: var(--ambre-doux); color: var(--graphite); }
.notif-push-state { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.notif-push-state p { margin: 0; }
.notif-push-state a { color: var(--prusse); }
@media (max-width: 1179px) { .notifications-page .mails-side { order: 1; } }
.notif-save { margin: var(--sp-4) 0 var(--sp-5); }
.notif-urgent { color: var(--erreur); font-weight: 600; }
