/* Composants propres à Carburant (le reste vient de kit/kit.css). Tokens uniquement. */

.cb-s0 { --c: var(--cb-g1); } .cb-s1 { --c: var(--cb-g2); } .cb-s2 { --c: var(--cb-g3); }
.cb-s3 { --c: var(--cb-g4); } .cb-s4 { --c: var(--cb-g5); }

/* ---------- pastilles de carburant ---------- */
.cb-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: none; }
.cb-chips::-webkit-scrollbar { display: none; }
.cb-chip {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 22px; font-weight: 600; font-size: 15px;
  background: var(--kit-surface); border: 1px solid var(--kit-line); color: var(--kit-fg);
}
.cb-chip[aria-checked="true"] { background: var(--kit-accent); border-color: var(--kit-accent); color: var(--kit-accent-fg); }

/* ---------- ligne de fraîcheur ---------- */
.cb-fresh { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--kit-muted); line-height: 1.3; min-width: 0; }
.cb-fresh i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cb-g1); box-shadow: 0 0 0 4px rgba(18, 137, 79, .16); }
.cb-fresh i.is-stale { background: var(--cb-g3); box-shadow: 0 0 0 4px rgba(240, 179, 35, .2); }
.cb-fresh i.is-old { background: var(--cb-g5); box-shadow: 0 0 0 4px rgba(199, 58, 55, .16); }
.cb-fresh-t { flex: 1; min-width: 0; }
.cb-refresh { flex: none; width: 36px; height: 36px; margin: -8px -6px -8px 0; border-radius: 50%; display: grid; place-items: center; color: var(--kit-accent); }
.cb-refresh .kit-ic { width: 20px; height: 20px; }
.cb-refresh[disabled] { opacity: .4; }

/* ---------- ligne station ---------- */
.cb-st { display: grid; grid-template-columns: 5px 1fr auto; gap: 14px; align-items: center; padding: 12px 18px 12px 0; min-height: 70px; border-bottom: 1px solid var(--kit-line); background: var(--kit-surface); color: inherit; }
.cb-st:last-child { border-bottom: 0; }
.cb-st:active { filter: brightness(.97); }
.cb-bar { align-self: stretch; margin: 10px 0; background: var(--c); border-radius: 0 4px 4px 0; }
.cb-st h3 { font-size: 16px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cb-st p { font-size: 13px; color: var(--kit-muted); margin-top: 3px; line-height: 1.35; }
.cb-st p .ok { color: var(--cb-ok); font-weight: 600; }
.cb-st p .no { color: var(--cb-no); font-weight: 600; }
.cb-st.is-best { background: var(--kit-accent-soft); }
.cb-pr { text-align: right; font-family: var(--kit-font-display); font-weight: 800; font-size: 27px; line-height: 1; letter-spacing: -.02em; }
.cb-pr small { font-size: 15px; font-weight: 600; }
.cb-pr em { display: block; font-style: normal; font-family: var(--kit-font-body); font-weight: 700; font-size: 12px; margin-top: 5px; letter-spacing: 0; color: var(--kit-muted); }
.cb-pr em.is-neg { color: var(--cb-ok); }
.cb-pr em.is-pos { color: var(--cb-no); }

/* ---------- écran Liste ---------- */
.cb-list-screen { display: flex; flex-direction: column; gap: 12px; }
.cb-list-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cb-list-tools .kit-seg { width: 160px; flex: none; }
.cb-card-list { border: 1px solid var(--kit-line); border-radius: 20px; overflow: hidden; }

/* ---------- écran Carte ---------- */
html[data-screen="carte"] .kit-top { display: none; }
.kit-content[data-screen="carte"] { padding: 0; gap: 0; overflow: hidden; }
.cb-mapscreen { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--cb-map-bg); }
.cb-map { position: absolute; inset: 0; z-index: 0; background: var(--cb-map-bg); font-family: var(--kit-font-body); }
.cb-nomap { position: absolute; inset: 0; background: radial-gradient(circle at 30% 28%, var(--kit-accent-soft), var(--cb-map-bg) 70%); }

