/* ═════════════════════════════════════════════════════════════════
 * NUTRITION · DIRECTION B (04/10) — la semaine en frise + la chronologie du jour. AJOUT : ne touche aucune règle existante.
 * Planche : REFERENCE-A-capture-0923. Charte noir et or ; cibles ≥ 44 px ; interrupteur localStorage nutri.frise = '0'.
 * ═════════════════════════════════════════════════════════════════ */
.nf-racine {
  --glu: #F5A62B; --pro: #F6E3B4; --lip: #D9794B; --eau: #4FC3F7;   /* glucides or · lipides cuivre · protéines champagne · eau bleu (les jetons de la maquette) */
  --nf-a: var(--tr-or, #F5A62B); --nf-a-vif: var(--tr-or-vif, #FFC766); --nf-a-rgb: var(--th-a2-rgb, 245, 166, 43);
  --nf-carte: rgba(24, 22, 19, .92); --nf-bord: rgba(var(--nf-a-rgb), .16); --nf-bord-fort: rgba(var(--nf-a-rgb), .42);
  --nf-txt: var(--tr-texte, #F6F2EC); --nf-txt-2: var(--tr-texte-2, #B4ADA3); --nf-txt-3: #9A9389; --nf-danger: #FF7A6B;
  display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; color: var(--nf-txt); font-family: inherit; position: relative;
}
.nf-racine * { box-sizing: border-box; }
.nf-i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nf-b44 { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 12px; }
.nf-b44:focus-visible, .nf-tab:focus-visible, .nf-jr:focus-visible, .nf-puce:focus-visible, .nf-cta:focus-visible, .nf-ch input:focus-visible, .nf-f input:focus-visible { outline: 2px solid var(--nf-a-vif); outline-offset: 2px; }
.nf-rond { border-radius: 50%; }
.nf-carte { background: var(--nf-carte); border: 1px solid var(--nf-bord); border-radius: 18px; padding: 6px 6px 8px; }

/* onglets Journal · Recettes · Allergies · Exercices */
.nf-tabs { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--nf-carte); border: 1px solid var(--nf-bord); }
.nf-tab { flex: 1; min-height: 44px; border-radius: 999px; font: 600 15px/1 inherit; display: flex; align-items: center; justify-content: center; color: var(--nf-txt); background: none; border: 0; white-space: nowrap; cursor: pointer; padding: 0 4px; }
.nf-tab.on { background: linear-gradient(180deg, #FFC766, #F5A62B 45%, #E08A17); color: #1A1105; box-shadow: 0 0 18px rgba(var(--nf-a-rgb), .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
.nf-mois { flex: none; border: 1px solid var(--nf-bord); color: var(--nf-a-vif); }

/* frise des 7 jours */
.nf-ft { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 2px; }
.nf-ft-mid { text-align: center; line-height: 1.15; }
.nf-ft-mid b { font-size: 16px; display: block; }
.nf-ft-mid small { display: block; font-size: 12px; color: var(--nf-txt-2); font-weight: 500; }
.nf-ft .nf-rond { color: var(--nf-a-vif); }
.nf-ft [disabled] { opacity: .35; }
.nf-frise { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.nf-jr { min-height: 70px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid transparent; background: none; color: var(--nf-txt); line-height: 1.1; cursor: pointer; padding: 4px 0; font: inherit; }
.nf-jr .nf-w { font-size: 12px; color: var(--nf-txt-2); font-weight: 600; }
.nf-jr b { font-size: 19px; font-weight: 700; }
.nf-bs { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; align-items: flex-start; width: 30px; }
.nf-bs i { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .10); width: 100%; }
.nf-bs i[style] { background-clip: padding-box; }
.nf-jr.on { background: rgba(var(--nf-a-rgb), .14); border: 1.5px solid var(--nf-a-vif); box-shadow: 0 0 16px rgba(var(--nf-a-rgb), .35); }
.nf-jr.on .nf-w, .nf-jr.on b { color: var(--nf-a-vif); }
.nf-jr.fut b { color: var(--nf-txt-3); }
.nf-note { margin: 6px 4px 0; font-size: 12px; color: var(--nf-txt-2); }

/* 4 cartes à bordure or */
.nf-res { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nf-mc { border: 1px solid var(--nf-bord-fort); border-radius: 12px; background: var(--nf-carte); padding: 7px 6px 8px; line-height: 1.15; min-width: 0; }
.nf-mc small { display: block; font-size: 12px; font-weight: 600; }
.nf-mc b { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; margin-top: 2px; }
.nf-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin-top: 5px; overflow: hidden; }
.nf-bar i { display: block; height: 100%; border-radius: 3px; }

/* chronologie */
.nf-chrono { display: flex; flex-direction: column; gap: 6px; }
.nf-tl-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.nf-tl-t b { font-size: 17px; display: block; line-height: 1.15; }
.nf-tl-t small { display: block; font-size: 12.5px; color: var(--nf-txt-2); }
.nf-actions { display: flex; gap: 6px; flex: none; }
.nf-puce { min-height: 44px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; font: 700 15px/1 inherit; color: var(--nf-txt); background: rgba(255, 255, 255, .05); border: 1px solid var(--nf-bord-fort); cursor: pointer; }
.nf-puce .nf-i { width: 18px; height: 18px; }
.nf-puce.on { border-color: var(--nf-a-vif); color: var(--nf-a-vif); background: rgba(var(--nf-a-rgb), .12); }
.nf-puce.eau { color: var(--eau); border-color: rgba(79, 195, 247, .5); }
.nf-holo-bt .nf-puce[aria-pressed="true"] { background: var(--nf-a-vif); color: #1A1105; }
.nf-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.nf-tl::before { content: ""; position: absolute; left: 60px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--nf-a), rgba(var(--nf-a-rgb), .2)); }
.nf-e { position: relative; display: grid; grid-template-columns: 50px 24px minmax(0, 1fr); align-items: center; margin-bottom: 4px; }
.nf-h { font-size: 16px; font-weight: 800; color: var(--nf-a-vif); font-variant-numeric: tabular-nums; }
.nf-h-eau { color: var(--eau); }
.nf-pt { width: 12px; height: 12px; border-radius: 50%; background: #0B0B0C; border: 3px solid var(--nf-a); margin-left: 5px; z-index: 1; }
.nf-pt.eau { border-color: var(--eau); }
.nf-pt.plein { background: var(--nf-a); }
.nf-cd { min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 3px 4px 3px 12px; border-radius: 14px; background: var(--nf-carte); border: 1px solid var(--nf-bord); line-height: 1.15; }
.nf-mn { flex: 1; min-width: 0; }
.nf-mn b { font-size: 15px; display: block; }
.nf-mn small { display: block; font-size: 12.5px; color: var(--nf-txt-2); }
.nf-mn small i { font-style: normal; font-weight: 700; }
.nf-aliments { margin-top: 1px; font-size: 12px !important; color: var(--nf-txt-3) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-m-gluc { color: var(--glu); } .nf-m-lip { color: var(--lip); } .nf-m-prot { color: var(--pro); }
.nf-cd.eau { border-color: rgba(79, 195, 247, .28); }
.nf-cd.eau b { color: var(--eau); }
.nf-corrige { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #1A1105; background: var(--nf-a-vif); }
.nf-vide, .nf-vide-li { color: var(--nf-txt-2); font-size: 14px; line-height: 1.4; margin: 4px 2px; list-style: none; }
.nf-dit { color: var(--nf-danger); font-size: 13px; margin: 6px 2px 0; }

/* éditeur déplié */
.nf-cd.nf-edit { display: block; border: 1.5px solid var(--nf-a-vif); background: linear-gradient(180deg, #26200F, #18140C); box-shadow: 0 0 22px rgba(var(--nf-a-rgb), .28); padding: 8px; }
.nf-r1 { display: grid; grid-template-columns: 1fr 1.3fr 44px; gap: 6px; align-items: center; }
.nf-r1 .nf-titre-ed { grid-column: 1 / 3; margin: 0; font-weight: 700; }
.nf-ch { min-height: 44px; border-radius: 10px; background: #0f0d0a; border: 1px solid rgba(255, 255, 255, .16); display: flex; align-items: center; gap: 6px; padding: 0 8px; font-weight: 700; font-size: 16px; min-width: 0; }
.nf-ch .nf-i { width: 18px; height: 18px; color: var(--nf-a); }
.nf-ch input { background: none; border: 0; color: inherit; font: inherit; min-width: 0; width: 100%; min-height: 40px; color-scheme: dark; }
.nf-r2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.nf-r2.eau { grid-template-columns: 1fr; }
.nf-f { border-radius: 10px; background: #0f0d0a; border: 1px solid rgba(255, 255, 255, .16); padding: 3px 8px 4px; line-height: 1.1; min-height: 44px; display: block; min-width: 0; }
.nf-f.opt { border-style: dashed; }
.nf-f small { display: block; font-size: 12px; font-weight: 600; }
.nf-f span { display: flex; align-items: baseline; gap: 2px; }
.nf-f input { width: 100%; min-width: 0; background: none; border: 0; color: var(--nf-txt); font: 800 17px/1.2 inherit; padding: 0; min-height: 24px; }
.nf-f input::placeholder { color: var(--nf-txt-3); }
.nf-f em { font-style: normal; font-size: 12px; color: var(--nf-txt-2); }
.nf-nom-ligne { margin: 8px 2px 0; font-size: 13px; font-weight: 600; } .nf-nom-ligne small { color: var(--nf-txt-2); font-weight: 400; }
.nf-moment { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--nf-txt-2); }
.nf-moment select, .nf-dl-form select { min-height: 44px; border-radius: 10px; background: #0f0d0a; color: var(--nf-txt); border: 1px solid rgba(255, 255, 255, .16); padding: 0 8px; font: inherit; color-scheme: dark; }
.nf-r3 { display: grid; grid-template-columns: 44px 1fr 1.25fr; gap: 6px; margin-top: 6px; }
.nf-r3.sans-del { grid-template-columns: 1fr 1.25fr; }
.nf-cta { min-height: 44px; border-radius: 12px; font: 700 15px/1 inherit; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 1.5px solid var(--nf-bord-fort); color: var(--nf-txt); background: rgba(255, 255, 255, .05); }
.nf-cta.or { background: linear-gradient(180deg, #FFC766, #F5A62B 45%, #E08A17); color: #1A1105; border-color: transparent; }
.nf-cta.sobre { border-color: var(--nf-a); color: var(--nf-a-vif); }
.nf-del { border-radius: 12px; background: rgba(255, 122, 107, .10); border: 1px solid rgba(255, 122, 107, .55); color: var(--nf-danger); }

/* bandeau « supprimé · Annuler » */
.nf-toast { position: sticky; bottom: 84px; z-index: 5; min-height: 52px; border-radius: 14px; background: #2A251D; border: 1px solid var(--nf-bord-fort); box-shadow: 0 10px 30px rgba(0, 0, 0, .7); display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; font-size: 14.5px; font-weight: 600; }
.nf-toast[hidden] { display: none; }
.nf-toast span { flex: 1; }
.nf-toast button { color: var(--nf-a-vif); font-weight: 800; font-size: 15px; gap: 6px; }

/* vue Tonio */
.nf-cl-tete { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.nf-avatar { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--nf-bord-fort); background: radial-gradient(circle at 50% 38%, #3a352c 0 26%, transparent 27%), radial-gradient(ellipse at 50% 100%, #3a352c 0 40%, transparent 41%), #17140f; flex: none; }
.nf-cl-nom b { display: block; font-size: 18px; } .nf-cl-nom small { display: block; font-size: 12.5px; color: var(--nf-txt-2); }
.nf-corps-bloc { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 8px; padding: 8px; }
.nf-hl { position: relative; min-width: 0; }
.nf-holo { width: 100%; height: 300px; border: 0; border-radius: 14px; background: #040a14; display: block; }
.nf-holo-bt { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.nf-holo-vide { min-height: 120px; display: flex; align-items: center; text-align: center; padding: 10px; font-size: 13px; color: var(--nf-txt-2); border: 1px dashed var(--nf-bord); border-radius: 14px; }
.nf-dls { min-width: 0; display: flex; flex-direction: column; }
.nf-dls-t { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; } .nf-dls-t h3 { font-size: 16px; margin: 0; } .nf-dls-t small { color: var(--nf-a-vif); font-size: 12px; }
.nf-dl-liste { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nf-dl { display: flex; align-items: center; gap: 6px; min-height: 48px; }
.nf-niv { flex: none; min-width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff; }
.nf-dl-t { flex: 1; min-width: 0; line-height: 1.15; } .nf-dl-t b { display: block; font-size: 14.5px; } .nf-dl-t small { display: block; font-size: 12px; color: var(--nf-txt-2); }
.nf-ajouter { width: 100%; margin-top: auto; }
.nf-dl-form { display: grid; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--nf-txt-2); } .nf-dl-form label { display: grid; gap: 2px; }
.nf-gouttes { display: flex; align-items: center; gap: 2px; margin: 6px 2px 0; flex-wrap: wrap; color: rgba(79, 195, 247, .35); }
.nf-gouttes span { display: inline-flex; } .nf-gouttes span.plein { color: var(--eau); } .nf-gouttes .nf-i { width: 20px; height: 20px; }
.nf-gouttes span.plein .nf-i { fill: currentColor; } .nf-gouttes b { margin-left: 6px; font-size: 14px; color: var(--eau); }
.nf-pied { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; } .nf-pied .nf-cta { min-height: 52px; font-size: 16px; }
/* sur la vue utilisateur, l'ancien visuel qui ferait doublon avec la planche est masqué (rien n'est supprimé du code ; nutri.frise = '0' le rend) */
.tr-nutri:has(.nf-racine) .tr-nutri-jour, .tr-nutri:has(.nf-racine) > nav.tr-photos[aria-label^="Recettes, carnet"], .tr-nutri:has(.nf-racine) .tr-macros { display: none; }
.nf-liens { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nf-lien-carnet { display: block; width: 100%; text-align: center; min-height: 44px; color: var(--nf-a-vif); font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .nf-toast:not([hidden]) { animation: nf-monte .2s ease-out; } @keyframes nf-monte { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } } }

/* 04/10 — fiche client : « TONIO COACH | Fiche client » (planche, vue coach) */
.nf-eyebrow { margin: 0 2px 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--nf-txt-2, rgba(255,255,255,.7)); } .nf-eyebrow b { color: var(--tr-or, #E2B04E); }

/* 04/10 — avec la frise, la chronologie EST la vue du jour : la zone « jour consulté, lecture seule » de la date (#168) est masquée (la puce + le mini-calendrier restent, et pilotent la frise) */
:has(.nf-racine) > [data-ndate-zone], .tr-nutri:has(.nf-racine) [data-ndate-zone] { display: none !important; }
