/* ============================================================
   Nouvelle navigation, étapes N1 et N2 (design/plan-structure.md) : menu du patron
   sur ordinateur (N1) et barre du bas sur téléphone (N2). Actif seulement quand js/nav-v2.js pose body.nv2-on
   (boutique de test). Classes propres (nv2-), tokens de css/tokens.css.
   L'ancienne barre (.pv-lat) est seulement masquée, jamais modifiée.
   ============================================================ */
.nv2-lat,.nv2-onglets,.nv2-bas,.nv2-feuille{display:none;}
.nv2-onglets[hidden],.nv2-feuille[hidden]{display:none!important;}

@media (min-width:768px){
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .pv-lat{display:none;}
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-lat{display:flex;}
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-onglets{display:block;}
}

/* Téléphone (N2) : barre du bas et feuille « Plus » à la place de l'ancienne barre du bas.
   L'ancienne (#pvBas, #pvFeuille) est seulement masquée. Les onglets de l'entrée ouverte
   restent au-dessus de la page et passent à la ligne. */
@media (max-width:767px){
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .pv-barre-basse,
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .pv-feuille{display:none!important;}
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-bas{display:grid;}
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-feuille{display:flex;}
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-onglets{display:block;margin-left:0;padding:var(--ds-e3) var(--ds-e4) 0;}
  /* Le bas de chaque page reste au-dessus de la barre (56 px + encoche) */
  body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .page{padding-bottom:calc(72px + env(safe-area-inset-bottom));}
  .nv2-onglet{padding:0 var(--ds-e3);}
  /* Focus clavier jamais caché sous la barre du bas */
  html:has(body.pv-nav-on.nv2-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode)){scroll-padding-bottom:calc(72px + env(safe-area-inset-bottom));}
}

/* ---------- Barre latérale : 7 entrées ---------- */
.nv2-lat,.nv2-lat *,.nv2-onglets,.nv2-onglets *,.nv2-bas,.nv2-bas *,.nv2-feuille,.nv2-feuille *{box-sizing:border-box;}
/* css/style.css stylise tout élément <nav> (ancienne barre du haut : fixe, 64 px, fond clair) :
   on remet nos deux <nav> dans le flux. */
.nv2-lat__menu,.nv2-onglets,.nv2-feuille__menu{position:static;inset:auto;z-index:auto;height:auto;justify-content:normal;align-items:stretch;
  backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom:0;transition:none;}
.nv2-lat__menu{padding:0;background:none;}
.nv2-lat{position:fixed;inset:0 auto 0 0;z-index:50;width:var(--pv-lat-largeur);flex-direction:column;gap:var(--ds-e1);
  padding:0 var(--ds-e3) var(--ds-e4);overflow-y:auto;overscroll-behavior:contain;
  background:var(--ds-fond);border-right:1px solid var(--ds-bordure);color:var(--ds-texte);font:400 var(--ds-t-texte)/var(--ds-interligne) var(--ds-police);}
.nv2-lat>*{flex-shrink:0;}
.nv2-lat__logo{padding:var(--ds-e5) var(--ds-e1) var(--ds-e3);line-height:0;}
/* Logo « L'épi » (27/11/2026) : image jour, image nuit en mode nuit */
.nv2-lat__img{display:block;width:auto;height:44px;max-width:100%;}
.nv2-lat__img--nuit,[data-theme="dark"] .nv2-lat__img--jour{display:none;}
[data-theme="dark"] .nv2-lat__img--nuit{display:block;}
/* Sélecteur de boutique : celui de js/nav-pv.js (pvHtmlBoutique) */
.nv2-lat .pv-lat__boutique{margin:0 0 var(--ds-e4);min-height:var(--ds-h-commande);border-color:var(--ds-bordure-champ);background:var(--ds-surface);border-radius:var(--ds-rayon);color:var(--ds-texte);font:600 var(--ds-t-texte) var(--ds-police);}
.nv2-lat .pv-lat__boutique select{height:var(--ds-h-commande);font:600 var(--ds-t-texte) var(--ds-police);color:var(--ds-texte);}
.nv2-lat .pv-lat__boutique select option{background:var(--ds-surface);color:var(--ds-texte);}
.nv2-lat .pv-lat__boutique .pv-ico{color:var(--ds-texte-2);}
.nv2-lat__menu{display:flex;flex-direction:column;gap:2px;}

