/* Leurre Fuel (traqueur nutritionnel) - porte du prototype. Scope sous .fuel. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-Dr-cltI.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.fuel {
  --bg:#F5F7F8; --surface:#FFFFFF; --ink:#1C2430; --ink-soft:#69747F; --line:#E6EAED;
  --energy:#1FA971; --energy-soft:#DBF2E8;
  --protein:#3B7DD8; --protein-soft:#DEEAF8;
  --carbs:#E8A13A; --carbs-soft:#FBEED6;
  --fat:#D8695C; --fat-soft:#F8E1DE;
  --fshadow:0 10px 30px rgba(28,36,48,.08);
  background:var(--bg); color:var(--ink); font-family:'DM Sans',system-ui,sans-serif;
  display:flex; flex-direction:column; height:100%;
}
.fuel .screen { flex:1; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
.fuel .screen::-webkit-scrollbar { display:none; }
.fuel .view { display:none; padding:0 18px 96px; }
.fuel .view.active { display:block; }

.fuel .topbar { padding:18px 18px 4px; display:flex; align-items:center; justify-content:space-between; }
.fuel .brand { font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:24px; letter-spacing:-.02em; display:flex; align-items:center; gap:7px; }
.fuel .brand .b { width:24px; height:24px; border-radius:7px; background:var(--energy); display:flex; align-items:center; justify-content:center; }
.fuel .brand .b svg { width:14px; height:14px; stroke:#fff; fill:none; stroke-width:2.4; }
.fuel .topbar .date { font-size:13px; color:var(--ink-soft); font-weight:500; }
.fuel .topbar .date::first-letter { text-transform:uppercase; }
.fuel .wk .col.today .bar { background:linear-gradient(180deg,var(--energy),var(--energy)); }
.fuel .wk .col.today .d { color:var(--energy); font-weight:700; }

.fuel .cal-wrap { display:flex; flex-direction:column; align-items:center; margin-top:8px; }
.fuel .cal-ring { position:relative; width:230px; height:230px; }
.fuel .cal-ring svg { transform:rotate(-90deg); }
.fuel .cal-ring .center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; user-select:none; }
.fuel .cal-ring .kcal { font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:60px; line-height:.9; cursor:pointer; transition:transform .12s;
  /* Appui long fiable sur mobile (voir lunea .day). */
  touch-action:none; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.fuel .cal-ring .kcal:active { transform:scale(.96); }
.fuel .cal-ring .unit { font-size:13px; color:var(--ink-soft); font-weight:600; letter-spacing:.06em; text-transform:uppercase; margin-top:4px; }
.fuel .focal-dot { position:absolute; top:34%; right:34%; width:12px; height:12px; border-radius:50%; background:var(--energy); box-shadow:0 0 0 3px var(--bg); }
.fuel .cal-sub { margin-top:16px; display:flex; gap:22px; }
.fuel .cal-sub div { text-align:center; }
.fuel .cal-sub .n { font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:18px; }
.fuel .cal-sub .k { font-size:11px; color:var(--ink-soft); margin-top:1px; }

