/* ═════════════════════════════════════════════════════════════════
 * NUTRITION · JOURNAL v3 (piste D « plaques bronze ») + CARNET v3 (piste C « chaleur ») — 04/10, ordre d'Alexandre (appel 23:51) — AJOUT SEUL.
 * Tout est sous html[data-nutri-j3="1"] (posé par nutri-journal3.js tant que nutri.journal3 ≠ '0' et que le Journal v2 est allumé) :
 * nutri.journal3 = '0' (ou ?journal3=0) → le Journal et le Carnet v2 reviennent tels qu'en ligne. nutri.carnet3 = '0' → seul le Carnet revient.
 * Noir et or ; le Journal garde sa structure : date (calendrier) à GAUCHE, signet du Livre à DROITE, récapitulatif de la semaine conservé,
 * quatre cartes, déroulé par créneaux. Le repère Tenir / Charger / Récup reste retiré (.nf-slot-modes, masqué par la v2).
 * Polices : Barlow / Barlow Condensed déjà livrées (polices.css). Aucun CDN. Cibles ≥ 44 px, contrastes ≥ 4,5:1 (mesurés par l'épreuve).
 * ═════════════════════════════════════════════════════════════════ */
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) {
  --j3-or: #E3BC52; --j3-or-clair: #F2D98A; --j3-or-fonce: #CFA32B; --j3-encre: #14100a; --j3-doux: #D3CCB8;
  --j3-plaque: linear-gradient(160deg, #2b2112, #15100a); --j3-carte: linear-gradient(160deg, #241c10, #13100a); --j3-filet: rgba(227, 188, 82, .5);
}

/* ── 1. En-tête : date (mini-calendrier) à GAUCHE, signet du Livre à DROITE ── */
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .tr-ndate { left: 16px; right: auto; }
html:root:root[data-nutri-j3="1"]:not([data-nutri-j3-sig="0"]) .tr-nutri:has(.nf-racine) :is(.lv-signet, .lv-signet-bulle) { display: block !important; }
html:root:root[data-nutri-j3="1"]:not([data-nutri-j3-sig="0"]) .tr-nutri:has(.nf-racine) .lv-signet-bulle { display: flex !important; }
html:root:root[data-nutri-j3="1"]:not([data-nutri-j3-sig="0"]) .tr-nutri:has(.nf-racine) > [data-lv-signet-zone] { display: contents !important; }
html:root:root[data-nutri-j3="1"] :is(.tr-nutri:has(.nf-racine) .tr-ndate-puce, .nf-cj3 .tr-ndate-puce) {
  background: linear-gradient(160deg, var(--j3-or-clair, #F2D98A), var(--j3-or-fonce, #CFA32B)); border: 1px solid rgba(255, 244, 205, .85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 18px -8px rgba(0, 0, 0, .8);
}
html:root:root[data-nutri-j3="1"] :is(.tr-nutri:has(.nf-racine) .tr-ndate-puce, .nf-cj3 .tr-ndate-puce) :is(.tr-ndate-sem, .tr-ndate-jr, .tr-ndate-mois) { color: #14100a !important; text-shadow: none; }
html:root:root[data-nutri-j3="1"] :is(.tr-nutri:has(.nf-racine) .tr-ndate-puce, .nf-cj3 .tr-ndate-puce) .tr-ndate-jr { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-weight: 800; }

/* ── 2. Récapitulatif de la semaine : CONSERVÉ tel quel (28 sept. – 4 oct., barres glucides · lipides · protéines · eau), simplement ré-affiché ── */
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-frisec { display: block !important; margin-top: 8px; background: var(--j3-carte); border-color: var(--j3-filet); padding-left: 6px; padding-right: 6px; }
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-frisec .nf-frise { gap: 1px; }   /* 7 jours ≥ 44 px de large même à 360 px */

/* ── 3. Quatre cartes : grands chiffres condensés or clair, barres épaisses ── */
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res { gap: 8px; margin-top: 12px; }
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 104px; padding: 10px 7px 11px; border-radius: 14px;
  background: var(--j3-plaque); border: 1px solid var(--j3-filet); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 22px -14px rgba(0, 0, 0, .9);
}
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc small { font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc:not(.nf-mc-eau) b {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: min(26px, 6.4vw); font-weight: 800; line-height: .95; color: var(--j3-or-clair, #F2D98A); letter-spacing: .005em; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc.nf-j3-obj:not(.nf-mc-eau) b { font-size: 19px; line-height: 1.05; }
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc:not(.nf-mc-eau) .nf-bar { height: 8px; border-radius: 4px; margin-top: 8px; background: rgba(255, 255, 255, .16); }
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc:not(.nf-mc-eau) .nf-bar i { border-radius: 4px; }
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-mc-eau .nf-eau-b {
  width: 44px; height: 44px; border-radius: 12px; border: 0; color: #14100a; font-size: 26px; font-weight: 800; line-height: 1;
  background: linear-gradient(150deg, var(--j3-or-clair, #F2D98A), var(--j3-or-fonce, #CFA32B)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-mc-eau .nf-eau-b:disabled { opacity: 1; color: #C9C0A4; background: #2a2316; box-shadow: none; }

/* ── 4. Déroulé : plaques d'heure, cartes brun-noir, écarts entre repas, repère « Maintenant » ── */
html:root:root[data-nutri-j3="1"] .nf-j2-tl::before { background: linear-gradient(180deg, rgba(227, 188, 82, .85), rgba(227, 188, 82, .3)); }
html:root:root[data-nutri-j3="1"] .nf-j2-r > .nf-j2-h, html:root:root[data-nutri-j3="1"] .nf-j2-tl > .nf-e > .nf-h {
  justify-self: stretch; box-sizing: border-box; min-height: 46px; margin-right: 4px; padding: 0; display: grid; place-items: center; text-align: center;
  border-radius: 10px; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 26px; font-weight: 800; letter-spacing: 0; color: #E3BC52;
  background: #100c07; border: 1.5px solid rgba(227, 188, 82, .75);
}
html:root:root[data-nutri-j3="1"] .nf-j2-r.plein > .nf-j2-h { color: #14100a; background: linear-gradient(160deg, #F2D98A, #CFA32B); border-color: #F2D98A; }
html:root:root[data-nutri-j3="1"] .nf-j2-r.plein .nf-j2-pt { background: #F2D98A; box-shadow: 0 0 0 4px rgba(227, 188, 82, .22); }
html:root:root[data-nutri-j3="1"] .nf-j2-carte { border-radius: 14px; background: var(--j3-carte, linear-gradient(160deg, #241c10, #13100a)); border: 1px solid rgba(227, 188, 82, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 10px 22px -14px rgba(0, 0, 0, .9); }
html:root:root[data-nutri-j3="1"] .nf-j2-carte.plein { border-color: rgba(227, 188, 82, .6); background: linear-gradient(160deg, #2a2113, #15100a); }
html:root:root[data-nutri-j3="1"] .nf-j2-nom { font-size: 14.5px; font-weight: 700; color: #E9E2D0; }
html:root:root[data-nutri-j3="1"] .nf-j2-carte.plein > .nf-j2-nom { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #E3BC52; }
html:root:root[data-nutri-j3="1"] .nf-j2-mn b { font-size: 16.5px; }
html:root:root[data-nutri-j3="1"] .nf-j2-mn small { font-size: 13px; font-weight: 600; color: #D3CCB8; }
html:root:root[data-nutri-j3="1"] .nf-j2-mn small i { font-weight: 800; }
html:root:root[data-nutri-j3="1"] .nf-j2-plus, html:root:root[data-nutri-j3="1"] .nf-j2-repas .nf-b44 {
  width: 44px; height: 44px; border-radius: 12px; color: #E3BC52; background: #0d0a06; border: 1.5px solid rgba(227, 188, 82, .75);
}
html:root:root[data-nutri-j3="1"] .nf-j2-eau { color: #9ED9F8; }
html:root:root[data-nutri-j3="1"] .nf-j2-ajout { color: #E3BC52; }
html:root:root[data-nutri-j3="1"] .nf-j2-autre {
  min-height: 54px; border-radius: 14px; font-size: 16px; font-weight: 800; color: #14100a; border: 0;
  background: linear-gradient(150deg, #F2D98A, #CFA32B); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 22px -12px rgba(212, 175, 55, .55);
}
html:root:root[data-nutri-j3="1"] .nf-j2-autre .nf-i { color: #14100a; }
/* écart entre deux repas notés + repère « Maintenant » (heure du téléphone) */
.nf-j3-ecart, .nf-j3-now { list-style: none; position: relative; display: grid; grid-template-columns: var(--j2-col, 74px) 18px minmax(0, 1fr); align-items: center; }
.nf-j3-ecart { min-height: 26px; margin: -2px 0 8px; }
.nf-j3-ecart span { grid-column: 3; margin-left: 8px; font-size: 12.5px; font-weight: 600; color: #D3CCB8; }
.nf-j3-now { min-height: 28px; margin: 0 0 10px; }
.nf-j3-now b { grid-column: 1; justify-self: end; margin-right: 4px; padding: 3px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: #14100a; background: #F2D98A; }
.nf-j3-now span { grid-column: 3; margin-left: 8px; font-size: 13px; font-weight: 700; color: #F2D98A; display: flex; align-items: center; gap: 8px; }
.nf-j3-now span::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #F2D98A, rgba(242, 217, 138, 0)); }

/* ── 5. Mini-calendrier de la date : teinte « chaleur » (Journal et Carnet) ── */
html:root:root[data-nutri-j3="1"] .tr-ndate-cal { background: linear-gradient(160deg, #241c10, #120e08); border: 1px solid rgba(227, 188, 82, .55); }
html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="1"], html:root:root[data-nutri-j3="1"] .nf-j3-j[data-nb="1"], html:root:root[data-nutri-j3="1"] .nf-j3-lg[data-nb="1"] { background: #3a3010; }
html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="2"], html:root:root[data-nutri-j3="1"] .nf-j3-j[data-nb="2"], html:root:root[data-nutri-j3="1"] .nf-j3-lg[data-nb="2"] { background: #5b4a14; }
html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="3"], html:root:root[data-nutri-j3="1"] .nf-j3-j[data-nb="3"], html:root:root[data-nutri-j3="1"] .nf-j3-lg[data-nb="3"] { background: #6e5a1a; }
html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="4"], html:root:root[data-nutri-j3="1"] .nf-j3-j[data-nb="4"], html:root:root[data-nutri-j3="1"] .nf-j3-lg[data-nb="4"] { background: #7d661c; }
html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="1"], html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="2"], html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="3"], html:root:root[data-nutri-j3="1"] .tr-ndate-case[data-nf-j3-nb="4"] { color: #FFF8E1; }
html:root:root[data-nutri-j3="1"] .tr-ndate-case.choisi { background: linear-gradient(150deg, #F2D98A, #E3BC52 55%, #CFA32B) !important; color: #14100a !important; }

/* ═════ CARNET v3 (piste C « chaleur ») ═════ */
/* En-tête : date à gauche, jour au centre, signet du Livre à droite — même schéma que le Journal */
.nf-cj3 .nf-cj2-tete { gap: 10px; min-height: 92px; }
.nf-cj3 .nf-cj2-tete .tr-ndate-racine { order: -1; flex: none; }
.nf-cj3 .nf-cj2-jour { text-align: center; }
.nf-cj3 .nf-cj2-jour small { color: #EFE9D8; }
.nf-cj3 .nf-j3-signet { --lv-s-k: .16; flex: none; width: 56px; height: 93px; position: relative; order: 3; }
.nf-cj3 .tr-ndate-puce { min-width: 64px; }
.nf-cj3 .nf-j3-signet .lv-signet { position: relative; top: auto; right: auto; left: auto; width: 56px; height: 93px; }
/* calendrier « chaleur » */
.nf-j3-cal { margin-top: 10px; border-radius: 22px; padding: 10px 6px 8px; background: rgba(18, 18, 22, .92); border: 1px solid rgba(227, 188, 82, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 24px -16px #000; }
.nf-j3-cal-tete { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 4px; }
.nf-j3-cal-mois { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 25px; font-weight: 800; color: #fff; text-transform: capitalize; }
.nf-j3-nav { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; cursor: pointer; color: #E3BC52; background: #0d0a06; border: 1.5px solid rgba(227, 188, 82, .7); }
.nf-j3-nav[aria-disabled="true"] { color: #9d9580; border-color: rgba(255, 255, 255, .2); cursor: default; }
.nf-j3-grille { display: block; }
.nf-j3-sem, .nf-j3-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); justify-items: center; }
.nf-j3-sem { text-align: center; font-size: 12.5px; font-weight: 700; color: #D3CCB8; margin-bottom: 2px; }
.nf-j3-jours { row-gap: 3px; }
.nf-j3-j { box-sizing: border-box; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 14px; cursor: pointer; border: 0; background: transparent; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 21px; font-weight: 700; color: #F4EFE0; position: relative; }
.nf-j3-j.fut { color: #9d9580; font-weight: 600; cursor: default; }
.nf-j3-j.auj { box-shadow: inset 0 0 0 2px #F2D98A; }
.nf-j3-j[data-nb="1"], .nf-j3-j[data-nb="2"], .nf-j3-j[data-nb="3"], .nf-j3-j[data-nb="4"] { color: #FFF8E1; }
.nf-j3-j.eau::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: #9ED9F8; }
.nf-j3-j.sel { color: #14100a !important; font-weight: 800; background: linear-gradient(150deg, #F2D98A, #E3BC52 55%, #CFA32B) !important; }
.nf-j3-j:focus-visible, .nf-j3-nav:focus-visible, .nf-j3-auj:focus-visible, .nf-j3-edit:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.nf-j3-pied { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px 0; }
.nf-j3-legende { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: #D3CCB8; }
.nf-j3-lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid rgba(227, 188, 82, .4); }
.nf-j3-legende .nf-j3-lg:first-of-type { margin-left: 4px; }
.nf-j3-legende .nf-j3-lg:last-of-type { margin-right: 4px; }
.nf-j3-auj { min-height: 44px; padding: 0 16px; border-radius: 14px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 800; color: #E3BC52; background: #0d0a06; border: 1.5px solid rgba(227, 188, 82, .7); }
/* « Ajouter un repas » juste sous le calendrier : le bouton existant, en or plein et plus haut */
.nf-cj3 .nf-cj2-ajout { min-height: 56px; margin-top: 12px; border-radius: 16px; }
/* repas du jour : une carte par repas */
.nf-j3-repas { margin-top: 14px; }
.nf-j3-rt { margin: 0 0 8px; }
.nf-j3-rt h3 { margin: 0; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 27px; font-weight: 800; color: #fff; text-transform: capitalize; }
.nf-j3-rt small { display: block; font-size: 13px; font-weight: 600; color: #D3CCB8; }
.nf-j3-carte { display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px; gap: 10px; align-items: start; margin-bottom: 8px; padding: 10px 6px 10px 10px; border-radius: 16px; background: linear-gradient(160deg, #2a2113, #13100a); border: 1px solid rgba(227, 188, 82, .55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 10px 22px -14px #000; }
.nf-j3-pl { box-sizing: border-box; min-height: 46px; display: grid; place-items: center; border-radius: 10px; font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-size: 25px; font-weight: 800; color: #14100a; background: linear-gradient(160deg, #F2D98A, #CFA32B); }
.nf-j3-nm { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #E3BC52; }
.nf-j3-it { margin-top: 1px; font-size: 16.5px; font-weight: 700; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.nf-j3-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nf-j3-chips i { font-style: normal; font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 2px 9px; background: #0d0a06; border: 1px solid rgba(227, 188, 82, .4); color: #F4EFE0; }
.nf-j3-chips i.k { color: #D3CCB8; font-weight: 700; }
.nf-j3-edit { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; cursor: pointer; color: #E3BC52; background: #0d0a06; border: 1.5px solid rgba(227, 188, 82, .75); }
.nf-j3-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 4px 0 6px; padding: 10px 12px; border-radius: 14px; background: #15100a; border: 1px dashed rgba(227, 188, 82, .55); font-size: 13.5px; color: #D3CCB8; }
.nf-j3-total b { font-weight: 800; color: #F4EFE0; }
.nf-cj3 .nf-cj2-eau { border-radius: 16px; }
.nf-cj3 .nf-cj2-eau-b { border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .nf-j3-cal *, .nf-j3-repas * { transition: none !important; } }

/* ═════ 05/10 · Corrections du contrôle de Chef (PR #191) — AJOUTS en fin de feuille ═════ */
/* B1 · calendrier du Carnet : colonnes = cases (aucun recouvrement à 320/360), 44 px de haut, tout le tiers de colonne touchable */
.nf-j3-jours { justify-items: stretch; }
html:root:root .nf-j3-j { width: 100%; min-width: 0; }   /* la règle globale « Nutrition : bouton ≥ 44 px de large » (skin-nutrition-tactile.css) imposait 44 px dans des colonnes de 34–40 px */
.nf-j3-sem span { min-width: 0; }
.nf-j3-pied { flex-wrap: wrap; row-gap: 4px; }
.nf-j3-auj { white-space: nowrap; flex: none; }
@media (max-width: 359px) {
  .nf-j3-cal { padding-left: 4px; padding-right: 4px; }
  .nf-j3-auj { padding: 0 10px; font-size: 13.5px; }
  .nf-j3-legende { font-size: 12px; }
}
/* B2 · plaques d'heure : « 12h30 » tient dans sa plaque sous 340 px */
@media (max-width: 339px) {
  html:root:root[data-nutri-j3="1"] .nf-j2-r > .nf-j2-h, html:root:root[data-nutri-j3="1"] .nf-j2-tl > .nf-e > .nf-h { font-size: 20px; margin-right: 2px; }
  /* (d) pastille « Maintenant » dans l'écran, sept jours du récap ≥ 44 px de large */
  .nf-j3-now b { font-size: 10px; padding: 3px 4px; letter-spacing: 0; margin-right: 2px; white-space: nowrap; }
  html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-frisec { margin-left: -8px; margin-right: -8px; padding-left: 0; padding-right: 0; }
  html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-frisec .nf-frise { gap: 0; }
}
/* (e) créneaux à venir : grisés (texte ≥ 4,5:1 conservé), le toucher reste refusé proprement */
html:root:root[data-nutri-j3="1"] .nf-j3-fut > .nf-j2-h { color: #a79f88; background: #0c0a07; border-color: rgba(167, 159, 136, .38); }
html:root:root[data-nutri-j3="1"] .nf-j3-fut .nf-j2-carte.vide { background: #0f0d09; border-color: rgba(167, 159, 136, .22); box-shadow: none; }
html:root:root[data-nutri-j3="1"] .nf-j3-fut .nf-j2-carte.vide :is(.nf-j2-nom, .nf-j2-plus) { color: #a79f88; }
html:root:root[data-nutri-j3="1"] .nf-j3-fut .nf-j2-pt { background: #3a3629; box-shadow: none; }
@media (max-width: 339px) {   /* 320 px : quatre cartes d'indicateurs sans débordement */
  html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res { gap: 5px; }
  html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc { padding-left: 4px; padding-right: 4px; }
  html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc small { font-size: 11.5px; letter-spacing: 0; }
  html:root:root[data-nutri-j3="1"] .tr-nutri:has(.nf-racine) .nf-res .nf-mc:not(.nf-mc-eau) b { font-size: 19px; }
}
