/* Barre de menu de NOCR (haut de page), partagée par l'interface générale et l'appli de saisie
   (/appli/) : on passe de l'une à l'autre sans changer d'en-tête. Règles autonomes (variables et
   boutons redéfinis ici) : l'appli a sa propre feuille de style, qui ne doit pas la déformer. */

.topbar, dialog.goto {
  --night: #023b47; --teal: #0e7c86; --teal-dark: #064552; --surface: #ffffff; --text: #1f2a33;
  --muted: #63707c; --border: #dbe2e8; --accent: #0e7c86; --accent-soft: #e2f2f3;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.45;
}
.topbar button, dialog.goto button { min-height: 0; font: inherit; border-radius: 8px; touch-action: manipulation; }
.topbar { display: flex; align-items: center; gap: .25rem; padding: .35rem 1rem; background: var(--night); color: #fff;
          position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); min-height: 54px; }
.topbar img { height: 34px; }
.topbar .brand { font-weight: 800; color: #fff; text-decoration: none; letter-spacing: .03em; margin-right: 1rem; }
.topbar .spacer { flex: 1; }
.topbar form { margin: 0; }
.topbar a, .topbar summary, .topbar button.link { background: none; border: 0; font-weight: 500; color: #dff1f3; text-decoration: none; padding: .5rem .6rem; border-radius: 8px;
                                                 cursor: pointer; font-size: .95rem; }
.topbar a:hover, .topbar summary:hover, .topbar a.active, .menu[open] > summary { background: rgba(255, 255, 255, .1); color: #fff; }
.topbar .shortcut { background: var(--teal); color: #fff; font-weight: 600; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: " ▾"; font-size: .8em; }
.menu .items { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--surface);
               border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); padding: .4rem; z-index: 30; }
.menu.right .items { left: auto; right: 0; }
.menu .items a, .menu .items button.link { display: block; width: 100%; text-align: left; color: var(--text); padding: .55rem .8rem; }
/* Entrées trouvées seulement par « Aller à… » (Ctrl+K) : masquées ici aussi, même si une autre feuille ne se charge pas. */
.menu .items a[hidden] { display: none; }
.menu .items a:hover, .menu .items button.link:hover { background: var(--accent-soft); color: var(--teal-dark); }
.menu .items a.active { background: var(--accent-soft); color: var(--teal-dark); font-weight: 700; }
.menu .items { max-height: calc(100vh - 80px); overflow-y: auto; min-width: 260px; }
.menu .items .group { display: block; padding: .6rem .8rem .2rem; font-size: .75rem; font-weight: 700; text-transform: uppercase;
                      letter-spacing: .04em; color: var(--muted); }
.menu .items .group:not(:first-child) { border-top: 1px solid var(--border); margin-top: .3rem; }
.menu .items hr { border: 0; border-top: 1px solid var(--border); margin: .3rem 0; }
.menu.icon > summary::after { content: ""; }
.topbar .goto-open, .topbar .menu.icon > summary { font-size: 1rem; padding-inline: .45rem; }
dialog.goto { margin: 10vh auto auto; width: min(560px, calc(100% - 32px)); padding: .6rem; border: 0; border-radius: 14px;
              background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
dialog.goto::backdrop { background: rgba(2, 59, 71, .35); }
dialog.goto input { width: 100%; font-size: 1.1rem; }
dialog.goto ul { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 55vh; overflow-y: auto; }
dialog.goto li a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; }
dialog.goto li a small { color: var(--muted); text-align: right; }
dialog.goto li a.selected, dialog.goto li a:hover { background: var(--accent-soft); color: var(--teal-dark); }
dialog.goto .empty { margin: .6rem .7rem; }
.nav-items { display: flex; align-items: center; gap: .1rem; flex-wrap: wrap; flex: 1; }
.menu-toggle { display: none; }
.bell { position: relative; text-decoration: none; padding: .2rem .4rem; }
.bell .count { position: absolute; top: -.3rem; right: -.4rem; background: #c0392b; color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .35rem; font-weight: 700; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .topbar { flex-wrap: wrap; }
  .nav-items { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; padding-bottom: .5rem; }
  body.menu-open .nav-items { display: flex; }
  .menu .items { position: static; box-shadow: none; background: rgba(255, 255, 255, .06); }
  .menu .items a, .menu .items button.link { color: #dff1f3; }
  .menu .items { max-height: none; }
  .menu .items .group { color: #9fc4ca; }
  .menu .items .group:not(:first-child), .menu .items hr { border-color: rgba(255, 255, 255, .15); }
}
