/* =====================================================================
   Mass Gainer v3 — couche Muscu / IA / Récompenses
   (base.css = design Liquid Glass d'origine)
   ===================================================================== */

:root {
  --gold: #f5b301;
  --gold-2: #ffd75e;
  --violet: #8a5cf6;
  --sheet-radius: 32px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dock-h: 74px;
  --text-muted: #5f6b84;
}

html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
@media (prefers-reduced-motion: reduce) {
  .mesh-orb, .wave { animation: none !important; }
}

html.sheet-open, html.sheet-open body { overflow: hidden; }
button { font-family: inherit; }
img { -webkit-user-drag: none; }
.app-shell { padding-bottom: calc(130px + var(--safe-bottom)); }

/* ---------- Top bar : niveau + série ---------- */
.level-chip {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  font-weight: 800; color: var(--text-primary);
  transition: transform .16s var(--spring);
}
.level-chip:active { transform: scale(.94); }
.level-chip-ring {
  --p: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--flame-1) calc(var(--p) * 1%), rgba(16,22,36,.09) 0);
  position: relative; font-size: .82rem;
}
.level-chip-ring::before {
  content: ""; position: absolute; inset: 3.5px; border-radius: 50%;
  background: linear-gradient(145deg,#fff,var(--accent-soft));
}
.level-chip-ring span { position: relative; }
.level-chip-streak { font-size: .82rem; }

/* ---------- Transitions de vues ---------- */
.view { display: none; }
.view.active { display: flex; flex-direction: column; gap: 16px; animation: viewIn .42s var(--ease-out) both; }
.view.active.from-left { animation-name: viewInLeft; }
.view.active.from-right { animation-name: viewInRight; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes viewInLeft { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes viewInRight { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.view.active .card { animation: cardRise .5s var(--ease-out) both; }
.view.active .card:nth-child(2) { animation-delay: .04s; }
.view.active .card:nth-child(3) { animation-delay: .08s; }
.view.active .card:nth-child(4) { animation-delay: .12s; }
.view.active .card:nth-child(5) { animation-delay: .16s; }
.view.active .card:nth-child(n+6) { animation-delay: .2s; }

.section-title { margin: 10px 4px -4px; font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; }

/* ---------- Dock 5 positions + bouton + ---------- */
.bottom-dock { grid-template-columns: repeat(5, 1fr); max-width: 420px; }
.dock-slider { width: calc((100% - 12px) / 5); }
.dock-btn { font-size: .64rem; padding: 8px 2px; white-space: nowrap; }
.dock-plus { padding: 0; display: flex; align-items: center; justify-content: center; align-self: stretch; }
.dock-plus-inner {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--flame-1), var(--flame-2) 60%, var(--flame-3));
  box-shadow: 0 8px 18px var(--accent-glow), inset 0 1.5px 0 rgba(255,255,255,.45);
  transition: transform .35s var(--spring);
}
.dock-plus-inner svg { width: 22px; height: 22px; }
.dock-plus:active .dock-plus-inner { transform: scale(.88); }
.dock-plus.active .dock-plus-inner { transform: rotate(45deg); }
.bottom-dock.on-plus .dock-slider { opacity: 0; }

/* ---------- Pastille séance en cours ---------- */
.session-pill {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(96px + var(--safe-bottom)); z-index: 31;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font-weight: 800; font-size: .85rem; color: var(--text-primary);
  animation: pillIn .45s var(--spring) both;
  max-width: calc(100% - 32px); white-space: nowrap; border: 0; font-family: inherit;
}
#session-pill-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.session-pill-cta, .session-pill-dot { flex-shrink: 0; }
.session-pill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--flame-1); animation: pulseRing 1.6s ease-out infinite; color: var(--flame-1); }
.session-pill-cta { color: var(--accent); }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ---------- Boutons génériques ---------- */
.btn-pill { position: relative; overflow: hidden; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px dashed rgba(16,22,36,.18); }
.btn-dark { background: #101624; color: #fff; box-shadow: 0 10px 24px rgba(16,22,36,.25); }
.btn-gold { background: linear-gradient(135deg,#f59e0b,#fbbf24 60%,#fde68a); color: #4a2a00; box-shadow: 0 10px 24px rgba(245,158,11,.35), inset 0 1.5px 0 rgba(255,255,255,.5); }
.btn-ai { background: linear-gradient(135deg,#7c3aed,#a855f7 55%,#ec4899); color: #fff; box-shadow: 0 10px 24px rgba(124,58,237,.3), inset 0 1.5px 0 rgba(255,255,255,.35); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > * { flex: 1; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .18; pointer-events: none; animation: ripple .6s var(--ease-out); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.icon-btn {
  appearance: none; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.75);
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 1rem; cursor: pointer; color: var(--text-secondary); flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20,35,70,.06); transition: transform .16s var(--spring);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn.sm { width: 32px; height: 32px; font-size: .85rem; }

.ai-inline-btn {
  margin-top: 14px; width: 100%; appearance: none; cursor: pointer;
  padding: 11px 14px; border-radius: 16px; border: 1px solid rgba(138,92,246,.22);
  background: linear-gradient(135deg, rgba(124,58,237,.09), rgba(236,72,153,.07));
  color: #5b21b6; font-weight: 700; font-size: .86rem; text-align: left;
  transition: transform .16s var(--spring);
}
.ai-inline-btn:active { transform: scale(.98); }

/* ---------- Carte XP / niveau ---------- */
.xp-card { padding: 16px 18px; }
.xp-row { display: flex; align-items: center; gap: 14px; }
.xp-medal {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 18px;
  display: grid; place-items: center; font-size: 1.35rem; font-weight: 900; color: #fff;
  background: linear-gradient(140deg, var(--flame-1), var(--flame-3));
  box-shadow: 0 10px 22px var(--accent-glow), inset 0 1.5px 0 rgba(255,255,255,.5);
  position: relative;
}
.xp-medal small { position: absolute; top: 5px; font-size: .5rem; letter-spacing: .1em; opacity: .9; }
.xp-medal b { margin-top: 8px; }
.xp-main { flex: 1; min-width: 0; }
.xp-title { margin: 0; font-weight: 800; font-size: 1rem; letter-spacing: -.02em; }
.xp-sub { margin: 1px 0 7px; font-size: .76rem; color: var(--text-secondary); font-weight: 600; }
.xp-bar { height: 10px; border-radius: 99px; background: rgba(16,22,36,.08); overflow: hidden; position: relative; }
.xp-bar-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--flame-1), var(--flame-3)); transition: width .9s var(--ease-out); position: relative; overflow: hidden; }
.xp-bar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); transform: translateX(-100%); animation: shimmer 2.6s ease-in-out infinite; }
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }
.streak-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.streak-box { border-radius: 18px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.streak-emoji { font-size: 1.5rem; line-height: 1; }
.streak-emoji.lit { animation: flame 1.4s ease-in-out infinite alternate; transform-origin: 50% 90%; }
@keyframes flame { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.12) rotate(3deg); } }
.streak-val { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.streak-lbl { font-size: .68rem; color: var(--text-secondary); font-weight: 700; }

/* ---------- Quêtes ---------- */
.quest-list { display: flex; flex-direction: column; gap: 9px; }
.quest {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 18px;
  transition: transform .2s var(--spring), background .3s;
}
.quest-icon { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; background: rgba(255,255,255,.8); flex-shrink: 0; }
.quest-body { flex: 1; min-width: 0; }
.quest-name { font-size: .86rem; font-weight: 700; margin: 0 0 5px; }
.quest-bar { height: 6px; border-radius: 99px; background: rgba(16,22,36,.08); overflow: hidden; }
.quest-bar > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg,#05c485,#34d399); transition: width .7s var(--ease-out); }
.quest.done { background: rgba(5,196,133,.1); }
.quest.claimed { opacity: .62; }
.quest-claim { padding: 7px 11px; font-size: .74rem; }
.quest-xp { font-size: .72rem; font-weight: 800; color: var(--text-muted); white-space: nowrap; }
.chest-btn {
  margin-top: 12px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.chest-btn .chest-emoji { font-size: 1.4rem; display: inline-block; }
.chest-btn.ready .chest-emoji { animation: chestWiggle 1.2s ease-in-out infinite; }
@keyframes chestWiggle { 0%,60%,100% { transform: rotate(0); } 70% { transform: rotate(-12deg) scale(1.1); } 80% { transform: rotate(10deg) scale(1.1); } 90% { transform: rotate(-6deg); } }

/* ---------- Carte séance du jour ---------- */
.training-today { padding: 0; }
.tt-hero { position: relative; padding: 18px; color: #fff; border-radius: inherit; overflow: hidden; }
.tt-hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg,#101624 0%,rgba(16,22,36,.9) 55%,var(--accent) 140%); }
.tt-hero-img { position: absolute; right: -10px; top: 0; bottom: 0; width: 46%; opacity: .35; mix-blend-mode: screen; object-fit: cover; mask-image: linear-gradient(90deg, transparent, #000 55%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); }
.tt-content { position: relative; z-index: 1; }
.tt-eyebrow { margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-light); }
.tt-title { margin: 4px 0 4px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }
.tt-meta { margin: 0 0 14px; font-size: .8rem; color: rgba(255,255,255,.72); font-weight: 600; }
.tt-week { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.tt-dot { width: 22px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.18); }
.tt-dot.on { background: linear-gradient(90deg,var(--flame-1),var(--flame-3)); box-shadow: 0 0 10px rgba(var(--accent-rgb),.6); }
.tt-week span { font-size: .72rem; color: rgba(255,255,255,.7); font-weight: 700; margin-left: 4px; }
.tt-actions { display: flex; gap: 8px; }
.tt-actions .btn-pill { flex: 1; }
.btn-glass-dark { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); }

/* ---------- Onglets segmentés ---------- */
.seg-tabs { position: relative; display: grid; grid-template-columns: repeat(4,1fr); padding: 4px; border-radius: 999px; }
.seg-slider { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px)/4); border-radius: 999px; background: #fff; box-shadow: 0 4px 14px rgba(16,22,36,.1); transition: transform .4s var(--spring); }
.seg-btn { position: relative; z-index: 1; appearance: none; border: 0; background: transparent; padding: 9px 2px; font-weight: 700; font-size: .78rem; color: var(--text-secondary); cursor: pointer; border-radius: 999px; transition: color .2s; }
.seg-btn.active { color: var(--text-primary); }
.training-body { display: flex; flex-direction: column; gap: 14px; }
.training-body > * { animation: cardRise .45s var(--ease-out) both; }

/* ---------- Unités kg / lb ---------- */
.unit-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(16,22,36,.07); position: relative; }
.unit-toggle button { appearance: none; border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .78rem; color: var(--text-secondary); cursor: pointer; transition: all .25s var(--spring); }
.unit-toggle button.on { background: #fff; color: var(--text-primary); box-shadow: 0 3px 10px rgba(16,22,36,.12); }
.unit-toggle.big button { padding: 10px 26px; font-size: .95rem; }

/* ---------- Programmes ---------- */
.prog-card { border-radius: var(--radius-card); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.prog-top { display: flex; gap: 12px; align-items: center; }
.prog-emoji { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; font-size: 1.6rem; background: linear-gradient(145deg,#fff,var(--accent-soft)); box-shadow: inset 0 1px 0 #fff, 0 6px 14px rgba(var(--accent-rgb),.12); flex-shrink: 0; }
.prog-name { margin: 0; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.prog-meta { margin: 2px 0 0; font-size: .78rem; color: var(--text-secondary); font-weight: 600; }
.prog-thumbs { display: flex; gap: 6px; overflow: hidden; }
.prog-thumbs .ex-media { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.prog-actions { display: flex; gap: 8px; }
.prog-actions .btn-pill:first-child { flex: 1; }
.empty-hero { text-align: center; padding: 26px 18px; }
.empty-hero .big-emoji { font-size: 3rem; display: block; margin-bottom: 8px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.empty-hero h3 { margin: 0 0 6px; font-size: 1.1rem; }
.empty-hero p { margin: 0 0 16px; color: var(--text-secondary); font-size: .88rem; }
.template-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.template-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; cursor: pointer; text-align: left; border: 1px solid rgba(255,255,255,.9); appearance: none; width: 100%; font: inherit; color: inherit; transition: transform .16s var(--spring); }
.template-item:active { transform: scale(.98); }
.template-item b { display: block; font-size: .92rem; }
.template-item span { font-size: .76rem; color: var(--text-secondary); }

/* ---------- Médias d'exercice (2 images alternées) ---------- */
.ex-media { position: relative; overflow: hidden; background: linear-gradient(145deg,#f3f6fc,#e7edf8); border-radius: 14px; }
.ex-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.ex-media img.f1 { animation: exFrame 1.8s steps(1, end) infinite; }
@keyframes exFrame { 0% { opacity: 0; } 50% { opacity: 1; } }
.ex-media.smooth img.f1 { animation: exFrameSmooth 2s ease-in-out infinite; }
@keyframes exFrameSmooth { 0%, 30% { opacity: 0; } 50%, 80% { opacity: 1; } 100% { opacity: 0; } }
.ex-media.still img.f1,
.ex-media.smooth.still img.f1 { animation: none; opacity: 0; }
.ex-media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.4rem; opacity: .55; }
.ex-media.loaded .ph { display: none; }
.ex-media img.err { display: none; }

/* ---------- Bibliothèque ---------- */
.lib-search { position: relative; }
.lib-search input { padding-left: 42px; }
.lib-search .s-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); opacity: .5; pointer-events: none; }
.chip-scroll { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-scroll::-webkit-scrollbar { display: none; }
.fchip { flex-shrink: 0; appearance: none; cursor: pointer; padding: 8px 13px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.7); color: var(--text-secondary); transition: all .22s var(--spring); white-space: nowrap; }
.fchip.on { background: #101624; color: #fff; border-color: #101624; transform: scale(1.03); }
.fchip.mass.on { background: linear-gradient(135deg,var(--flame-1),var(--flame-2)); border-color: transparent; }
.lib-count { font-size: .76rem; color: var(--text-muted); font-weight: 700; margin: 2px 4px; }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-card { appearance: none; border: 1px solid rgba(255,255,255,.92); background: rgba(255,255,255,.72); border-radius: 22px; padding: 8px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 7px; font: inherit; color: inherit; position: relative; box-shadow: 0 6px 16px rgba(20,35,70,.05); transition: transform .18s var(--spring), box-shadow .2s; animation: cardRise .4s var(--ease-out) both; }
.ex-card:active { transform: scale(.97); }
.ex-card .ex-media { aspect-ratio: 1 / 1; border-radius: 16px; width: 100%; }
.ex-card-name { font-size: .8rem; font-weight: 750; line-height: 1.22; margin: 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.44em; }
.ex-card-meta { font-size: .68rem; color: var(--text-muted); font-weight: 700; margin: 0 2px 2px; }
.ex-card .star { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(255,255,255,.92); border-radius: 99px; padding: 2px 7px; font-size: .62rem; font-weight: 800; color: var(--accent); }
.ex-card .pick-mark { position: absolute; top: 12px; right: 12px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.92); border: 2px solid rgba(16,22,36,.15); display: grid; place-items: center; color: #fff; font-size: .8rem; font-weight: 900; transition: all .25s var(--spring); }
.ex-card.picked { box-shadow: 0 0 0 2.5px var(--accent), 0 10px 24px var(--accent-glow); }
.ex-card.picked .pick-mark { background: var(--accent); border-color: var(--accent); transform: scale(1.12); }
.load-more { margin: 4px auto 0; }

/* ---------- Feuilles (bottom sheets) ---------- */
.sheet-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(12,18,32,.32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s ease both; }
.sheet-overlay.closing { animation: fadeOut .28s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; margin: 0 auto; max-width: 520px;
  max-height: calc(100dvh - 40px - var(--safe-top)); display: flex; flex-direction: column;
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  background: linear-gradient(170deg, #fafcff, #eff4fc);
  box-shadow: 0 -20px 60px rgba(16,28,58,.22), inset 0 1.5px 0 #fff;
  animation: sheetUp .5s var(--ease-out) both;
  will-change: transform;
}
.sheet.full { top: 0; max-height: none; border-radius: 0; padding-top: var(--safe-top); }
@media (min-width: 560px) { .sheet.full { top: 16px; bottom: 16px; border-radius: var(--sheet-radius); } }
.sheet.closing { animation: sheetDown .32s var(--ease-in-out) both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sheetDown { to { transform: translateY(105%); } }
.sheet-grip { width: 42px; height: 5px; border-radius: 99px; background: rgba(16,22,36,.16); margin: 9px auto 0; flex-shrink: 0; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px 10px; flex-shrink: 0; }
.sheet-title { flex: 1; min-width: 0; margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 18px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
.sheet-body > * { flex-shrink: 0; }
.sheet-foot { flex-shrink: 0; padding: 12px 18px calc(12px + var(--safe-bottom)); border-top: 1px solid rgba(16,22,36,.06); background: rgba(255,255,255,.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; gap: 8px; }
.sheet-foot .btn-pill { flex: 1; }

/* Dialogue */
.dialog { position: fixed; z-index: 90; left: 50%; top: 50%; transform: translate(-50%,-50%); width: calc(100% - 40px); max-width: 360px; border-radius: 28px; padding: 22px; text-align: center; animation: dialogIn .4s var(--spring) both; }
.dialog h3 { margin: 6px 0 6px; font-size: 1.12rem; }
.dialog p { margin: 0 0 18px; color: var(--text-secondary); font-size: .9rem; }
.dialog .btn-row { flex-wrap: nowrap; }
.dialog-overlay { z-index: 89; }
@keyframes dialogIn { from { opacity: 0; transform: translate(-50%,-46%) scale(.92); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

/* ---------- Détail exercice ---------- */
.ex-hero { border-radius: 26px; aspect-ratio: 4 / 3; width: 100%; box-shadow: 0 14px 30px rgba(16,22,36,.12); }
.ex-hero-controls { display: flex; justify-content: center; gap: 8px; margin-top: -4px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: rgba(16,22,36,.06); color: var(--text-secondary); }
.tag.m { background: rgba(var(--accent-rgb),.1); color: var(--accent-deep); }
.tag.s { background: rgba(138,92,246,.1); color: #6d28d9; }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: st; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: st; position: relative; padding-left: 36px; font-size: .88rem; line-height: 1.45; color: var(--text-secondary); }
.steps li::before { content: counter(st); position: absolute; left: 0; top: -1px; width: 25px; height: 25px; border-radius: 50%; background: linear-gradient(135deg,var(--flame-1),var(--flame-2)); color: #fff; font-size: .74rem; font-weight: 800; display: grid; place-items: center; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stat { border-radius: 18px; padding: 11px; text-align: center; }
.mini-stat b { display: block; font-size: 1.05rem; font-weight: 800; }
.mini-stat span { font-size: .68rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ai-box { border-radius: 20px; padding: 14px; background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(236,72,153,.06)); border: 1px solid rgba(138,92,246,.18); font-size: .88rem; line-height: 1.5; color: var(--text-primary); }
.ai-box h4 { margin: 10px 0 6px; font-size: .9rem; }
.ai-box h4:first-child { margin-top: 0; }
.ai-box ul { margin: 0; padding-left: 18px; }
.ai-box li { margin-bottom: 4px; }
.skeleton { border-radius: 10px; height: 12px; margin: 8px 0; background: linear-gradient(90deg, rgba(16,22,36,.06), rgba(16,22,36,.12), rgba(16,22,36,.06)); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------- Éditeur de programme ---------- */
.emoji-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.emoji-row::-webkit-scrollbar { display: none; }
.emoji-opt { appearance: none; width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.7); font-size: 1.3rem; cursor: pointer; transition: transform .2s var(--spring); }
.emoji-opt.on { background: #fff; box-shadow: 0 0 0 2.5px var(--accent); transform: scale(1.06); }
.bx { border-radius: 24px; padding: 12px; display: flex; flex-direction: column; gap: 10px; animation: cardRise .4s var(--ease-out) both; }
.bx-head { display: flex; align-items: center; gap: 10px; }
.bx-head .ex-media { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; cursor: pointer; }
.bx-name { flex: 1; min-width: 0; font-weight: 800; font-size: .92rem; line-height: 1.2; }
.bx-name small { display: block; font-weight: 600; font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.bx-tools { display: flex; gap: 4px; }
.set-table { display: flex; flex-direction: column; gap: 6px; }
.set-hdr, .set-row { display: grid; grid-template-columns: 30px 1fr 1fr 34px; gap: 6px; align-items: center; }
.set-hdr { font-size: .64rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; padding: 0 2px; }
.set-hdr span:nth-child(2), .set-hdr span:nth-child(3) { text-align: center; }
.set-num { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: rgba(16,22,36,.06); color: var(--text-secondary); appearance: none; border: 0; cursor: pointer; }
.set-num.warm { background: rgba(255,159,10,.18); color: #b55900; }
.set-num.drop { background: rgba(138,92,246,.16); color: #6d28d9; }
.num-input { width: 100%; padding: 10px 6px; border-radius: 13px; border: 1.2px solid rgba(255,255,255,.95); background: rgba(255,255,255,.8); text-align: center; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--text-primary); outline: none; font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s, background .2s; -moz-appearance: textfield; }
.num-input::-webkit-outer-spin-button, .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); background: #fff; }
.num-input::placeholder { color: rgba(16,22,36,.3); font-weight: 600; }
.num-wrap { position: relative; }
.num-wrap .u { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: .62rem; font-weight: 800; color: var(--text-muted); pointer-events: none; }
.conv { display: block; text-align: center; font-size: .62rem; color: var(--text-muted); font-weight: 700; margin-top: 2px; min-height: .8em; }
.rest-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .76rem; font-weight: 700; color: var(--text-secondary); }
.rest-chip { appearance: none; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.6); padding: 5px 9px; border-radius: 99px; font-size: .72rem; font-weight: 800; color: var(--text-secondary); cursor: pointer; }
.rest-chip.on { background: #101624; color: #fff; border-color: #101624; }
.note-input { font-size: 16px; padding: 9px 12px; border-radius: 13px; }
.add-set-btn { appearance: none; border: 1px dashed rgba(16,22,36,.18); background: transparent; border-radius: 13px; padding: 9px; font-weight: 800; font-size: .8rem; color: var(--text-secondary); cursor: pointer; }

/* ---------- Séance active ---------- */
.ws-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 8px; }
.ws-title { flex: 1; min-width: 0; }
.ws-title h3 { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-title p { margin: 0; font-size: .78rem; color: var(--text-secondary); font-weight: 700; font-variant-numeric: tabular-nums; }
.ws-progress { height: 5px; margin: 0 16px 6px; border-radius: 99px; background: rgba(16,22,36,.08); overflow: hidden; flex-shrink: 0; }
.ws-progress > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg,var(--flame-1),var(--flame-3)); transition: width .6s var(--ease-out); }
.wx { border-radius: 26px; padding: 12px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .3s, background .3s; }
.wx.complete { background: linear-gradient(145deg, rgba(5,196,133,.12), rgba(255,255,255,.6)); }
.wx-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.wx-head .ex-media { width: 64px; height: 64px; border-radius: 18px; flex-shrink: 0; }
.wx-info { flex: 1; min-width: 0; }
.wx-name { margin: 0; font-weight: 800; font-size: .96rem; line-height: 1.2; }
.wx-sub { margin: 3px 0 0; font-size: .74rem; color: var(--text-secondary); font-weight: 600; }
.wx-count { font-size: .78rem; font-weight: 800; color: var(--text-muted); white-space: nowrap; }
.wx.complete .wx-count { color: #037a52; }
.wx-body { display: flex; flex-direction: column; gap: 8px; }
.wx-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .76rem; font-weight: 700; color: var(--text-secondary); }
.sugg-chip { appearance: none; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 99px; font-size: .74rem; font-weight: 800; background: rgba(5,196,133,.14); color: #037a52; }
.wset { display: grid; grid-template-columns: 30px 52px 1fr 1fr 46px; gap: 6px; align-items: center; padding: 4px; border-radius: 16px; transition: background .35s; }
.wset-hdr { display: grid; grid-template-columns: 30px 52px 1fr 1fr 46px; gap: 6px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 0 4px; }
.wset-hdr span { text-align: center; }
.wset .prev { font-size: .7rem; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.15; cursor: pointer; }
.wset.done { background: rgba(5,196,133,.14); }
.wset.done .num-input { background: transparent; border-color: transparent; color: #037a52; }
.check-btn { appearance: none; border: 0; width: 46px; height: 42px; border-radius: 14px; cursor: pointer; background: rgba(16,22,36,.07); color: rgba(16,22,36,.35); display: grid; place-items: center; transition: transform .25s var(--spring), background .25s; }
.check-btn svg { width: 22px; height: 22px; }
.check-btn:active { transform: scale(.88); }
.wset.done .check-btn { background: linear-gradient(135deg,#05c485,#34d399); color: #fff; box-shadow: 0 6px 16px rgba(5,196,133,.35); animation: checkPop .45s var(--spring); }
@keyframes checkPop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.wset.pr-flash { animation: prFlash 1.2s ease; }
@keyframes prFlash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(245,179,1,.5); } }
.wx-foot { display: flex; gap: 6px; }
.wx-foot button { flex: 1; }

/* Minuteur de repos */
.rest-bar { position: absolute; left: 12px; right: 12px; bottom: calc(80px + var(--safe-bottom)); z-index: 5; border-radius: 26px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; animation: restIn .45s var(--spring) both; }
.rest-bar.out { animation: restOut .3s var(--ease-in-out) both; }
@keyframes restIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes restOut { to { opacity: 0; transform: translateY(30px) scale(.94); } }
.rest-ring { width: 54px; height: 54px; position: relative; flex-shrink: 0; }
.rest-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rest-ring circle { fill: none; stroke-width: 5; }
.rest-ring .trk { stroke: rgba(16,22,36,.09); }
.rest-ring .fil { stroke: var(--water-1); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.rest-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rest-info { flex: 1; min-width: 0; }
.rest-info strong { display: block; font-size: .9rem; }
.rest-info span { display: block; font-size: .74rem; color: var(--text-secondary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rest-bar.urgent .fil { stroke: var(--flame-1); }
.rest-bar.urgent { animation: restPulse .5s ease infinite alternate; }
@keyframes restPulse { to { transform: scale(1.015); } }

/* ---------- Résumé de séance / célébrations ---------- */
.celebrate { text-align: center; padding-top: 6px; }
.trophy { font-size: 4.2rem; display: inline-block; animation: trophyIn .9s var(--spring) both, bob 2.6s ease-in-out 1s infinite; filter: drop-shadow(0 12px 18px rgba(245,158,11,.35)); }
@keyframes trophyIn { from { transform: scale(0) rotate(-30deg); } }
.celebrate h2 { margin: 6px 0 4px; font-size: 1.6rem; font-weight: 900; letter-spacing: -.04em; }
.celebrate p { margin: 0; color: var(--text-secondary); }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sum-tile { border-radius: 20px; padding: 14px; animation: cardRise .5s var(--ease-out) both; }
.sum-tile b { display: block; font-size: 1.5rem; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sum-tile span { font-size: .72rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.pr-list { display: flex; flex-direction: column; gap: 8px; }
.pr-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(135deg, rgba(245,179,1,.16), rgba(255,215,94,.1)); border: 1px solid rgba(245,179,1,.3); font-size: .86rem; font-weight: 700; animation: cardRise .5s var(--ease-out) both; }
.xp-gain { border-radius: 22px; padding: 16px; }
.xp-gain-num { font-size: 2.2rem; font-weight: 900; letter-spacing: -.04em; color: var(--accent); }

.modal-celebrate { text-align: center; padding: 26px 22px; }
.modal-celebrate .big { font-size: 4.6rem; display: inline-block; animation: badgeSpin 1.1s var(--spring) both; }
@keyframes badgeSpin { from { transform: scale(0) rotateY(540deg); opacity: 0; } }
.modal-celebrate .lvl-num { width: 110px; height: 110px; margin: 0 auto; border-radius: 34px; display: grid; place-items: center; font-size: 3rem; font-weight: 900; color: #fff; background: linear-gradient(140deg,var(--flame-1),var(--gold)); box-shadow: 0 18px 40px var(--accent-glow); animation: badgeSpin 1s var(--spring) both; }
.modal-celebrate h3 { margin: 16px 0 6px; font-size: 1.4rem; font-weight: 900; letter-spacing: -.03em; }
.modal-celebrate p { color: var(--text-secondary); margin: 0 0 18px; }
.rarity { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin-top: 8px; }
.r-bronze { background: rgba(180,110,50,.15); color: #8a4b12; }
.r-silver { background: rgba(120,130,150,.18); color: #4a566e; }
.r-gold { background: rgba(245,179,1,.2); color: #8a5a00; }
.r-legend { background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(236,72,153,.18)); color: #6d28d9; }

/* ---------- Badges / profil ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.badge-cell { appearance: none; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.6); border-radius: 20px; padding: 12px 6px; text-align: center; cursor: pointer; font: inherit; color: inherit; transition: transform .18s var(--spring); }
.badge-cell:active { transform: scale(.95); }
.badge-cell .bi { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.badge-cell b { display: block; font-size: .7rem; line-height: 1.2; }
.badge-cell.locked .bi { filter: grayscale(1); opacity: .35; }
.badge-cell.locked b { color: var(--text-muted); }
.badge-cell.unlocked { background: linear-gradient(160deg,#fff,var(--accent-soft)); box-shadow: 0 6px 16px rgba(var(--accent-rgb),.12); }
.profile-top { display: flex; align-items: center; gap: 14px; }
.avatar { width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; font-weight: 900; font-size: 1.5rem; color: #fff; background: linear-gradient(140deg,#101624,#3a2a20); box-shadow: 0 10px 22px rgba(16,22,36,.25); flex-shrink: 0; }
.profile-name { margin: 0; font-size: 1.3rem; font-weight: 900; letter-spacing: -.03em; }
.settings-group { padding: 0; }
.settings-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; font-weight: 800; font-size: .98rem; }
.settings-group summary::-webkit-details-marker { display: none; }
.settings-group .chev { transition: transform .3s var(--spring); font-size: 1.3rem; color: var(--text-muted); }
.settings-group[open] .chev { transform: rotate(90deg); }
.settings-inner { padding: 0 18px 18px; }
.settings-group[open] .settings-inner { animation: cardRise .35s var(--ease-out); }
.range-row { margin-top: 14px; }
.range-row input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- Graphiques SVG ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.2s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .ar { fill: url(#chartGrad); opacity: 0; animation: fadeIn .8s .4s ease forwards; }
.chart .pt { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart .ax { font-size: 9px; fill: var(--text-muted); font-weight: 700; }
.chart .gd { stroke: rgba(16,22,36,.06); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg,var(--flame-2),var(--flame-1)); transform-origin: bottom; animation: growUp .8s var(--ease-out) both; min-height: 3px; }
.bar i.dim { background: rgba(16,22,36,.1); }
.bar span { font-size: .6rem; font-weight: 800; color: var(--text-muted); }
@keyframes growUp { from { transform: scaleY(0); } }
.hbar { display: grid; grid-template-columns: 92px 1fr 34px; gap: 8px; align-items: center; font-size: .78rem; font-weight: 700; margin-bottom: 7px; }
.hbar .tr { height: 10px; border-radius: 99px; background: rgba(16,22,36,.07); overflow: hidden; }
.hbar .tr i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,var(--violet),#c084fc); transform-origin: left; animation: growRight .9s var(--ease-out) both; }
@keyframes growRight { from { transform: scaleX(0); } }
.hbar .v { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------- Historique / calendrier ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h3 { margin: 0; font-size: 1.05rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.cal-dow { font-size: .64rem; font-weight: 800; color: var(--text-muted); padding-bottom: 4px; }
.cal-day { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--text-secondary); position: relative; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.cal-day.has { background: linear-gradient(135deg,var(--flame-1),var(--flame-2)); color: #fff; box-shadow: 0 4px 10px var(--accent-glow); }
.cal-day.nut::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--protein); }
.cal-day.has.nut::after { background: #fff; }
.sess-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; cursor: pointer; appearance: none; border: 1px solid rgba(255,255,255,.9); width: 100%; text-align: left; font: inherit; color: inherit; transition: transform .16s var(--spring); }
.sess-item:active { transform: scale(.98); }
.sess-date { width: 46px; height: 50px; border-radius: 15px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(16,22,36,.06); }
.sess-date b { font-size: 1.1rem; line-height: 1; }
.sess-date span { font-size: .6rem; font-weight: 800; color: var(--accent); text-transform: uppercase; }
.sess-main { flex: 1; min-width: 0; }
.sess-main b { display: block; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-main span { font-size: .74rem; color: var(--text-secondary); font-weight: 600; }
.sess-pr { font-size: .74rem; font-weight: 800; color: #8a5a00; background: rgba(245,179,1,.18); padding: 4px 8px; border-radius: 99px; white-space: nowrap; }
.rec-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; cursor: pointer; }
.rec-item .ex-media { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.rec-item b { flex: 1; font-size: .84rem; line-height: 1.2; }
.rec-item span { font-size: .82rem; font-weight: 800; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Coach IA ---------- */
.coach-body { display: flex; flex-direction: column; gap: 14px; }
.coach-hero { display: flex; align-items: center; gap: 14px; }
.coach-orb { width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0; position: relative; background: conic-gradient(from 0deg, #7c3aed, #ec4899, var(--flame-2), #38bdf8, #7c3aed); animation: spin 6s linear infinite; box-shadow: 0 10px 28px rgba(124,58,237,.35); }
.coach-orb::after { content: "✦"; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #f2eaff); display: grid; place-items: center; font-size: 1.3rem; color: #7c3aed; animation: spin 6s linear infinite reverse; }
.coach-orb.thinking { animation-duration: 1.2s; }
.coach-orb.thinking::after { animation-duration: 1.2s; }
@keyframes spin { to { transform: rotate(360deg); } }
.coach-hero h2 { margin: 0; font-size: 1.15rem; }
.coach-hero p { margin: 2px 0 0; font-size: .8rem; color: var(--text-secondary); }
.quick-prompts { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.quick-prompts::-webkit-scrollbar { display: none; }
.qp { flex-shrink: 0; appearance: none; cursor: pointer; padding: 9px 13px; border-radius: 16px; border: 1px solid rgba(138,92,246,.2); background: rgba(255,255,255,.78); font-size: .78rem; font-weight: 700; color: #5b21b6; max-width: 220px; text-align: left; line-height: 1.25; transition: transform .16s var(--spring); }
.qp:active { transform: scale(.95); }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 20px; font-size: .9rem; line-height: 1.5; animation: msgIn .4s var(--spring) both; word-wrap: break-word; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: 4px 0 6px; padding-left: 18px; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg,var(--flame-1),var(--flame-2)); color: #fff; border-bottom-right-radius: 6px; }
.msg.model { align-self: flex-start; background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.95); border-bottom-left-radius: 6px; box-shadow: 0 6px 16px rgba(20,35,70,.06); }
.msg.err { background: rgba(255,59,48,.08); color: #b42318; border-color: rgba(255,59,48,.2); }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #a78bfa; animation: typing 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat-input { position: sticky; bottom: calc(96px + var(--safe-bottom)); display: flex; gap: 8px; padding: 6px; border-radius: 26px; z-index: 5; }
.chat-input textarea { flex: 1; resize: none; border: 0; background: transparent; outline: none; font: inherit; font-size: 16px; padding: 9px 10px; max-height: 120px; color: var(--text-primary); }
.send-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#7c3aed,#ec4899); flex-shrink: 0; align-self: flex-end; transition: transform .2s var(--spring); }
.send-btn:active { transform: scale(.88); }
.send-btn:disabled { opacity: .45; }
.send-btn svg { width: 20px; height: 20px; }
.key-cta { text-align: center; }

/* Option cards (générateur IA) */
.opt-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.opt { appearance: none; cursor: pointer; padding: 9px 13px; border-radius: 14px; font-weight: 700; font-size: .82rem; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.72); color: var(--text-secondary); transition: all .22s var(--spring); }
.opt.on { background: #101624; color: #fff; border-color: #101624; }

/* ---------- Effets flottants ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.float-xp { position: absolute; font-weight: 900; font-size: 1rem; color: var(--accent); text-shadow: 0 2px 10px rgba(255,255,255,.9); animation: floatUp 1.2s var(--ease-out) forwards; white-space: nowrap; transform: translate(-50%, -50%); }
.float-xp.gold { color: #b07800; font-size: 1.2rem; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -70%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.toast { z-index: 96; bottom: calc(100px + var(--safe-bottom)); }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pop-in { animation: popIn .5s var(--spring) both; }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }

/* ---------- Onboarding ---------- */
.ob-step { display: flex; flex-direction: column; gap: 14px; animation: viewInRight .45s var(--ease-out) both; }
.ob-hero { text-align: center; padding: 10px 0 0; }
.ob-hero img { width: 84px; height: 84px; border-radius: 26px; box-shadow: 0 18px 40px var(--accent-glow); animation: bob 3s ease-in-out infinite; }
.ob-hero h2 { margin: 14px 0 4px; font-size: 1.6rem; font-weight: 900; letter-spacing: -.04em; }
.ob-hero p { margin: 0; color: var(--text-secondary); }
.ob-dots { display: flex; justify-content: center; gap: 6px; }
.ob-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(16,22,36,.15); transition: all .3s var(--spring); }
.ob-dots i.on { width: 22px; background: var(--accent); }

/* ---------- Petits écrans ---------- */
@media (max-width: 370px) {
  .lib-grid { gap: 8px; }
  .wset, .wset-hdr { grid-template-columns: 26px 44px 1fr 1fr 42px; gap: 4px; }
  .check-btn { width: 42px; }
  .dock-btn span:not(.dock-icon):not(.dock-plus-inner) { font-size: .58rem; }
  .hbar { grid-template-columns: 76px 1fr 30px; }
}
@media (hover: hover) {
  .ex-card:hover { box-shadow: 0 12px 26px rgba(20,35,70,.1); transform: translateY(-2px); }
}

/* Grilles : autoriser le rétrécissement des éléments à texte long */
.action-row > *, .sum-grid > *, .mini-stats > *, .form-grid > * { min-width: 0; }
.sess-item { min-width: 0; }
.macros-grid > * { min-width: 0; }
.rest-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 370px) {
  .macros-grid { gap: 7px; }
  .macro-capsule { padding: 10px 8px; }
  .macro-numbers { font-size: .7rem; }
  .macro-numbers strong { font-size: .9rem; }
  .rest-bar { gap: 8px; padding: 8px 10px; }
  .rest-ring { width: 46px; height: 46px; }
  .rest-bar .icon-btn.sm { width: 30px; height: 30px; font-size: .72rem; }
  .ring-wrap { width: 120px; height: 120px; }
  .remaining-big { font-size: 1.35rem; }
}

/* Fiche exercice : « à quoi ça sert » + consignes */
.why-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: rgba(var(--accent-rgb),.07); border: 1px solid rgba(var(--accent-rgb),.16); }
.why-box span { font-size: 1.2rem; line-height: 1.3; }
.why-box p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--text-primary); }
.howto-box h4, .ai-box h4 { margin: 14px 0 6px; font-size: .9rem; }
.howto-box ul { margin: 0; padding-left: 18px; font-size: .88rem; color: var(--text-secondary); line-height: 1.45; }
.howto-box li { margin-bottom: 4px; }

/* ===================== Barre de menu Liquid Glass (codes iOS 26/27) ===================== */
.bottom-dock {
  touch-action: none; user-select: none; -webkit-user-select: none; overflow: visible;
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.42));
  backdrop-filter: blur(22px) saturate(190%) brightness(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(190%) brightness(1.04);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow:
    0 18px 40px rgba(16,28,58,.16), 0 3px 10px rgba(16,28,58,.07),
    inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.35),
    inset 0 0 0 .5px rgba(255,255,255,.4);
}
/* Pastille de sélection au repos : verre neutre, icône teintée (comme Apple) */
.dock-slider { background: none !important; box-shadow: none !important; overflow: visible; transition: transform .55s cubic-bezier(.3,1.35,.5,1), opacity .25s ease; will-change: transform; }
.dock-glass {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(16,22,36,.075), rgba(16,22,36,.045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(255,255,255,.25);
  transform: scale(1, 1);
  transition: transform .45s cubic-bezier(.3,1.4,.5,1), background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
  will-change: transform;
}
.dock-glass::before, .dock-glass::after { content: ""; position: absolute; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
/* reflet spéculaire en croissant (haut) */
.dock-glass::before { inset: 3% 10% 52% 10%; background: radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); }
/* reflet de fond (bas) */
.dock-glass::after { inset: 62% 18% 6% 18%; background: radial-gradient(100% 100% at 50% 100%, rgba(255,255,255,.55), rgba(255,255,255,0) 75%); }
.dock-btn.active { color: var(--accent) !important; }
.dock-btn.active .dock-icon svg { stroke-width: 2.4; }

/* Lentille Liquid Glass pendant le toucher : transparente, déborde de la barre */
.bottom-dock.lensing .dock-slider { transition: opacity .2s ease; }
.bottom-dock.lensing .dock-glass {
  transition: background .2s ease, box-shadow .2s ease;
  background:
    radial-gradient(140% 100% at 50% 0%, rgba(255,255,255,.28), rgba(255,255,255,.05) 55%, rgba(255,255,255,.12) 100%);
  backdrop-filter: blur(.6px) saturate(200%) brightness(1.1) contrast(1.06);
  -webkit-backdrop-filter: blur(.6px) saturate(200%) brightness(1.1) contrast(1.06);
  box-shadow:
    0 12px 30px rgba(16,28,58,.20), 0 2px 6px rgba(16,28,58,.10),
    inset 0 1.5px .5px rgba(255,255,255,1),
    inset 0 -1.5px 1px rgba(255,255,255,.7),
    inset 1.5px 0 1px rgba(255,255,255,.6),
    inset -1.5px 0 1px rgba(255,255,255,.6),
    inset 0 0 16px rgba(255,255,255,.45),
    inset 3px 0 5px rgba(255,70,130,.10),
    inset -3px 0 5px rgba(40,160,255,.14);
}
.bottom-dock.lensing .dock-glass::before, .bottom-dock.lensing .dock-glass::after { opacity: 1; }
.bottom-dock.lensing .dock-btn.active { color: var(--text-secondary) !important; }
.bottom-dock.lensing .dock-btn { transition: color .15s ease, transform .3s cubic-bezier(.3,1.4,.5,1); }
.bottom-dock.lensing .dock-btn.lens { color: var(--accent) !important; transform: scale(1.22) translateY(-1px); }
.bottom-dock.lensing .dock-btn.lens .dock-plus-inner { transform: scale(.9); }
.dock-glass.settle { animation: glassSettle .38s cubic-bezier(.28,1.28,.45,1); }
@keyframes glassSettle { 0% { transform: scale(1.06, .93); } 40% { transform: scale(.97, 1.04); } 72% { transform: scale(1.015, .99); } 100% { transform: scale(1, 1); } }
.bottom-dock.on-plus .dock-slider { opacity: 0; }

/* ===================== Nouveaux éléments Muscu ===================== */
.guide-card { appearance: none; border: 0; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-card); transition: transform .18s var(--spring); }
.guide-card:active { transform: scale(.98); }
.guide-ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(145deg,#eef4ff,#dfe9ff); flex-shrink: 0; }
.guide-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guide-txt b { font-size: 1rem; }
.guide-txt span { font-size: .8rem; color: var(--text-secondary); line-height: 1.35; }
.guide-chev { font-size: 1.4rem; color: var(--text-muted); flex-shrink: 0; }
.guide-p { margin: 0 0 10px; font-size: .9rem; line-height: 1.5; color: var(--text-secondary); }
.guide-p:last-child { margin-bottom: 0; }
.guide-item summary span:first-child { line-height: 1.3; padding-right: 10px; }

.template-item { position: relative; }
.template-item > div { flex: 1; min-width: 0; }
.tpl-ico { font-size: 1.5rem; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.85); flex-shrink: 0; }
.template-item.recommended { background: linear-gradient(145deg, rgba(5,196,133,.12), rgba(255,255,255,.75)); border-color: rgba(5,196,133,.3); }
.reco-badge { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 99px; background: rgba(5,196,133,.15); color: #037a52; font-style: normal; font-size: .7rem; font-weight: 800; }
.tpl-ex-list { display: flex; flex-direction: column; gap: 8px; }
.tpl-ex { appearance: none; border: 0; background: rgba(255,255,255,.6); border-radius: 16px; padding: 8px; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.tpl-ex .ex-media { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.tpl-ex span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tpl-ex b { font-size: .86rem; line-height: 1.2; }
.tpl-ex small { font-size: .74rem; color: var(--text-secondary); font-weight: 600; }
.tpl-ex i { font-style: normal; color: var(--text-muted); font-size: 1rem; }

.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-btn { appearance: none; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; padding: 14px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: transform .16s var(--spring); }
.tool-btn:active { transform: scale(.97); }
.tool-btn span { font-size: 1.5rem; }
.tool-btn b { font-size: .86rem; line-height: 1.2; }
.tool-btn small { font-size: .72rem; color: var(--text-secondary); }

.rec-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 4px; }
.rec-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.rec-ring { --p: 100; --c: #05c485; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(16,22,36,.08) 0); position: relative; }
.rec-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.rec-ring span { position: relative; font-size: 1.15rem; }
.rec-cell b { font-size: .7rem; line-height: 1.15; }
.rec-cell small { font-size: .62rem; font-weight: 800; color: var(--text-muted); line-height: 1.1; }
.rec-tired .rec-ring { --c: var(--accent); } .rec-tired small { color: var(--accent-deep); }
.rec-recovering .rec-ring { --c: #ff9f0a; } .rec-recovering small { color: #b55900; }
.rec-almost .rec-ring { --c: #a3c934; } .rec-almost small { color: #5b7a00; }
.rec-ready .rec-ring { --c: #05c485; } .rec-ready small { color: #037a52; }

.deload-card { background: linear-gradient(145deg, rgba(138,92,246,.1), rgba(255,255,255,.7)); }

.plate-viz { display: flex; align-items: center; height: 130px; margin: 6px 0 4px; padding: 0 6px; }
.pv-bar { width: 70px; height: 14px; border-radius: 4px 0 0 4px; background: linear-gradient(180deg,#d4d7de,#9ea3ad); flex-shrink: 0; }
.pv-sleeve { display: flex; align-items: center; gap: 3px; height: 100%; padding-left: 3px; border-left: 6px solid #6b7080; }
.pv-sleeve i { display: block; width: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset 2px 0 0 rgba(255,255,255,.4); animation: plateIn .45s var(--spring) both; }
.pv-sleeve i:nth-child(2) { animation-delay: .05s; } .pv-sleeve i:nth-child(3) { animation-delay: .1s; } .pv-sleeve i:nth-child(4) { animation-delay: .15s; } .pv-sleeve i:nth-child(n+5) { animation-delay: .2s; }
@keyframes plateIn { from { transform: translateX(30px); opacity: 0; } }
.plate-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* Séance : outils, ressenti, suggestions */
.wx-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-chip { appearance: none; cursor: pointer; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.75); padding: 6px 11px; border-radius: 99px; font-size: .74rem; font-weight: 800; color: var(--text-secondary); transition: transform .16s var(--spring); }
.mini-chip:active { transform: scale(.94); }
.why-line { flex-basis: 100%; font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.sugg-chip.down { background: rgba(255,159,10,.16); color: #b55900; }
.feel-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 18px; background: rgba(255,255,255,.7); animation: cardRise .4s var(--ease-out) both; }
.feel-row > span { font-size: .8rem; font-weight: 800; color: var(--text-secondary); }
.feel-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.feel-btn { appearance: none; cursor: pointer; border: 1.5px solid rgba(16,22,36,.08); background: #fff; border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: .74rem; font-weight: 800; color: var(--text-secondary); transition: transform .2s var(--spring), border-color .2s, background .2s; }
.feel-btn b { font-size: 1.35rem; line-height: 1.1; }
.feel-btn:active { transform: scale(.93); }
.feel-btn.on { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); color: var(--accent); transform: scale(1.03); }
.feel-row.answered .feel-btn:not(.on) { opacity: .55; }

/* Résumé : comparaison */
.compare-card { border-radius: 22px; padding: 14px; animation: cardRise .5s var(--ease-out) .2s both; }
.compare-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 800; font-size: .88rem; }
.compare-head small { color: var(--text-muted); font-size: .72rem; }
.compare-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; text-align: center; }
.compare-row b { display: block; font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.compare-row span { font-size: .66rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.pos { color: #037a52; } .neg { color: var(--accent-deep); }

/* Mensurations */
.measure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.measure-cell { border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.measure-cell span { font-size: .72rem; font-weight: 700; color: var(--text-secondary); }
.measure-cell b { font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.measure-cell small { font-size: .72rem; font-weight: 800; }

/* Petites corrections d'affichage */
.sum-tile span { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.mini-stat span { font-size: .62rem; letter-spacing: .02em; }
.streak-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 370px) { .rec-grid { grid-template-columns: repeat(4, 1fr); } .tools-grid { grid-template-columns: 1fr; } }
.template-item > div > span { display: block; line-height: 1.35; margin-top: 2px; }
.template-item .tpl-ico { font-size: 1.4rem; color: inherit; }
.template-item .guide-chev { font-size: 1.4rem; color: var(--text-muted); }
/* Toast : largeur naturelle (left:50% limitait la largeur à la moitié de l'écran) */
.toast { width: max-content; max-width: calc(100% - 32px); line-height: 1.35; }
.mini-stat span { text-transform: none; font-size: .7rem; letter-spacing: 0; }

.streak-row > * { min-width: 0; }

/* ===================== Barre d'onglets (4) + bouton d'action séparé — HIG Apple ===================== */
.bottom-dock-wrap { gap: 10px; align-items: center; padding: 0 16px; }
.bottom-dock { grid-template-columns: repeat(4, 1fr); max-width: 330px; flex: 1; transition: transform .35s var(--spring), padding .35s var(--ease-out); }
.dock-slider { width: calc((100% - 12px) / 4); }
.dock-btn { font-size: .66rem; }
.dock-btn > span:not(.dock-icon) { display: block; max-height: 1.2em; overflow: hidden; transition: max-height .3s var(--ease-out), opacity .2s ease; }
.dock-fab {
  pointer-events: auto; appearance: none; border: 0; cursor: pointer; flex-shrink: 0;
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, rgba(var(--accent-rgb),.96), rgba(var(--accent-rgb),.92) 55%, rgba(var(--accent-rgb),.94));
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 14px 30px rgba(var(--accent-rgb),.38), 0 3px 8px rgba(16,28,58,.12),
    inset 0 1.5px 1px rgba(255,255,255,.65), inset 0 -2px 6px rgba(140,30,0,.25), inset 0 0 0 1px rgba(255,255,255,.25);
  transition: transform .45s cubic-bezier(.3,1.4,.5,1), width .35s var(--ease-out), height .35s var(--ease-out);
  position: relative; overflow: hidden;
}
.dock-fab::before { content: ""; position: absolute; inset: 4% 16% 52% 16%; border-radius: 50%; background: radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.7), rgba(255,255,255,0) 70%); pointer-events: none; }
.dock-fab svg { width: 26px; height: 26px; position: relative; transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.dock-fab:active { transform: scale(.9); }
.dock-fab.active svg { transform: rotate(45deg); }

/* Réduction au défilement (comme iOS) */
.bottom-dock-wrap.minimized .bottom-dock { padding: 4px; }
.bottom-dock-wrap.minimized .dock-btn { padding: 8px 2px; gap: 0; }
.bottom-dock-wrap.minimized .dock-btn > span:not(.dock-icon) { max-height: 0; opacity: 0; }
.bottom-dock-wrap.minimized .dock-slider { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); }
.bottom-dock-wrap.minimized .dock-fab { width: 46px; height: 46px; }
.bottom-dock-wrap.minimized .dock-fab svg { width: 21px; height: 21px; }

/* Accessibilité : réglages iOS « Réduire la transparence » et « Augmenter le contraste » */
@media (prefers-reduced-transparency: reduce) {
  .bottom-dock, .liquid-surface, .liquid-surface-strong, .sheet { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: #f7f9fd !important; }
  .bottom-dock.lensing .dock-glass { backdrop-filter: none !important; background: rgba(16,22,36,.08) !important; }
}
@media (prefers-contrast: more) {
  .bottom-dock { border-color: rgba(16,22,36,.25); background: rgba(255,255,255,.92); }
  .dock-btn { color: var(--text-primary); }
  .dock-glass { box-shadow: inset 0 0 0 1.5px rgba(16,22,36,.35) !important; }
}

/* =====================================================================
   v3.2 — Plus de transparence (Liquid Glass « regular » d'Apple)
   ===================================================================== */
:root {
  --glass-bg: linear-gradient(150deg, rgba(255,255,255,.50), rgba(255,255,255,.24));
  --glass-strong-bg: linear-gradient(150deg, rgba(255,255,255,.66), rgba(255,255,255,.42));
  --glass-inner-bg: rgba(255,255,255,.40);
  --glass-border: rgba(255,255,255,.62);
  --glass-shadow:
    0 14px 36px rgba(23,41,82,.09),
    0 2px 8px rgba(23,41,82,.04),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(255,255,255,.25);
}
.liquid-surface { backdrop-filter: blur(30px) saturate(200%) brightness(1.03); -webkit-backdrop-filter: blur(30px) saturate(200%) brightness(1.03); }
.liquid-surface::before { background: linear-gradient(125deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.06) 36%, transparent 60%); }
.liquid-surface-strong { backdrop-filter: blur(34px) saturate(200%); -webkit-backdrop-filter: blur(34px) saturate(200%); border-color: rgba(255,255,255,.7); }
.liquid-inner { border-color: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.75); }
.liquid-btn, .liquid-pill, .fchip, .mini-chip, .rest-chip, .opt, .emoji-opt, .icon-btn, .unit-toggle button.on, .seg-slider {
  background: rgba(255,255,255,.48);
  border-color: rgba(255,255,255,.7);
  backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
}
.unit-toggle, .seg-tabs { background: rgba(16,22,36,.05); }
.seg-slider { background: rgba(255,255,255,.75); }
.glass-input, .num-input { background: rgba(255,255,255,.5); border-color: rgba(255,255,255,.7); }
.glass-input:focus, .num-input:focus { background: rgba(255,255,255,.85); }
.ex-card, .template-item, .tool-btn, .sess-item, .badge-cell, .tpl-ex { background: rgba(255,255,255,.42); border-color: rgba(255,255,255,.65); }
.quest-icon, .tpl-ico, .sess-date { background: rgba(255,255,255,.6); }
.feel-btn { background: rgba(255,255,255,.55); }
.feel-row, .msg.model { background: rgba(255,255,255,.55); }

/* Fiches : verre translucide très flouté ; plus opaques en plein écran (règle Apple) */
.sheet {
  background: linear-gradient(170deg, rgba(250,252,255,.74), rgba(238,244,253,.70));
  backdrop-filter: blur(44px) saturate(180%); -webkit-backdrop-filter: blur(44px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,.75);
}
.sheet.full { background: linear-gradient(170deg, rgba(250,252,255,.9), rgba(238,244,253,.88)); }
.sheet-foot { background: rgba(255,255,255,.45); border-top-color: rgba(255,255,255,.55); }
.sheet-overlay { background: rgba(12,18,32,.22); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dialog { background: linear-gradient(150deg, rgba(255,255,255,.72), rgba(255,255,255,.5)); }

/* Barre d'onglets : verre plus clair */
.bottom-dock {
  background: linear-gradient(180deg, rgba(255,255,255,.40), rgba(255,255,255,.22));
  backdrop-filter: blur(18px) saturate(210%) brightness(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(210%) brightness(1.06);
  border-color: rgba(255,255,255,.6);
}

/* Bouton + : même verre que la barre, à plat, icône teintée (style bouton séparé iOS) */
.dock-fab {
  align-self: stretch; height: auto; width: auto; aspect-ratio: 1 / 1; min-width: 0;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(255,255,255,.40), rgba(255,255,255,.22));
  backdrop-filter: blur(18px) saturate(210%) brightness(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(210%) brightness(1.06);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 18px 40px rgba(16,28,58,.14), 0 3px 10px rgba(16,28,58,.06), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.35);
  transition: transform .45s cubic-bezier(.3,1.4,.5,1);
}
.dock-fab::before { display: none; }
.dock-fab svg { width: 24px; height: 24px; stroke-width: 2.4; }
.dock-fab:active { transform: scale(.92); background: rgba(255,255,255,.55); }
.bottom-dock-wrap.minimized .dock-fab { width: auto; height: auto; }
.bottom-dock-wrap.minimized .dock-fab svg { width: 20px; height: 20px; }

/* Effet de bord de défilement : le contenu se fond en douceur sous la barre (comme iOS) */
.scroll-edge-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(118px + var(--safe-bottom)); z-index: 29; pointer-events: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent);
  mask-image: linear-gradient(to top, #000 35%, transparent);
  background: linear-gradient(to top, rgba(238,243,252,.55), rgba(238,243,252,0));
}

/* Choix de l'ambiance sonore */
.pack-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pack { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 18px; border: 1.5px solid rgba(255,255,255,.65); background: rgba(255,255,255,.42); cursor: pointer; transition: border-color .2s, background .2s, transform .18s var(--spring); }
.pack:active { transform: scale(.98); }
.pack.on { border-color: var(--accent); background: rgba(var(--accent-rgb),.07); }
.pack-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255,255,255,.65); flex-shrink: 0; }
.pack-txt { flex: 1; min-width: 0; }
.pack-txt b { display: block; font-size: .9rem; }
.pack-txt span { font-size: .75rem; color: var(--text-secondary); line-height: 1.3; }
.pack-play { flex-shrink: 0; }
.pack-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(16,22,36,.2); flex-shrink: 0; display: grid; place-items: center; }
.pack.on .pack-radio { border-color: var(--accent); }
.pack.on .pack-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

@media (prefers-reduced-transparency: reduce) {
  .scroll-edge-bottom { display: none; }
  .dock-fab, .sheet, .dialog { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: #f7f9fd !important; }
}
/* Bouton + : cercle de la même hauteur que la barre (66 px déployée, 47 px réduite) */
.dock-fab { align-self: center; aspect-ratio: auto; width: 66px; height: 66px; border-radius: 50%; transition: transform .45s cubic-bezier(.3,1.4,.5,1), width .35s var(--ease-out), height .35s var(--ease-out); }
.bottom-dock-wrap.minimized .dock-fab { width: 47px; height: 47px; }
.pack-txt span { display: block; margin-top: 1px; }

/* =====================================================================
   Liquid Glass interactif — toute l'app (glass.js)
   ===================================================================== */
.lg-i { --gx: 50%; --gy: 50%; --tx: 0px; --ty: 0px; --lg-s: 1.05; isolation: isolate; }
.ex-card, .template-item, .tool-btn, .sess-item, .tpl-ex, .guide-card, .pack, .quest, .rec-item, .badge-cell, .sum-tile { --lg-s: 1.03; }
.icon-btn, .btn-icon-sm, .check-btn, .fchip, .mini-chip, .rest-chip, .opt, .emoji-opt, .feel-btn, .qp, .level-chip, .dock-fab, .send-btn, .sugg-chip, .set-num, .unit-toggle button, .chip { --lg-s: 1.12; }
.lg-i::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.7), rgba(255,255,255,.22) 32%, rgba(255,255,255,0) 62%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.85), inset 0 1px 8px rgba(255,255,255,.55), 0 10px 26px rgba(16,28,58,.14);
}
.lg-i.lg-press::after { opacity: 1; transition: opacity .1s ease; }
.lg-i.lg-press {
  transform: translate(var(--tx), var(--ty)) scale(var(--lg-s)) !important;
  transition: transform .28s cubic-bezier(.3,1.5,.5,1) !important;
  z-index: 5;
}
.lg-i.lg-release { animation: lgRelease .6s cubic-bezier(.3,1.2,.5,1); }
@keyframes lgRelease {
  0% { transform: scale(var(--lg-s)); }
  40% { transform: scale(calc(2 - var(--lg-s) + (var(--lg-s) - 1) * .4)); }
  70% { transform: scale(calc(1 + (var(--lg-s) - 1) * .25)); }
  100% { transform: scale(1); }
}
/* Les boutons colorés (orange, violet, sombre) : reflet plus discret */
.btn-flame.lg-i::after, .btn-ai.lg-i::after, .btn-dark.lg-i::after, .btn-gold.lg-i::after {
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.45), rgba(255,255,255,.12) 34%, rgba(255,255,255,0) 62%);
}
/* Les cases cochées gardent leur état */
.wset.done .check-btn.lg-i { animation: none; }

/* Interrupteurs : la pastille devient une goutte de verre pendant le toucher (iOS 26) */
.switch::after { transition: transform .35s cubic-bezier(.3,1.4,.5,1), background .2s ease, box-shadow .2s ease; }
.switch:active::after {
  transform: scale(1.35, 1.15);
  background: radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.9), rgba(255,255,255,.35));
  box-shadow: 0 4px 14px rgba(16,28,58,.25), inset 0 0 0 1px rgba(255,255,255,.9), inset 0 -2px 4px rgba(16,28,58,.08);
}
.switch:checked:active::after { transform: translateX(20px) scale(1.35, 1.15); }

/* Contrôle segmenté : lentille glissable (mêmes codes que la barre d'onglets) */
.seg-tabs { overflow: visible; }
.seg-slider { transition: transform .5s cubic-bezier(.3,1.35,.5,1), background .2s ease, box-shadow .2s ease; will-change: transform; }
.seg-tabs.lensing .seg-slider {
  transition: background .2s ease, box-shadow .2s ease;
  background: radial-gradient(140% 100% at 50% 0%, rgba(255,255,255,.4), rgba(255,255,255,.08) 55%, rgba(255,255,255,.18));
  backdrop-filter: blur(.6px) saturate(200%) brightness(1.08); -webkit-backdrop-filter: blur(.6px) saturate(200%) brightness(1.08);
  box-shadow: 0 10px 26px rgba(16,28,58,.18), inset 0 1.5px .5px #fff, inset 0 -1.5px 1px rgba(255,255,255,.7),
    inset 1.5px 0 1px rgba(255,255,255,.6), inset -1.5px 0 1px rgba(255,255,255,.6), inset 0 0 14px rgba(255,255,255,.45),
    inset 3px 0 5px rgba(255,70,130,.08), inset -3px 0 5px rgba(40,160,255,.12);
}
.seg-tabs.lensing .seg-btn { transition: color .15s ease, transform .3s cubic-bezier(.3,1.4,.5,1); }
.seg-tabs.lensing .seg-btn.active { color: var(--text-secondary); }
.seg-tabs.lensing .seg-btn.lens { color: var(--accent); transform: scale(1.1); }

@media (prefers-reduced-motion: reduce) {
  .lg-i.lg-press { transform: none !important; }
  .lg-i.lg-release { animation: none; }
}

/* =====================================================================
   v3.3 — Design iOS 27 : verre dépoli partout, lisibilité d'abord
   ===================================================================== */
/* Fond un peu plus coloré pour que le verre se « voie », sans gêner la lecture */
.orb-orange { background: radial-gradient(circle, rgba(var(--accent-rgb),.62) 0%, rgba(var(--flame3-rgb),.28) 55%, transparent 75%); }
.orb-sky { background: radial-gradient(circle, rgba(10,132,255,.5) 0%, rgba(56,189,248,.26) 55%, transparent 75%); }
.orb-violet { background: radial-gradient(circle, rgba(138,92,246,.42) 0%, rgba(255,114,182,.22) 55%, transparent 75%); }

/* Verre « regular » d'iOS 27 : un peu plus laiteux pour garantir la lisibilité du texte */
:root {
  --glass-bg: linear-gradient(150deg, rgba(255,255,255,.58), rgba(255,255,255,.34));
  --glass-inner-bg: rgba(255,255,255,.46);
  --vibrant-secondary: #3f4a61;
}
.liquid-surface { backdrop-filter: blur(34px) saturate(190%) brightness(1.04); -webkit-backdrop-filter: blur(34px) saturate(190%) brightness(1.04); }
.sub-text, .coach-hint, .micro-note, .meal-meta, .prog-meta, .wx-sub, .quest-xp, .tpl-ex small, .guide-txt span { color: var(--vibrant-secondary); }

/* En-tête : reste en haut, se compacte au défilement, contenu flouté dessous (scroll edge effect) */
.top-bar {
  position: sticky; top: 0; z-index: 28;
  margin: calc(-14px - var(--safe-top)) -16px 18px; padding: calc(14px + var(--safe-top)) 18px 8px;
  transition: padding .3s var(--ease-out);
}
.scroll-edge-top {
  position: fixed; left: 0; right: 0; top: 0; z-index: 27; pointer-events: none;
  height: calc(96px + var(--safe-top));
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  background: linear-gradient(to bottom, rgba(240,245,253,.72), rgba(240,245,253,0));
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  opacity: 0; transition: opacity .3s ease;
}
html.scrolled .scroll-edge-top { opacity: 1; }
.app-title, .brand-mini-icon, .eyebrow { transition: all .3s var(--ease-out); }
html.scrolled .top-bar { padding-top: calc(8px + var(--safe-top)); padding-bottom: 6px; }
html.scrolled .app-title { font-size: 1.12rem; }
html.scrolled .brand-mini-icon { width: 32px; height: 32px; border-radius: 10px; }
html.scrolled .eyebrow { font-size: .62rem; }
.level-chip { background: rgba(255,255,255,.5); backdrop-filter: blur(20px) saturate(190%); -webkit-backdrop-filter: blur(20px) saturate(190%); border: 1px solid rgba(255,255,255,.7); }

/* Boutons : verre teinté plat (glassProminent), sans relief 3D */
.btn-flame {
  background: linear-gradient(180deg, rgba(var(--accent-rgb),.94), rgba(var(--accent-rgb),.94));
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb),.22), inset 0 1px 0 rgba(255,255,255,.38), inset 0 0 0 .5px rgba(255,255,255,.25);
}
.btn-ai {
  background: linear-gradient(180deg, rgba(132,72,240,.92), rgba(120,58,232,.92));
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 6px 16px rgba(124,58,237,.2), inset 0 1px 0 rgba(255,255,255,.32), inset 0 0 0 .5px rgba(255,255,255,.2);
}
.btn-dark {
  background: rgba(16,22,36,.84);
  backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 6px 16px rgba(16,22,36,.18), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-gold { background: linear-gradient(180deg, rgba(251,191,36,.95), rgba(245,166,10,.95)); box-shadow: 0 6px 16px rgba(245,158,11,.22), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-danger-ghost { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.xp-medal, .prog-emoji { box-shadow: 0 6px 14px rgba(var(--accent-rgb),.18), inset 0 1px 0 rgba(255,255,255,.45); }
.dock-slider, .seg-slider { box-shadow: none; }

/* Carte « Prochaine séance » : verre sombre dépoli sur la photo (texte blanc lisible) */
.training-today { background: transparent; border-color: rgba(255,255,255,.35); }
.tt-hero-bg { background: linear-gradient(140deg, rgba(16,22,36,.86) 0%, rgba(42,26,18,.8) 60%, rgba(var(--accent-rgb),.55) 130%); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.tt-hero-img { opacity: .3; }
.btn-glass-dark { background: rgba(255,255,255,.16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.28); }

/* Toasts, bannières, dialogues, champ du coach, minuteur : verre dépoli lisible */
.toast, .reminder-banner, .rest-bar, .session-pill, .chat-input {
  background: linear-gradient(150deg, rgba(255,255,255,.72), rgba(255,255,255,.55));
  backdrop-filter: blur(30px) saturate(190%); -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid rgba(255,255,255,.75);
}
.dialog { backdrop-filter: blur(40px) saturate(190%); -webkit-backdrop-filter: blur(40px) saturate(190%); }
.msg.model { backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
.msg.user { background: linear-gradient(180deg, rgba(var(--accent-rgb),.94), rgba(var(--accent-rgb),.94)); }

/* Fiche plein écran (séance) : verre plus opaque, en-tête en verre */
.session-sheet .ws-head { background: transparent; }
.wx { backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%); }

@media (prefers-reduced-transparency: reduce) {
  .scroll-edge-top { background: #f0f5fd; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .toast, .reminder-banner, .rest-bar, .session-pill, .chat-input, .btn-flame, .btn-ai, .btn-dark, .tt-hero-bg { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .toast, .reminder-banner, .rest-bar, .session-pill, .chat-input { background: #fbfcfe; }
}
html, body { overflow-x: clip; }
.app-shell { z-index: auto; }

/* ---------- Orange vif d'origine conservé ; lisibilité renforcée par le poids et une ombre de texte ---------- */
.btn-flame, .msg.user {
  background: linear-gradient(135deg, var(--flame-1) 0%, var(--flame-2) 60%, var(--flame-3) 100%);
}
.btn-flame { font-weight: 800; text-shadow: 0 1px 1.5px rgba(var(--accent-deep-rgb),.45), 0 0 1px rgba(var(--accent-deep-rgb),.3); }
.msg.user { text-shadow: 0 1px 1px rgba(var(--accent-deep-rgb),.35); }
.fchip.mass.on { text-shadow: 0 1px 1px rgba(var(--accent-deep-rgb),.4); }
.pulse-badge { color: var(--accent-deep); }
.ex-card .star { color: var(--accent-deep); }
.badge-ai { color: #02663f; }

/* =====================================================================
   Couleurs de l'app (Profil › Apparence) — chaque thème redéfinit l'accent
   ===================================================================== */
:root, html[data-accent="flame"] {
  --flame-1: #ff4d00; --flame-2: #ff7e24; --flame-3: #ffb347;
  --accent: #ff5a14; --accent-rgb: 255, 90, 20; --flame3-rgb: 255, 168, 76;
  --accent-deep: #c93d00; --accent-deep-rgb: 140, 40, 0;
  --accent-soft: #ffeede; --accent-light: #ffb38a;
  --accent-glow: rgba(255, 90, 20, .34);
}
html[data-accent="ocean"] {
  --flame-1: #0a6cff; --flame-2: #2f8bff; --flame-3: #63c6ff;
  --accent: #0a6cff; --accent-rgb: 10, 108, 255; --flame3-rgb: 99, 198, 255;
  --accent-deep: #0050c8; --accent-deep-rgb: 0, 40, 110;
  --accent-soft: #e3efff; --accent-light: #9cc8ff;
  --accent-glow: rgba(10, 108, 255, .32);
}
html[data-accent="violet"] {
  --flame-1: #7c3aed; --flame-2: #9b5cf6; --flame-3: #c9a6ff;
  --accent: #7c3aed; --accent-rgb: 124, 58, 237; --flame3-rgb: 201, 166, 255;
  --accent-deep: #5b21b6; --accent-deep-rgb: 60, 20, 120;
  --accent-soft: #f0e8ff; --accent-light: #c9a6ff;
  --accent-glow: rgba(124, 58, 237, .32);
}
html[data-accent="emerald"] {
  --flame-1: #059669; --flame-2: #10b981; --flame-3: #6ee7b7;
  --accent: #059669; --accent-rgb: 5, 150, 105; --flame3-rgb: 110, 231, 183;
  --accent-deep: #047857; --accent-deep-rgb: 0, 70, 45;
  --accent-soft: #ddf7ec; --accent-light: #8ee9c6;
  --accent-glow: rgba(5, 150, 105, .3);
}
html[data-accent="raspberry"] {
  --flame-1: #e11d74; --flame-2: #f43f8e; --flame-3: #ff8fc0;
  --accent: #e11d74; --accent-rgb: 225, 29, 116; --flame3-rgb: 255, 143, 192;
  --accent-deep: #be185d; --accent-deep-rgb: 110, 10, 55;
  --accent-soft: #ffe4f0; --accent-light: #ff9cc8;
  --accent-glow: rgba(225, 29, 116, .3);
}
html[data-accent="graphite"] {
  --flame-1: #1f2937; --flame-2: #4b5563; --flame-3: #9ca3af;
  --accent: #1f2937; --accent-rgb: 31, 41, 55; --flame3-rgb: 156, 163, 175;
  --accent-deep: #111827; --accent-deep-rgb: 0, 0, 0;
  --accent-soft: #eceef2; --accent-light: #b6bcc6;
  --accent-glow: rgba(31, 41, 55, .25);
}

/* Sélecteur de couleur */
.accent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.accent-opt { appearance: none; cursor: pointer; font: inherit; color: var(--text-primary); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 20px; border: 1.5px solid rgba(255,255,255,.65); background: rgba(255,255,255,.42); transition: border-color .2s, transform .2s var(--spring), background .2s; }
.accent-opt.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.accent-swatch { width: 40px; height: 40px; border-radius: 50%; position: relative; box-shadow: 0 6px 14px rgba(16,22,36,.16), inset 0 1px 0 rgba(255,255,255,.5); }
.accent-opt.on .accent-swatch::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.05rem; text-shadow: 0 1px 2px rgba(0,0,0,.35); animation: popIn .35s var(--spring); }
.accent-opt b { font-size: .78rem; }

/* ---------- Laisser déborder les effets Liquid Glass (agrandissement, halo, lentille) ---------- */
.liquid-surface { overflow: visible; }
.liquid-surface::before { border-radius: inherit; }
/* sauf les cartes qui contiennent une image ou une vague à découper */
.hydration-card, .training-today, .tt-hero, .ex-hero, .reminder-banner { overflow: hidden; }
/* rangées défilantes : marge intérieure pour que l'agrandissement et le halo ne soient pas coupés */
.chip-scroll, .quick-prompts, .emoji-row { padding: 8px 6px 12px; margin: -6px -6px -6px; scroll-padding-inline: 6px; }
.prog-thumbs { overflow: visible; }
.lib-grid, .badge-grid, .template-grid, .tools-grid, .rec-grid, .sum-grid { overflow: visible; }
.chip-scroll, .quick-prompts, .emoji-row { padding: 8px 12px 12px; margin: -6px -12px -6px; scroll-padding-inline: 12px; }
.fchip, .qp, .chip, .opt { --lg-s: 1.07; }
/* Puces sélectionnées : verre teinté (plus dense que les autres, mais translucide) */
.fchip.on, .opt.on, .rest-chip.on { background: rgba(16,22,36,.82); border-color: rgba(255,255,255,.18); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); }
.fchip.mass.on { background: linear-gradient(135deg, rgba(var(--accent-rgb), .9), rgba(var(--flame3-rgb), .88)); }

/* ---------- Position de la barre d'onglets comme sur iOS 26/27 ----------
   Sur iPhone avec barre d'accueil (safe-area ≈ 34 pt), la barre flottante s'arrête juste
   au-dessus de l'indicateur d'accueil (~20 pt du bas) au lieu de 14 pt AU-DESSUS de la zone sûre. */
:root {
  --dock-bottom: max(12px, calc(var(--safe-bottom) - 14px));
  --dock-h: 66px;
  --above-dock: calc(var(--dock-bottom) + var(--dock-h) + 12px);
}
.bottom-dock-wrap { bottom: var(--dock-bottom); }
.session-pill { bottom: var(--above-dock); }
.toast { bottom: var(--above-dock); }
.chat-input { bottom: var(--above-dock); }
.app-shell { padding-bottom: calc(var(--above-dock) + 24px); }
.scroll-edge-bottom { height: calc(var(--dock-bottom) + var(--dock-h) + 40px); }


/* =====================================================================
   v3.5 — Nouveaux composants (IA 1-tap, Frigo, Vocal, Code-barres, Classiques)
   ===================================================================== */
.ai-inline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.ai-inline-row .ai-inline-btn {
  margin-top: 0;
  text-align: center;
  padding: 11px 10px;
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.voice-chip {
  padding: 5px 11px;
  font-size: .74rem;
}
.voice-live {
  background: linear-gradient(135deg, #ff3b30, #ff6b4a) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 0 0 0 rgba(255, 59, 48, .55);
  animation: voicePulse 1.1s ease-out infinite;
}
@keyframes voicePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.photo-controls-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-controls-3 .photo-btn {
  padding: 11px 6px;
  font-size: .78rem;
  white-space: nowrap;
}

.meal-fav-btn {
  padding: 6px 10px;
  font-size: .92rem;
  line-height: 1;
}
.meal-fav-btn.on {
  color: #d97706;
  background: rgba(245, 179, 1, .18);
  border-color: rgba(245, 179, 1, .38);
}

.fav-meal-row { gap: 8px; }
.fav-meal-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 18px;
  padding: 4px 6px 4px 10px;
  gap: 4px;
  max-width: 220px;
}
.fav-meal-go {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fav-meal-go b {
  font-size: .8rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 155px;
}
.fav-meal-go span {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.fav-meal-rm {
  appearance: none;
  border: 0;
  background: rgba(16, 22, 36, .06);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Cartes d'options repas 1-tap (Finir ma journée & Frigo) */
.macro-opt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.macro-opt-card {
  border-radius: 20px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.macro-opt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.macro-opt-top b { font-size: .95rem; line-height: 1.25; }
.macro-opt-items {
  margin: 0;
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.macro-opt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .76rem;
  font-weight: 800;
  color: var(--text-secondary);
}

/* Scanner code-barres */
.bc-stage {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #0d1322;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}
.bc-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bc-reticle {
  position: absolute;
  inset: 18% 12%;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 16px;
  box-shadow: 0 0 0 999px rgba(8, 12, 24, .35);
  pointer-events: none;
  overflow: hidden;
}
.bc-reticle span {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  top: 50%;
  animation: bcScan 1.8s ease-in-out infinite alternate;
}
@keyframes bcScan { from { transform: translateY(-28px); } to { transform: translateY(28px); } }
.bc-hint {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  margin: 0;
  text-align: center;
  font-size: .74rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}
.bc-card {
  border-radius: 20px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bc-head { display: flex; align-items: center; gap: 10px; }
.bc-name { display: block; font-size: .92rem; line-height: 1.25; }
.bc-macros {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(16, 22, 36, .05);
  font-size: .82rem;
  font-weight: 700;
}
.mini-chip.on {
  background: #101624;
  color: #fff;
  border-color: #101624;
}

/* =====================================================================
   MODE SOMBRE LIQUID GLASS (html[data-theme="dark"])
   ===================================================================== */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-base: #0b101d;
  --text-primary: #f4f7ff;
  --text-secondary: #b4c0d8;
  --text-muted: #8a97b2;
  --vibrant-secondary: #b4c0d8;
  --glass-bg: linear-gradient(150deg, rgba(28, 38, 62, .68), rgba(18, 25, 42, .52));
  --glass-strong-bg: linear-gradient(150deg, rgba(32, 44, 72, .84), rgba(20, 28, 48, .72));
  --glass-inner-bg: rgba(255, 255, 255, .07);
  --glass-border: rgba(255, 255, 255, .15);
  --glass-shadow:
    0 18px 44px rgba(0, 0, 0, .44),
    0 4px 12px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -1px 0 rgba(255, 255, 255, .06);
}
html[data-theme="dark"] .ambient-scene {
  background: linear-gradient(155deg, #070b15 0%, #0e1629 52%, #191124 100%);
}
html[data-theme="dark"] .orb-orange {
  background: radial-gradient(circle, rgba(var(--accent-rgb), .38) 0%, rgba(var(--flame3-rgb), .14) 55%, transparent 75%);
}
html[data-theme="dark"] .orb-sky {
  background: radial-gradient(circle, rgba(14, 165, 233, .28) 0%, rgba(56, 189, 248, .12) 55%, transparent 75%);
}
html[data-theme="dark"] .orb-violet {
  background: radial-gradient(circle, rgba(139, 92, 246, .28) 0%, rgba(236, 72, 153, .12) 55%, transparent 75%);
}
html[data-theme="dark"] .ambient-grain { opacity: .05; background-image: radial-gradient(#fff 0.7px, transparent 0.7px); }
html[data-theme="dark"] .app-title {
  background: linear-gradient(120deg, #ffffff 30%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
html[data-theme="dark"] .liquid-surface::before {
  background: linear-gradient(125deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .02) 38%, transparent 62%);
}
html[data-theme="dark"] .liquid-inner {
  border-color: rgba(255, 255, 255, .11);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .12);
}
html[data-theme="dark"] .liquid-btn,
html[data-theme="dark"] .liquid-pill,
html[data-theme="dark"] .fchip,
html[data-theme="dark"] .mini-chip,
html[data-theme="dark"] .rest-chip,
html[data-theme="dark"] .opt,
html[data-theme="dark"] .emoji-opt,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .btn-icon-sm,
html[data-theme="dark"] .level-chip {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .16);
  color: var(--text-primary);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .16);
}
html[data-theme="dark"] .ex-card,
html[data-theme="dark"] .template-item,
html[data-theme="dark"] .tool-btn,
html[data-theme="dark"] .sess-item,
html[data-theme="dark"] .badge-cell,
html[data-theme="dark"] .tpl-ex,
html[data-theme="dark"] .pack,
html[data-theme="dark"] .accent-opt,
html[data-theme="dark"] .feel-btn,
html[data-theme="dark"] .feel-row,
html[data-theme="dark"] .qp {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .13);
  color: var(--text-primary);
}
html[data-theme="dark"] .badge-cell.unlocked {
  background: linear-gradient(160deg, rgba(var(--accent-rgb), .24), rgba(255, 255, 255, .08));
}
html[data-theme="dark"] .quest-icon,
html[data-theme="dark"] .tpl-ico,
html[data-theme="dark"] .sess-date,
html[data-theme="dark"] .pack-ico,
html[data-theme="dark"] .guide-ico,
html[data-theme="dark"] .prog-emoji {
  background: rgba(255, 255, 255, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
html[data-theme="dark"] .level-chip-ring::before,
html[data-theme="dark"] .rec-ring::before {
  background: #141c2f;
}
html[data-theme="dark"] .pct-pill,
html[data-theme="dark"] .next-reminder-chip,
html[data-theme="dark"] .analysis-note,
html[data-theme="dark"] .empty-state {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
  color: var(--text-primary);
}
html[data-theme="dark"] .glass-input,
html[data-theme="dark"] .num-input {
  background: rgba(12, 18, 32, .62);
  border-color: rgba(255, 255, 255, .16);
  color: var(--text-primary);
}
html[data-theme="dark"] .glass-input:focus,
html[data-theme="dark"] .num-input:focus {
  background: rgba(16, 24, 42, .9);
}
html[data-theme="dark"] .num-input::placeholder,
html[data-theme="dark"] .glass-input::placeholder {
  color: rgba(180, 192, 216, .45);
}
html[data-theme="dark"] .ring-track,
html[data-theme="dark"] .liquid-bar,
html[data-theme="dark"] .xp-bar,
html[data-theme="dark"] .quest-bar,
html[data-theme="dark"] .ws-progress,
html[data-theme="dark"] .hbar .tr,
html[data-theme="dark"] .switch,
html[data-theme="dark"] .bc-macros,
html[data-theme="dark"] .fav-meal-rm,
html[data-theme="dark"] .set-num,
html[data-theme="dark"] .check-btn,
html[data-theme="dark"] .tag {
  background: rgba(255, 255, 255, .1);
}
html[data-theme="dark"] .ring-track { background: transparent; stroke: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .unit-toggle,
html[data-theme="dark"] .seg-tabs {
  background: rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .unit-toggle button.on,
html[data-theme="dark"] .seg-slider {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
html[data-theme="dark"] .btn-dark,
html[data-theme="dark"] .fchip.on,
html[data-theme="dark"] .opt.on,
html[data-theme="dark"] .rest-chip.on,
html[data-theme="dark"] .mini-chip.on {
  background: rgba(244, 247, 255, .92);
  color: #0b101d;
  border-color: rgba(255, 255, 255, .85);
}
html[data-theme="dark"] .fchip.mass.on {
  color: #fff;
}
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .add-set-btn {
  border-color: rgba(255, 255, 255, .2);
  color: var(--text-secondary);
}
html[data-theme="dark"] .ai-inline-btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, .24), rgba(236, 72, 153, .16));
  border-color: rgba(167, 139, 250, .35);
  color: #e9d5ff;
}
html[data-theme="dark"] .ai-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, .2), rgba(236, 72, 153, .12));
  border-color: rgba(167, 139, 250, .3);
}
html[data-theme="dark"] .qp { color: #d8b4fe; border-color: rgba(167, 139, 250, .28); }
html[data-theme="dark"] .msg.model {
  background: rgba(30, 40, 66, .82);
  border-color: rgba(255, 255, 255, .14);
  color: var(--text-primary);
}
html[data-theme="dark"] .msg.err {
  background: rgba(255, 59, 48, .18);
  color: #fca5a5;
  border-color: rgba(255, 59, 48, .35);
}
html[data-theme="dark"] .sheet {
  background: linear-gradient(170deg, rgba(18, 25, 43, .88), rgba(12, 17, 30, .9));
  border-top-color: rgba(255, 255, 255, .18);
}
html[data-theme="dark"] .sheet.full {
  background: linear-gradient(170deg, rgba(15, 21, 36, .95), rgba(10, 15, 26, .96));
}
html[data-theme="dark"] .sheet-foot {
  background: rgba(15, 21, 36, .75);
  border-top-color: rgba(255, 255, 255, .1);
}
html[data-theme="dark"] .sheet-grip { background: rgba(255, 255, 255, .24); }
html[data-theme="dark"] .dialog,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .reminder-banner,
html[data-theme="dark"] .rest-bar,
html[data-theme="dark"] .session-pill,
html[data-theme="dark"] .chat-input {
  background: linear-gradient(150deg, rgba(28, 38, 62, .86), rgba(18, 25, 42, .78));
  border-color: rgba(255, 255, 255, .18);
  color: var(--text-primary);
}
html[data-theme="dark"] .bottom-dock,
html[data-theme="dark"] .dock-fab {
  background: linear-gradient(180deg, rgba(30, 41, 68, .66), rgba(18, 26, 44, .52));
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .06);
}
html[data-theme="dark"] .dock-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
html[data-theme="dark"] .bottom-dock.lensing .dock-glass {
  background: radial-gradient(140% 100% at 50% 0%, rgba(255, 255, 255, .26), rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, .12) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .48), inset 0 1.5px .5px rgba(255, 255, 255, .65), inset 0 -1px 1px rgba(255, 255, 255, .3), inset 0 0 14px rgba(255, 255, 255, .2);
}
html[data-theme="dark"] .scroll-edge-top {
  background: linear-gradient(to bottom, rgba(11, 16, 29, .82), rgba(11, 16, 29, 0));
}
html[data-theme="dark"] .scroll-edge-bottom {
  background: linear-gradient(to top, rgba(11, 16, 29, .75), rgba(11, 16, 29, 0));
}
html[data-theme="dark"] .pulse-badge { color: var(--accent-light); }
html[data-theme="dark"] .pulse-badge.is-done,
html[data-theme="dark"] .badge-ai,
html[data-theme="dark"] .reco-badge,
html[data-theme="dark"] .sugg-chip,
html[data-theme="dark"] .pos,
html[data-theme="dark"] .wx.complete .wx-count,
html[data-theme="dark"] .wset.done .num-input {
  color: #34d399;
}
html[data-theme="dark"] .badge-sim { color: #fbbf24; }
html[data-theme="dark"] .badge-water { color: #7dd3fc; }
html[data-theme="dark"] .tag.m { color: var(--accent-light); }
html[data-theme="dark"] .tag.s { color: #c4b5fd; }
html[data-theme="dark"] .ex-media { background: linear-gradient(145deg, #1b253d, #131b2e); }
html[data-theme="dark"] .chart .gd { stroke: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .chart .pt { fill: #141c2f; }
html[data-theme="dark"] .skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .14), rgba(255, 255, 255, .06)); background-size: 200% 100%; }
html[data-theme="dark"] .ex-card .star { background: rgba(15, 21, 36, .88); color: var(--accent-light); }
html[data-theme="dark"] .key-status-ok { color: #34d399 !important; }
html[data-theme="dark"] .check-btn { color: rgba(255, 255, 255, .45); }


/* =====================================================================
   v4.0 — KORE (Score de forme, Briefing audio, Wrapped HD, AI row 3)
   ===================================================================== */
.ai-inline-row-3 {
  grid-template-columns: 1.35fr .82fr .82fr;
}
@media (max-width: 360px) {
  .ai-inline-row-3 { grid-template-columns: 1fr 1fr; }
  .ai-inline-row-3 > :first-child { grid-column: 1 / -1; }
}

.readiness-card { padding: 15px 16px; }
.rd-top { display: flex; align-items: center; gap: 13px; }
.rd-gauge-btn {
  appearance: none; border: 0; padding: 0; background: transparent;
  cursor: pointer; flex-shrink: 0; border-radius: 50%;
}
.rd-ring {
  --p: 0; --rc: var(--accent);
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), rgba(16, 22, 36, .09) 0);
  box-shadow: 0 6px 16px rgba(16, 22, 36, .08);
}
.rd-ring::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: linear-gradient(150deg, #ffffff, #f2f6ff);
}
.rd-ring b { position: relative; font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.rd-ring.big { width: 68px; height: 68px; }
.rd-ring.big b { font-size: 1.28rem; }
.rd-ring.rd-peak { --rc: #05c485; }
.rd-ring.rd-normal { --rc: var(--accent); }
.rd-ring.rd-low { --rc: #ff9f0a; }
html[data-theme="dark"] .rd-ring { background: conic-gradient(var(--rc) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); }
html[data-theme="dark"] .rd-ring::before { background: #141c2f; }

.rd-main { flex: 1; min-width: 0; }
.rd-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rd-title-row h2 { margin: 0; font-size: 1rem; }
.rd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rd-preview { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 22px; }
.rd-choice-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rd-choice-row .feel-btn { padding: 8px 2px; font-size: .68rem; }
.rd-choice-row .feel-btn b { font-size: 1.2rem; }

.brief-head-row { display: flex; gap: 8px; }
.brief-head-row > :first-child { flex: 1; }

.wrapped-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}
.wrapped-preview {
  width: 100%;
  max-width: 310px;
  border-radius: 24px;
  display: block;
  box-shadow: 0 20px 50px rgba(8, 12, 24, .34);
  border: 1px solid rgba(255, 255, 255, .25);
}


/* =====================================================================
   v4.1 — Spotify Mini-Player discret & Intégrations Santé (Google Fit / Fitbit)
   ===================================================================== */
.ws-spotify { padding: 4px 16px 6px; flex-shrink: 0; }
.sp-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 20px;
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
}
.sp-bar.compact { padding: 6px 8px; border-radius: 17px; }
.sp-art {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 22, 36, .16);
}
.sp-bar.compact .sp-art { width: 34px; height: 34px; border-radius: 9px; }
.sp-art-ph {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1db954, #169c46);
  color: #fff;
  font-size: 1rem;
}
.sp-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sp-meta b {
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-meta span {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-ctrls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sp-btn {
  appearance: none;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(16, 22, 36, .06);
  color: var(--text-primary);
  font-size: .78rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .16s var(--spring), background .2s;
}
.sp-btn:active { transform: scale(.88); }
.sp-btn.play {
  width: 36px;
  height: 36px;
  background: #1db954;
  color: #fff;
  font-size: .84rem;
  box-shadow: 0 4px 12px rgba(29, 185, 84, .34);
}
html[data-theme="dark"] .sp-btn { background: rgba(255, 255, 255, .12); color: #fff; }
html[data-theme="dark"] .sp-btn.play { background: #1db954; color: #05160b; }

.copy-uri-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.copy-uri-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(16, 22, 36, .06);
}
html[data-theme="dark"] .copy-uri-row code { background: rgba(255, 255, 255, .1); }

.health-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.health-strip .mini-stat { padding: 9px 4px; }
.health-strip .mini-stat b { font-size: .92rem; }
.health-strip .mini-stat span { font-size: .62rem; }
@media (max-width: 350px) {
  .health-strip { grid-template-columns: repeat(2, 1fr); }
}
