/* Pop-up de sortie vers la web app : fenêtre sur ordinateur, encart bas sur mobile. */
.np-sortie { box-sizing: border-box; padding: 0; border: 0; color: var(--np-encre); background: var(--np-blanc); font-family: var(--np-font-texte); }
.np-sortie *, .np-sortie *::before, .np-sortie *::after { box-sizing: border-box; }
.np-sortie:not([open]) { display: none; }
.np-sortie:focus { outline: none; }
.np-sortie__invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.np-sortie__titre { margin: 0; font: 800 var(--np-fs-h3)/var(--np-lh-titre) var(--np-font-titre); color: var(--np-marine-900); }
.np-sortie__accroche { margin: var(--np-s2) 0 0; font-size: var(--np-fs-md); line-height: var(--np-lh-texte); }
.np-sortie__liste { margin: var(--np-s4) 0 0; padding: 0; list-style: none; display: grid; gap: var(--np-s2); }
.np-sortie__liste li { display: flex; gap: var(--np-s2); align-items: flex-start; font-size: var(--np-fs-sm); line-height: var(--np-lh-texte); }
.np-sortie__liste .np-icon { color: var(--np-succes); margin-top: 1px; }
.np-sortie__note { margin: var(--np-s3) 0 0; padding: var(--np-s3); border-radius: var(--np-r-sm); background: var(--np-eau-50); font-size: var(--np-fs-sm); line-height: var(--np-lh-texte); color: var(--np-encre-2); }
.np-sortie__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--np-s2) var(--np-s4); margin-top: var(--np-s5); }
.np-sortie__bouton { min-height: var(--np-cible); justify-content: center; }
.np-sortie__non { min-height: 44px; padding: 0 var(--np-s2); border: 0; background: none; color: var(--np-encre-2); font: inherit; font-size: var(--np-fs-sm); text-decoration: underline; cursor: pointer; }
.np-sortie__fermer { position: absolute; top: var(--np-s2); right: var(--np-s2); z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--np-r-pill); background: var(--np-blanc); color: var(--np-encre-2); cursor: pointer; }
.np-sortie__fermer .np-icon { width: 22px; height: 22px; }
.np-sortie__fermer:hover { background: var(--np-eau-100); color: var(--np-marine-900); }
.np-sortie :focus-visible { outline: none; box-shadow: var(--np-focus); }
.np-sortie__visuel { display: block; width: 100%; height: auto; border-radius: var(--np-r-md); box-shadow: var(--np-ombre-2); }
.np-sortie__poignee { display: none; }

/* Ordinateur : fenêtre centrée, modale. */
.np-sortie[data-format="fenetre"] { width: min(42rem, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border-radius: var(--np-r-lg); box-shadow: var(--np-ombre-3); }
.np-sortie[data-format="fenetre"]::backdrop { background: rgba(14, 42, 71, .55); }
.np-sortie[data-format="fenetre"] .np-sortie__corps { display: grid; grid-template-columns: 9.5rem 1fr; gap: var(--np-s6); align-items: start; padding: var(--np-s8); }
.np-sortie[data-format="fenetre"] .np-sortie__texte { padding-right: var(--np-s6); }

/* Mobile : encart non modal en bas, un quart d'écran au plus
   (184 px minimum pour les très petits écrans, sinon le bouton serait coupé). */
.np-sortie--feuille { position: fixed; inset: auto 0 0 0; z-index: 2147483001; width: 100%; max-width: 100%; margin: 0; max-height: max(25vh, 11.5rem); max-height: max(25dvh, 11.5rem); overflow: hidden; border-radius: var(--np-r-lg) var(--np-r-lg) 0 0; box-shadow: 0 -8px 30px rgba(14, 42, 71, .22); touch-action: none; transition: max-height var(--np-duree) ease, transform var(--np-duree) ease; animation: np-sortie-monte 260ms ease-out; }
.np-sortie--feuille .np-sortie__poignee { display: flex; justify-content: center; }
.np-sortie--feuille .np-sortie__agrandir { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.np-sortie--feuille .np-sortie__barre { width: 44px; height: 5px; border-radius: var(--np-r-pill); background: var(--np-ligne-forte); }
.np-sortie--feuille .np-sortie__fermer { top: 4px; right: 4px; }
.np-sortie--feuille .np-sortie__corps { padding: 0 var(--np-s4) calc(var(--np-s3) + env(safe-area-inset-bottom)); }
.np-sortie--feuille .np-sortie__surtitre, .np-sortie--feuille .np-sortie__visuel, .np-sortie--feuille .np-sortie__details, .np-sortie--feuille .np-sortie__non { display: none; }
.np-sortie--feuille .np-sortie__titre { padding-right: 40px; font-size: var(--np-fs-md); }
.np-sortie--feuille .np-sortie__accroche { margin-top: var(--np-s1); font-size: var(--np-fs-sm); line-height: 1.4; }
.np-sortie--feuille .np-sortie__actions { margin-top: var(--np-s3); }
.np-sortie--feuille .np-sortie__bouton { width: 100%; }

/* Encart agrandi : glisser vers le haut ou toucher la poignée. */
.np-sortie--feuille.est-etendue { max-height: 85vh; max-height: 85dvh; display: flex; flex-direction: column; }
.np-sortie--feuille.est-etendue .np-sortie__corps { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.np-sortie--feuille.est-etendue .np-sortie__surtitre, .np-sortie--feuille.est-etendue .np-sortie__details { display: block; }
.np-sortie--feuille.est-etendue .np-sortie__visuel { display: block; width: 6rem; margin: 0 auto var(--np-s3); }
.np-sortie--feuille.est-etendue .np-sortie__titre { margin-top: var(--np-s1); font-size: var(--np-fs-h3); }
.np-sortie--feuille.est-etendue .np-sortie__accroche { font-size: var(--np-fs-md); }
.np-sortie--feuille.est-etendue .np-sortie__actions { position: sticky; bottom: 0; padding-top: var(--np-s2); background: var(--np-blanc); }

@keyframes np-sortie-monte { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .np-sortie--feuille { animation: none; transition: none; }
}
