/* ══════════════════════════════════════════════════════════════════════════
   Coque de Notion'Perso (07/10/2026) : la coque de Gestion à l'identique.
   Valeurs reprises de vendor/gestion_assets/assets/gestion.css (« COQUE COMMUNE »,
   lignes 125-545 au 06/10) : menu latéral papier, rubrique ouverte en encre,
   recherche flottante, tiroir sous 981 px. Pilotée par gestion-shell.js (repris
   tel quel, attributs data-shell-*).
   Apparence du menu latéral et jetons --np-* : static/np/menu.css (C026).
   Jetons préfixés --np-* et classes np-* pour la marque, la barre et la recherche.
   Rien ne vise body ni html au-delà de la géométrie de coque.
   ══════════════════════════════════════════════════════════════════════════ */

/* Inter variable auto-hébergé, comme le site (une seule requête, 100 à 900, licence SIL OFL). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable.woff2") format("woff2");
}

/* Jetons --np-* : static/np/menu.css (chargée avec cette feuille). */

body.has-shell { --np-shell-left: var(--np-sidebar-width); padding-left: var(--np-shell-left); }
html[data-nav="collapsed"] body.has-shell { --np-shell-left: var(--np-sidebar-collapsed); }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 8px 12px; border-radius: 8px;
  background: var(--np-ink); color: var(--np-paper); text-decoration: none;
  font: 500 14px/1.2 var(--np-font);
}
.skip-link:focus { top: 8px; outline: 2px solid var(--np-rouge); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Menu latéral : géométrie (apparence : static/np/menu.css) ─────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--np-shell-left);
  z-index: var(--np-z-sidebar);
}

/* ── Barre du haut : transparente, seule la recherche est un objet ───────── */
.np-topbar {
  position: fixed;
  top: 0;
  left: var(--np-shell-left);
  right: 0;
  height: var(--np-header-height);
  z-index: var(--np-z-topbar);
  pointer-events: none;
  font-family: var(--np-font);
}
.np-topbar__inner { height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 20px; }
.np-topbar__menu {
  display: none;
  pointer-events: auto;
  appearance: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--np-ink-15);
  background: var(--np-paper);
  color: var(--np-ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.np-topbar__menu svg { width: 20px; height: 20px; }
.np-topbar__menu:focus-visible { outline: 2px solid var(--np-rouge); outline-offset: 2px; }
.np-topbar .np-topbar__brand { display: none; pointer-events: auto; flex: 0 0 auto; }
.np-topbar__brand .np-brand__logo { height: 34px; }
.np-topbar__search { pointer-events: auto; position: relative; flex: 1 1 auto; min-width: 0; margin: 0; }

/* Recherche « verre » de Gestion : seule exception de transparence admise. */
.np-search {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  border-radius: 23px;
  border: 1px solid rgba(30, 42, 74, 0.22);
  background: rgba(250, 246, 240, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 24px -14px rgba(30, 42, 74, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.np-search:focus-within {
  border-color: var(--np-rouge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 2px rgba(200, 48, 42, 0.35), 0 8px 24px -14px rgba(30, 42, 74, 0.45);
}
.np-search__icon { position: absolute; left: 16px; width: 18px; height: 18px; fill: var(--np-ink-70); pointer-events: none; }
.np-search__kbd {
  position: absolute; right: 14px;
  font: 400 11px/1.4 var(--np-font); color: var(--np-ink-70);
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--np-ink-15); background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.np-search:focus-within .np-search__kbd { display: none; }
.np-search__input {
  appearance: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 44px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--np-ink);
  caret-color: var(--np-rouge);
  font: 400 15px/1 var(--np-font);
  box-shadow: none;
}
.np-search__input:focus { outline: none; }
.np-search__input::placeholder { color: var(--np-ink-70); }
.np-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .np-search { -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .np-search { background: var(--np-paper); }
}
@media (prefers-reduced-transparency: reduce) {
  .np-search { background: var(--np-paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .np-search { background: Canvas; border-color: CanvasText; }
}

.shell-scrim { position: fixed; inset: 0; z-index: var(--np-z-scrim); background: rgba(30, 42, 74, 0.42); }
.shell-scrim[hidden] { display: none; }

/* ── Petit écran : tiroir de navigation, recherche toujours affichée ─────── */
@media (max-width: 980px) {
  body.has-shell { --np-shell-left: 0px; padding-left: 0; }
  html[data-nav="collapsed"] body.has-shell { --np-shell-left: 0px; }
  .sidebar {
    width: min(300px, 86vw);
    z-index: var(--np-z-drawer);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s var(--np-ease), visibility 0s linear 0.22s;
    box-shadow: 0 20px 50px -20px rgba(30, 42, 74, 0.6);
  }
  html[data-nav-open] .sidebar { transform: translateX(0); visibility: visible; transition: transform 0.22s var(--np-ease); }
  html[data-nav-open] body { overflow: hidden; }
  .sidebar__collapse { display: none; }
  .sidebar__close { display: inline-flex; }
  .np-topbar { left: 0; }
  .np-topbar__inner { padding: 0 12px; gap: 8px; }
  .np-topbar__menu { display: inline-flex; }
  .np-topbar .np-topbar__brand { display: inline-flex; }
}
@media (max-width: 560px) {
  .np-topbar .np-topbar__brand { display: none; }
  .np-search { height: 44px; }
  .np-search__kbd { display: none; }
  .np-search__input { font-size: 16px; padding-left: 42px; padding-right: 14px; }
}
@media (min-width: 1400px) {
  .np-topbar__inner { padding: 0 24px; }
  .np-search { height: 48px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar__link, .sidebar__chev, .np-search, .np-brand__logo { transition: none !important; }
}
