/* Masquer des liens (public/assets/masquer.js). Les croix n'apparaissent qu'en mode d'édition : le crayon en tête d'une
   boîte (ou de la vue Liste) met cette boîte seule en édition (attribut data-edition) ; un second clic ou Échap en sort.
   Bandeau « Lien masqué » en bas de l'écran ; page « Liens masqués ». */
.pn-editer {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; padding: 0; margin: 0 0 0 2px;
  border: 0; border-radius: 6px; background: none; color: var(--texte-doux, var(--doux, #8a97a0)); cursor: pointer; line-height: 0; opacity: .5;
}
.pn-editer:hover, .pn-editer:focus-visible { opacity: 1; color: var(--accent, currentColor); background: var(--survol, rgba(0, 0, 0, .05)); }
.pn-editer:focus-visible { outline: 2px solid var(--accent, #2f6f94); outline-offset: 1px; }
.pn-editer[aria-pressed="true"] { opacity: 1; color: var(--accent, currentColor); background: var(--accent-doux, rgba(0, 0, 0, .07)); }
.it-liste-edition { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.pn-masquer {
  display: none; flex: none; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin: 0 1px;
  border: 0; border-radius: 6px; background: transparent; color: var(--texte-doux, var(--doux, #8a97a0)); cursor: pointer; line-height: 0;
}
[data-edition] .pn-masquer { display: inline-flex; }
.pn-masquer:hover { color: var(--danger, #a94442); background: var(--accent-doux, #e3edf3); }
.pn-masquer:focus-visible { outline: 2px solid var(--accent, #2f6f94); outline-offset: 1px; }
/* Au doigt : des cibles d'au moins 40 px (le crayon déborde sans grandir l'en-tête ; les lignes grandissent en édition). */
@media (pointer: coarse) {
  .pn-editer { width: 40px; height: 40px; margin: -8px -4px -8px 0; }
  [data-edition] .pn-masquer { width: 40px; height: 40px; }
  .it-liste-edition .pn-editer { margin: 0; }
}
@media (max-width: 719px) { [data-edition] .it-ligne .it-c-nom { padding-right: 120px !important; } }
@media print { .pn-masquer, .pn-editer, .it-liste-edition, .pn-msq-bandeau { display: none !important; } }
.ex-apercu .pn-masquer, .ex-apercu .pn-editer { display: none !important; }
.pn-msq-bandeau { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 24px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px 10px 16px; border: 1px solid var(--bord, #e4e8ec);
  border-radius: 12px; background: var(--carte, #fff); color: var(--texte, #3a3a3a); box-shadow: 0 6px 24px rgba(20, 30, 40, .16); font-size: 14px; }
.pn-msq-bandeau[hidden] { display: none; }
.pn-msq-t { font-weight: 600; }
.pn-msq-b { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--accent, #2f6f94); text-decoration: underline; cursor: pointer; }
.pn-msq-x { text-decoration: none; font-size: 18px; line-height: 1; color: var(--texte-doux, #8a97a0); padding: 0 2px; }
.pn-pied-masques a { color: inherit; }
.pn-msq-page h2 { font-size: 16px; margin: 22px 0 8px; }
.pn-msq-l { list-style: none; margin: 0; padding: 0; }
.pn-msq-l li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--bord, #e4e8ec); }
.pn-msq-nom { min-width: 0; overflow-wrap: anywhere; }
.pn-msq-nom small { color: var(--texte-doux, #8a97a0); }
.pn-msq-tout { margin-top: 18px; }
.pn-msq-vide { color: var(--texte-doux, #8a97a0); }

/* Déplacer les liens (glisser.js) : poignée en tête de chaque lien, en mode d'édition seulement. Le lien pris suit la
   souris ou le doigt ; un cadre en pointillé marque sa place ; « Ordre d'origine » remet la boîte comme elle était. */
.pn-glisser {
  display: none; flex: none; align-items: center; justify-content: center; width: 22px; height: 26px; padding: 0; margin: 0 2px 0 -2px;
  border: 0; border-radius: 6px; background: transparent; color: var(--texte-doux, var(--doux, #8a97a0)); cursor: grab; line-height: 0;
  touch-action: none; -webkit-user-select: none; user-select: none;
}
[data-edition] .pn-glisser { display: inline-flex; }
.pn-glisser:hover { color: var(--accent, currentColor); background: var(--survol, rgba(0, 0, 0, .05)); }
.pn-glisser:focus-visible { outline: 2px solid var(--accent, #2f6f94); outline-offset: 1px; }
li.pn-place {
  display: block !important; list-style: none; box-sizing: border-box; margin: 1px 0 !important; padding: 0 !important;
  border: 1.5px dashed var(--accent, #2f6f94) !important; border-radius: 8px; background: var(--accent-doux, rgba(47, 111, 148, .06));
}
.pn-tire {
  position: fixed !important; z-index: 1000; margin: 0 !important; pointer-events: none; list-style: none; box-sizing: border-box;
  border-radius: 8px; box-shadow: 0 10px 28px rgba(20, 30, 45, .22), 0 2px 6px rgba(20, 30, 45, .12);
}
.pn-glisse, .pn-glisse * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.pn-ordre-raz {
  display: block; margin: 6px 4px 2px auto; padding: 4px 6px; border: 0; background: none; font: inherit; font-size: 12.5px;
  color: var(--accent, #2f6f94); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.pn-ordre-raz:focus-visible { outline: 2px solid var(--accent, #2f6f94); outline-offset: 1px; }
.pn-glisser-annonce { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* « N de plus » sans lien caché (tous déplacés ailleurs) : il disparaît. */
[data-af-reste][hidden], [data-ae-reste][hidden], [data-ad-reste][hidden] { display: none !important; }
@media (pointer: coarse) {
  [data-edition] .pn-glisser { width: 40px; height: 40px; margin: 0; }
  .pn-ordre-raz { min-height: 40px; padding: 4px 10px; }
}
@media print { .pn-glisser, .pn-ordre-raz { display: none !important; } }
.ex-apercu .pn-glisser, .ex-apercu .pn-ordre-raz { display: none !important; }