.cb-fl-hd {
  position: absolute; z-index: 5; left: 14px; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 10px); height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 0 18px;
  background: var(--kit-surface); border-radius: 20px; box-shadow: var(--cb-shadow);
}
.cb-fl-hd h1 { font-family: var(--kit-font-display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cb-fl-acts { display: flex; gap: 4px; flex: none; }
.cb-act { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: var(--kit-accent-strong); }
.cb-act.is-tint { background: var(--kit-accent-soft); }
.cb-fl-chips { position: absolute; z-index: 5; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 76px); }
.cb-fl-chips .cb-chips { padding: 0 14px 10px; }
.cb-fl-chips .cb-chip { border-color: transparent; box-shadow: 0 4px 12px -6px rgba(14, 46, 51, .4); }
.cb-fl-chips .cb-chip[aria-checked="true"] { border-color: var(--kit-accent); }

.cb-sheet {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 46%;
  display: flex; flex-direction: column; background: var(--kit-surface); border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px -12px rgba(14, 46, 51, .4); transition: height .22s ease;
}
.cb-sheet[data-pos="low"] { height: 92px; }
.cb-sheet[data-pos="high"] { height: calc(100% - var(--cb-top-gap, 140px)); }
.cb-sheet.is-drag { transition: none; }
.cb-grab { flex: none; width: 100%; height: 30px; display: grid; place-items: center; touch-action: none; }
.cb-grab i { width: 42px; height: 5px; border-radius: 3px; background: var(--kit-line); }
.cb-sheet-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px; }
.cb-sheet-top h2 { font-family: var(--kit-font-display); font-size: 19px; font-weight: 800; letter-spacing: -.01em; min-width: 0; }
.cb-sheet-top .kit-seg { width: 160px; flex: none; }
.cb-sheet .cb-fresh { flex: none; padding: 6px 18px 8px; }
.cb-sheet-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.cb-locate {
  position: absolute; right: 14px; top: -62px; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: var(--kit-surface); color: var(--kit-accent-strong); box-shadow: var(--cb-shadow);
}
.cb-sheet[data-pos="high"] .cb-locate { display: none; }

/* Leaflet : pastilles de prix, position, rayon, attribution */
.cb-mapscreen .leaflet-bottom { bottom: var(--cb-sheet-h, 0px); }
.cb-mapscreen .leaflet-control-attribution { font-size: 11px; background: rgba(255, 255, 255, .82); color: #33484c; border-radius: 0 8px 0 0; }
.cb-pin-wrap, .cb-me-wrap { background: none; border: 0; }
.cb-pin {
  position: relative; display: grid; place-items: center; width: 100%; height: 27px; border-radius: 14px; background: var(--c); color: #fff;
  font-family: var(--kit-font-display); font-weight: 800; font-size: 15px; box-shadow: 0 0 0 2.5px #fff, 0 3px 8px rgba(0, 0, 0, .28);
}
.cb-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--c); border-bottom: 0; }
.cb-pin.cb-s1, .cb-pin.cb-s2 { color: #0E2E33; }
.cb-pin.is-best { height: 38px; border-radius: 19px; font-size: 21px; box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(0, 0, 0, .3); }
.cb-me { position: relative; display: block; width: 44px; height: 44px; }
.cb-me::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(37, 99, 235, .35); animation: cb-pulse 2.6s ease-out infinite; }
.cb-me i { position: absolute; left: 11px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--cb-me); border: 3.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
@keyframes cb-pulse { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }
path.cb-radius { fill: rgba(11, 124, 134, .05); fill-opacity: 1; stroke: #0B7C86; stroke-width: 1.5; stroke-dasharray: 5 6; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.8); }

/* ---------- vides, lieu ---------- */
.cb-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 20px; color: var(--kit-muted); }
.cb-empty h2 { font-size: 19px; font-weight: 800; color: var(--kit-fg); }
.cb-empty .kit-btn { margin-top: 6px; }
.cb-place {
  position: absolute; z-index: 6; left: 14px; right: 14px; bottom: 18px; padding: 22px 20px 20px; border-radius: 28px; background: var(--kit-surface);
  box-shadow: 0 -6px 30px -12px rgba(14, 46, 51, .4); display: flex; flex-direction: column; gap: 12px;
}
.cb-place > .kit-ic { width: 40px; height: 40px; color: var(--kit-accent); }
.cb-place h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.cb-place p { color: var(--kit-muted); font-size: 15px; }
.cb-list-screen > .cb-place { position: static; box-shadow: none; border: 1px solid var(--kit-line); }
.cb-err { color: var(--cb-no); font-size: 14px; }
.cb-err:empty { display: none; }