.nv2-lat__item{display:flex;align-items:center;gap:var(--ds-e3);width:100%;min-height:var(--ds-h-commande);padding:0 var(--ds-e3);
  border:1px solid transparent;border-radius:var(--ds-rayon);background:none;color:var(--ds-texte);
  font:400 var(--ds-t-texte) var(--ds-police);text-align:left;cursor:pointer;transition:var(--ds-transition);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.nv2-lat__item span{min-width:0;overflow-wrap:anywhere;}
.nv2-lat__item .pv-ico{width:20px;height:20px;color:var(--ds-texte-2);}
.nv2-lat__item:hover{background:var(--ds-surface-2);}
.nv2-lat__item[aria-current="page"]{background:var(--ds-surface);border-color:var(--ds-bordure);font-weight:600;box-shadow:inset 3px 0 0 var(--ds-accent-texte);}
.nv2-lat__item[aria-current="page"] .pv-ico{color:var(--ds-accent-texte);}
/* La nuit, le fond « surface » se confond avec le fond de page : l'entrée active prend le blé voilé */
[data-theme="dark"] .nv2-lat__item[aria-current="page"]{background:var(--ds-accent-voile);border-color:transparent;}
.nv2-lat__item--petit{min-height:var(--ds-h-commande);}
.nv2-lat__item--petit .pv-ico{width:18px;height:18px;}
.nv2-lat__item[aria-pressed="true"] .pv-ico{color:var(--ds-accent-texte);}

.nv2-lat__bas{margin-top:auto;padding-top:var(--ds-e3);border-top:1px solid var(--ds-bordure);display:flex;flex-direction:column;gap:2px;}
.nv2-lat__qui{padding:var(--ds-e1) var(--ds-e3) var(--ds-e2);color:var(--ds-texte-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* Échappatoire : discrète (couleur secondaire, soulignée), mais 16 px et 48 px comme le reste */
.nv2-lat__ancien{margin-top:var(--ds-e2);min-height:var(--ds-h-commande);padding:0 var(--ds-e3);border:0;background:none;border-radius:var(--ds-rayon);
  color:var(--ds-texte-2);font:400 var(--ds-t-texte) var(--ds-police);text-align:left;text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--ds-bordure-champ);cursor:pointer;}
.nv2-lat__ancien:hover{color:var(--ds-texte);text-decoration-color:currentColor;}

/* ---------- Onglets de l'entrée ouverte ---------- */
.nv2-onglets{margin-left:var(--pv-lat-largeur);padding:var(--ds-e4) var(--ds-e6) 0;background:var(--ds-fond);font-family:var(--ds-police);}
.nv2-onglets__ligne{display:flex;flex-wrap:wrap;gap:0 var(--ds-e1);max-width:var(--ds-contenu-max);border-bottom:1px solid var(--ds-bordure);}
.nv2-onglet{display:inline-flex;align-items:center;text-decoration:none;min-height:var(--ds-h-commande);padding:0 var(--ds-e3);margin-bottom:-1px;border:0;border-bottom:3px solid transparent;background:none;
  color:var(--ds-texte-2);font:500 var(--ds-t-texte) var(--ds-police);white-space:nowrap;cursor:pointer;transition:var(--ds-transition);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.nv2-onglet:hover{color:var(--ds-texte);border-bottom-color:var(--ds-bordure-champ);}
.nv2-onglet[aria-current="page"]{color:var(--ds-texte);font-weight:600;border-bottom-color:var(--ds-accent);}

/* ---------- Téléphone : barre du bas (N2) ---------- */
/* css/style.css stylise tout <nav> (barre du haut fixe de 64 px) : tout est redonné ici. */
.nv2-bas{position:fixed;top:auto;left:0;right:0;bottom:0;z-index:50;height:auto;grid-auto-flow:column;grid-auto-columns:minmax(min-content,1fr);
  justify-content:normal;align-items:stretch;padding:0 0 env(safe-area-inset-bottom);
  background:var(--ds-surface);border-top:1px solid var(--ds-bordure);border-bottom:0;backdrop-filter:none;-webkit-backdrop-filter:none;transition:none;
  font-family:var(--ds-police);}
.nv2-bas__item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:55px;padding:var(--ds-e1) 2px;
  border:0;background:none;color:var(--ds-texte-2);font:500 var(--ds-t-texte)/1.2 var(--ds-police);letter-spacing:-.01em;cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:var(--ds-transition);}
/* Libellés en 16 px sur une ligne : chaque colonne prend au moins la largeur de son mot (375 px tient). */
.nv2-bas__item span{display:flex;flex-direction:column;align-items:center;white-space:nowrap;text-align:center;}
/* Largeur du libellé en gras réservée : la barre ne bouge pas quand l'entrée s'allume. Texte caché, non lu. */
.nv2-bas__item span::after{content:attr(data-libelle) / "";font-weight:600;height:0;overflow:hidden;visibility:hidden;}
.nv2-bas__item .pv-ico{width:24px;height:24px;flex-shrink:0;}
/* Sous 360 px (ou zoom 200 %) : 3 entrées + Plus (js/nav-v2.js). « Plus » (mot court) garde 56 px,
   les 3 mots longs se partagent le reste : rien ne sort de l’écran à 320 px. */
@media (max-width:359.98px){.nv2-bas{grid-template-columns:repeat(3,auto) minmax(56px,auto);}.nv2-bas__item{padding-inline:0;}
  /* Deux blocs des pages qui sortaient de l'écran à 320 px (nouveau menu seulement) :
     pastille de l'accueil (texte sur une ligne) et rangée des délais du portail (Restaurateurs). */
  body.nv2-on .ac-espace-commande{height:auto;white-space:normal;line-height:1.3;max-width:100%;}
  body.nv2-on .rs-grille-rpdelaipreset:not(#_){grid-template-columns:repeat(4,minmax(0,1fr)) minmax(64px,72px);}}
.nv2-bas__item:hover{color:var(--ds-texte);background:var(--ds-surface-2);}
/* Entrée active : trait blé en haut, comme le trait sous l'onglet actif (repère lisible d'un coup d'œil) */
.nv2-bas__item[aria-current="page"]{color:var(--ds-texte);font-weight:600;box-shadow:inset 0 3px 0 var(--ds-accent-texte);}
.nv2-bas__item[aria-current="page"] .pv-ico{color:var(--ds-accent-texte);}

/* ---------- Téléphone : feuille « Plus » (N2) ---------- */
.nv2-feuille{position:fixed;inset:0;z-index:10001;align-items:flex-end;background:var(--ds-voile-fenetre);}
.nv2-feuille__panneau{width:100%;max-height:85vh;overflow-y:auto;overscroll-behavior:contain;
  padding:var(--ds-e2) var(--ds-e3) calc(var(--ds-e4) + env(safe-area-inset-bottom));
  background:var(--ds-surface);color:var(--ds-texte);border-radius:var(--ds-rayon-fenetre) var(--ds-rayon-fenetre) 0 0;box-shadow:var(--ds-ombre);
  font:400 var(--ds-t-texte)/var(--ds-interligne) var(--ds-police);}
.nv2-feuille__titre{display:flex;align-items:center;justify-content:space-between;padding:var(--ds-e1) 0 var(--ds-e2) var(--ds-e3);}
.nv2-feuille__titre h2{margin:0;font:600 var(--ds-t-section)/1.2 var(--ds-police);color:var(--ds-texte);letter-spacing:0;}
.nv2-feuille__fermer{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border:0;border-radius:var(--ds-rayon);
  background:none;color:var(--ds-texte-2);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.nv2-feuille__fermer:hover{background:var(--ds-surface-2);color:var(--ds-texte);}
.nv2-feuille__fermer .pv-ico{width:22px;height:22px;}
.nv2-feuille__menu{display:flex;flex-direction:column;gap:2px;padding:0;background:none;}
.nv2-feuille__item{transition:var(--ds-transition);display:flex;align-items:center;gap:var(--ds-e3);width:100%;min-height:var(--ds-h-commande);padding:0 var(--ds-e3);
  border:1px solid transparent;border-radius:var(--ds-rayon);background:none;color:var(--ds-texte);
  font:400 var(--ds-t-texte) var(--ds-police);text-align:left;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.nv2-feuille__item .pv-ico{width:22px;height:22px;flex-shrink:0;color:var(--ds-texte-2);}
.nv2-feuille__item:hover{background:var(--ds-surface-2);}
.nv2-feuille__item[aria-current="page"]{background:var(--ds-fond);border-color:var(--ds-bordure);font-weight:600;box-shadow:inset 3px 0 0 var(--ds-accent-texte);}
[data-theme="dark"] .nv2-feuille__item[aria-current="page"]{background:var(--ds-accent-voile);border-color:transparent;}
.nv2-feuille__item[aria-current="page"] .pv-ico,.nv2-feuille__item[aria-pressed="true"] .pv-ico{color:var(--ds-accent-texte);}
.nv2-feuille__item--petit{min-height:48px;}
.nv2-feuille__compte{margin-top:var(--ds-e3);padding-top:var(--ds-e3);border-top:1px solid var(--ds-bordure);display:flex;flex-direction:column;gap:2px;}
.nv2-feuille__boutique{display:flex;flex-direction:column;gap:var(--ds-e1);padding:0 var(--ds-e3) var(--ds-e2);color:var(--ds-texte-2);}
.nv2-feuille__boutique strong{color:var(--ds-texte);font-weight:600;}
.nv2-feuille__boutique select{min-height:48px;width:100%;padding:0 var(--ds-e3);border:1px solid var(--ds-bordure-champ);border-radius:var(--ds-rayon);
  background:var(--ds-surface);color:var(--ds-texte);font:600 var(--ds-t-texte) var(--ds-police);}
.nv2-feuille__qui{padding:var(--ds-e1) var(--ds-e3);color:var(--ds-texte-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.nv2-feuille .nv2-lat__ancien{width:100%;min-height:48px;}

/* Focus clavier : même anneau que le reste de l'appli (css/systeme.css) */
.nv2-bas :focus-visible,.nv2-feuille :focus-visible,
.nv2-lat :focus-visible,.nv2-onglets :focus-visible{outline:3px solid var(--ds-focus)!important;outline-offset:2px;box-shadow:0 0 0 5px var(--ds-accent)!important;}
.nv2-lat__item:active,.nv2-onglet:active,.nv2-bas__item:active,.nv2-feuille__item:active{transform:translateY(1px);}
@media (prefers-reduced-motion:reduce){.nv2-lat__item,.nv2-onglet,.nv2-bas__item{transition:none;}.nv2-lat__item:active,.nv2-onglet:active,.nv2-bas__item:active,.nv2-feuille__item:active{transform:none;}}

/* ---------- N3 : page Hygiène en deux groupes (nouveau menu seulement) ----------
   Les boutons hTab_* existants sont rangés par js/nav-v2.js dans « Au quotidien » et « Registre ».
   Ils gardent leur style d'onglet (css/systeme.css, .ds .pv-onglet). Les onglets passent à la ligne. */
#page-haccp .pv-onglets[hidden]{display:none!important;}
.nv2-h-barre{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--ds-e4) var(--ds-e6);margin:0 0 var(--ds-e5);}
.nv2-h-groupes{flex:1 1 28rem;min-width:0;display:flex;flex-direction:column;gap:var(--ds-e4);}
/* Titre de groupe : un cran au-dessus des onglets qu'il range (taille et couleur de texte) */
.nv2-h-groupe__titre{margin:0 0 var(--ds-e1);font:600 var(--ds-t-fort)/1.3 var(--ds-police);color:var(--ds-texte);letter-spacing:0;}
.nv2-h-groupe__onglets{display:flex;flex-wrap:wrap;gap:0 var(--ds-e5);border-bottom:1px solid var(--ds-bordure);}
.nv2-h-groupe__onglets .pv-onglet{margin-bottom:-1px;}
/* Bouton d'export : à droite des groupes sur ordinateur */
.nv2-h-export{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:var(--ds-e3);}
.nv2-h-export.est-ouvert{flex:1 1 100%;}
.nv2-h-export__bouton[aria-expanded="true"]{border-color:var(--ds-accent);}
.nv2-h-export__bloc{width:100%;margin:0;}
.nv2-h-export__bloc[hidden]{display:none!important;}
/* Téléphone : en bas de la page, pleine largeur, la tournée reste en haut */
.nv2-h-export--bas{align-items:stretch;margin-top:var(--ds-e6);padding-top:var(--ds-e5);border-top:1px solid var(--ds-bordure);}
.nv2-h-export--bas .nv2-h-export__bouton{width:100%;justify-content:center;}
#page-haccp .nv2-h-groupe__onglets .pv-onglet:focus-visible,.nv2-h-export__bouton:focus-visible{outline:3px solid var(--ds-focus)!important;outline-offset:2px;box-shadow:0 0 0 5px var(--ds-accent)!important;}

/* ---------- N4 : accueil « À faire maintenant » (js/accueil-v2.js) ----------
   Une seule surface, une ligne par tâche (pas une carte par tâche). Le rang se lit en mots
   (« En retard », « Obligation légale »…), la couleur ne fait que le doubler. */
/* Même largeur que les cartes des chiffres (bords alignés). Titres : 12 px au-dessus de leur bloc,
   :not(#_) pour passer devant la marge nulle des titres de css/systeme.css. */
.nv2-afaire{margin:0 0 var(--ds-e6);font-family:var(--ds-police);color:var(--ds-texte);}
.nv2-afaire .nv2-afaire__entete:not(#_),.nv2-chiffres-titre:not(#_){margin:0 0 var(--ds-e3);}
.nv2-afaire__entete{margin:0 0 var(--ds-e3);font:600 var(--ds-t-section)/1.25 var(--ds-police);color:var(--ds-texte);letter-spacing:0;}
.nv2-afaire__liste{list-style:none;margin:0;padding:0;background:var(--ds-surface);border:1px solid var(--ds-bordure);border-radius:var(--ds-rayon-carte);overflow:hidden;}
.nv2-afaire__suite{margin-top:var(--ds-e2);}
.nv2-afaire__liste>li+li{border-top:1px solid var(--ds-bordure);}
.nv2-afaire__tache{display:grid;grid-template-columns:1fr auto;grid-template-areas:"rang fleche" "titre fleche" "detail fleche";column-gap:var(--ds-e3);
  width:100%;min-height:var(--ds-h-ligne);padding:var(--ds-e3) var(--ds-e4);border:0;background:none;color:inherit;text-align:left;cursor:pointer;
  font:400 var(--ds-t-texte)/1.4 var(--ds-police);transition:var(--ds-transition);touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.nv2-afaire__tache:hover{background:var(--ds-surface-2);}
.nv2-afaire__rang{grid-area:rang;font-weight:600;color:var(--ds-texte-2);}
.nv2-afaire__titre{grid-area:titre;font-weight:600;font-size:var(--ds-t-fort);color:var(--ds-texte);overflow-wrap:anywhere;}
.nv2-afaire__detail{grid-area:detail;color:var(--ds-texte-2);overflow-wrap:anywhere;}
.nv2-afaire__fleche{grid-area:fleche;align-self:center;width:20px;height:20px;color:var(--ds-texte-2);}
.nv2-afaire__tache--retard .nv2-afaire__rang{color:var(--ds-alerte);}
.nv2-afaire__tache--legal .nv2-afaire__rang{color:var(--ds-attention);}
.nv2-afaire__vide{margin:0;padding:var(--ds-e4);background:var(--ds-surface);border:1px solid var(--ds-bordure);border-radius:var(--ds-rayon-carte);color:var(--ds-texte-2);}
/* Rien d'urgent : un repère vert « fait » et le texte en couleur pleine */
.nv2-afaire__vide--fait{display:flex;align-items:center;gap:var(--ds-e3);color:var(--ds-texte);font-weight:600;}
.nv2-afaire__vide-ico{width:24px;height:24px;flex-shrink:0;color:var(--ds-fait);}
.nv2-afaire__tout{margin-top:var(--ds-e3);min-height:var(--ds-h-commande);padding:0 var(--ds-e4);border:1px solid var(--ds-bordure-champ);border-radius:var(--ds-rayon);
  background:var(--ds-surface);color:var(--ds-texte);font:600 var(--ds-t-texte) var(--ds-police);cursor:pointer;transition:var(--ds-transition);}
.nv2-afaire__tout:hover{background:var(--ds-surface-2);}
.nv2-afaire :focus-visible{outline:3px solid var(--ds-focus)!important;outline-offset:-3px;box-shadow:inset 0 0 0 5px var(--ds-accent)!important;}
.nv2-afaire__tout:focus-visible{outline-offset:2px;box-shadow:0 0 0 5px var(--ds-accent)!important;}
.nv2-chiffres-titre{margin:0 0 var(--ds-e3);font:600 var(--ds-t-section)/1.25 var(--ds-police);color:var(--ds-texte);}
/* Espace équipe (manager, chef) : même bloc au-dessus des tuiles */
.eq .nv2-afaire{margin:0 0 var(--ds-e5);}

/* ---------- N5 : bouton inactif qui explique (nouveau menu seulement) ----------
   Lisible (contraste plein), visiblement « pas encore » : fond neutre, bord pointillé. */
#page-haccp .pv-btn.nv2-inactif[aria-disabled="true"]:not(#_){background:var(--ds-surface-2);color:var(--ds-texte);border:1px dashed var(--ds-bordure-champ);
  box-shadow:none;cursor:not-allowed;white-space:normal;text-align:center;height:auto;min-height:var(--ds-h-commande);}
#page-haccp .pv-btn.nv2-inactif[aria-disabled="true"]:not(#_):hover{background:var(--ds-surface-2);}

/* ---------- Animations douces de la nouvelle navigation ----------
   150 à 200 ms, sortie rapide (courbe « ease-out »), une seule fois : rien qui clignote,
   rien qui tourne en boucle. Seulement transform, opacity et couleurs.
   Tout est dans « no-preference » : coupé net si l'appareil demande moins d'animations. */
:root{--nv2-duree:180ms;--nv2-duree-courte:160ms;--nv2-courbe:cubic-bezier(.22,1,.36,1);}
@media (prefers-reduced-motion:no-preference){
  /* Onglets : couleur et trait du dessous glissent d'un onglet à l'autre */
  .nv2-onglet,.nv2-lat__item,.nv2-bas__item,.nv2-feuille__item,
  body.nv2-on #page-haccp .nv2-h-groupe__onglets .pv-onglet{
    transition:color var(--nv2-duree-courte) var(--nv2-courbe),background-color var(--nv2-duree-courte) var(--nv2-courbe),
      border-color var(--nv2-duree-courte) var(--nv2-courbe),transform var(--nv2-duree-courte) var(--nv2-courbe);}
  .nv2-bas__item .pv-ico{transition:color var(--nv2-duree-courte) var(--nv2-courbe);}
  /* Contenu de l'onglet d'Hygiène qui s'affiche : léger fondu montant */
  body.nv2-on #page-haccp [id^="hSec_"]{animation:nv2-apparait var(--nv2-duree-courte) var(--nv2-courbe);}
  /* Feuille « Plus » : le voile se fond, le panneau monte ; à la fermeture, il redescend */
  .nv2-feuille:not([hidden]){animation:nv2-fondu var(--nv2-duree) var(--nv2-courbe);}
  .nv2-feuille:not([hidden]) .nv2-feuille__panneau{animation:nv2-monte var(--nv2-duree) var(--nv2-courbe);}
  .nv2-feuille.nv2-feuille--sortie{pointer-events:none;animation:nv2-fondu-sortie var(--nv2-duree-courte) ease-in forwards;}
  .nv2-feuille.nv2-feuille--sortie .nv2-feuille__panneau{animation:nv2-descend var(--nv2-duree-courte) ease-in forwards;}
  /* Cartes qui s'ouvrent : suite de « À faire » et bloc d'export */
  .nv2-afaire__suite.nv2-entree:not([hidden]),.nv2-h-export__bloc:not([hidden]){animation:nv2-apparait var(--nv2-duree) var(--nv2-courbe);}
  .nv2-afaire__tache,.nv2-afaire__tout,.nv2-h-export__bouton{transition:background-color var(--nv2-duree-courte) var(--nv2-courbe),border-color var(--nv2-duree-courte) var(--nv2-courbe);}
  /* Passage jour / nuit : les couleurs se fondent (classe posée 260 ms par js/nav-v2.js) */
  html.nv2-fondu-theme,html.nv2-fondu-theme body,html.nv2-fondu-theme body *,html.nv2-fondu-theme body *::before,html.nv2-fondu-theme body *::after{
    transition:background-color 200ms ease-out,color 200ms ease-out,border-color 200ms ease-out,fill 200ms ease-out,stroke 200ms ease-out!important;}
}
@keyframes nv2-apparait{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
@keyframes nv2-fondu{from{opacity:0;}to{opacity:1;}}
@keyframes nv2-fondu-sortie{from{opacity:1;}to{opacity:0;}}
@keyframes nv2-monte{from{transform:translateY(24px);opacity:.6;}to{transform:none;opacity:1;}}
@keyframes nv2-descend{from{transform:none;opacity:1;}to{transform:translateY(24px);opacity:0;}}
.nv2-afaire--fige *{transition:none!important;}

/* ---------- Tablette du labo (kiosque ?etab=, boutique de test : body.nv2-labo) ----------
   Cibles de 64 px (--ds-h-labo) ; cartes des employés centrées sous le titre et l'heure. */
body.nv2-labo #page-pointage .km-bouton.pv-btn{height:var(--ds-h-labo);min-height:var(--ds-h-labo);padding-inline:var(--ds-e5);font-size:var(--ds-t-fort);}
@media (min-width:481px){
  body.nv2-labo .pv-kq-grille{grid-template-columns:repeat(auto-fit,minmax(260px,300px));justify-content:center;}
  body.nv2-labo .pv-kq-question{text-align:center;}
}

/* ---------- Production (nouveau menu seulement) ----------
   Le message « Fiche enregistrée » reste invisible mais gardait sa place (vide de 40 px sous les actions) :
   il ne prend de la place que lorsqu'il s'affiche (js/production.js pose opacity: 1). */
body.nv2-on #page-ficheproduction #fpSaveMsg:not([style*="opacity: 1"]){display:none;}
/* iPhone : date et boutons d'action en pleine largeur, bords alignés (plus d'escalier) */
@media (max-width:767px){
  body.nv2-on #page-ficheproduction .fp-rangee-date>*{flex:1 1 100%;}
  body.nv2-on #page-ficheproduction .fp-rangee-date .fp-rangee-reprendre{flex-direction:column;gap:var(--ds-e2);}
  body.nv2-on #page-ficheproduction .fp-rangee-date .fp-rangee-reprendre>button{width:100%;justify-content:center;}
}

/* ============================================================
   Refonte R3 (design/plan-refonte.md) : dessin du menu, SEULEMENT sous body.rf-on
   (nouvelle navigation de la boutique de test, sans ?visuel=ancien). Sans rf-on, rien ne change.
   - Barre latérale : ordinateur et tablette en paysage (768 px et plus, pas plus haut que large).
   - Barre du bas : iPhone et tablette en portrait (768 px et plus, plus haut que large).
     Même seuil dans js/nav-v2.js (nv2Ordi, NV2_MQ_PORTRAIT).
   - Mêmes noms, mêmes boutons ; libellés en Plus Jakarta Sans ; repère doré (trait de 4 px en
     dégradé) sur l'entrée active : à gauche dans la barre latérale, en haut dans la barre du bas.
   - Tablette tactile : entrées de 64 px.
   ============================================================ */
/* Repère doré : jour croûte foncée (#B45309 à #92400E, ≥ 4,6:1 sur la barre et sur l'entrée active),
   nuit croûte (#D97706 à #F59E0B, ≥ 4:1). Le #D97706 seul ne fait que 2,96:1 sur le fond du jour. */
body.rf-on{--nv2-repere-a:var(--rf-croute-trait);--nv2-repere-b:var(--rf-croute-texte);}
[data-theme="dark"] body.rf-on{--nv2-repere-a:var(--rf-croute-1);--nv2-repere-b:var(--rf-croute-2);}

body.rf-on .nv2-lat__item,body.rf-on .nv2-lat__ancien,
body.rf-on .nv2-feuille__item,body.rf-on .nv2-feuille .nv2-lat__ancien,body.rf-on .nv2-onglet{font-family:var(--rf-police-chiffre);letter-spacing:-.01em;}
body.rf-on .nv2-lat__item,body.rf-on .nv2-feuille__item{position:relative;font-weight:500;}

/* Barre latérale : entrée active en blé voilé, trait collé au bord gauche de la barre */
body.rf-on .nv2-lat__item[aria-current="page"],
body.rf-on .nv2-feuille__item[aria-current="page"]{background:var(--ds-accent-voile);border-color:transparent;box-shadow:none;font-weight:600;}
body.rf-on .nv2-lat__item[aria-current="page"]::before,
body.rf-on .nv2-feuille__item[aria-current="page"]::before{content:"";position:absolute;left:calc(-1 * var(--ds-e3) - 1px);top:8px;bottom:8px;width:4px;
  border-radius:0 4px 4px 0;background:linear-gradient(180deg,var(--nv2-repere-a),var(--nv2-repere-b));}

/* Barre du bas : trait en haut de l'entrée active */
body.rf-on .nv2-bas__item{position:relative;}
/* Libellés de la barre du bas en Plus Jakarta Sans à partir de 390 px seulement : cette police est plus large,
   et en dessous les 5 mots de 16 px ne tiennent plus avec des cibles de 48 px (à 375 px, « Plus » n'aurait que
   38 px). Sous 390 px (iPhone SE et mini, Android 360 px), la barre garde sa police pour garder ses 5 entrées. */
@media (min-width:390px){body.rf-on .nv2-bas__item{min-width:48px;font-family:var(--rf-police-chiffre);letter-spacing:-.03em;}}
body.rf-on .nv2-bas__item[aria-current="page"]{box-shadow:none;}
body.rf-on .nv2-bas__item[aria-current="page"]::before{content:"";position:absolute;top:0;left:20%;right:20%;height:4px;
  border-radius:0 0 4px 4px;background:linear-gradient(90deg,var(--nv2-repere-a),var(--nv2-repere-b));}

/* Tablette en portrait : barre du bas et feuille « Plus », comme sur iPhone ; la page prend toute la largeur */
@media (min-width:768px) and (max-aspect-ratio:9999/10000){
  body.pv-nav-on.nv2-on.rf-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-lat{display:none;}
  body.pv-nav-on.nv2-on.rf-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-bas{display:grid;}
  body.pv-nav-on.nv2-on.rf-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-feuille{display:flex;}
  body.pv-nav-on.nv2-on.rf-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .nv2-onglets{margin-left:0;}
  body.pv-nav-on.nv2-on.rf-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode) .page{margin-left:0;padding-bottom:calc(72px + env(safe-area-inset-bottom));}
  html:has(body.pv-nav-on.nv2-on.rf-on:not(.kiosque-mode):not(.client-mode):not(.kiosque-pin-mode)){scroll-padding-bottom:calc(72px + env(safe-area-inset-bottom));}
}
/* Tablette tactile : entrées de 64 px */
@media (min-width:768px) and (pointer:coarse){
  body.rf-on .nv2-lat__item,body.rf-on .nv2-bas__item,body.rf-on .nv2-feuille__item{min-height:var(--ds-h-labo);}
}
