:root { --accent: #ff7a1a; --bg: #111418; --card: #1b1f25; --line: #2a3038; }
html, body { background: var(--bg); }
body { padding-top: calc(52px + env(safe-area-inset-top)); padding-bottom: calc(76px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem;
  height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; background: rgba(17,20,24,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; letter-spacing: .02em; } .brand i { color: var(--accent); }
#view { max-width: 640px; padding: 16px; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; display: flex; background: rgba(17,20,24,.96); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: .7rem; color: #8b95a1; text-decoration: none; }
.bottomnav a i { font-size: 1.3rem; }
.bottomnav a.active { color: var(--accent); }
.bottomnav a.nav-live.live i { color: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.card { background: var(--card); border-color: var(--line); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 700; }
.btn-accent:hover, .btn-accent:active { background: #ff8f3d !important; border-color: #ff8f3d !important; color: #111 !important; }
.text-accent { color: var(--accent) !important; }
.section-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #8b95a1; margin: 1.25rem 0 .5rem; font-weight: 700; }
.list-item { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:active { background: #232831; }
.stat { text-align: center; } .stat b { display: block; font-size: 1.4rem; } .stat small { color: #8b95a1; }
.badge-user { background: #2a3038; color: #cfd6de; font-weight: 600; }

/* Séance en cours */
.ex-card .card-header { background: transparent; border-color: var(--line); display: flex; align-items: center; gap: .5rem; }
.ex-card .ex-name { font-weight: 700; color: var(--accent); flex: 1; }
.sets { width: 100%; }
.sets th { font-size: .7rem; color: #8b95a1; text-transform: uppercase; font-weight: 600; padding: .4rem .25rem; text-align: center; }
.sets td { padding: .25rem; text-align: center; vertical-align: middle; }
.sets td.prev { color: #6c7682; font-size: .8rem; white-space: nowrap; }
.sets input { width: 100%; max-width: 80px; text-align: center; background: #262b33; border: 1px solid transparent; color: #fff; border-radius: 8px; padding: .45rem .2rem; font-size: 1rem; font-weight: 600; }
.sets input:focus { outline: none; border-color: var(--accent); }
.sets tr.done td { background: rgba(46, 160, 67, .15); }
.sets tr.done input { background: transparent; }
.btn-check-set { width: 38px; height: 38px; border-radius: 8px; border: 0; background: #262b33; color: #8b95a1; }
tr.done .btn-check-set { background: #2ea043; color: #fff; }
.set-num { font-weight: 700; color: #8b95a1; width: 28px; }
.chrono { font-variant-numeric: tabular-nums; color: #8b95a1; }

.rest-bar { position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 1031; display: flex; align-items: center; gap: .5rem;
  background: var(--accent); color: #111; border-radius: 14px; padding: .6rem .75rem; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 616px; margin: auto; }
.rest-bar .rest-time { flex: 1; text-align: center; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rest-bar .btn-outline-light { color: #111; border-color: rgba(0,0,0,.35); }
.rest-bar.over { background: #2ea043; }

.picker-group { position: sticky; top: 0; background: #22272e; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8b95a1; padding: .35rem 1rem; font-weight: 700; z-index: 1; }
.empty { text-align: center; color: #8b95a1; padding: 2rem 1rem; }
.login-box { max-width: 360px; margin: 10vh auto 0; }
.ex-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #fff; cursor: pointer; }
.ex-card .card-header { align-items: flex-start; }
.ex-card .ex-name { line-height: 1.2; }
.min-w-0 { min-width: 0; cursor: pointer; }
.rt-range { width: 170px; }
.list-item.flex-wrap { row-gap: .5rem; }
.sets input::placeholder { color: #6c7682; font-weight: 500; }
.ex-thumb-empty { display: inline-flex; align-items: center; justify-content: center; background: #262b33; color: #6c7682; border: 1px dashed #3a4350; font-size: 1.1rem; }
.ex-prio { color: #c9a27a; }