/* ---------- fiche station ---------- */
.cb-fiche { display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.cb-fiche-top h2 { font-family: var(--kit-font-display); font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.05; overflow-wrap: anywhere; }
.cb-adr { color: var(--kit-muted); font-size: 14px; margin-top: 6px; }
.cb-tags, .cb-srv { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-tags { margin-top: 10px; }
.cb-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 12px; border-radius: 15px; background: var(--kit-surface); border: 1px solid var(--kit-line); font-size: 13px; font-weight: 600; }
.cb-tag.is-ok { background: var(--cb-ok-bg); border-color: var(--cb-ok-line); color: var(--cb-ok); }
.cb-tag.is-no { background: var(--cb-no-bg); border-color: var(--cb-no-bg); color: var(--cb-no); }
.cb-tag.is-soft { font-weight: 500; }
.cb-tag .kit-ic { width: 16px; height: 16px; }
.cb-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cb-pc { background: var(--kit-surface); border: 1px solid var(--kit-line); border-radius: 14px; padding: 8px 10px; min-height: 62px; }
.cb-pc small { display: block; font-size: 12px; color: var(--kit-muted); font-weight: 600; }
.cb-pc b { font-family: var(--kit-font-display); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.cb-pc.is-off b { color: var(--kit-muted); font-size: 15px; font-family: var(--kit-font-body); font-weight: 600; opacity: .8; }
.cb-pc.is-main { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 84px; padding: 12px 16px; background: var(--cb-main-bg); border-color: var(--cb-main-bg); color: var(--cb-main-fg); }
.cb-pc.is-main small { color: var(--cb-main-sub); }
.cb-pc.is-main b { font-size: 44px; line-height: 1; }
.cb-pc.is-main b span { font-size: 20px; font-weight: 600; }
.cb-pc-r { text-align: right; font-size: 13px; color: var(--cb-main-sub); line-height: 1.3; }
.cb-pc-r strong { display: block; font-size: 15px; color: var(--cb-main-fg); }
.cb-hours dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin-top: 10px; font-size: 15px; }
.cb-hours dt { color: var(--kit-muted); }
.cb-hours dt::first-letter { text-transform: uppercase; }
.cb-hours dd { font-weight: 600; text-align: right; }
.cb-cta { position: sticky; bottom: -24px; margin: auto -20px -24px; padding: 18px 20px 24px; background: linear-gradient(to bottom, transparent, var(--kit-bg) 28%); }
.cb-cta .kit-btn { box-shadow: 0 10px 20px -10px var(--kit-accent); }

/* ---------- alertes ---------- */
.cb-drop { padding-top: 10px; padding-bottom: 10px; text-decoration: none; }
.cb-drop-t { display: flex; flex-direction: column; min-width: 0; }
.cb-drop-t b { font-weight: 700; }
.cb-drop-t small { color: var(--kit-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-low { font-family: var(--kit-font-display); font-weight: 800; font-size: 17px; color: var(--cb-ok); }

.cb-note-in { margin: 0; padding: 14px 16px; font-size: 14px; }

/* ---------- réglages ---------- */
.cb-radius-row { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--kit-line); }

/* ---------- onboarding ---------- */
.cb-onb { height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: env(safe-area-inset-top, 0px) 20px max(18px, env(safe-area-inset-bottom, 0px)); }
.cb-onb-top { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.cb-dots { display: flex; gap: 6px; }
.cb-dots i { width: 26px; height: 5px; border-radius: 3px; background: var(--kit-line); }
.cb-dots i.is-on { background: var(--kit-accent); }
.cb-skip { min-height: 48px; padding: 0 4px; font-weight: 600; color: var(--kit-accent); }
.cb-onb-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.cb-onb-body h1 { font-family: var(--kit-font-display); font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.cb-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cb-opt { display: grid; grid-template-columns: 44px 1fr 24px; gap: 14px; align-items: center; min-height: 64px; padding: 8px 14px; text-align: left; background: var(--kit-surface); border: 1.5px solid var(--kit-line); border-radius: 18px; }
.cb-opt-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--kit-accent-soft); font-family: var(--kit-font-display); font-weight: 800; font-size: 13px; color: var(--kit-accent-strong); }
.cb-opt-t b { display: block; font-size: 17px; }
.cb-opt-t small { display: block; color: var(--kit-muted); font-size: 13px; line-height: 1.25; }
.cb-opt-rd { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--kit-line); }
.cb-opt[aria-checked="true"] { border-color: var(--kit-accent); background: var(--kit-accent-soft); }
.cb-opt[aria-checked="true"] .cb-opt-ic { background: var(--kit-accent); color: var(--kit-accent-fg); }
.cb-opt[aria-checked="true"] .cb-opt-rd { border-color: var(--kit-accent); background: radial-gradient(var(--kit-accent) 0 45%, transparent 48%); }
.cb-onb-pin { display: grid; place-items: center; height: 160px; border-radius: 28px; background: var(--kit-accent-soft); color: var(--kit-accent); }
.cb-onb-pin .kit-ic { width: 72px; height: 72px; stroke-width: 1.4; }
.cb-onb-foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; text-align: center; }
.cb-onb-note { font-size: 13px; color: var(--kit-muted); }
