/* Notifications : cloche de la barre du haut et panneau « Tous | Mes notifications ». Aucune valeur de couleur en dur : variables du thème. */
:root {
  --dec-materiel: var(--success); --dec-acces: var(--blue); --dec-autre: var(--muted);      /* causes de décalage ajoutées (planning) : couleurs du thème */
  --nt-largeur: 380px;                 /* largeur du panneau (bureau) */
  --nt-hauteur: 70vh;                  /* hauteur maximale du panneau */
  --nt-ligne-min: 44px;                /* hauteur minimale d'une ligne (cible tactile) */
  --nt-point: 8px;                     /* point lu / non lu */
  --nt-pastille: 16px;                 /* diamètre minimal de la pastille de la cloche */
}

.nt-wrap { position: relative; display: inline-flex; margin-right: var(--s-2); }
.nt-wrap[hidden] { display: none; }
.tb-notif { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tb-notif:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tb-notif[aria-expanded="true"] { color: var(--fg); background: var(--surface2); }
.nt-pastille { position: absolute; top: calc(var(--s-1) * -1); right: calc(var(--s-1) * -1); min-width: var(--nt-pastille); height: var(--nt-pastille); padding: 0 var(--s-1); box-sizing: border-box;
  border-radius: var(--nt-pastille); background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 700; line-height: 1; display: inline-grid; place-items: center; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; }
.nt-pastille[hidden] { display: none; }

/* ── Panneau ── */
.nt-panneau { position: absolute; top: calc(100% + var(--s-2)); right: 0; z-index: 1500; width: var(--nt-largeur); max-width: calc(100vw - var(--s-4)); max-height: var(--nt-hauteur);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); }
.nt-panneau[hidden] { display: none; }
.nt-entete { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--border); background: var(--surface); flex: none; }
.nt-entete .seg button { display: inline-flex; align-items: center; gap: var(--s-1); white-space: nowrap; }
.nt-n { min-width: 1.4em; padding: 0 var(--s-1); border-radius: var(--r-sm); background: var(--accent); color: var(--bg); font-size: 11px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.nt-tout-lire { flex: none; padding: var(--s-1) var(--s-2); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.nt-tout-lire:hover, .nt-tout-lire:focus-visible { background: var(--accent-d); }
.nt-tout-lire[hidden] { display: none; }
.nt-corps-liste { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }

.nt-jour { padding: var(--s-2) var(--s-3) var(--s-1); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.nt-ligne { position: relative; display: grid; grid-template-columns: var(--nt-point) minmax(0, 1fr) auto auto; align-items: center; column-gap: var(--s-2); min-height: var(--nt-ligne-min);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); border: 0; border-top: 1px solid var(--border); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%; box-sizing: border-box; }
.nt-jour + .nt-ligne { border-top: 0; }
.nt-ligne:hover, .nt-ligne:focus-visible { background: var(--surface2); outline: none; }
.nt-ligne:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.nt-point { width: var(--nt-point); height: var(--nt-point); box-sizing: border-box; border: 1.5px solid var(--muted); border-radius: 50%; }
.nt-ligne.non-lue .nt-point { border-color: var(--accent); background: var(--accent); }
.nt-ligne.non-lue .nt-texte { font-weight: 600; }
.nt-texte { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.nt-sous { margin-top: 2px; color: var(--muted); font-size: 11.5px; line-height: 1.3; overflow-wrap: anywhere; }
.nt-heure { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-ligne .zm-btn { min-width: 28px; height: 28px; padding: 0; opacity: 0; }
.nt-ligne:hover .zm-btn, .nt-ligne:focus-within .zm-btn, .nt-ligne .zm-btn[aria-expanded="true"] { opacity: 1; }
.nt-vide { padding: var(--s-5) var(--s-3); color: var(--muted); font-size: 13px; text-align: center; }
.nt-plus-lien { display: block; width: 100%; padding: var(--s-3); border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.nt-plus-lien:hover, .nt-plus-lien:focus-visible { background: var(--accent-d); }

/* Activité : pas de point ; groupes dépliables */
.nt-activite .nt-ligne { grid-template-columns: minmax(0, 1fr) auto auto; padding-left: var(--s-3); }
.nt-chev { color: var(--muted); transition: transform var(--t-base); flex: none; }
.nt-ligne[aria-expanded="true"] .nt-chev { transform: rotate(180deg); }
.nt-sous-liste { background: var(--bg); }
.nt-sous-liste .nt-ligne { min-height: var(--nt-ligne-min); padding-left: var(--s-5); }

/* ── Téléphone : feuille pleine largeur sous la barre ── */
@media (max-width: 720px) {
  .nt-wrap { position: static; margin-right: var(--s-1); }
  .nt-panneau { position: fixed; z-index: 3000; top: calc(var(--topbar-h, 60px) + 1px); left: 0; right: 0; width: auto; max-width: none; max-height: calc(100dvh - var(--topbar-h, 60px) - 1px);
    height: calc(100dvh - var(--topbar-h, 60px) - 1px); border-width: 1px 0 0; border-radius: 0; }
  .nt-ligne .zm-btn { opacity: 1; }
  .nt-ligne { min-height: var(--nt-ligne-min); }
}
