/* publications : cloche et centre de notifications, fenêtre « Programmer », pastilles des réseaux dans « Programmé » */

/* ---------- Cloche ---------- */
.nk-cloche { position: relative; }
.nk-cloche-pastille { position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #141519; font: 600 10.5px/17px var(--font-sans); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.nk-cloche-ip { position: absolute; z-index: 5; top: calc(env(safe-area-inset-top) + 8px); right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); }
body:not(.plateforme-iphone) .nk-cloche-ip { top: 10px; }
.nk-cloche:focus-visible, .nk-notif:focus-visible, .nk-notifs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Panneau ---------- */
.nk-notifs { position: fixed; z-index: 120; top: 56px; right: 12px; width: min(380px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
.nk-notifs[hidden] { display: none; }
body.plateforme-iphone .nk-notifs { top: calc(env(safe-area-inset-top) + 56px); left: 8px; right: 8px; width: auto; max-height: calc(100dvh - env(safe-area-inset-top) - 120px); }
.nk-notifs-tete { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; }
.nk-notifs-tete strong { flex: 1; font: 500 16px/1.2 var(--font-display); }
.nk-notifs-lien { height: 32px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; color: var(--accent); }
.nk-notifs-lien:disabled { color: var(--ink-3); cursor: default; }
.nk-notifs-fermer { width: 32px; height: 32px; border-radius: 8px; color: var(--ink-2); }
.nk-notifs-lien:not(:disabled):hover, .nk-notifs-fermer:hover { background: var(--surface-2); }
.nk-notifs-permission { display: block; width: calc(100% - 8px); margin: 0 4px 6px; min-height: 40px; padding: 8px 12px; border-radius: 10px; background: var(--accent-bg); border: 1px solid var(--accent-border); color: var(--accent); font-size: 13px; font-weight: 500; text-align: left; }
.nk-notifs-info, .nk-notifs-vide { margin: 4px 10px 10px; font-size: 12.5px; color: var(--ink-2); }
.nk-notifs-liste { list-style: none; margin: 0; padding: 0; }
.nk-notif { position: relative; display: grid; gap: 2px; width: 100%; min-height: 44px; padding: 10px 12px 10px 24px; border-radius: 10px; text-align: left; }
.nk-notif:hover { background: var(--surface-2); }
.nk-notif.non-lue::before { content: ""; position: absolute; left: 9px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nk-notif-titre { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.nk-notif:not(.non-lue) .nk-notif-titre { font-weight: 500; color: var(--ink-2); }
.nk-notif-texte { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.nk-notif-quand { font-size: 11.5px; color: var(--ink-3); }

/* ---------- Fenêtre « Programmer » ---------- */
.nk-prog { display: flex; flex-direction: column; gap: 12px; }
.nk-prog label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.nk-prog input[type=date], .nk-prog input[type=time], .nk-prog select, .nk-prog textarea { min-height: 40px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); font: 400 14px/1.4 var(--font-sans); color-scheme: light dark; }
.nk-prog textarea { resize: vertical; }
.nk-prog :is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nk-prog-reseaux { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
.nk-prog-reseaux legend { padding: 0; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.nk-prog .nk-prog-reseau { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; min-height: 44px; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); font-size: 14px; cursor: pointer; }
.nk-prog .nk-prog-reseau:has(input:checked) { border-color: var(--accent-border); background: var(--accent-bg); }
.nk-prog-reseau input { width: 18px; height: 18px; accent-color: var(--accent); grid-row: span 2; }
.nk-prog-reseau small { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.nk-prog-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nk-prog-tete { display: flex; justify-content: space-between; gap: 8px; }
.nk-prog-compte { font-weight: 400; color: var(--ink-3); }
.nk-prog-info { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.nk-prog-alerte { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: 13px; }
.nk-prog-alerte[hidden] { display: none; }
.nk-prog-boutons { display: flex; justify-content: flex-end; gap: 8px; }
.nk-prog-boutons button { min-height: 40px; }
.nk-prog-mention { margin: 0; font-size: 11.5px; color: var(--ink-3); text-align: right; }

/* ---------- « Programmé » : une pastille par réseau ---------- */
.proj-acts { flex-wrap: wrap; gap: 6px; align-items: center; }
.nk-pubs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.nk-pub { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.nk-pub-ok { background: var(--signal-bg); color: var(--signal); }
.nk-pub-cours, .nk-pub-retard { background: var(--accent-bg); color: var(--accent); }
.nk-pub-echec { background: var(--danger-bg); color: var(--danger); }
@media (min-width: 701px) {
  .proj-table.est-range .proj-row { grid-template-columns: minmax(0, 1.2fr) 96px 100px 110px 56px minmax(190px, 1.3fr); }
}
@media (max-width: 700px) {
  .proj-table.est-range .proj-row { grid-template-columns: minmax(0, 1fr) auto; }
  .proj-table.est-range .proj-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .nk-pubs { justify-content: flex-start; }
  .nk-prog-ligne { grid-template-columns: 1fr; }
}
/* « Publier maintenant » et « Réessayer » attendent une réponse : toujours visibles */
.proj-act.nk-act-visible { opacity: 1; color: var(--accent); border-color: var(--accent-border); background: var(--accent-bg); }
/* iPhone, espace ouvert : la cloche s'ajoute à la barre du haut ; l'encoche se resserre pour que tout tienne en 390 px */
body.iphone-detail .cue072-wrap { min-width: 0; }
body.iphone-detail .cue072-notch { min-width: 0; max-width: 100%; }
body.iphone-detail .cue072-copy { min-width: 0; }
body.iphone-detail .cue072-bot { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
