/* =============================================
   CENTRE DE NOTIFICATIONS — cloche de la barre du haut
   Téléphone : panneau qui monte du bas (angles droits en bas, sans poignée : il ne se
   tire pas). Ordinateur : bulle sous la cloche. Même contenu, mêmes actions.
   ============================================= */
.ntf-wrap { display: flex; }
.ntf-bell { position: relative; }
.ntf-bell--open { background: var(--clr-surface-2); color: var(--clr-text); }
.ntf-bell__count {
  position: absolute; top: 1px; right: -2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border: 2px solid var(--clr-surface); border-radius: var(--radius-full);
  background: var(--clr-accent); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 13px; text-align: center;
}

.ntf-layer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.ntf-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, .45); pointer-events: auto; }
.ntf {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 88dvh;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--clr-surface); color: var(--clr-text);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 24px rgba(16, 24, 40, .2);
  overflow: hidden;
  pointer-events: auto;
}
#ntf-panel { display: contents; }
.ntf-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.ntf-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 16px; }
.ntf-title { font-size: var(--text-base); font-weight: 700; letter-spacing: -.01em; }
.ntf-tabs { display: flex; gap: var(--sp-1); padding: 0 var(--sp-3); border-bottom: 1px solid var(--clr-border); flex-shrink: 0; }
.ntf-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 8px 9px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--clr-text-muted); font-size: var(--text-sm); font-weight: 600;
}
.ntf-tab.active { color: var(--clr-text); border-bottom-color: var(--clr-accent); }
.ntf-count {
  min-width: 20px; padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--clr-surface-2); color: var(--clr-text-muted);
  font-size: var(--text-xs); line-height: 20px; text-align: center;
}
.ntf-tab.active .ntf-count { background: var(--clr-accent-soft); color: var(--clr-accent-text); }

.ntf-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: var(--sp-3); }
.ntf-group {
  padding: 12px 16px 2px;
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: var(--clr-text-muted);
}
.ntf-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 10px 16px; }
.ntf-item + .ntf-item { border-top: 1px solid var(--clr-border); }
.ntf-item--unread { background: var(--clr-accent-tint); }
.ntf-ico {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.ntf-ico--danger  { background: var(--clr-danger-soft);  color: var(--clr-danger); }
.ntf-ico--warning { background: var(--clr-warning-soft); color: var(--clr-warning); }
.ntf-ico--accent  { background: var(--clr-accent-soft);  color: var(--clr-accent-text); }
.ntf-ico--success { background: var(--clr-success-soft); color: var(--clr-success); }
.ntf-ico--neutral { background: var(--clr-surface-2);    color: var(--clr-text-muted); }
.ntf-text { flex: 1; min-width: 0; }
.ntf-text__title { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-sm); font-weight: 600; line-height: 1.35; }
.ntf-text__sub { margin-top: 2px; font-size: .8125rem; line-height: 1.4; color: var(--clr-text-muted); }
.ntf-dot { width: 8px; height: 8px; margin-left: auto; flex-shrink: 0; border-radius: var(--radius-full); background: var(--clr-accent); }
.ntf-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.ntf-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--clr-border); border-radius: var(--radius-sm);
  background: var(--clr-surface); box-shadow: var(--shadow-xs);
  color: var(--clr-text); font-size: .8125rem; font-weight: 600; white-space: nowrap;
}
.ntf-btn:hover { background: var(--clr-surface-2); }
.ntf-btn:disabled { opacity: .6; }
.ntf-btn--primary { border-color: transparent; background: var(--clr-accent); color: #fff; box-shadow: none; }
.ntf-btn--primary:hover { background: var(--clr-accent-hover); }
.ntf-done {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 var(--sp-2);
  color: var(--clr-success); font-size: .8125rem; font-weight: 600; white-space: nowrap;
}
.ntf-sublist { margin-top: var(--sp-2); border: 1px solid var(--clr-border); border-radius: var(--radius-md); }
.ntf-subrow {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: 6px 6px 6px 12px; font-size: .8125rem; font-weight: 500;
}
.ntf-subrow + .ntf-subrow { border-top: 1px solid var(--clr-border); }
.ntf-subrow__sub { color: var(--clr-text-muted); font-weight: 400; }
.ntf-empty { padding: var(--sp-8) var(--sp-4); text-align: center; font-size: var(--text-sm); color: var(--clr-text-muted); }

/* Téléphone : cibles tactiles de 40 px */
@media (max-width: 1023px) {
  .ntf-btn, .ntf-done { height: 40px; }
  .ntf-subrow { padding: 4px 4px 4px 12px; }
  .ntf-head .btn-icon { width: 40px; height: 40px; }
}

/* Ordinateur : bulle sous la cloche, sans voile — un clic ailleurs la ferme */
@media (min-width: 1024px) {
  .ntf-backdrop { display: none; }
  .ntf {
    left: auto; bottom: auto;
    top: calc(var(--topbar-h) + 8px);
    right: calc(var(--sidebar-w) + 16px);
    width: 404px;
    max-height: calc(100dvh - var(--topbar-h) - 32px);
    padding-bottom: 0;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
}
