@font-face { font-family: 'Bricolage'; src: url('../fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  --ink: #0E1630; --ink-2: #1B2650; --ink-3: #2A3768;
  --blue: #2F5BFF; --blue-d: #1F45E0; --blue-l: #E9EEFF; --blue-m: #C9D5FF;
  --yellow: #FFD23F; --yellow-d: #E3B30F; --yellow-l: #FFF6D6;
  --mist: #F3F4F9; --card: #FFFFFF; --line: #E5E8F1; --muted: #6A7192; --soft: #9AA0B8;
  --green: #0B9A63; --green-l: #E2F5EC; --red: #DC3D43; --red-l: #FDECEC; --amber: #C77A00; --amber-l: #FFF2DC;
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(14,22,48,.05), 0 8px 24px rgba(14,22,48,.06);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --num: 'Bricolage', 'Figtree', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--mist); color: var(--ink); }
body { font-family: 'Figtree', system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
.ic { display: block; flex-shrink: 0; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: calc(var(--safe-t) + 14px) 18px calc(var(--safe-b) + 104px); }

/* En-tête */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.logo { width: 42px; height: 42px; border-radius: 13px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; position: relative; }
.logo::after { content: ''; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px var(--mist); }
.top-txt { flex: 1; min-width: 0; }
.top-hi { font-family: var(--num); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; line-height: 1.1; }
.top-date { color: var(--muted); font-size: 14px; text-transform: capitalize; }
.syncpill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.syncpill.ok { color: var(--green); }
.syncpill.wait { color: var(--amber); }
.syncpill.off { color: var(--soft); }

/* Carte héros */
.hero { background: radial-gradient(120% 90% at 100% 0%, #2B3D86 0%, var(--ink) 55%); color: #fff; border-radius: var(--r-xl); padding: 18px 18px 18px; position: relative; overflow: hidden; box-shadow: 0 14px 34px rgba(14,22,48,.22); }
.hero::before { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); }
.status { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; background: rgba(255,255,255,.09); font-weight: 600; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); }
.dot.live { background: var(--yellow); box-shadow: 0 0 0 0 rgba(255,210,63,.7); animation: pulse 1.6s infinite; }
.dot.road { background: #7FA0FF; }
.dot.done { background: #5BD6A2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,210,63,.6); } 70% { box-shadow: 0 0 0 9px rgba(255,210,63,0); } 100% { box-shadow: 0 0 0 0 rgba(255,210,63,0); } }
.timer { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.hero-mid { display: flex; align-items: center; gap: 18px; margin: 16px 0 14px; }
.ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .trk { stroke: rgba(255,255,255,.10); }
.ring .val { stroke: var(--yellow); transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-n { font-family: var(--num); font-weight: 800; font-size: 40px; line-height: .95; letter-spacing: -0.04em; }
.ring-s { font-size: 13px; color: rgba(255,255,255,.62); margin-top: 3px; }
.hero-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.kv { display: flex; flex-direction: column; }
.kv-l { font-size: 12.5px; color: rgba(255,255,255,.6); }
.kv-v { font-family: var(--num); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.kv-v small { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.6); margin-left: 3px; letter-spacing: 0; }
.nudge { display: flex; align-items: center; gap: 10px; background: rgba(255,210,63,.13); border: 1px solid rgba(255,210,63,.28); color: #FFE69A; padding: 11px 13px; border-radius: var(--r-md); font-size: 14.5px; line-height: 1.3; }
.nudge b { color: var(--yellow); font-weight: 700; }
.nudge.good { background: rgba(91,214,162,.12); border-color: rgba(91,214,162,.3); color: #BDF0D9; }
.nudge.good b { color: #5BD6A2; }
.nudge.rest { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }

/* Gros bouton */
.cta { margin: 14px 0 6px; }
.btn-big { width: 100%; height: 66px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--num); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; transition: transform .12s ease, box-shadow .2s; }
.btn-big:active { transform: scale(.975); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 10px 22px rgba(47,91,255,.32); }
.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 10px 22px rgba(227,179,15,.35); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.subacts { display: flex; gap: 8px; margin-top: 8px; }
.subacts button { flex: 1; height: 46px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.subacts button:active { background: var(--mist); }

/* Cartes */
.card { background: var(--card); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); margin-top: 14px; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-t { font-family: var(--num); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.card-k { font-size: 13px; color: var(--muted); font-weight: 600; }
.big { font-family: var(--num); font-weight: 800; font-size: 34px; letter-spacing: -0.035em; line-height: 1; }
.big small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.bar { position: relative; height: 12px; border-radius: 6px; background: var(--mist); margin: 14px 0 6px; overflow: visible; }
.bar-f { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--blue), #5C7DFF); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bar-f.gold { background: linear-gradient(90deg, var(--blue), var(--yellow-d)); }
.bar-m { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.bar-lbls { position: relative; height: 18px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.bar-lbls span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: var(--mist); border-radius: var(--r-md); padding: 11px 12px; }
.stat-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-v { font-family: var(--num); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; margin-top: 2px; white-space: nowrap; }
.row3 .stat-v { font-size: 17px; }
.row3 .stat { padding: 10px 10px; }
.stat-v.pos { color: var(--green); }
.stat.hl { background: var(--yellow-l); }

/* Chronologie */
.tl { display: flex; flex-direction: column; }
.tl-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.tl-row:first-child { border-top: 0; }
.tl-time { width: 46px; font-family: var(--num); font-weight: 700; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.code { min-width: 50px; height: 34px; padding: 0 8px; border-radius: 11px; background: var(--blue-l); color: var(--blue-d); font-family: var(--num); font-weight: 800; font-size: 14px; display: grid; place-items: center; letter-spacing: 0; }
.code.v { background: var(--mist); color: var(--muted); }
.code.pen { background: var(--red-l); color: var(--red); }
.code.plus { background: var(--green-l); color: var(--green); }
.tl-main { flex: 1; min-width: 0; }
.tl-l { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-s { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 1px; }
.tl-p { font-family: var(--num); font-weight: 800; font-size: 16px; }
.tl-p.neg { color: var(--red); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11.5px; font-weight: 700; }
.tag.s { background: var(--yellow-l); color: #8A6A00; }
.tag.v { background: var(--mist); color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 22px 10px 12px; font-size: 15px; }
.empty .ic { margin: 0 auto 8px; color: var(--soft); }

/* Barre d'onglets */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 14px calc(var(--safe-b) + 8px); background: rgba(243,244,249,.86); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid rgba(14,22,48,.06); }
.tabs-in { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tab { height: 56px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--soft); }
.tab.on { color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
.tab.on .ic { color: var(--blue); }

/* Feuilles du bas */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(14,22,48,.42); animation: fade .2s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--mist); border-radius: 28px 28px 0 0; padding: 10px 18px calc(var(--safe-b) + 18px); animation: up .28s cubic-bezier(.2,.8,.2,1); max-width: 520px; margin: 0 auto; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #CDD2E0; margin: 0 auto 12px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-t { font-family: var(--num); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.sheet-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.xbtn { width: 40px; height: 40px; border-radius: 20px; background: var(--card); display: grid; place-items: center; border: 1px solid var(--line); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tile { background: var(--card); border: 2px solid transparent; border-radius: var(--r-md); padding: 11px 12px 10px; text-align: left; display: flex; flex-direction: column; gap: 3px; min-height: 86px; box-shadow: var(--shadow); transition: transform .1s, border-color .15s; }
.tile:active { transform: scale(.97); }
.tile.on { border-color: var(--blue); background: var(--blue-l); }
.tile-c { font-family: var(--num); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.tile-l { font-size: 13px; color: var(--muted); line-height: 1.2; flex: 1; }
.tile-p { display: inline-flex; align-items: center; gap: 5px; font-family: var(--num); font-weight: 700; font-size: 14px; }
.pt { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 1.5px var(--yellow-d); display: inline-block; }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: #E6E9F2; border-radius: 15px; padding: 4px; gap: 4px; margin-top: 14px; }
.seg button { height: 44px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 15px; padding: 12px 14px; margin-top: 10px; font-weight: 600; width: 100%; text-align: left; }
.switch small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.tg { width: 52px; height: 32px; border-radius: 16px; background: #D5D9E5; position: relative; flex-shrink: 0; transition: background .2s; }
.tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: transform .2s; }
.tg.on { background: var(--green); }
.tg.on::after { transform: translateX(20px); }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.inp { height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); padding: 0 14px; font-size: 18px; font-family: var(--num); font-weight: 600; width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; }
.inp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.danger { color: var(--red); background: var(--red-l); }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row > * { flex: 1; }
.btn-md { height: 52px; border-radius: 16px; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Listes réglages */
.list { background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); margin-top: 10px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); min-height: 58px; }
.li:first-child { border-top: 0; }
.li-main { flex: 1; min-width: 0; }
.li-t { font-weight: 600; font-size: 15.5px; }
.li-s { font-size: 13px; color: var(--muted); }
.li .inp { width: 104px; height: 44px; font-size: 16px; text-align: right; }
.sect { font-family: var(--num); font-weight: 700; font-size: 15px; color: var(--muted); margin: 22px 4px 0; letter-spacing: -0.01em; }
.page-t { font-family: var(--num); font-weight: 800; font-size: 30px; letter-spacing: -0.035em; margin: 4px 2px 2px; }
.mnav { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 4px; }
.mnav button { width: 44px; height: 44px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; }
.mnav .page-t { text-transform: capitalize; margin: 0; }

/* Graphique */
.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.range { width: 100%; margin: 14px 0 4px; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 4px; background: var(--blue-l); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); border: 4px solid #fff; box-shadow: 0 3px 10px rgba(47,91,255,.4); }
.simval { display: flex; align-items: baseline; justify-content: space-between; }

.week { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.week:first-child { border-top: 0; }

/* Toast */
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 600; box-shadow: 0 12px 30px rgba(14,22,48,.3); animation: drop .35s cubic-bezier(.2,.8,.2,1); max-width: calc(100% - 32px); }
.toast .tp { color: var(--yellow); font-family: var(--num); font-weight: 800; font-size: 18px; }
@keyframes drop { from { transform: translate(-50%, -30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Guide d'installation */
.install { text-align: left; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--r-md); padding: 14px; margin-top: 10px; }
.step-n { width: 32px; height: 32px; border-radius: 16px; background: var(--ink); color: var(--yellow); font-family: var(--num); font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.step b { font-weight: 700; }
.ios-share { display: inline-flex; vertical-align: -5px; width: 26px; height: 26px; border-radius: 7px; background: var(--blue-l); color: var(--blue); place-items: center; justify-content: center; align-items: center; }

.note { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.okline { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.okline.ok { color: var(--green); }
.okline.warn { color: var(--amber); }
.okline.off { color: var(--muted); }

/* Résultat de l'intervention */
.res4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.res4 button { height: 54px; border-radius: 15px; background: var(--card); border: 2px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--ink-2); box-shadow: var(--shadow); }
.res4 button.on.ok { border-color: var(--green); background: var(--green-l); color: var(--green); }
.res4 button.on.ko { border-color: var(--red); background: var(--red-l); color: var(--red); }
.tile .badge { position: absolute; top: 9px; right: 9px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--ink); color: var(--yellow); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; }
.tile { position: relative; }

/* Planning */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; margin: 10px -2px 0; scroll-snap-type: x mandatory; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.dchip { flex: 0 0 auto; width: 66px; height: 78px; border-radius: 20px; background: var(--card); border: 2px solid transparent; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; scroll-snap-align: start; }
.dchip .wd { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.dchip .dn { font-family: var(--num); font-weight: 800; font-size: 24px; line-height: 1.05; }
.dchip .ct { font-size: 11.5px; font-weight: 700; color: var(--soft); }
.dchip .ct.has { color: var(--blue); }
.dchip.on { border-color: var(--blue); background: var(--blue-l); }
.dchip.today .wd { color: var(--blue); }
.ptile { position: relative; }
.ptile .minus { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); z-index: 2; }
.ptile .cnt { font-family: var(--num); font-weight: 800; font-size: 26px; color: var(--blue); position: absolute; right: 14px; bottom: 8px; }
.plan-sum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

/* Bilan */
.bil-hero { background: radial-gradient(120% 90% at 100% 0%, #2B3D86 0%, var(--ink) 55%); color: #fff; border-radius: var(--r-xl); padding: 18px; }
.bil-big { font-family: var(--num); font-weight: 800; font-size: 52px; letter-spacing: -0.04em; line-height: 1; }
.bil-big small { font-size: 18px; font-weight: 600; color: rgba(255,255,255,.65); letter-spacing: 0; margin-left: 4px; }
.bil-line { color: rgba(255,255,255,.75); font-size: 14.5px; margin-top: 6px; }
.bil-line b { color: #fff; }
.hbar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.12); margin-top: 14px; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 5px; background: var(--yellow); }
.adv { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.adv:first-child { border-top: 0; padding-top: 2px; }
.adv-i { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.adv.action .adv-i { background: var(--blue-l); color: var(--blue); }
.adv.warn .adv-i { background: var(--amber-l); color: var(--amber); }
.adv.good .adv-i { background: var(--green-l); color: var(--green); }
.strip { width: 100%; height: auto; display: block; margin-top: 6px; }
.minibars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; height: 120px; margin-top: 10px; }
.mb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.mb i { width: 100%; max-width: 42px; border-radius: 9px 9px 4px 4px; background: #9DB2FF; display: block; }
.mb i.ok { background: var(--blue); }
.mb i.cur { box-shadow: 0 0 0 2px var(--ink); }
.mb span { font-size: 12px; color: var(--muted); font-weight: 600; }
.mb b { font-family: var(--num); font-size: 13px; }
.gain { display: flex; align-items: center; gap: 14px; }
.gain .big { color: var(--blue); }
.dayrow { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.dayrow:first-child { border-top: 0; }
.dayrow .dd { width: 54px; font-weight: 700; text-transform: capitalize; color: var(--ink-2); font-size: 14px; }
.dayrow .dbar { flex: 1; height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; }
.dayrow .dbar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.dayrow .dp { font-family: var(--num); font-weight: 800; width: 56px; text-align: right; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 700; font-size: 14px; }

/* Absent ou refus : à côté de « Je suis arrivé » */
.cta-row { display: flex; gap: 10px; }
.cta-row .btn-big { flex: 1; }
.btn-side { width: 92px; height: 66px; flex-shrink: 0; border-radius: 22px; background: var(--card); border: 1px solid #F3C9CB; color: var(--red); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; box-shadow: var(--shadow); transition: transform .12s; }
.btn-side:active { transform: scale(.96); }
.btn-side span { font-size: 11.5px; font-weight: 800; line-height: 1.1; text-align: center; }
.cchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cchip { height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 2px solid transparent; font-family: var(--num); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; box-shadow: var(--shadow); }
.cchip small { font-family: 'Figtree', sans-serif; font-size: 11.5px; font-weight: 700; color: var(--blue); }
.cchip.on { border-color: var(--blue); background: var(--blue-l); }
.res3 { display: grid; gap: 10px; margin-top: 8px; }
.res3 button { height: 64px; border-radius: 20px; background: var(--red-l); color: var(--red); border: 1px solid #F3C9CB; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--num); font-weight: 700; font-size: 19px; }
.res3 button:active { transform: scale(.98); }

/* Carte de la tournée */
.mapbox { position: relative; height: 230px; border-radius: 16px; overflow: hidden; margin-top: 6px; background: #F7F8FC; }
.mapbox .plan { width: 100%; height: 100%; display: block; }
.mapbox .mlmap { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.mapbox.live .mlmap { opacity: 1; }
.pin { width: 26px; height: 26px; border-radius: 13px; background: #2F5BFF; color: #fff; border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(14,22,48,.35); display: grid; place-items: center; font: 800 12px/1 'Bricolage', 'Figtree', sans-serif; }
.pin.ko { background: #DC3D43; }
.pin.start { background: #0E1630; color: #FFD23F; border-radius: 8px; }
.legs { margin-top: 10px; }
.leg { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.leg:first-child { border-top: 0; }
.leg-n { width: 28px; height: 28px; border-radius: 14px; background: var(--blue); color: #fff; display: grid; place-items: center; font: 800 12.5px/1 var(--num); flex-shrink: 0; }
.leg-n.ko { background: var(--red); }
.leg-m { flex: 1; min-width: 0; font-size: 15px; }
.leg-m small { display: block; color: var(--muted); font-size: 13px; }
.leg-g { width: 44px; height: 44px; border-radius: 14px; background: var(--blue-l); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
