/* Diago — style iOS 26 : fond crème, vert chasse, verre discret, coins concentriques. */
:root {
  color-scheme: light;
  --bg: #f3f2ee;
  --text: #1f2a3d;
  --muted: #5d6879;
  --faint: #8a93a3;
  --line: rgba(31, 42, 61, .07);
  --fill: rgba(118, 118, 128, .12);
  --card: rgba(255, 255, 255, .74);
  --accent: #2f5e45;
  --accent-soft: rgba(47, 94, 69, .11);
  --red: #d94b61;
  --red-soft: rgba(217, 75, 97, .1);
  --amber: #b97a1e;
  --amber-soft: rgba(185, 122, 30, .11);
  --leaf: #5a8f3a;
  --leaf-soft: rgba(90, 143, 58, .12);
  --r: 26px;
  --shadow: 0 0 0 .5px rgba(0, 0, 0, .045), 0 8px 24px -10px rgba(30, 40, 35, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; min-width: 0; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(720px 480px at 100% 0%, rgba(120, 170, 135, .38), transparent 65%),
  radial-gradient(640px 520px at 0% 38%, rgba(255, 212, 184, .5), transparent 70%),
  radial-gradient(720px 600px at 75% 100%, rgba(172, 202, 232, .36), transparent 70%), var(--bg); }

.app { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px calc(120px + env(safe-area-inset-bottom)); }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); }

/* En-tête */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin-top: 6px; border-radius: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #3b7556, #2b573f); box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .3), 0 6px 14px -5px rgba(35, 80, 55, .5); }
.brand-name { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.05; }
.brand-sub { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 650; color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 .5px rgba(47, 94, 69, .18); border: 0; cursor: pointer; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--text); text-decoration: none; white-space: nowrap; cursor: pointer;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), inset 0 .5px 0 rgba(255, 255, 255, .9), 0 2px 6px -2px rgba(30, 40, 35, .12);
  transition: background .15s, transform .12s, box-shadow .15s, filter .15s; }
