:root {
  --bg: #F3F6FA; --panel: #FFFFFF; --panel-2: #EEF3F9; --side: #FFFFFF;
  --line: #E2E7EE; --line-2: #CBD5E1;
  --text: #0E1B2E; --muted: #556275; --faint: #7C8796;
  --blue: #1976D2; --deep: #0B3D91; --cyan: #4FC3F7; --gold: #E0A000; --red: #D93A4A; --green: #1F9D61; --grey: #8A97AD; --violet: #6D5BD0;
  --tint: #E8F1FC; --gold-txt: #946400; --field: #FFFFFF; --tile: #F5F8FC;
  --radius: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Inter, system-ui, sans-serif; }
h1, h2, h3 { font-family: 'Sora', sans-serif; margin: 0; color: var(--text); }
h1 { font-size: 2rem; letter-spacing: -0.5px; }
h2 { font-size: 1.2rem; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.layout { display: flex; min-height: 100vh; }
.side { width: 236px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { padding: 0 2px; }
.brand img { display: block; width: 100%; height: auto; }
.wordmark { font-family: 'Exo 2', sans-serif; font-style: italic; font-weight: 800; font-size: 24px; color: var(--deep); }
.wordmark .blue { color: var(--blue); }
.side-sub { margin: 4px 8px 20px; font-size: 0.85rem; color: var(--muted); }
.side-sub b { color: var(--text); }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 10px; color: #3B4656; text-decoration: none; font-weight: 500; }
.menu-item.active { background: var(--tint); color: var(--deep); font-weight: 600; }
.menu-item.soon { color: #98A3B3; }
.menu-item small { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }
.ver { display: inline-block; margin-top: 8px; color: #98A3B3; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; font-size: 0.8rem; color: var(--faint); padding: 0 8px; }

.main { flex: 1; min-width: 0; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 18px; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 14px; font-size: 0.85rem; border: 1px solid var(--line); background: var(--panel-2); }
.pill.demo { border-color: #C9C0F5; background: #EFECFF; color: #4B3FA8; }
.pill.gold { border-color: #F0D49A; background: #FFF6E0; color: #7A5300; }
.pill .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--gold); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 0.9rem; }
.kpi .value { font-family: 'Sora', sans-serif; font-size: 2rem; font-weight: 700; margin: 4px 0 2px; }
.kpi .sub { color: var(--faint); font-size: 0.85rem; }

.grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.6fr); gap: 18px; align-items: stretch; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.count { background: #FDECEE; color: #B3263A; border: 1px solid #F5C2C8; border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; font-weight: 700; }

.todo-list { display: flex; flex-direction: column; gap: 10px; }
.alert { border-radius: 14px; padding: 14px; border: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.alert.critical { background: #FDF1F2; border-color: #F5C2C8; }
.alert.info { background: #F3F1FF; border-color: #D4CCF7; }
.alert .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.alert .kind { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.alert.critical .kind { color: #B3263A; }
.alert.warning .kind { color: #8A5A00; }
.alert.info .kind { color: #4B3FA8; }
.alert .who { font-weight: 700; font-size: 1.05rem; }
.alert .what { color: #2B3647; font-size: 0.95rem; }
.alert .when { color: var(--faint); font-size: 0.8rem; white-space: nowrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: none; border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 0.9rem; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line-2); }
.btn.gold { background: var(--gold); color: #2A1F07; }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; }

.map-card { padding: 14px; }
.map-wrap { position: relative; flex: 1; display: flex; min-height: 500px; }
#map { flex: 1; border-radius: 12px; background: #E9EEF4; }
.map-full { position: absolute; top: 10px; right: 10px; z-index: 500; background: #fff; color: #151C27; border: none; border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: 0.85rem; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-hint { margin-top: -4px; }
.map-card.full { position: fixed; inset: 0; z-index: 900; border-radius: 0; margin: 0; }
.map-card.full .map-wrap { min-height: 0; }
.leaflet-control-layers { border-radius: 8px !important; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }
.leaflet-container { font: inherit; background: #E9EEF4; }
.leaflet-tooltip { background: #fff; color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; font-size: 0.85rem; }
.leaflet-tooltip-top:before { border-top-color: var(--line-2); }
.leaflet-control-attribution { background: rgba(255, 255, 255, 0.8) !important; color: var(--faint) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }

.deliv { display: flex; flex-direction: column; gap: 16px; }
.day h3 { font-size: 0.95rem; color: var(--muted); font-family: Inter, sans-serif; font-weight: 600; margin-bottom: 6px; }
.day h3 b { color: var(--text); }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 1fr) 140px 110px 120px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid transparent; }
.row.sel { border-color: var(--blue); background: var(--tint); }
.row input { width: 20px; height: 20px; accent-color: var(--blue); }
.row .name { font-weight: 600; background: none; border: none; color: var(--text); text-align: left; padding: 0; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.bar { height: 8px; border-radius: 4px; background: #E6EEF7; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; }
.lvl { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { font-size: 0.75rem; padding: 2px 8px; border-radius: 6px; background: var(--tint); color: var(--deep); justify-self: start; }
.tour-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--tint); border: 1px solid var(--blue); }
.tour-bar b { color: var(--gold-txt); }
.more { align-self: flex-start; background: none; border: 1px dashed var(--line-2); color: var(--muted); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 0.9rem; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(14, 27, 46, 0.45); z-index: 1000; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--panel); border-left: 1px solid var(--line-2); z-index: 1001; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.drawer { gap: 22px; }
.drawer h2 { padding-right: 48px; }
.drawer .close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-size: 1.4rem; line-height: 1; }
.gauge-big { display: flex; gap: 18px; align-items: center; }
.ring { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.ring > div { width: 94px; height: 94px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring b { font-family: 'Sora', sans-serif; font-size: 1.7rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.fact .label { color: var(--muted); font-size: 0.8rem; }
.fact .value { font-weight: 700; font-size: 1.05rem; }
.chart { width: 100%; height: auto; display: block; }
.list { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.list > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.ok { color: var(--green); }
.warn { color: var(--gold-txt); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); border: 1px solid var(--text); color: #fff; padding: 12px 16px; border-radius: 12px; z-index: 1100; display: flex; gap: 14px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast button { background: none; border: none; color: var(--cyan); font-weight: 700; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr; }
  .map-wrap { min-height: 400px; }
}
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 6px 14px; border-right: none; border-bottom: 1px solid var(--line); }
  .side-sub { margin: 0; }
  .brand { width: 150px; }
  .menu, .side-foot { display: none; }
  .main { padding: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 1.6rem; }
  h1 { font-size: 1.6rem; }
  .row { grid-template-columns: 28px minmax(0, 1fr) 90px; grid-template-areas: "c n l" "c p q"; row-gap: 4px; }
  .row .c-check { grid-area: c; } .row .c-name { grid-area: n; } .row .lvl { grid-area: l; }
  .row .c-place { grid-area: p; font-size: 0.85rem; } .row .c-qty { grid-area: q; }
  .row .c-tag { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(30px); opacity: 0; } }
}

/* ───────── v4 : connexion, rôles, produits, photos, chauffeur, client ───────── */
input, select { font: inherit; }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(700px 420px at 50% 10%, #DCEBFB 0%, #F3F6FA 70%); }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; }
.auth-logo { width: 100%; height: auto; }
.auth-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { font-size: 1.5rem; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.auth-form input, .dform input { padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--field); color: var(--text); font-size: 1rem; }
.auth-form input:focus, .dform input:focus { border-color: var(--blue); outline: none; }
.auth-form.narrow { max-width: 480px; }
.auth-foot { text-align: center; }
.btn.big { padding: 13px 16px; font-size: 1rem; }
.btn:disabled { opacity: .55; cursor: wait; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.link { background: none; border: none; color: var(--blue); padding: 4px 0; font-weight: 600; text-align: left; }
.form-msg { min-height: 1.2em; color: #C2412D; font-size: 0.9rem; }
.form-msg.ok { color: var(--green); }
.qr { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; align-self: center; }
code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); z-index: 1200; }

.menu-item { background: none; border: none; text-align: left; width: 100%; font: inherit; }
.dist-pick { display: flex; flex-direction: column; gap: 4px; margin: -8px 8px 16px; font-size: 0.8rem; color: var(--muted); }
.dist-pick select, .ph-add select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px; }
.side-foot { display: flex; flex-direction: column; gap: 6px; }
.side-foot .small { color: var(--muted); word-break: break-all; }
.side-actions { display: flex; flex-direction: column; align-items: flex-start; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg button { background: none; border: none; color: var(--muted); padding: 7px 12px; font-weight: 600; font-size: 0.85rem; }
.seg button.on { background: var(--deep); color: #fff; }
.ptag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 45%, transparent); vertical-align: middle; white-space: nowrap; }
.ptag::before { content: ''; width: 7px; height: 7px; border-radius: 4px; background: var(--pc); }
.addr { color: var(--muted); margin-top: 4px; }
.sec { font-size: 1rem; margin-bottom: 8px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sec-head .sec { margin: 0; }
.ph-add { display: flex; gap: 8px; align-items: center; }
.ph-add .btn { cursor: pointer; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photos .muted { grid-column: 1 / -1; }
.ph { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--muted); font-size: 0.75rem; }
.ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--panel-2); }

.driver-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.dcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dcard.done { border-color: #A8DDC2; background: #EAF7F0; }
.dhead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dhead .who { font-weight: 700; font-size: 1.1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dhead .when { font-size: 0.8rem; font-weight: 700; color: var(--gold-txt); white-space: nowrap; }
.dfacts { display: flex; justify-content: space-between; gap: 10px; color: #2B3647; }
.dfacts b { color: var(--gold-txt); }
.dform { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.dform label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); flex: 1 1 200px; }
.dcard .ok { color: var(--green); }

.client-body { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.ring.big { width: 150px; height: 150px; }
.ring.big > div { width: 118px; height: 118px; }
.ring.big b { font-size: 2rem; }
#dr-body { display: flex; flex-direction: column; gap: 20px; }
.drawer .actions { margin-top: -8px; }
.legend { margin-top: -6px; }
@media (max-width: 820px) {
  .gauge-big { flex-direction: column; align-items: stretch; }
  .ring { align-self: center; }
  .dist-pick { margin: 0; }
}
@media (max-width: 820px) {
  .side-foot { display: flex; flex-direction: row; width: 100%; margin: 0; padding: 0; }
  .side-foot .small, .side-foot .ver { display: none; }
  .side-actions { flex-direction: row; gap: 16px; }
  .brand { width: 130px; }
}

.map-note { background: rgba(255,255,255,.95); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; font-size: .85rem; }

/* v7 : bulle de carte et en-tête de fiche enrichis */
.leaflet-tooltip.tip { padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(14,27,46,.18); white-space: normal; }
.tip-card { width: 290px; overflow: hidden; border-radius: 14px; border-top: 4px solid var(--pc); }
.tip-photo { height: 120px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: .8rem; }
.tip-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tip-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--text); }
.tip-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tip-serial, .chip { font-size: .72rem; font-weight: 700; color: var(--deep); background: var(--tint); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.tip-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.tip-addr { color: var(--muted); }
.tip-level { display: flex; align-items: baseline; gap: 8px; }
.tip-level b { font-family: 'Sora', sans-serif; font-size: 1.35rem; color: var(--text); }
.tip-foot { font-size: .8rem; color: #2B3647; }
.bad { color: #C2412D; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cap-line { color: #2B3647; margin-top: 6px; font-size: .92rem; }
.dr-hero { margin: -24px -24px 0; height: 210px; background: var(--panel-2); position: relative; overflow: hidden; }
.dr-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ring .tiny { font-size: .7rem; }

/* v8 : filtres, accès, tournée */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.filters input, .filters select, .acc-form select, .acc-form input, .acc-form textarea { background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 9px 11px; font: inherit; }
.filters input[type=search] { flex: 1 1 260px; min-width: 200px; }
.filters select { flex: 0 1 auto; }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--tint); color: var(--deep); margin-left: 4px; vertical-align: middle; white-space: nowrap; }
.badge.call { background: #FFF4D6; color: #8A5A00; }
.badge.note { background: #E3F5EC; color: #17734A; }
.tip-badges { margin-left: -4px; }
.tip-note { font-size: .78rem; color: #1F5A3D; background: #E3F5EC; border-radius: 8px; padding: 6px 8px; }
.acc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.acc-form label { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--muted); }
.acc-form label.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; color: var(--text); }
.acc-form .full { grid-column: 1 / -1; }
.acc-form textarea { resize: vertical; min-height: 70px; }
.acc-form select:disabled { opacity: .6; }
.tour-bar .actions { display: flex; gap: 8px; }
.tour-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact.over { background: #FDECEE; }
.fact .value.ok { color: var(--green); }
.load { display: flex; flex-wrap: wrap; gap: 12px; font-size: .9rem; }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stops li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.stops .n, .stopn { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #2A1F07; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
.stopn { margin-right: 8px; }
.stops .note, .dnote { font-size: .82rem; color: #1F5A3D; background: #E3F5EC; border-radius: 8px; padding: 6px 8px; margin-top: 4px; }
.dnote { display: flex; flex-direction: column; gap: 4px; }
.stop-num span { display: flex; width: 26px; height: 26px; border-radius: 50%; background: #F5B731; color: #2A1F07; font-weight: 800; align-items: center; justify-content: center; border: 2px solid #fff; font-size: .8rem; }
.tour-head h2 { font-size: 1.3rem; }
@media (max-width: 820px) { .acc-form, .tour-kpis { grid-template-columns: 1fr; } }

/* v9 : croix de fermeture, horloge, bulles cliquables */
.toast .x, .leaflet-popup-close-button { font-size: 1.3rem !important; line-height: 1; }
.toast .x { color: var(--muted); padding: 0 2px; }
.leaflet-popup.tip .leaflet-popup-content-wrapper { padding: 0; border-radius: 14px; background: #fff; color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(14,27,46,.18); }
.leaflet-popup.tip .leaflet-popup-content { margin: 0; width: auto !important; }
.leaflet-popup.tip .leaflet-popup-tip { background: #fff; }
.leaflet-popup.tip a.leaflet-popup-close-button { top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(11,16,24,.75); color: #fff !important; display: flex; align-items: center; justify-content: center; z-index: 2; }
.tip-open { margin: 2px 12px 12px; width: calc(100% - 24px); }
.mini-tip { font-size: .85rem; }
.clock { font-variant-numeric: tabular-nums; }
.kpi, .card, .filters { box-shadow: 0 1px 2px rgba(14,27,46,.06); }
.main h1 { letter-spacing: -0.3px; }

/* v10 : tableau de bord finalisé */
.brief { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 14px; padding: 12px 16px; font-size: 1.02rem; }
.brief:empty { display: none; }
.brief b.red { color: var(--red); }
button.kpi { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
button.kpi:hover { border-color: var(--line-2); transform: translateY(-1px); }
button.kpi:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.kpi .label, .kpi .value, .kpi .sub { display: block; }
@media (min-width: 1200px) {
  .filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(0, 1fr)) auto; }
  .filters select { min-width: 0; width: 100%; text-overflow: ellipsis; }
  .filters #f-count, .filters #f-reset { grid-column: 1 / -1; }
}
.todo-list .more { margin-top: 2px; }
.filters #f-count:empty, .filters #f-reset[hidden] { display: none; }

/* v11 : chargement visible */
.loading { flex-direction: column; }
.load-card { display: grid; justify-items: center; gap: 16px; width: min(320px, 80vw); }
.load-card img { width: 200px; height: auto; animation: breathe 1.8s ease-in-out infinite; }
.load-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; }
.load-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 99px; transition: width .35s ease; }
.load-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); animation: sweep 1.2s linear infinite; }
#load-step { color: var(--muted); font-size: .95rem; text-align: center; min-height: 1.4em; }
@keyframes breathe { 50% { opacity: .65; transform: scale(.98); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.busybar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1300; pointer-events: none; opacity: 0; transition: opacity .2s; overflow: hidden; }
.busybar::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--cyan), var(--blue), transparent); animation: busy 1s ease-in-out infinite; }
.busybar.on { opacity: 1; }
@keyframes busy { from { left: -40%; } to { left: 100%; } }
.loading-btn { position: relative; padding-left: 40px !important; }
.loading-btn::before { content: ''; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .load-card img, .load-bar::after, .busybar::before, .loading-btn::before { animation: none; } }

/* v11 : prix du jour et commandes */
.price-pill { cursor: pointer; font: inherit; border: 1px solid rgba(245,183,49,.4); }
.price-pill .tr.down { color: var(--green); } .price-pill .tr.up { color: var(--red); }
.mcount { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--gold); color: #1A1300; font-size: .78rem; font-weight: 700; }
.link.strong { font: inherit; font-weight: 700; color: var(--gold-txt); text-decoration: underline; padding: 0; }
.trend { display: flex; gap: 12px; align-items: flex-start; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0 14px; }
.trend .arrow { font-size: 1.2rem; line-height: 1.4; }
.trend.down .arrow, .trend.down b { color: var(--green); } .trend.up .arrow, .trend.up b { color: var(--red); } .trend.flat .arrow { color: var(--muted); }
.trend p { margin: 0; } .trend details { margin-top: 4px; } .trend summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.trend details p { color: var(--muted); margin-top: 6px; }
.price-box { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 18px; margin: 16px 0; }
.price-box.done { border-color: rgba(43,216,143,.5); }
.price-box h3 { margin: 0; font-size: 1.15rem; }
.pb-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; }
.price-box .label { margin: 4px 0 8px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 99px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.chip.on { border-color: var(--gold-txt); color: #8A5A00; background: rgba(245,183,49,.08); }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.qty-row .qty { width: 120px; font-size: 1.4rem; font-weight: 700; text-align: center; background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 12px; padding: 8px; font-family: 'Sora', sans-serif; }
.qty-row .step { width: 48px; height: 48px; font-size: 1.4rem; padding: 0; }
.qty-range { width: 100%; accent-color: var(--gold-txt); margin: 6px 0 12px; }
.pb-price { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pb-price > div { background: var(--tile); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.pb-price .big { font-family: 'Sora', sans-serif; font-size: 1.7rem; line-height: 1.2; }
.pb-hint { color: var(--text); margin: 10px 0 0; min-height: 0; } .pb-hint:empty { display: none; }
.pb-hint .link { color: var(--gold-txt); font-weight: 700; }
.price-box .note { display: grid; gap: 6px; margin: 14px 0 0; color: var(--muted); }
.price-box .note input { background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; }
.pb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.big-line { font-size: 1.15rem; margin: 8px 0; }
.ord-list { display: grid; gap: 10px; }
.order { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 18px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; }
.order.confirmed { border-left-color: var(--green); opacity: .85; }
.order .who { margin: 0 0 2px; font-weight: 600; } .order p { margin: 0; }
.order .o-qty, .order .o-total { display: grid; text-align: right; }
.order .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.badge.ok { background: rgba(43,216,143,.14); color: var(--green); }
.pt-prod { margin: 6px 0 18px; } .pt-prod h3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 1rem; }
.table-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ptable th, .ptable td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ptable thead th { color: var(--muted); font-weight: 600; font-size: .88rem; }
.ptable td.num { text-align: right; }
.ptable input.cents { width: 76px; background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 8px; padding: 7px 8px; font: inherit; text-align: right; }
.inline-form, .grid-top { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 10px 0; }
.inline-form label, .grid-top label { display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
.inline-form .grow { flex: 1 1 260px; }
.inline-form input, .inline-form select, .inline-form textarea, .grid-top input, .grid-top select { background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 9px 11px; font: inherit; }
.grid-form .actions { display: flex; gap: 12px; align-items: center; }
#view-prices .card { margin-bottom: 16px; }
@media (max-width: 640px) {
  .pb-price { grid-template-columns: 1fr; }
  .order { grid-template-columns: 1fr 1fr; } .order .o-main { grid-column: 1 / -1; } .order .o-qty, .order .o-total { text-align: left; }
}
.order .name { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.order .name:hover { text-decoration-color: var(--cyan); }

/* v12 : remplir le camion, rapport */
.fill-box { background: rgba(245,183,49,.07); border: 1px solid rgba(245,183,49,.45); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.fill-box p { margin: 0 0 6px; }
.fill-box ul { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; }
.fill-box label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.fill-box input { margin-top: 4px; accent-color: var(--gold-txt); width: 18px; height: 18px; }
.deliv-need { margin: -4px 0 10px; } .deliv-need:empty { display: none; } .deliv-need b { color: var(--text); }
.rp-tools { display: flex; gap: 10px; align-items: center; }
.rp-tools select { background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 9px 11px; font: inherit; }
.rp-hero { border-left: 4px solid var(--green); margin-bottom: 16px; }
.rp-hero .label { color: var(--muted); margin: 0; }
.rp-big { font-family: 'Sora', sans-serif; font-size: 2.6rem; font-weight: 700; color: var(--green); margin: 4px 0; }
.rp-big span { font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.rp-grid .card h2, #view-report .card h2 { font-size: 1.1rem; margin: 0 0 10px; }
.rp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.rp-tile { background: var(--tile); border-radius: 12px; padding: 12px 14px; }
.rp-tile .label { color: var(--muted); font-size: .85rem; margin: 0; }
.rp-tile .value { font-family: 'Sora', sans-serif; font-size: 1.6rem; font-weight: 700; margin: 2px 0; }
.rp-tile .sub { color: var(--faint); font-size: .82rem; margin: 0; }
#view-report > .card { margin-bottom: 16px; }
@media print {
  .side, .no-print, .busybar, .toast, #loading, .drawer, .drawer-backdrop { display: none !important; }
  body, .main, .layout { background: #fff !important; color: #111 !important; display: block !important; }
  .card, .rp-tile { background: #fff !important; border: 1px solid #ccc !important; color: #111 !important; box-shadow: none !important; break-inside: avoid; }
  .muted, .rp-tile .label, .rp-tile .sub, .rp-hero .label { color: #555 !important; }
  .rp-big { color: #0a7a4a !important; }
}

/* v13 : bon moment, mensualisation, alertes, relances */
.good-moment { background: rgba(43,216,143,.09); border: 1px solid rgba(43,216,143,.45); border-radius: 14px; padding: 12px 16px; margin: 16px 0 0; }
.good-moment b:first-child { color: var(--green); font-size: 1.05rem; }
.good-moment p { margin: 6px 0 0; }
.budget-box, .prefs-box { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 18px; margin: 16px 0; }
.budget-box.active { border-color: rgba(43,216,143,.5); }
.budget-box h3, .prefs-box h3 { margin: 0 0 6px; font-size: 1.15rem; }
.budget-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.budget-figs > div { background: var(--tile); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.budget-figs b { font-family: 'Sora', sans-serif; font-size: 1.2rem; } .budget-figs b.gold { color: var(--gold-txt); font-size: 1.45rem; }
.budget-box select { background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 8px; padding: 6px 8px; font: inherit; margin-left: 6px; }
.prefs-box .chk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.prefs-box .chk-row { display: flex; gap: 18px; margin: 4px 0 12px; }
.prefs-box input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--cyan); }
.prefs-box input.mini { width: 56px; background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 8px; padding: 6px 8px; font: inherit; text-align: center; }
.order .b-amount { width: 100px; background: var(--field); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 8px; padding: 7px 8px; font: inherit; text-align: right; display: block; margin-top: 4px; }
.call-list { display: grid; gap: 6px; }
.call-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) 1fr 1fr auto; gap: 10px 14px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.call-row .name { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.call-acts { display: flex; gap: 6px; } .call-acts .btn { padding: 7px 12px; }
@media (max-width: 640px) { .budget-figs { grid-template-columns: 1fr; } .call-row { grid-template-columns: 1fr auto; } .call-row > .muted { display: none; } }
.prefs-box .chk { display: block; line-height: 2.3; margin: 4px 0; }
.prefs-box .chk input[type=checkbox] { vertical-align: middle; margin-right: 8px; }
.prefs-box .chk-row .chk { display: inline-block; }

/* v14 : espace client en onglets */
.ctabs { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 5px; margin-bottom: 14px; max-width: 1010px; }
.ctabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 11px 10px; border-radius: 10px; cursor: pointer; }
.ctabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
.ctabs button:hover { color: var(--text); }
.ctabs .dot { position: absolute; top: 8px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.ctabs .ic { font-size: 1.1rem; }
.client-card [data-ctab] > .price-box:first-child, .client-card [data-ctab] > .budget-box:first-child { margin-top: 0; }
.good-moment .btn { margin-top: 10px; }
.status-lines { display: grid; gap: 8px; margin-top: 14px; }
.status-line { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; color: var(--text); font: inherit; }
button.status-line { cursor: pointer; } button.status-line:hover { border-color: var(--line-2); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 10px 0 6px; }
@media (max-width: 640px) {
  .ctabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; margin: 0; border-radius: 0; border-width: 1px 0 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: #fff; }
  .ctabs button { flex-direction: column; gap: 2px; font-size: .72rem; padding: 6px 2px; }
  .ctabs button[aria-selected="true"] { box-shadow: inset 0 2px 0 var(--gold); }
  .ctabs .ic { font-size: 1.25rem; }
  #view-client { padding-bottom: 76px; }
}
.ctabs { max-width: 760px; }
.bud-option { margin-bottom: 12px; } .bud-option p { margin: 6px 0 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { width: 40px; height: 22px; accent-color: var(--green); }

/* v15 : courbe avec axes, période, légende et survol */
.chart-box { margin-top: 14px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.chart-title { margin: 0; font-weight: 700; } .chart-title .muted { font-weight: 500; }
.chart-wrap { position: relative; background: var(--tile); border-radius: 12px; padding: 6px 4px 0; }
.chart-svg { width: 100%; min-height: 60px; } .chart-svg svg { display: block; max-width: 100%; height: auto; }
.chart-svg .hover-zone { cursor: crosshair; touch-action: none; }
.chart-tip { position: absolute; top: 8px; width: 150px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; font-size: .85rem; pointer-events: none; box-shadow: 0 6px 18px rgba(14,27,46,.4); }
.chart-tip span { color: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--muted); font-size: .82rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-line { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.lg-dash { width: 16px; height: 0; border-top: 2px dashed #D93A4A; display: inline-block; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: #F5B731; display: inline-block; }
.seg button[aria-pressed="true"] { background: var(--deep); color: #fff; }
.seg button { cursor: pointer; }
@media (max-width: 640px) { body:has(#view-client:not([hidden])) .toast { bottom: 92px; } }

/* v16 · enquête clients */
.sv-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin:14px 0 22px}
.sv-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px}.sv-v{font-size:26px;font-weight:800;margin:0}.sv-l{margin:4px 0 0;font-weight:600}.sv-n{margin:4px 0 0;font-size:13px}
.sv-h{font-size:18px;margin:6px 0 10px}.sv-table{width:100%;border-collapse:collapse;font-size:14px}.sv-table th,.sv-table td{text-align:left;padding:8px;border-bottom:1px solid rgba(128,128,128,.25)}
.sv-h{font-size:20px;margin:34px 0 12px}
.site-back{display:inline-flex;align-items:center;gap:6px;margin:0 0 14px;padding:8px 12px;border:1.5px solid var(--line-2);border-radius:10px;color:var(--deep);font-weight:600;font-size:.88rem;text-decoration:none;background:#fff;white-space:nowrap}
.site-back:hover{border-color:var(--blue)}
.auth-back{margin:18px auto 0;display:flex;width:max-content}
@media (max-width: 820px){.side-foot .site-back{margin:0;padding:5px 9px;font-size:.8rem}.side-actions .link{white-space:nowrap;font-size:.85rem}}

/* ── Charte OiLSmart : profondeur et couleur ── */
html, body { background: linear-gradient(180deg, #DCE8F6 0, #EAF0F7 340px, #EEF3F9 100%) fixed; }
.side { background: linear-gradient(180deg, #123766 0%, #0C2850 45%, #0A1F3F 100%); border-right: none; box-shadow: 4px 0 24px rgba(11,31,63,.12); }
.brand { padding: 4px 4px 2px; }
.side-sub { color: #AFC2DC; }
.side-sub b { color: #fff; }
.menu-item { color: #D5E0EE; position: relative; }
.menu-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu-item.active { background: rgba(79,195,247,.16); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #4FC3F7; }
.menu-item.soon { color: #7F96B6; }
.side-foot { color: #9FB3CF; }
.side-foot .link { color: #8FD3F7; }
.side-foot .ver, .ver { color: #7F96B6; }
.site-back { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.site-back:hover { border-color: #4FC3F7; }
.auth .site-back, .auth-back { background: #fff; color: var(--deep); border-color: var(--line-2); }
h1 { color: var(--deep); }
.card, .kpi, .filters { border-color: #DCE4EE; box-shadow: 0 1px 2px rgba(11,31,63,.05), 0 8px 24px -16px rgba(11,61,145,.25); }
.kpi { border-top: 3px solid var(--blue); }
.kpi:nth-child(2) { border-top-color: var(--gold); }
.kpi:nth-child(3) { border-top-color: var(--red); }
.kpi:nth-child(4) { border-top-color: var(--cyan); }
.card h2, .day h3 { color: var(--deep); }
.btn.primary { background: linear-gradient(180deg, #1E88E5, #1565C0); }
.btn.primary:hover { background: #0B3D91; }
.sv-card { border-top: 3px solid var(--blue); }
@media (max-width: 820px) { .side { box-shadow: 0 4px 18px rgba(11,31,63,.18); } }
.side-foot .small { color: #9FB3CF; }
@media (max-width: 820px) {
  .side-foot { flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  .side-actions { flex-wrap: wrap; gap: 6px 14px; }
}
.dr-mini { position: absolute; inset: 0; }
.dr-photo { position: absolute; right: 12px; bottom: 12px; width: 34%; height: 58%; border-radius: 12px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 8px 24px rgba(11,31,63,.35); z-index: 500; }
.dr-photo.full { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; }
.dr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-mini .leaflet-control-attribution { font-size: 9px; }
/* ── Finitions modernes ── */
h1 { letter-spacing: -0.02em; }
.card { border-radius: 20px; }
.kpi { border-radius: 18px; transition: transform .2s ease, box-shadow .2s ease; }
button.kpi:hover, .kpi[data-go]:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(11,61,145,.45); }
.btn { transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { box-shadow: 0 8px 18px -10px rgba(21,101,192,.7); }
.menu-item { border-radius: 12px; transition: background .15s ease, color .15s ease; }
.alert { transition: box-shadow .2s ease; }
.alert:hover { box-shadow: 0 10px 24px -18px rgba(11,42,91,.5); }
.gdpr { border-top: 1px solid var(--line); padding-top: 14px; }
.gdpr .muted { margin: 4px 0 10px; }
.btn.danger { color: #B3263A; border-color: #F0C2C8; }
.btn.danger:hover { border-color: #B3263A; }
.btn.danger-fill { background: #B3263A; color: #fff; border: none; }
/* ── Tournées du jour ── */
.tr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.tr-card { border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 14px; padding: 14px 16px; margin-top: 12px; background: #fff; display: grid; gap: 8px; }
.tr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tr-head b { font-size: 1.05rem; }
.tr-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.tr-bar { height: 8px; border-radius: 4px; background: #E6EEF7; overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.tr-stops { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .9rem; }
.tr-stops li { display: flex; gap: 8px; align-items: baseline; }
.tr-stops li span:first-child { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #E6EEF7; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; }
.tr-stops li.done span:first-child { background: #2F7D57; color: #fff; }
.tr-stops li .muted { margin-left: auto; white-space: nowrap; }
.tr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-map { height: 520px; border-radius: 12px; margin-top: 10px; background: #E9EEF4; }
.tr-pin span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.tr-empty { padding: 18px 4px; display: grid; gap: 8px; justify-items: start; }
.ok { color: #2F7D57; font-weight: 600; }
@media (max-width: 1100px) { .tr-grid { grid-template-columns: 1fr; } .tr-map { height: 380px; } }
.tr-names { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.tr-names summary { cursor: pointer; font-weight: 600; color: var(--deep); }
.tr-name { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.tr-name label { flex: 1; display: grid; gap: 4px; }
.tr-name input { padding: 9px 11px; border: 1.5px solid var(--line-2); border-radius: 10px; font: inherit; }

/* Parc des jauges */
.filters.fl-filters { display: flex; flex-wrap: wrap; border: 0; padding: 0 0 12px; background: none; box-shadow: none; }
.fl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fl-table { min-width: 980px; }
.fl-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.fl-table td { vertical-align: top; }
.fl-table tbody tr:hover { background: var(--panel-2); }
.fl-table .name { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.btn.sm { padding: 5px 12px; font-size: 0.85rem; }
#view-fleet .kpi { text-align: left; cursor: pointer; }
.fl-table .name { background: none; border: 0; padding: 0; color: var(--blue, #1976D2); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#view-fleet button.kpi { display: flex; flex-direction: column; font: inherit; color: inherit; }
#view-fleet button.kpi .label, #view-fleet button.kpi .sub { display: block; }
.filters.fl-filters select { min-width: 190px; width: auto; flex: 0 0 auto; }
@media (max-width: 700px) { .fl-filters select, .fl-filters .btn { flex: 1 1 100%; } }

/* ───── Watch / Coach : le marché, la fenêtre de choix, le prix tournée ───── */
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.client-head { display: flex; align-items: center; gap: 10px; }
.plan-badge { font-weight: 700; font-size: .82rem; padding: 6px 11px; border-radius: 999px; background: var(--tint); color: var(--deep); letter-spacing: .01em; }
.plan-badge.coach { background: linear-gradient(135deg, #0B3D91, #1976D2); color: #fff; }
.lang-sw button { padding: 6px 11px; }
.mv { font-weight: 700; white-space: nowrap; }
.mv.down { color: var(--green); } .mv.up { color: var(--red); } .mv.flat { color: var(--muted); }
.mk-hint { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; width: 100%; margin: 16px 0 0; padding: 12px 16px; text-align: left; font: inherit; color: var(--text);
  background: var(--tint); border: 1px solid #C9DCF3; border-radius: 14px; cursor: pointer; }
.mk-hint.warn { background: #FFF6E0; border-color: #F1D58A; }
.mk-hint-r { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--muted); }
.mk-hint .link, .mk-line-btn .link { color: var(--blue); font-weight: 600; }
.mk-line-btn { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0 4px; cursor: pointer; }
.mk-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mk-kpis .value small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.range { position: relative; height: 10px; border-radius: 6px; margin: 14px 0 6px; background: linear-gradient(90deg, #1F9D61, #E0A000 55%, #D93A4A); }
.range i { position: absolute; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #fff; border: 3px solid var(--deep); box-shadow: 0 2px 6px rgba(11,61,145,.35); }
.range-lbl { display: flex; justify-content: space-between; margin: 0; font-size: .8rem; color: var(--muted); }
.mk-sec { margin-top: 22px; }
.mk-chart { margin-top: 18px; }
.mk-svg { display: block; max-width: 100%; }
.mk-grid { stroke: #E6ECF3; } .mk-vgrid { stroke: #F0F3F7; }
.mk-ax { fill: #6B7686; font-size: 11px; }
.mk-line { fill: none; stroke: #0B3D91; stroke-width: 2.2; stroke-linejoin: round; }
.mk-ma { fill: none; stroke: #E0A000; stroke-width: 2; stroke-dasharray: 6 5; opacity: .9; }
.mk-hi { fill: #D93A4A; stroke: #fff; stroke-width: 2; } .mk-lo { fill: #1F9D61; stroke: #fff; stroke-width: 2; }
.mk-lbl { font-size: 11px; font-weight: 700; } .mk-lbl.hi { fill: #B02838; } .mk-lbl.lo { fill: #17804E; } .mk-lbl.now { fill: #0B3D91; font-size: 12px; }
.mk-today { fill: #0B3D91; stroke: #fff; stroke-width: 2.5; }
.mk-pulse { fill: #1976D2; opacity: .25; animation: mkpulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mkpulse { from { transform: scale(.6); opacity: .45; } to { transform: scale(1.8); opacity: 0; } }
.mk-today-line { stroke: #0B3D91; stroke-dasharray: 3 4; opacity: .5; }
.mk-hl { stroke: #9AA6B5; } .mk-hd { fill: #0B3D91; stroke: #fff; stroke-width: 2; }
.lg-dash.gold { border-top-color: #E0A000; }
.lg-dot.hi { background: #D93A4A; } .lg-dot.lo { background: #1F9D61; }
.mk-box { position: relative; min-height: 250px; }
.mk-blur { position: relative; filter: blur(3px) saturate(.7); opacity: .55; pointer-events: none; max-height: 220px; overflow: hidden; }
.mk-blur svg { width: 100%; height: auto; }
.coach-lock { position: relative; margin: -60px 0 0; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; box-shadow: 0 10px 30px rgba(14,27,46,.12); }
[data-ctab="order"] > .coach-lock { margin-top: 0; }
.coach-lock h3 { margin: 6px 0 6px; font-size: 1.15rem; }
.cl-badge { display: inline-block; margin: 0; font-size: .8rem; font-weight: 700; color: var(--deep); background: var(--tint); padding: 4px 10px; border-radius: 999px; }
.win-head { margin: 0 0 12px; font-size: 1.02rem; } .win-head.warn { color: #8A5A00; }
.win-bar { position: relative; height: 16px; border-radius: 9px; background: var(--panel-2); overflow: hidden; }
.win-bar i { position: absolute; top: 0; bottom: 0; }
.win-choice { left: 0; background: linear-gradient(90deg, #1F9D61, #4CC38A); }
.win-reserve { background: repeating-linear-gradient(135deg, #F5B731 0 8px, #E9A915 8px 16px); }
.win-lbl { position: relative; display: flex; justify-content: space-between; height: 22px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.win-lbl span:nth-child(2) { position: absolute; transform: translateX(-50%); white-space: nowrap; color: #8A5A00; font-weight: 600; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vs-col { border-radius: 14px; padding: 14px 16px; border: 1px solid; }
.vs-col.bad { background: #FDF1F2; border-color: #F2C4CA; } .vs-col.good { background: #EEF9F3; border-color: #BFE6D1; }
.vs-t { margin: 0 0 6px; font-weight: 700; }
.vs-col ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.vs-fact { margin: 14px 0 6px; padding: 12px 14px; border-left: 4px solid var(--deep); background: var(--tile); border-radius: 0 10px 10px 0; }
.swing { display: grid; gap: 8px; margin-top: 10px; }
.sw-row { display: grid; grid-template-columns: 44px 1fr 120px; align-items: center; gap: 12px; }
.sw-y { font-weight: 700; color: var(--muted); }
.sw-track { position: relative; height: 14px; background: var(--panel-2); border-radius: 8px; }
.sw-bar { position: absolute; top: 5px; height: 4px; background: linear-gradient(90deg, #1F9D61, #D93A4A); border-radius: 2px; }
.sw-dot { position: absolute; top: 1px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid #fff; }
.sw-dot.lo { background: #1F9D61; } .sw-dot.hi { background: #D93A4A; }
.sw-gap { display: grid; text-align: right; line-height: 1.2; } .sw-gap b { color: #B02838; }
.tour-box { background: var(--tile); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.tour-box .sec { margin-top: 0; }
.coach-meter p { margin: 12px 0 8px; }
.meter { height: 12px; border-radius: 7px; background: #E3E9F1; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #E0A000, #F5C84B); }
.tour-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #EEF9F3; color: #17603F; font-size: .92rem; }
.mk-note { margin: 22px 0 4px; font-size: .82rem; color: var(--muted); }
.acc-info { margin: 0; }
@media (max-width: 760px) {
  .mk-kpis { grid-template-columns: 1fr; }
  .vs { grid-template-columns: 1fr; }
  .sw-row { grid-template-columns: 40px 1fr 92px; gap: 8px; }
  .client-head { width: 100%; justify-content: space-between; }
}
#view-client .top { max-width: 1010px; }
.vs-col li { color: var(--text); font-weight: 400; }
.sw-gap span { white-space: nowrap; font-size: .76rem; }
.win-lbl span:nth-child(2).edge { display: none; }

/* ───── Test de pose ───── */
.inst-card h2 { font-size: 1.15rem; margin: 0 0 12px; }
.inst-search { display: grid; gap: 6px; font-weight: 600; }
.inst-search input { font-size: 1.05rem; padding: 12px 14px; }
.inst-results { display: grid; gap: 6px; margin-top: 10px; }
.inst-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; text-align: left; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.inst-row:hover { border-color: #9FC2EA; }
.inst-row .ok { color: var(--green); font-weight: 600; } .inst-row .warn { color: #B07A00; font-weight: 600; }
.inst-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.inst-head h2 { margin-bottom: 2px; }
.inst-dev { margin: 12px 0; }
.inst-rules summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.inst-rules ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.inst-banner { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; font-size: 1.6rem; }
.inst-banner div { display: grid; gap: 2px; font-size: 1rem; }
.inst-banner b { font-size: 1.15rem; }
.inst-banner.wait { background: var(--tint); color: var(--deep); }
.inst-banner.good { background: #E7F6EE; color: #17603F; border: 1px solid #BFE6D1; }
.inst-banner.warn { background: #FFF6E0; color: #7A5300; border: 1px solid #F1D58A; }
.inst-banner.bad { background: #FDF1F2; color: #A12634; border: 1px solid #F2C4CA; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #C9DCF3; border-top-color: var(--blue); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.inst-checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.inst-checks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.inst-checks li div { display: grid; gap: 2px; }
.inst-checks li em { font-style: normal; font-size: .9rem; color: var(--muted); }
.inst-checks .ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; }
.inst-checks .good .ic { background: var(--green); } .inst-checks .warn .ic { background: #E0A000; } .inst-checks .bad .ic { background: var(--red); }
.inst-checks .bad { border-color: #F2C4CA; } .inst-checks .bad em { color: #A12634; }
.inst-h { margin-top: 20px !important; }
.inst-manual, .inst-note { display: grid; gap: 6px; margin: 8px 0; font-weight: 600; }
.inst-manual input { max-width: 160px; font-size: 1.05rem; padding: 10px 12px; }
#gauge-sec [data-inst-tank] { margin: 4px 0 8px; }
.inst-card + .inst-card { margin-top: 16px; }
.inst-note textarea { font: inherit; padding: 10px 12px; border-radius: 10px; }

/* ───── Pose par le client ───── */
.si-banner { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 16px; padding: 14px 16px; text-align: left; font: inherit; color: var(--text);
  background: #FFF6E0; border: 1px solid #F1D58A; border-radius: 16px; cursor: pointer; }
.si-banner > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.si-banner .link { color: var(--blue); font-weight: 700; white-space: nowrap; }
.si-ic { font-size: 1.6rem; }
.si-head { display: grid; gap: 12px; margin-bottom: 14px; }
.si-head .btn { justify-self: start; }
.si-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.si-steps li { display: grid; justify-items: center; gap: 4px; font-size: .78rem; color: var(--muted); text-align: center; }
.si-steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-weight: 700; color: var(--muted); }
.si-steps li.on { color: var(--deep); font-weight: 700; } .si-steps li.on span { background: var(--deep); color: #fff; }
.si-steps li.done span { background: var(--green); color: #fff; }
.si-card h2 { font-size: 1.15rem; margin: 0 0 10px; }
.si-h { margin-top: 22px !important; }
.si-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.si-choice { display: grid; justify-items: center; gap: 6px; padding: 14px 10px; font: inherit; color: var(--text); text-align: center;
  background: var(--panel); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.si-choice.on { border-color: var(--blue); background: var(--tint); }
.si-field { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 600; flex-wrap: wrap; }
.si-field input { width: 120px; font-size: 1.05rem; padding: 10px 12px; }
.si-warn { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #FFF6E0; border: 1px solid #F1D58A; color: #5A3E00; }
.si-list { margin: 0 0 6px; padding-left: 22px; display: grid; gap: 8px; }
.si-done { text-align: center; }
.si-done .pb-actions { justify-content: center; }
.si-big { font-size: 3rem; margin: 0; }
.si-again { margin-top: 18px; }

/* ── Oli, l'assistant de pose ── */
.ai-card { border: 2px solid color-mix(in srgb, var(--blue) 35%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 8%, var(--panel)), var(--panel) 55%); }
.ai-top { display: flex; gap: 14px; align-items: center; }
.ai-top h2 { margin: 0 0 2px; }
.ai-top p { margin: 0; }
.ai-bot { flex: none; filter: drop-shadow(0 3px 6px rgba(11, 61, 145, .18)); }
.ai-bot { border-radius: 50%; background: radial-gradient(circle at 50% 45%, #fff 55%, var(--tint)); }
.ai-top .ai-bot { animation: ai-bob 3s ease-in-out infinite; }
.ai-bot.ai-think { animation: ai-think 1.2s ease-in-out infinite; }
@keyframes ai-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes ai-think { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.ai-hero { display: block; margin: 0 auto 6px; max-width: 60%; height: auto; max-height: 200px; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ai-photo { cursor: pointer; }
.ai-photo input { display: none; }
.ai-askbox { display: flex; gap: 10px; margin-top: 12px; align-items: flex-end; }
.ai-askbox[hidden] { display: none; }
.ai-askbox textarea { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); }
.ai-out:empty { display: none; }
.ai-out { margin-top: 14px; }
.ai-say { display: flex; gap: 10px; align-items: flex-start; }
.ai-bubble { position: relative; flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 12px 14px; font-size: 1.02rem; line-height: 1.45; }
.ai-bubble p { margin: 0 0 6px; } .ai-bubble p:last-child { margin-bottom: 0; }
.ai-bubble ol { margin: 6px 0 4px; padding-left: 22px; } .ai-bubble li { margin: 3px 0; }
.ai-say.good .ai-bubble { border-color: var(--green); }
.ai-say.warn .ai-bubble { border-color: var(--gold); }
.ai-say.bad .ai-bubble { border-color: var(--red); }
.ai-handoff { font-weight: 600; color: var(--deep); }
.ai-filled { color: var(--green); font-weight: 600; }
.ai-demo { color: var(--faint); font-size: .85rem; }
.ai-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: ai-dot 1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 560px) { .ai-actions .btn { flex: 1 1 100%; justify-content: center; } .ai-askbox { flex-direction: column; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .ai-bot, .ai-dots i { animation: none !important; } }

.ai-photo-wrap { display: inline-flex; flex-direction: column; gap: 6px; align-items: center; }
.ai-gallery { font-size: .9rem; cursor: pointer; } .ai-gallery input { display: none; }
@media (max-width: 560px) { .ai-photo-wrap { flex: 1 1 100%; align-items: stretch; text-align: center; } }
/* Aimant : comment réveiller la jauge */
.si-magnet { display: flex; gap: 16px; align-items: center; margin: 12px 0; padding: 12px; border-radius: 14px; background: var(--tile); }
.si-magnet svg { flex: none; }
.si-magnet ol { margin: 0; padding-left: 20px; } .si-magnet li { margin: 4px 0; }
.si-led { animation: si-led 2.4s infinite; }
@keyframes si-led { 0%, 30% { fill: #1F9D61; } 31%, 55% { fill: #D93A4A; } 56%, 100% { fill: #CBD5E1; } }
.si-mag { animation: si-mag 2.4s ease-in-out infinite; }
@keyframes si-mag { 0%, 100% { transform: translate(28px, -6px); } 35%, 65% { transform: translate(0, 0); } }
@media (max-width: 560px) { .si-magnet { flex-direction: column; align-items: stretch; } .si-magnet svg { align-self: center; } }
@media (prefers-reduced-motion: reduce) { .si-led, .si-mag { animation: none; } }
/* Bandeau « Votre jauge est arrivée ? » : sur téléphone, le lien passe sous le texte */
.si-banner > span:nth-child(2) { min-width: 0; flex: 1 1 200px; }
@media (max-width: 560px) { .si-banner { flex-wrap: wrap; } .si-banner .link { flex-basis: 100%; padding-left: 44px; } }
/* ── Oli en discussion ── */
.oli-chat { margin-top: 16px; border: 2px solid color-mix(in srgb, var(--blue) 35%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 8%, var(--panel)), var(--panel) 55%); }
.oli-thread { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; max-height: 420px; overflow-y: auto; }
.oli-thread:empty { display: none; }
.oli-me { align-self: flex-end; max-width: 85%; background: var(--blue); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; }
.oli-me p { margin: 0; line-height: 1.4; }
.oli-thread .ai-say { max-width: 95%; }
.oli-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.oli-chips:empty { display: none; }
.oli-chip { white-space: normal; text-align: left; }
.oli-form { display: flex; gap: 10px; margin-top: 12px; }
.oli-form input { flex: 1; min-width: 0; font: inherit; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); }
.oli-lock-tag { margin: 12px 0 0; font-weight: 700; color: var(--deep); }

/* v38 : espace client, nouveau look (téléphone d'abord) */
.tank-hero { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: center; padding: 22px; border-radius: 24px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #2A8CF0 0%, #1565C0 38%, #0B3D91 72%, #0A2A63 100%); box-shadow: 0 18px 40px -18px rgba(11,61,145,.55); position: relative; overflow: hidden; }
.tank-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); pointer-events: none; }
.tk-vis { position: relative; width: 132px; height: 176px; border-radius: 30px 30px 26px 26px; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.35); overflow: hidden; box-shadow: inset 0 0 0 6px rgba(255,255,255,.06); }
.tk-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: var(--p); min-height: 6px; background: linear-gradient(180deg, #7FD6FF 0%, #38A8F5 45%, #1E88E5 100%); transition: height .9s cubic-bezier(.2,.7,.2,1); }
.tk-wave { position: absolute; left: -60px; right: -60px; top: -13px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpath d='M0 7 C 15 0, 45 0, 60 7 S 105 14, 120 7 V14 H0Z' fill='%237FD6FF'/%3E%3C/svg%3E") 0 0 / 60px 14px repeat-x; opacity: .95; }
.tk-read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-shadow: 0 1px 8px rgba(5,25,60,.45); }
.tk-read b { font-family: 'Sora', sans-serif; font-size: 2rem; line-height: 1; }
.tk-read span { font-size: .85rem; opacity: .92; margin-top: 4px; }
.tk-main { min-width: 0; }
.tk-prod { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: rgba(255,255,255,.85); }
.tank-hero .ptag { background: rgba(255,255,255,.16); color: #fff; border-color: transparent; }
.tk-label { margin-top: 14px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.tk-days { font-size: 1.05rem; color: rgba(255,255,255,.9); }
.tk-days b { font-family: 'Sora', sans-serif; font-size: 2.6rem; line-height: 1.05; color: #fff; letter-spacing: -1px; }
.tk-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 11px; line-height: 1.3; border-radius: 999px; font-size: .8rem; font-weight: 700; background: rgba(127,214,168,.22); color: #C9F5DC; }
.tk-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lvl-soon .tk-chip { background: rgba(255,200,80,.22); color: #FFE2A3; }
.lvl-low .tk-chip, .lvl-crit .tk-chip { background: rgba(255,120,120,.25); color: #FFD1D1; }
.lvl-low .tk-liquid { background: linear-gradient(180deg, #FFD27A, #F0A500); } .lvl-low .tk-wave { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpath d='M0 7 C 15 0, 45 0, 60 7 S 105 14, 120 7 V14 H0Z' fill='%23FFD27A'/%3E%3C/svg%3E") 0 0 / 60px 14px repeat-x; }
.lvl-crit .tk-liquid { background: linear-gradient(180deg, #FF9A9A, #E04A5A); } .lvl-crit .tk-wave { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpath d='M0 7 C 15 0, 45 0, 60 7 S 105 14, 120 7 V14 H0Z' fill='%23FF9A9A'/%3E%3C/svg%3E") 0 0 / 60px 14px repeat-x; }
@media (prefers-reduced-motion: no-preference) { .tk-wave { animation: tk-wave 3.2s linear infinite; } }
@keyframes tk-wave { to { transform: translateX(60px); } }
.tk-facts { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.tk-facts .fact { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.tk-facts .fact .value { font-size: 1rem; }

/* Onglets : icônes au trait, onglet actif en pastille */
.ctabs .ic { display: inline-flex; font-size: 0; }
.ctabs button[aria-selected="true"] { color: var(--blue); background: var(--tint); box-shadow: none; }
.ctabs button[aria-selected="true"] .ic { color: var(--blue); }

@media (max-width: 640px) {
  body.is-client { background: linear-gradient(180deg, #EAF2FD 0, var(--bg) 320px); }
  body.is-client .side { padding: 10px 16px; gap: 2px 12px; }
  body.is-client .side .site-back { display: none; }
  body.is-client .side-sub { font-size: .8rem; }
  body.is-client .side-actions { gap: 14px; font-size: .8rem; }
  body.is-client .main { padding: 14px 14px 0; }
  #view-client .top { gap: 8px; }
  #view-client .top .muted { font-size: .8rem; }
  #view-client h1 { font-size: 1.45rem; }
  #view-client .client-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
  .tank-hero { grid-template-columns: 112px 1fr; gap: 18px; padding: 18px; }
  .tk-vis { width: 112px; height: 156px; }
  .tk-days b { font-size: 2.3rem; }
  .tk-facts { gap: 8px; } .tk-facts .fact { padding: 10px; } .tk-facts .fact .label { font-size: .72rem; } .tk-facts .fact .value { font-size: .92rem; }
  .ctabs { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); padding-top: 6px; }
  .ctabs button { border-radius: 14px; margin: 0 2px; font-size: .68rem; white-space: nowrap; }
  .ctabs button[aria-selected="true"] { box-shadow: none; }
}
/* Oli : carte de discussion plus légère, questions en pastilles qui défilent */
.oli-chat { border: 1px solid var(--line); background: var(--panel); border-radius: 24px; box-shadow: 0 10px 30px -18px rgba(11,61,145,.35); }
.oli-chat .ai-top { gap: 12px; }
.oli-chat .ai-top h2 { font-size: 1.05rem; }
.oli-chat .ai-top p { font-size: .88rem; }
.oli-chat .oli-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px -4px 0; padding: 0 4px 4px; scroll-snap-type: x proximity; }
.oli-chat .oli-chips::-webkit-scrollbar { display: none; }
.oli-chat .oli-chip { white-space: nowrap; flex: none; scroll-snap-align: start; border-radius: 999px; background: var(--tint); border: 1px solid #C9DCF3; color: var(--deep); font-weight: 600; font-size: .88rem; padding: 8px 14px; }
.oli-chat .oli-form { background: var(--panel-2); border-radius: 999px; padding: 5px; gap: 6px; }
.oli-chat .oli-form input { border: 0; background: transparent; border-radius: 999px; padding: 9px 12px; }
.oli-chat .oli-form .btn { border-radius: 999px; padding: 9px 16px; }
.oli-chat .ai-say { border-radius: 4px 16px 16px 16px; }
/* Le marché sur l'accueil : une carte blanche, sobre */
.client-card .mk-hint { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.client-card .mk-hint.warn { background: var(--panel); border-color: #F1D58A; box-shadow: inset 4px 0 0 var(--gold); }
@media (max-width: 640px) {
  #view-client .client-card .price-box, #view-client .client-card .budget-box, #view-client .client-card .prefs-box { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 10px 30px -22px rgba(11,61,145,.35); }
}
/* v38 : la citerne du client, dessinée comme la vraie */
.tank-hero { grid-template-columns: 170px 1fr; }
.tk-vis { width: 170px; height: 139px; border-radius: 18px; border: 0; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); overflow: hidden; }
.tk-art { display: block; width: 100%; height: 100%; }
.tk-read { inset: auto 8px 8px auto; display: inline-flex; flex-direction: row; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(8,28,64,.62); backdrop-filter: blur(6px); text-shadow: none; }
.tk-read b { font-size: 1.05rem; } .tk-read span { font-size: .75rem; margin: 0; }
@media (prefers-reduced-motion: no-preference) { .tk-w { animation: tk-wave 3.2s linear infinite; } }
.tk-look { margin-top: 10px; }
.tk-look summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: .88rem; list-style: none; }
.tk-look summary::-webkit-details-marker { display: none; }
.tk-look summary::before { content: "🎨 "; }
.tk-look[open] { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.tk-look-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.tk-look-row > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.tk-sw { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-sw button { width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); padding: 0; }
.tk-sw button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--blue); }
@media (max-width: 640px) {
  .tank-hero { grid-template-columns: 1fr; gap: 14px; }
  .tk-vis { width: 100%; height: auto; aspect-ratio: 220 / 180; max-height: 210px; }
  .tk-main { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: end; }
  .tk-main .tk-prod { grid-column: 1 / -1; }
  .tk-main .tk-label { grid-column: 1 / -1; margin-top: 4px; }
  .tk-main .tk-days { grid-column: 1; }
  .tk-main .tk-chip { grid-column: 2; justify-self: end; margin: 0 0 6px; }
}
/* v38 : style « verre lumineux vu de biais » (A+C) */
.tk-vis { background: #061633; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 10px 30px -12px rgba(0,0,0,.45); }
@media (prefers-reduced-motion: no-preference) {
  .tk-glow { animation: tk-glow 3.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
  .tk-surf { animation: tk-surf 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes tk-glow { 50% { opacity: .7; transform: scale(1.08); } }
@keyframes tk-surf { 50% { opacity: .7; } }
@keyframes tk-wave { to { transform: translateX(40px); } }
.swing { gap: 18px; margin-top: 16px; }
.sw-y small { display: block; font-size: .68rem; font-weight: 600; opacity: .8; }
.sw-m { position: absolute; top: -17px; font-style: normal; font-size: .72rem; font-weight: 700; white-space: nowrap; line-height: 1; }
.sw-m.lo { color: #1F9D61; transform: translateX(calc(-100% - 6px)); }
.sw-m.hi { color: #C2303F; transform: translateX(6px); }
.sw-m.hi.end { transform: translateX(calc(-100% - 6px)); top: 16px; }
.sw-key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.sw-key span { display: inline-flex; align-items: center; gap: 6px; }
.sw-dot-k { width: 10px; height: 10px; border-radius: 50%; display: inline-block; } .sw-dot-k.lo { background: #1F9D61; } .sw-dot-k.hi { background: #D93A4A; }
.sw-fact { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--tint); color: var(--deep); font-size: .9rem; }
/* Paramètres du fournisseur */
.st-form { display: grid; gap: 0; margin-top: 8px; }
.st-row { display: grid; grid-template-columns: 1fr 240px; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.st-row .switch { align-items: flex-start; gap: 12px; }
.st-amt { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.st-amt span { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.st-amt input { width: 96px; }
.st-form .btn { justify-self: start; margin-top: 16px; }
@media (max-width: 640px) { .st-row { grid-template-columns: 1fr; gap: 10px; } }
/* Clients et formules */
.cl-scope .seg { display: inline-flex; }
.plan-chip { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.plan-chip.coach { background: #E3EEFF; color: #0B3D91; } .plan-chip.watch { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.st-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.st-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-chip.ok { color: #1F9D61; } .st-chip.warn { color: #B07A00; } .st-chip.off { color: #8A97AD; }
.cl-table td { vertical-align: middle; }
#cl-dists .card { margin-bottom: 16px; }
#cl-filters select { min-width: 200px; } #cl-filters input[type=search] { min-width: 260px; flex: 1; }

/* Mes réglages (client) */
.cs-card { background: transparent; border: none; padding: 0; gap: 0; }
.cs-card .st-box, .cs-card .prefs-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; }
.cs-card .prefs-box { gap: 0; }
.cs-card h3 { margin: 0; font-size: 1.1rem; }
.cs-card .st-box p { margin: 0; }
.cs-card .st-box label:not(.switch) { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.cs-card .st-box input:not([type]), .cs-card .st-box input[type=tel], .cs-card .st-box textarea { padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--field); color: var(--text); font: inherit; font-weight: 400; width: 100%; box-sizing: border-box; }
.cs-card .st-box textarea { resize: vertical; min-height: 76px; }
.cs-card .label-sm { font-weight: 600; font-size: 0.95rem; margin-top: 4px !important; }
.cs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-card input[type=range] { width: 100%; accent-color: var(--blue); height: 28px; }
.cs-card .cs-out { color: var(--blue); font-size: 1.05rem; }
.cs-card .btn { align-self: flex-start; }
.gear-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.gear-btn[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: #fff; }
@media (max-width: 520px) { .cs-two { grid-template-columns: 1fr; } .gear-btn span { display: none; } .gear-btn { width: 40px; justify-content: center; padding: 0; } }
.cs-card .seg { align-self: flex-start; }
/* Équipe : mise à jour automatique des prix */
.tp-auto { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); margin-bottom: 12px; }
.tp-auto h3 { margin: 0; }
.tp-auto .btn { align-self: flex-start; }
.tp-line { display: flex; gap: 10px; align-items: flex-start; }
.tp-line p { margin: 2px 0 0; }
.tp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey); margin-top: 6px; flex: none; }
.tp-line.ok .tp-dot { background: var(--green); }
.tp-line.bad .tp-dot { background: var(--red); }
/* Coach : prix officiel déjà publié pour les jours qui viennent */
.next-off { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); margin: 10px 0; }
.next-off p { margin: 0; line-height: 1.4; }
.next-off.down { border-color: rgba(31, 157, 97, .45); background: rgba(31, 157, 97, .07); }
.next-off.up { border-color: rgba(224, 160, 0, .5); background: rgba(224, 160, 0, .08); }

/* Relevé terrain */
.rl-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.rl-bars{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.rl-bar{display:grid;grid-template-columns:minmax(150px,1.2fr) 2fr minmax(90px,.7fr);gap:12px;align-items:center}
.rl-lab{display:flex;flex-direction:column}.rl-n{display:flex;flex-direction:column;text-align:right}
.rl-track{height:14px;border-radius:8px;background:var(--panel-2);overflow:hidden}.rl-track i{display:block;height:100%;border-radius:8px}
.rl-fleet{display:flex;align-items:center;gap:8px;margin-top:14px;font-size:14px;flex-wrap:wrap}.rl-fleet input{width:110px}
.rl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-bottom:6px}
.rl-grid label,.rl-note{display:flex;flex-direction:column;gap:4px;font-size:14px}
.rl-q{margin:12px 0}.rl-opts{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.rl-opt{border:1.5px solid var(--line-2);background:var(--panel);border-radius:12px;padding:10px 14px;font-size:15px;cursor:pointer;color:var(--text)}
.rl-opt.on{border-color:var(--blue);background:#E8F2FC;font-weight:700}
.rl-photos{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
.rl-verdict{border-left:6px solid;background:var(--panel-2);border-radius:10px;padding:12px 14px;margin:12px 0;font-size:15px}
.rl-pill{color:#fff;font-weight:700;font-size:12.5px;padding:3px 10px;border-radius:20px;white-space:nowrap}
.rl-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.rl-row>span:first-child{flex:1;min-width:0}
@media (max-width:600px){.rl-bar{grid-template-columns:1fr;gap:4px}.rl-n{text-align:left;flex-direction:row;gap:8px}}

/* Revendeur */
.rs-sum { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; align-items: stretch; }
.rs-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; min-width: 120px; display: flex; flex-direction: column; }
.rs-kpi b { font-family: 'Sora', sans-serif; font-size: 1.8rem; line-height: 1.1; }
.rs-kpi span { color: var(--muted); font-size: .9rem; }
.rs-kpi.ok b { color: var(--green); }
.rs-kpi.bad b { color: var(--red); }
.rs-help { flex-basis: 100%; margin: 0; }
.rs-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rs-state { font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; align-self: flex-start; }
.rs-state.ok { background: rgba(31,157,97,.12); color: var(--green); }
.rs-state.late { background: #FFF4D6; color: #8A5A00; }
.rs-state.bad { background: rgba(217,58,74,.12); color: var(--red); }
.rs-state.idle { background: var(--panel-2); color: var(--muted); }
.rs-facts { flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 520px) { .rs-list { grid-template-columns: 1fr; } .rs-kpi { min-width: 0; flex: 1; padding: 12px; } .rs-kpi b { font-size: 1.5rem; } .rs-kpi span { font-size: .8rem; } }
/* v48 — Santé du parc (équipe) */
.hl-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.hl-demo{display:flex;gap:6px;align-items:center;font-size:14px;color:var(--muted)}
.hl-gw{margin:4px 0 14px}.hl-card{display:flex;flex-direction:column;gap:4px;border-radius:16px;padding:12px 16px;border:1px solid var(--line);background:var(--panel)}
.hl-card.ok{border-left:6px solid var(--green)}.hl-card.bad{border-left:6px solid var(--red)}.hl-card span{color:var(--muted);font-size:.92rem}
.hl-card .hl-rej{color:#8A5A00;background:#FFF4E0;border-radius:10px;padding:6px 10px;margin-top:4px}
button.rs-kpi{cursor:pointer;text-align:left;font:inherit;color:inherit}button.rs-kpi.on{outline:2px solid var(--blue, #1976D2);outline-offset:-2px}
.hl-filter{margin:6px 0 10px}.rs-facts .warn{color:var(--red);font-weight:600}
/* v49 — Le marché cette semaine, avec Oli */
.mcard{background:#fff;border-radius:22px;box-shadow:0 6px 24px rgba(11,58,126,.12);overflow:hidden;margin:14px 0}
.mcard .mc-top{background:linear-gradient(135deg,#0B3A7E,#1976D2);color:#fff;padding:14px 16px 12px}
.mc-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.mc-logo{height:22px}.mc-bar span{font-size:11px;letter-spacing:.5px;text-transform:uppercase;opacity:.85}
.mc-oli{display:flex;gap:10px;align-items:flex-end;margin-bottom:10px}.mc-av{width:54px;height:54px;border-radius:50%;background:#fff;border:3px solid rgba(255,255,255,.6);object-fit:cover;flex:0 0 54px}
.mc-bub{background:#fff;color:#0E1B2E;border-radius:16px 16px 16px 4px;padding:9px 12px;font-size:15px;line-height:1.35;margin:0}.mc-bub b{color:#1E9E6A}
.mc-kpi{display:flex;align-items:center;gap:10px}.mc-kpi b{display:block;font-size:20px;line-height:1.15}.mc-kpi span{font-size:13px;opacity:.9}
.mc-arrow{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:0 0 40px;background:#8A97AD}.mc-arrow.down{background:#2ECC8F}.mc-arrow.up{background:#E25A5A}
.mc-spark{display:block;width:100%;height:46px;margin-top:6px}
.mc-body{padding:4px 16px 0}.mc-h{font-size:11px;color:#6B7A8F;text-transform:uppercase;letter-spacing:.5px;margin:12px 0 7px}
.mc-why{display:flex;gap:8px}.mc-tile{flex:1;border-radius:14px;padding:9px 8px;text-align:center;font-size:12px;line-height:1.25;color:#3B4A5E}.mc-tile b{display:block;font-size:13px;color:#0E1B2E;margin-top:4px}
.mc-risk{color:#8A5A00;font-size:13px;margin:9px 0 0}
.mc-me{background:#F3F7FC;border-radius:14px;padding:8px 12px 10px;margin-top:10px;font-size:14px;line-height:1.45}.mc-me .mc-h{margin:2px 0 3px}.mc-me p{margin:0}.mc-me b{color:#0B3A7E}
.mc-chips{display:flex;flex-wrap:wrap;gap:7px}
.mc-foot{border-top:1px solid #E8EDF3;margin-top:12px;padding:11px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.mc-foot span{display:block;font-size:12px;color:#6B7A8F}.mc-foot b{font-size:20px;color:#0B3A7E}
.mc-note{font-size:11px;color:#8A97A8;text-align:center;margin:0 0 10px}
.mc-lock{display:flex;gap:10px;align-items:center;padding:12px 16px}.mc-lock p{margin:0;font-size:14px;flex:1}.mc-mini{width:36px;height:36px;border-radius:50%;background:#E6F1FC;object-fit:cover}
html[data-theme="dark"] .mcard,body.dark .mcard{background:var(--panel)}
.brief-form .inline-form{margin-bottom:6px}
.mc-curve{display:block;width:100%;background:none;border:0;padding:0;color:#fff;text-align:right;cursor:pointer;font:inherit}.mc-curve span{font-size:12px;opacity:.85}
.mc-off{display:block;font-style:normal;font-size:12px;font-weight:600}.mc-off.down{color:#1E9E6A}.mc-off.up{color:#D93A4A}.mc-off.flat{color:#6B7A8F}
/* v50 — le menu de gauche défile quand il est plus haut que l'écran (version, compte, déconnexion toujours accessibles) */
@media (min-width: 821px) { .side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } .side .menu-item { flex: none; } }
/* v51 — Réglages des alertes et messages du client */
.al-box{background:#fff;border-radius:18px;padding:0 0 14px;overflow:hidden}
.al-head{display:flex;gap:10px;align-items:center;background:linear-gradient(135deg,#0B3A7E,#1976D2);color:#fff;padding:12px 16px;margin-bottom:4px}.al-head p{margin:0;font-size:14px;line-height:1.35}.al-head b{color:#7CF0B9}
.al-sec{font-size:11px;color:#6B7A8F;text-transform:uppercase;letter-spacing:.5px;margin:14px 16px 4px;display:flex;gap:8px;align-items:center}
.al-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 16px;border-bottom:1px solid #F0F3F7}.al-row.col{flex-direction:column;align-items:stretch;gap:7px}
.al-row b{display:block;font-size:14.5px}.al-row span{font-size:12.5px;color:#6B7A8F}
.al-seg{display:flex;background:#EEF3F9;border-radius:10px;padding:3px}.al-seg label{flex:1;margin:0;cursor:pointer}.al-seg input{position:absolute;opacity:0;pointer-events:none}
.al-seg span{display:block;text-align:center;padding:8px 4px;font-size:13px;color:#6B7A8F;border-radius:8px}.al-seg input:checked+span{background:#fff;color:#0B3A7E;font-weight:700;box-shadow:0 1px 3px rgba(0,0,0,.1)}
.al-seg input:focus-visible+span{outline:2px solid #1976D2}.al-seg.locked{opacity:.5}.al-seg.locked label{cursor:not-allowed}
.al-tog{position:relative;flex:0 0 44px;height:26px;margin:0}.al-tog input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
.al-tog i{position:absolute;inset:0;border-radius:13px;background:#CBD3DE;transition:background .15s}.al-tog i:after{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:left .15s}
.al-tog input:checked+i{background:#2ECC8F}.al-tog input:checked+i:after{left:21px}.al-tog input:focus-visible+i{outline:2px solid #1976D2}
.al-always{font-size:12px;font-weight:700;color:#16704C;background:#E7F8F0;border-radius:10px;padding:4px 9px}
.al-chips{display:flex;gap:7px;padding:4px 16px 6px;flex-wrap:wrap}.al-chip{border:1.5px solid #CFE0F5;border-radius:20px;padding:6px 11px;font-size:13px;color:#6B7A8F;margin:0;cursor:pointer;position:relative}
.al-chip input{position:absolute;opacity:0}.al-chip.on,.al-chip:has(input:checked){background:#0B3A7E;color:#fff;border-color:#0B3A7E}
.al-box>.muted.small{margin:0 16px 4px}.al-cap{margin:12px 16px;background:#E7F8F0;color:#16704C;border-radius:12px;padding:9px 12px;font-size:13px;text-align:center}.al-box>.btn{margin:0 16px}
.nt-card{background:#FFF8E8;border:1px solid #F5DFA8;border-radius:16px;padding:10px 14px;margin:0 0 12px}.nt-top{display:flex;justify-content:space-between;align-items:center}.nt-top h3{margin:0;font-size:15px}
.nt-list{list-style:none;margin:6px 0 0;padding:0}.nt{display:flex;gap:10px;padding:8px 0;border-top:1px solid rgba(0,0,0,.06)}.nt:first-child{border-top:0}.nt-ic{font-size:20px;line-height:1.2}
.nt b{font-size:14px}.nt p{margin:2px 0;font-size:13.5px;color:#3B4A5E}.nt.leak b{color:#B3261E}.nt.new b::after{content:" •";color:#1976D2}
.gear-btn{position:relative}.gear-btn .dot{position:absolute;top:2px;right:2px;width:9px;height:9px;border-radius:50%;background:#E25A5A}

/* v52 — météo */
.mc-wx{display:inline-block;margin-top:4px;font-size:13.5px}.mc-wx.cold b{color:#1565C0}.mc-wx.mild b{color:#1E9E6A}


/* v56 — Mon équipe : profils en tuiles, droits en cases à cocher */
#view-team .top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 12px; }
.tm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.tm-card.off { opacity: .6; }
.tm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tm-head > div { flex: 1; min-width: 140px; }
.tm-av { width: 42px; height: 42px; border-radius: 50%; background: var(--deep); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.tm-prof { background: var(--tint); color: var(--deep); border-radius: 999px; padding: 4px 10px; font-size: .85rem; font-weight: 600; }
.tm-prof i { font-style: normal; font-weight: 500; color: var(--violet); }
.tm-st { border-radius: 999px; padding: 4px 10px; font-size: .8rem; font-weight: 600; }
.tm-st.on { background: #E6F6EE; color: var(--green); } .tm-st.off { background: #F1F3F6; color: var(--grey); } .tm-st.wait { background: #FFF5DA; color: #8A6200; }
.tm-perms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-perms li { font-size: .82rem; border-radius: 8px; padding: 4px 8px; }
.tm-perms li.yes { background: #EAF2FC; color: var(--deep); } .tm-perms li.no { background: #F4F5F7; color: var(--faint); text-decoration: line-through; }
.tm-act { display: flex; gap: 8px; flex-wrap: wrap; }
.tm-edit .al-sec { margin: 18px 0 8px; font-weight: 700; color: var(--deep); }
.tm-profiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tm-pf { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); padding: 12px 14px; cursor: pointer; font: inherit; color: var(--text); }
.tm-pf .ic { font-size: 1.6rem; } .tm-pf span:last-child { font-size: .82rem; color: var(--muted); }
.tm-pf.on { border-color: var(--blue); background: #EEF5FD; box-shadow: 0 0 0 3px rgba(25, 118, 210, .12); }
.tm-pf:disabled { opacity: .45; cursor: not-allowed; }
.tm-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tm-ck { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--panel); }
.tm-ck input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.tm-ck .ic { font-size: 1.3rem; }
.tm-ck.on { border-color: var(--blue); background: #F3F8FE; }
.tm-ck.dis { opacity: .6; cursor: not-allowed; }
.tm-foot { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.tm-done { border: 2px solid var(--green); }
.tm-link { display: flex; gap: 8px; margin: 10px 0; }
.tm-link input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; font-size: .85rem; }
.tm-share { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
@media (max-width: 820px) {
  .tm-profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-checks { grid-template-columns: 1fr; }
  .tm-grid { grid-template-columns: 1fr; }
}
.tm-done [data-tm-close] { width: auto; }
.tm-edit .al-sec .muted { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 2px; }

/* v58 — Le marché côté fournisseur (la pastille jaune y mène) */
.sm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sm-kpis .value small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.sm-kpis .sm-next { border: 2px solid var(--gold); }
.sm-why { max-width: none; }
.sm-why .sm-head { font-size: 1.25rem; font-weight: 700; margin: 4px 0 2px; }
.sm-why .mc-body { padding-bottom: 14px; }
.sm-why .mc-tile { font-size: 13px; padding: 12px 10px; } .sm-why .mc-tile b { font-size: 14px; }
.sm-src { margin: 10px 0 0; }
.price-pill { cursor: pointer; }
@media (max-width: 820px) { .sm-kpis { grid-template-columns: 1fr; } .sm-why .mc-why { flex-direction: column; } }

/* Rappel : prix de base du fournisseur trop ancien (22/11) */
.stale-base { margin: .5rem 0; padding: .55rem .8rem; border-radius: 10px; background: #fff4e0; color: #7a4b00; border: 1px solid #f3c77a; font-size: .92rem; }