.fuel .macros { display:flex; gap:10px; margin-top:22px; }
.fuel .macro { flex:1; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:13px; box-shadow:var(--fshadow); }
.fuel .macro .top { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:9px; }
.fuel .macro .lab { font-size:12px; font-weight:600; color:var(--ink-soft); }
.fuel .macro .g { font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:15px; }
.fuel .macro .track { height:6px; background:#EEF1F3; border-radius:4px; overflow:hidden; }
.fuel .macro .fill { height:100%; border-radius:4px; }

.fuel .sec-title { font-size:13px; font-weight:600; color:var(--ink-soft); margin:26px 4px 12px; display:flex; justify-content:space-between; }
.fuel .card { background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:var(--fshadow); overflow:hidden; }

.fuel .meal { border-bottom:1px solid var(--line); }
.fuel .meal:last-child { border-bottom:none; }
.fuel .meal-h { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; }
.fuel .meal-h .name { font-weight:600; font-size:14.5px; display:flex; align-items:center; gap:9px; }
.fuel .meal-h .ic { width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:15px; }
.fuel .meal-h .kc { font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:14px; color:var(--ink-soft); }
.fuel .food { display:flex; justify-content:space-between; padding:9px 16px 9px 55px; font-size:13.5px; color:var(--ink-soft); border-top:1px solid #F1F4F5; }
.fuel .food .fk { font-weight:600; color:var(--ink); }
.fuel .add-food { padding:11px 16px 13px 55px; font-size:13px; color:var(--energy); font-weight:600; cursor:pointer; }

.fuel .search { display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:12px 15px; box-shadow:var(--fshadow); margin-top:6px; }
.fuel .search svg { width:18px; height:18px; stroke:var(--ink-soft); fill:none; stroke-width:2; }
.fuel .search input { border:none; background:none; font-family:inherit; font-size:14.5px; color:var(--ink); flex:1; }
.fuel .search input:focus { outline:none; }
.fuel .flist { margin-top:18px; }
.fuel .fitem { display:flex; align-items:center; justify-content:space-between; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:13px 15px; margin-bottom:10px; box-shadow:var(--fshadow); }
.fuel .fitem .nm { font-size:14px; font-weight:500; }
.fuel .fitem .meta { font-size:12px; color:var(--ink-soft); margin-top:2px; }
.fuel .fitem .plus { width:30px; height:30px; border-radius:9px; border:none; background:var(--energy-soft); color:var(--energy); font-size:18px; font-weight:700; cursor:pointer; }

.fuel .stat-row { display:flex; gap:10px; }
.fuel .stat { flex:1; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:15px 12px; text-align:center; box-shadow:var(--fshadow); }
.fuel .stat .v { font-family:'Space Grotesk',sans-serif; font-size:26px; font-weight:600; }
.fuel .stat .l { font-size:11.5px; color:var(--ink-soft); margin-top:3px; }
.fuel .wk { display:flex; align-items:flex-end; justify-content:space-between; height:130px; padding:16px 14px 8px; }
.fuel .wk .col { display:flex; flex-direction:column; align-items:center; gap:7px; flex:1; }
.fuel .wk .bar { width:60%; max-width:24px; background:linear-gradient(180deg,var(--energy),#7FD3B0); border-radius:6px 6px 3px 3px; }
.fuel .wk .d { font-size:11px; color:var(--ink-soft); font-weight:600; }

.fuel .set-list .set-item { display:flex; align-items:center; justify-content:space-between; padding:15px 16px; border-bottom:1px solid var(--line); }
.fuel .set-list .set-item:last-child { border-bottom:none; }
.fuel .set-item .k { font-size:14.5px; font-weight:500; }
.fuel .set-item .s { font-size:12px; color:var(--ink-soft); margin-top:2px; }
.fuel .set-item .v { font-size:14px; color:var(--ink-soft); }
.fuel .toggle { width:46px; height:28px; border-radius:999px; background:var(--line); position:relative; cursor:pointer; transition:.2s; border:none; }
.fuel .toggle.on { background:var(--energy); }
.fuel .toggle::after { content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.fuel .toggle.on::after { left:21px; }

.fuel .tabbar { display:flex; background:var(--surface); border-top:1px solid var(--line); padding:8px 6px calc(8px + env(safe-area-inset-bottom)); }
.fuel .tab { flex:1; border:none; background:none; font-family:inherit; color:var(--ink-soft); display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10.5px; font-weight:600; cursor:pointer; padding:5px; }
.fuel .tab svg { width:23px; height:23px; stroke:currentColor; fill:none; stroke-width:1.7; }
.fuel .tab.on { color:var(--energy); }
.fuel .hint { text-align:center; font-size:11px; color:#AEB8C0; padding:6px 24px 0; }