.btn:hover { background: rgba(255, 255, 255, .96); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), inset 0 .5px 0 #fff, 0 4px 10px -3px rgba(30, 40, 35, .16); }
.btn:active { transform: scale(.97); filter: brightness(.96); }
.btn:focus-visible, .tab:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline: 2px solid rgba(47, 94, 69, .55); outline-offset: 2px; }
.btn.primary { color: #fff; background: linear-gradient(180deg, #356a4e, #2b573f); backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .28), 0 0 0 .5px rgba(20, 50, 35, .35), 0 4px 12px -4px rgba(35, 80, 55, .4); }
.btn.primary:hover { background: linear-gradient(180deg, #3b7556, #2f5e45); }
.btn.danger { color: var(--red); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn.icon { width: 40px; height: 40px; padding: 0; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg.i { width: 17px; height: 17px; }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 6px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 12px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; text-align: left; border: 0; cursor: default; }
button.stat { cursor: pointer; }
.stat-label { order: -1; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-num { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats.four .stat-num { font-size: 22px; }
.stat.urgent .stat-num { color: var(--red); }

.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 42px; border-radius: 999px; background: var(--fill); }
.search svg { color: var(--faint); }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; }
.search input::placeholder { color: var(--faint); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0 4px; padding: 4px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; background: rgba(255, 255, 255, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 0 0 .5px rgba(0, 0, 0, .06), 0 3px 10px -4px rgba(30, 40, 35, .14); }
.chip.on { background: var(--accent); color: #fff; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .35), 0 6px 14px -4px rgba(35, 80, 55, .45); }

/* Contrôle segmenté iOS */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); }
.seg button { height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 0 8px; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }

/* Liste d'appels */
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.item { padding: 16px 18px; cursor: pointer; }
.item.dim { opacity: .58; }
.row { display: flex; align-items: center; gap: 9px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.haute { background: var(--red); } .dot.moyenne { background: var(--amber); } .dot.basse { background: var(--faint); }
.name { font-weight: 600; font-size: 16px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdv { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12px; font-weight: 600; color: var(--leaf, #2f5e45); background: rgba(47,94,69,.1); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.rdv svg { width: 12px; height: 12px; }
.when { color: var(--faint); font-size: 12.5px; flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum { margin: 6px 0 10px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; }
.tag.red { color: var(--red); background: var(--red-soft); }
.tag.green { color: var(--accent); background: var(--accent-soft); }
.tag.leaf { color: var(--leaf); background: var(--leaf-soft); }
.tag.amber { color: var(--amber); background: var(--amber-soft); }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions .btn { flex: 1; }
.actions .btn.icon { flex: none; }

.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.skeleton { height: 112px; border-radius: var(--r); background: linear-gradient(90deg, var(--line), rgba(255, 255, 255, .5), var(--line)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Tournée */
.head2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 2px 4px; }
.h-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.h-sub { color: var(--muted); font-size: 13.5px; }
.daynav { display: flex; align-items: center; gap: 6px; }
.daynav input[type=date] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.banner { padding: 11px 15px; border-radius: 16px; font-size: 13.5px; margin-bottom: 10px; background: var(--accent-soft); color: var(--accent); }
.banner.bad { background: var(--red-soft); color: var(--red); }
.banner.neutral { background: var(--line); color: var(--muted); }
.mapbox { position: relative; height: 340px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: #f1eee7; }
#map { position: absolute; inset: 0; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.maplibregl-ctrl-attrib { font-size: 10px; background: rgba(255, 255, 255, .7) !important; border-radius: 999px 0 0 0; }
.pin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12.5px; font-weight: 700; background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.pin.late { background: var(--red); } .pin.done { background: #9aa6a0; }
.pin.home { background: #fff; color: var(--accent); width: 30px; height: 30px; border: 0; }
.ctrls { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
.ctrls .seg { flex: 1 1 260px; }
.pill { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--fill); color: var(--muted); font-size: 13.5px; }
.pill select { background: transparent; border: 0; font-size: 16px; font-weight: 600; color: var(--text); outline: 0; cursor: pointer; }
.guide { padding: 16px; margin: 4px 0 6px; }
.g-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.g-step { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.g-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.g-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(31, 42, 61, .13); }
.g-dots .done { background: var(--accent); opacity: .45; } .g-dots .now { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.g-name { font-size: 19px; font-weight: 650; margin-top: 6px; }
.g-sub { color: var(--muted); font-size: 13.5px; }
.guide .btn { margin-top: 12px; }
.leg { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12.5px; padding: 6px 0 6px 28px; font-variant-numeric: tabular-nums; }
.leg svg.i { width: 15px; height: 15px; }
.leg .w { color: var(--amber); }
.stop { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
.stop.late { box-shadow: 0 0 0 1.5px rgba(217, 75, 97, .45), var(--shadow); }
.stop.now { box-shadow: 0 0 0 1.5px rgba(47, 94, 69, .45), 0 0 0 5px var(--accent-soft), var(--shadow); }
.stop.done { opacity: .55; }
.s-time { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.s-time small { display: block; font-size: 12.5px; font-weight: 500; color: var(--faint); }
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.late .num { background: var(--red); } .done .num { background: #9aa6a0; }
.addr { color: var(--muted); font-size: 13.5px; margin: 2px 0 8px; }

/* Réglages */
.form { display: flex; flex-direction: column; gap: 12px; }
.group { padding: 4px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: .5px solid var(--line); position: relative; }
.field:last-child { border-bottom: 0; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { border: 0; outline: 0; background: transparent; font-size: 16px; padding: 2px 0; width: 100%; }
.field textarea { resize: vertical; min-height: 60px; }
.field .hint { font-size: 12.5px; color: var(--faint); }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline input[type=time] { width: auto; background: var(--fill); border-radius: 10px; padding: 6px 10px; }
.card.group:focus-within, .field:focus-within { position: relative; z-index: 6; }
.sugg { position: absolute; left: -8px; right: -8px; top: 100%; z-index: 5; background: #fff; border-radius: 16px; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(0, 0, 0, .06); overflow: hidden; }
.sugg button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 11px 14px; cursor: pointer; font-size: 14.5px; }
.sugg button:hover, .sugg button:focus { background: var(--accent-soft); outline: 0; }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.chipset .chip { height: 32px; padding: 0 12px; font-size: 13.5px; }
.section-t { font-size: 13px; color: var(--muted); font-weight: 600; margin: 18px 6px 6px; }
.note { color: var(--faint); font-size: 12.5px; margin: 12px 4px 0; }
code { background: var(--fill); padding: 2px 6px; border-radius: 6px; font-size: 13px; overflow-wrap: anywhere; }

.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }

/* Feuille */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(20, 25, 22, .2); animation: fade .2s ease; }
.sheet { position: fixed; z-index: 21; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 720px; max-height: calc(92vh - env(safe-area-inset-top));
  display: flex; flex-direction: column; border-radius: 34px; padding: 6px 18px 18px;
  background: rgba(251, 250, 247, .9); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .05), 0 24px 60px -12px rgba(0, 0, 0, .3); animation: up .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; } }
.grabber { width: 36px; height: 5px; border-radius: 99px; background: rgba(0, 0, 0, .16); margin: 6px auto 10px; }
.sh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sh-title { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.sh-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sh-body { overflow-y: auto; margin-top: 12px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.block { background: rgba(255, 255, 255, .8); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .04); }
.block h3 { margin: 0 0 4px; font-size: 12px; color: var(--faint); font-weight: 600; }
.block p { margin: 0; }
.block.next { background: var(--accent-soft); box-shadow: none; }
.block.next h3 { color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.grid2 span { display: block; font-size: 12px; color: var(--faint); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.transcript { max-height: 260px; overflow-y: auto; font-size: 14px; }
.line { margin: 0 0 8px; color: var(--muted); }
.line b { color: var(--text); }
audio { width: 100%; margin-top: 4px; }
.sh-foot { display: flex; gap: 8px; margin-top: 12px; }
.sh-foot .btn { flex: 1; }

.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, .96); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .05), 0 10px 30px -8px rgba(0, 0, 0, .25); animation: fade .2s ease; max-width: calc(100% - 32px); }

.gate { max-width: 420px; margin: 18vh auto 0; padding: 28px; text-align: center; }
.gate h1 { font-size: 24px; margin: 14px 0 6px; }
.gate p { color: var(--muted); margin: 0; }

@media (max-width: 600px) {
  .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mapbox { height: 270px; }
  .stop { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
  .s-time { font-size: 17px; }
  .brand-name { font-size: 22px; }
}
@media (min-width: 640px) { .sheet { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Devis */
.q-top { display: flex; align-items: baseline; gap: 10px; }
.q-amount { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.banner .btn { margin-top: 8px; }
.lines { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 4px; }
.qline { display: grid; grid-template-columns: minmax(0, 1fr) 56px 92px 34px; gap: 6px; align-items: center; }
.qline input { border: 0; outline: 0; background: var(--fill); border-radius: 10px; padding: 8px 10px; font-size: 16px; width: 100%; }
.qline input.r { text-align: right; font-variant-numeric: tabular-nums; }
.qline .x { width: 34px; height: 34px; border: 0; background: none; color: var(--faint); cursor: pointer; border-radius: 50%; display: grid; place-items: center; }
.qline .x:hover { color: var(--red); background: var(--red-soft); }
.qhead { display: grid; grid-template-columns: minmax(0, 1fr) 56px 92px 34px; gap: 6px; font-size: 12px; color: var(--faint); font-weight: 600; }
.qhead span:nth-child(2), .qhead span:nth-child(3) { text-align: right; padding-right: 10px; }
.totals { padding: 10px 0 4px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.totals .ttc { color: var(--text); font-size: 20px; font-weight: 700; border-top: .5px solid var(--line); margin-top: 6px; padding-top: 8px; }
.field.mini { flex-direction: row; gap: 12px; flex-wrap: wrap; }
.mini label { flex: 1 1 120px; display: flex; flex-direction: column; gap: 4px; }
.mini label span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mini input { background: var(--fill) !important; border-radius: 10px; padding: 8px 10px !important; }
.prices { width: 100%; border-collapse: collapse; }
.prices th { text-align: right; font-size: 12px; color: var(--faint); font-weight: 600; padding: 4px; }
.prices th:first-child { text-align: left; }
.prices td { padding: 5px 4px; border-top: .5px solid var(--line); }
.prices td input { width: 84px; text-align: right; border: 0; outline: 0; background: var(--fill); border-radius: 10px; padding: 7px 10px; font-size: 16px; font-variant-numeric: tabular-nums; }
.prices td:not(:first-child) { text-align: right; }
.rule { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 0; border-bottom: .5px solid var(--line); font-size: 15px; }
.rule:last-child { border-bottom: 0; }
.rule input { width: 70px; text-align: right; border: 0; outline: 0; background: var(--fill); border-radius: 10px; padding: 7px 10px; font-size: 16px; }
.alt { background: var(--amber-soft); border-radius: 18px; padding: 12px 14px; margin-top: 10px; }
.alt p { margin: 0 0 8px; color: var(--amber); font-weight: 600; font-size: 14px; }
.alt .actions { margin-top: 0; flex-wrap: wrap; }
@media (max-width: 420px) { .tab { font-size: 10.5px; } .qline { grid-template-columns: minmax(0, 1fr) 46px 80px 30px; } .qhead { grid-template-columns: minmax(0, 1fr) 46px 80px 30px; } }
#qForm .sh-foot { flex-wrap: wrap; }
#qForm .sh-foot .primary { flex: 1 1 100%; order: -1; }



/* ===== Effets (validés sur la démo) ===== */
/* Chiffres qui roulent */
.roll { display: inline-flex; overflow: hidden; line-height: 1.15; height: 1.15em; vertical-align: bottom; font-variant-numeric: tabular-nums; }
.roll .col { display: inline-block; height: 1.15em; overflow: hidden; }
.roll .strip { display: flex; flex-direction: column; transition: transform .9s cubic-bezier(.22, 1.4, .36, 1); }
.roll .strip span { height: 1.15em; display: block; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Squelette */
.sk { padding: 16px 18px; }
.sk-row { display: flex; gap: 10px; align-items: center; }
.sk .b { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(31,42,61,.06) 0%, rgba(31,42,61,.06) 30%, rgba(255,255,255,.85) 50%, rgba(31,42,61,.06) 70%, rgba(31,42,61,.06) 100%); background-size: 250% 100%; animation: shimmer2 1.3s linear infinite; }
@keyframes shimmer2 { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.fadein { animation: fadein2 .5s ease both; }
@keyframes fadein2 { from { opacity: 0; transform: translateY(6px); } }
/* Agent actif */
.live { display: flex; align-items: center; gap: 7px; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--accent); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #34c27a; flex: none; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34c27a; animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.pulse::after { animation-delay: .9s; }
@keyframes ping { 75%, 100% { transform: scale(3); opacity: 0; } }
.live.off { color: var(--faint); } .live.off .pulse { background: var(--faint); } .live.off .pulse::before, .live.off .pulse::after { display: none; }
/* Bouton à texte roulant */
.rbtn { overflow: hidden; padding: 0 !important; align-items: flex-start !important; }
.rbtn .stack { width: 100%; display: flex; flex-direction: column; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.rbtn .stack > span { flex: none; height: var(--h, 44px); display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; }
.rbtn[data-s="1"] .stack { transform: translateY(calc(-1 * var(--h, 44px))); }
.rbtn[data-s="2"] .stack { transform: translateY(calc(-2 * var(--h, 44px))); }
.rbtn[data-s="2"] { filter: saturate(1.2) brightness(1.08); }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; opacity: .8; animation: sp .7s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
/* Glisser les cartes */
.swipe { position: relative; border-radius: var(--r); }
.swipe .under { position: absolute; inset: 0; border-radius: var(--r); display: flex; justify-content: space-between; align-items: center; padding: 0 24px; color: #fff; font-weight: 700; font-size: 15px; opacity: 0; transition: opacity .15s; }
.swipe .under span { display: flex; align-items: center; gap: 8px; }
.swipe.dragging .under { opacity: 1; }
.swipe.to-r .under { background: var(--leaf); } .swipe.to-l .under { background: var(--accent); }
.swipe.to-r .under .r, .swipe.to-l .under .l { visibility: hidden; }
.swipe .item { touch-action: pan-y; transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); }
.swipe.dragging .item { background: #fbfaf7; }
.swipe .item.drag { transition: none; }
.newcard { animation: drop .5s cubic-bezier(.2, 1.2, .3, 1); }
@keyframes drop { from { opacity: 0; transform: translateY(-16px) scale(.97); } }
/* Résumé qui apparaît */
.w { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(4px); animation: wordin .55s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes wordin { to { opacity: 1; filter: blur(0); transform: none; } }
@media (prefers-reduced-motion: reduce) { .w { opacity: 1; filter: none; transform: none; } .pulse::before, .pulse::after { display: none; } }
#qTotals { display: block !important; padding: 0 !important; }

/* Logo Diago (image) + nom du cabinet en titre */
.logo-img { width: 44px; height: 44px; border-radius: 13px; object-fit: cover; flex: none; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06), 0 6px 14px -6px rgba(30, 40, 35, .35); }
.top .brand-name { font-size: 21px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.top .brand > div { min-width: 0; }
.top .brand { min-width: 0; }
.top .brand-name { white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; }
@media (max-width: 600px) { .top .brand-name { font-size: 18px; } }
.top .brand-name { line-height: 1.3; padding-bottom: 2px; }

/* ===== Barre « eau » (Waterline) : place et format Diago ===== */
.nimbus-nav.diago-nav { position: fixed; z-index: 15; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(440px, calc(100% - 28px)); display: flex; }
.diago-nav .nimbus-item { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; height: 56px; padding: 0 4px; font-size: 11px; font-weight: 600; }
.diago-nav .nv-ico svg { width: 22px; height: 22px; }
.diago-nav .badge { z-index: 2; }

/* ===== Ouverture : logo D en verre ===== */
.splash { position: fixed; inset: 0; z-index: 100; background: #f3f2ee; transition: opacity .6s ease, visibility .6s; }
.splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.splash canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.splash .fallback { position: absolute; inset: 0; margin: auto; width: 120px; height: 120px; border-radius: 30px; animation: splashFb 1.6s cubic-bezier(.2, 1.2, .3, 1) both; }
@keyframes splashFb { from { opacity: 0; transform: scale(.6); filter: blur(10px); } }

/* ===== Aperçu du devis plein écran ===== */
.preview { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #f3f2ee; animation: pvIn .28s cubic-bezier(.2,.9,.3,1) both; }
.preview.out { animation: pvOut .25s ease both; }
@keyframes pvIn { from { transform: translateY(24px); opacity: 0; } }
@keyframes pvOut { to { transform: translateY(24px); opacity: 0; } }
.preview-bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; text-align: center; font-size: 16px; background: rgba(243,242,238,.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 .5px 0 rgba(0,0,0,.08); }
.preview-x { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: rgba(118,118,128,.14); color: var(--text); }
.preview-x svg { width: 18px; height: 18px; }
.preview iframe { flex: 1; width: 100%; border: 0; background: #f3f2ee; }

/* ===== Calendrier de la tournée ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd span { text-align: center; font-size: 12px; font-weight: 600; color: var(--faint); padding: 4px 0; }
.cal-d { position: relative; aspect-ratio: 1; border: 0; border-radius: 14px; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; color: var(--text); }
.cal-d b { font-weight: 500; font-size: 15px; }
.cal-d i { font-style: normal; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 16px; line-height: 16px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; }
.cal-d.alldone i { background: rgba(47,94,69,.18); color: var(--accent); }
.cal-d.has { background: rgba(47,94,69,.07); }
.cal-d.today b { color: var(--accent); font-weight: 700; }
.cal-d.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-d:active { transform: scale(.94); }

/* ===== Activités récentes (cloche) ===== */
.top { flex-wrap: wrap; transition: border-radius .5s ease; }
.top.open { border-radius: 28px; }
.act-btn { position: relative; display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 10px 0 12px; border: 0; border-radius: 999px; cursor: pointer; color: var(--text);
  background: rgba(255,255,255,.85); box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 2px 6px -2px rgba(30,40,35,.12); }
.act-btn:active { transform: scale(.96); }
.act-btn > .i { width: 20px; height: 20px; }
.act-btn .act-chev { width: 16px; height: 16px; color: var(--faint); transform: rotate(180deg); transition: transform .5s ease; }
.top.open .act-chev { transform: rotate(0); }
.act-count { position: absolute; top: -4px; left: 24px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red, #d94b61); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.top .act-btn:has(.act-count:not([hidden])) > .i:first-child { animation: bellRing 2.4s ease-in-out 1s infinite; transform-origin: 50% 10%; }
@keyframes bellRing { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(14deg); } 88% { transform: rotate(-12deg); } 92% { transform: rotate(8deg); } 96% { transform: rotate(-4deg); } }
.act-panel { flex-basis: 100%; display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s ease, opacity .5s ease; }
.act-panel > div { overflow: hidden; min-height: 0; }
.top.open .act-panel { grid-template-rows: 1fr; opacity: 1; }
.act-head { display: flex; flex-direction: column; padding: 14px 6px 6px; border-top: .5px solid var(--line); margin-top: 4px; }
.act-head b { font-size: 15px; }
.act-head span { font-size: 13px; color: var(--muted); }
.act-list { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 2px; }
.act-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 8px; border: 0; border-radius: 16px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer;
  opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease, background .2s; }
.top.open .act-item { opacity: 1; transform: none; transition-delay: var(--d), var(--d), 0s; }
.act-item:hover, .act-item:active { background: rgba(118,118,128,.08); }
.act-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(118,118,128,.1); color: var(--muted); }
.act-ic .i { width: 18px; height: 18px; }
.act-ic.hot { background: var(--red-soft, rgba(217,75,97,.1)); color: var(--red, #d94b61); }
.act-item.new .act-ic:not(.hot) { background: rgba(47,94,69,.1); color: var(--accent); }
.act-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.act-txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-txt span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-when { flex: none; font-size: 11.5px; color: var(--faint); padding-top: 2px; }
.act-empty { margin: 6px; color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .act-panel, .act-item, .act-chev { transition: none; } .act-btn > .i { animation: none !important; } }
.legal-links a, #gateCgv a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
