/* Réception Lot 123 — feuille de style
   Mobile d'abord ; tablette et PC à partir de 900 px. */

:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --ink: #17232c;
  --ink-2: #3c4a54;
  --muted: #6c7880;
  --line: #e2ded6;
  --line-2: #d3cec4;
  --accent: #16303b;
  --accent-2: #24566a;
  --accent-soft: #e3edf0;
  --ok: #1f8a4c;
  --ok-soft: #e2f3e8;
  --bad: #c42b3b;
  --bad-soft: #fbe6e8;
  --warn-soft: #fff3d6;
  --radius: 16px;
  --radius-s: 11px;
  --shadow: 0 1px 2px rgba(23, 35, 44, .06), 0 4px 14px rgba(23, 35, 44, .06);
  --shadow-l: 0 10px 40px rgba(23, 35, 44, .22);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.ico { flex: none; display: block; }

.boot { height: 100%; display: grid; place-content: center; justify-items: center; color: var(--muted); gap: 10px; }
.boot-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .7; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 12px; font-weight: 600; cursor: pointer; min-height: 44px;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.ghost.light { color: #fff; border-color: rgba(255,255,255,.35); }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: #efc3c8; }
.btn.big { min-height: 52px; padding: 12px 20px; font-size: 16.5px; border-radius: 14px; }
.btn.huge { min-height: 60px; font-size: 18px; border-radius: 16px; box-shadow: 0 6px 18px rgba(22,48,59,.28); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px;
  border: 0; background: transparent; cursor: pointer; color: var(--ink); font-weight: 800; font-size: 18px;
}
.icon-btn:active { background: rgba(0,0,0,.06); }
.icon-btn.on { background: var(--accent); color: #fff; }
.icon-btn.light { color: #fff; }
.row-end { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.row-btns > .btn { flex: 1 1 180px; }

/* ---------- Structure ---------- */
.app { min-height: 100%; }
.side { display: none; }
#view { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px); min-height: 100vh; }
.wrap { padding: 14px 16px 8px; max-width: 980px; margin: 0 auto; }

.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px;
  padding: calc(10px + var(--safe-t)) 12px 10px 16px; background: rgba(243, 241, 236, .92);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.top .icon-btn { margin-left: -8px; }
.top-t { flex: 1; min-width: 0; }
.top h1 { font-size: 22px; font-weight: 750; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-s { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; align-items: center; gap: 6px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center;
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tab { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.tab.on { color: var(--accent); }
.tab.on .ico { stroke-width: 2.4; }
.tab-fab {
  justify-self: center; width: 60px; height: 60px; margin-top: -26px; border-radius: 20px; border: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 20px rgba(22,48,59,.35), 0 0 0 5px var(--bg);
}
.tab-fab:active { transform: scale(.94); }

.only-mobile { }

@media (min-width: 900px) {
  .tabbar, .only-mobile { display: none !important; }
  .app { display: grid; grid-template-columns: 264px 1fr; }
  .side {
    display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh;
    padding: 22px 16px; border-right: 1px solid var(--line); background: var(--surface-2);
  }
  .side-nav { display: grid; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; font-weight: 600; color: var(--ink-2); }
  .side-nav a:hover { background: rgba(0,0,0,.04); }
  .side-nav a.on { background: var(--accent); color: #fff; }
  .side-foot { margin-top: auto; }
  .top .sync-slot { display: none; }
  #view { padding-bottom: 40px; }
  .wrap { padding: 20px 28px; }
  .top { padding: 16px 28px 12px; }
  .top h1 { font-size: 26px; }
}

/* ---------- Marque ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.brand-t { font-weight: 800; font-size: 17px; }
.brand-s { font-size: 12.5px; color: var(--muted); }

/* ---------- Synchro ---------- */
.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 6px 11px 6px 9px;
  font-size: 12.5px; font-weight: 650; cursor: pointer; white-space: nowrap; max-width: 210px; overflow: hidden;
}
.sync-pill span { overflow: hidden; text-overflow: ellipsis; }
.sync-pill.ok { background: var(--ok-soft); color: var(--ok); }
.sync-pill.busy { background: var(--accent-soft); color: var(--accent-2); }
.sync-pill.busy .ico { animation: spin 1.4s linear infinite; }
.sync-pill.off { background: #ececec; color: #555; }
.sync-pill.err { background: var(--bad-soft); color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 420px) { .top .sync-pill span { display: none; } .top .sync-pill { padding: 8px; } }

/* ---------- Accueil ---------- */
.kicker { text-transform: uppercase; letter-spacing: .09em; font-size: 11.5px; font-weight: 750; color: #9fc0cc; }
.visit-card {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--accent); color: #fff; border-radius: var(--radius); padding: 16px 16px 16px 18px; box-shadow: var(--shadow);
  background-image: radial-gradient(120% 140% at 100% 0%, #2b6377 0%, transparent 60%);
}
.visit-date { font-size: 20px; font-weight: 750; margin-top: 2px; }
.visit-sub { font-size: 13.5px; opacity: .8; margin-top: 2px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 10px; margin: 12px 0; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; min-height: 86px; }
.stat-n { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.stat-n.red { color: var(--bad); }
.stat-l { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.25; }
.stat-ring { flex-direction: row; align-items: center; gap: 10px; }
.stat-ring .stat-l { margin: 0; }
.ring-bg { fill: none; stroke: #ebe7df; stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset .4s; }
.ring text { font-size: 12.5px; font-weight: 800; fill: var(--ink); }
.type-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.tchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.tchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tchip b { font-weight: 800; }
.btnchip { cursor: pointer; opacity: .5; }
.btnchip.on { opacity: 1; border-color: var(--c, var(--ink)); }
.btnchip.neutral i { display: none; }
.sec { font-size: 15px; font-weight: 750; margin: 22px 2px 10px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.sec.flat { margin: 0; font-size: 19px; color: var(--ink); }
.cnt { font-size: 12.5px; font-weight: 700; background: #e7e3db; color: var(--ink-2); border-radius: 999px; padding: 1px 8px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.room { background: var(--surface); border-radius: var(--radius); padding: 14px 15px 12px; box-shadow: var(--shadow); display: block; }
.room:active { transform: scale(.99); }
.room-h { display: flex; justify-content: space-between; gap: 10px; }
.room-n { font-weight: 750; font-size: 16.5px; }
.room-s { font-size: 12.5px; color: var(--muted); }
.room-c { font-size: 22px; font-weight: 800; color: #c0bbb1; text-align: right; line-height: 1; }
.room-c.has { color: var(--ink); }
.room-c span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.room-dots { display: flex; gap: 4px; flex-wrap: wrap; min-height: 10px; margin: 8px 0; }
.room-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.bar { height: 5px; border-radius: 3px; background: #ece8e1; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.room-p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.home-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.foot-note { text-align: center; color: var(--muted); font-size: 13px; margin: 20px 0 6px; }
.hint, .plan-hint { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 8px 2px 14px; }
.plan-hint { padding: 0 16px; margin: 8px auto; max-width: 980px; }

/* ---------- Cartes défaut ---------- */
.dlist { display: grid; gap: 8px; }
.dcard {
  display: flex; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px 12px 12px 14px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; align-items: center;
}
.dcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dcard:active { transform: scale(.99); }
.dcard-main { flex: 1; min-width: 0; }
.dcard-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; flex-wrap: wrap; }
.dcard-type { color: var(--muted); font-weight: 650; }
.dcard-title { font-weight: 680; font-size: 15.5px; margin: 4px 0 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dcard-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.dcard-meta span { display: inline-flex; align-items: center; gap: 3px; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #b9b3a8; }
.dcard-ph { width: 64px; height: 64px; flex: none; }
.dcard-ph .ph { width: 100%; height: 100%; border-radius: 10px; }
.pend { color: var(--accent-2); }
.nb { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; }
.nb.big { min-width: 30px; height: 30px; border-radius: 15px; font-size: 15px; }
.sev { font-size: 11.5px; font-weight: 750; border-radius: 6px; padding: 1px 6px; }
.sev-b { background: var(--bad-soft); color: var(--bad); }
.sev-m { background: #eeece7; color: var(--muted); }
.st { font-weight: 650; }
.st-a_signaler { color: #9a5b00; }
.st-signale { color: var(--accent-2); }
.st-repris { color: #6b4fbf; }
.st-verifie { color: var(--ok); }
.st-reserve { color: var(--bad); }
.empty { color: var(--muted); padding: 6px 2px; margin: 0; }
.empty-big { text-align: center; color: var(--muted); padding: 50px 20px; display: grid; justify-items: center; gap: 10px; }

/* ---------- Filtres ---------- */
.filters { padding: 4px 16px 6px; max-width: 980px; margin: 0 auto; display: grid; gap: 8px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--muted); }
.filters .search input[type=search] { border: 0; outline: 0; background: transparent; flex: 1; min-height: 44px; padding: 0; color: var(--ink); width: auto; }
.fsels { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fsels::-webkit-scrollbar { display: none; }
.fsels select.fsel { width: auto; min-height: 38px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 600; flex: none; max-width: 170px; }
.fsels select.fsel.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Checklist ---------- */
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; max-width: 980px; margin: 0 auto; }
.chips-scroll::-webkit-scrollbar { display: none; }
.rchip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: 14px; }
.rchip span { font-size: 12px; color: var(--muted); font-weight: 700; }
.rchip span.full { color: var(--ok); }
.rchip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rchip.on span { color: #bcd7e0; }
.ck-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 4px 0 8px; }
.ck-cat h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 2px 8px; }
.ck { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-radius: 14px; padding: 13px 14px 12px; margin-bottom: 8px; box-shadow: var(--shadow); border-left: 4px solid transparent; }
.ck-ok { border-left-color: var(--ok); }
.ck-defaut { border-left-color: var(--bad); }
.ck-na { border-left-color: #b9b3a8; opacity: .72; }
.ck-l { font-weight: 700; font-size: 15.5px; }
.ck-e { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.ck-r { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.ck-note { font-size: 13.5px; background: var(--warn-soft); border-radius: 8px; padding: 5px 8px; margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
.ck-links { display: grid; gap: 4px; margin-top: 8px; }
.ck-link { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.ck-btns { display: grid; grid-template-columns: 1fr 1fr 1fr 48px; gap: 6px; }
.ckb { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.ckb:active { transform: scale(.96); }
.ckb.ok.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.ckb.def { color: var(--bad); }
.ckb.def.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.ckb.na.on { background: #8b857a; border-color: #8b857a; color: #fff; }
.ckb.nt { color: var(--muted); }
@media (min-width: 700px) {
  .ck { flex-direction: row; align-items: center; }
  .ck-body { flex: 1; }
  .ck-btns { width: 330px; flex: none; }
}
.next-room { margin-top: 18px; }

/* ---------- Fiche / formulaires ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card h3 { font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.lbl { font-size: 12.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 7px; }
.lbl:first-child { margin-top: 0; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 12px; background: #fff; min-height: 46px; font-size: 16px;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 0; border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.form { display: grid; gap: 4px; }
.form-err { color: var(--bad); font-size: 14px; min-height: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 2px; margin: 0 0 10px; }
legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
details { margin: 8px 0; }
details summary { cursor: pointer; font-weight: 650; color: var(--accent-2); padding: 6px 0; }
details textarea { margin-top: 8px; }
.expect { background: var(--accent-soft); border-radius: 11px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; color: var(--ink-2); }
.warn { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--warn-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.meta { margin: 6px 4px 12px; }
.saved-ind { min-height: 18px; }
.detail .top h1 { font-size: 19px; }

.seg { display: flex; background: #eeebe5; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px 6px; font-weight: 650; font-size: 14px; cursor: pointer; color: var(--ink-2); min-height: 40px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button.on.sv-bloquant { background: var(--bad); color: #fff; }
.seg button.on.sv-important { background: #e98a1e; color: #fff; }
.seg.wrap-seg { flex-wrap: wrap; }
.seg.wrap-seg button { flex: 1 1 30%; }
.seg.big button { display: grid; gap: 1px; padding: 10px 6px; }
.seg.big small { font-size: 11.5px; font-weight: 500; opacity: .8; }
.seg.dark { background: rgba(255,255,255,.12); }
.seg.dark button { color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg.dark button.on { background: #fff; color: var(--ink); }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tbig {
  display: grid; gap: 3px; text-align: left; padding: 14px 13px 13px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--surface); cursor: pointer; position: relative; min-height: 92px; align-content: start;
}
.tbig i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin-bottom: 4px; }
.tbig b { font-size: 15.5px; }
.tbig small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.tbig.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, white); box-shadow: 0 0 0 1px var(--c) inset; }
.type-grid.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.tbtn { display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 650; font-size: 14px; cursor: pointer; text-align: left; }
.tbtn i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.tbtn.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips.small .chip { font-size: 13px; padding: 5px 10px; min-height: 32px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 38px; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.opts { display: grid; gap: 2px; margin: 10px 0 4px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; cursor: pointer; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; }
.opt input { width: 22px; height: 22px; accent-color: var(--accent); margin-top: 1px; flex: none; }
.opt b { display: block; font-size: 15px; }
.opt small { color: var(--muted); font-size: 13px; }
.list-btns { display: grid; gap: 8px; margin-top: 10px; }
.lbtn { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.lbtn span { flex: 1; }
.lbtn b { display: block; }
.lbtn small { color: var(--muted); font-size: 13px; }
.users { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.users li { display: flex; align-items: center; gap: 8px; }
.tag { font-size: 11.5px; background: var(--accent-soft); color: var(--accent-2); border-radius: 6px; padding: 1px 6px; font-weight: 700; }

/* ---------- Photos ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ph-grid.big { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 14px 0; }
.ph { position: relative; aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: #e8e4dc; cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .ann-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ph-missing::after { content: 'Photo non disponible hors ligne'; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 11px; color: var(--muted); padding: 6px; }
.ph-act { position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(15,25,32,.72); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ph-act.del { right: auto; left: 6px; }
.ph-pend { position: absolute; left: 6px; top: 6px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 3px; color: var(--accent-2); }
.photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pbtn { display: grid; justify-items: center; gap: 8px; padding: 22px 10px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--surface); cursor: pointer; color: var(--accent); }
.pbtn b { color: var(--ink); font-size: 15px; }
.pbtn:active { background: var(--accent-soft); }

/* ---------- Plan ---------- */
.pv { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: #fff; }
.pv-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pv-stage.anim { transition: transform .22s ease, width .22s ease, height .22s ease; }
.pv-img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.pv-pins { position: absolute; inset: 0; }
.pv-tools { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 6px; z-index: 3; }
.pv-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.95); font-size: 22px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); color: var(--ink); }
.pin { position: absolute; width: 0; height: 0; z-index: 2; }
.pin-dot {
  position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .15s;
}
.pin::after { content: ''; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; } /* zone tactile */
.pin.has-l .pin-dot { left: -14px; top: -14px; width: 28px; height: 28px; }
.pin-l { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; z-index: 1; pointer-events: none; }
.pin.ghost { z-index: 1; pointer-events: none; }
.pin.ghost .pin-dot { transform: scale(.55); opacity: .45; border-width: 2px; }
.pin.ghost .pin-l { display: none; }
.pin.sel { z-index: 4; }
.pin.sel .pin-dot { transform: scale(1.25); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 3px 10px rgba(0,0,0,.4); }
.pin.dragging .pin-dot { transform: scale(1.45) translateY(-6px); box-shadow: 0 8px 18px rgba(0,0,0,.4); }
.pin.mine .pin-dot { animation: pop .2s ease-out; }
@keyframes pop { from { transform: scale(.3); } }
.pin-del {
  position: absolute; left: 10px; top: -38px; width: 34px; height: 34px; border-radius: 50%; border: 0; z-index: 5;
  background: var(--bad); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.mini-plan { height: 240px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 4px; }
@media (min-width: 900px) { .mini-plan { height: 340px; } }
.plan-full { height: calc(100vh - 200px - var(--tabbar) - var(--safe-b)); min-height: 320px; margin: 0 12px; border-radius: 16px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .plan-full { height: calc(100vh - 170px); margin: 0 28px; } }
.plan-filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 10px; scrollbar-width: none; }
.plan-filters::-webkit-scrollbar { display: none; }
.plan-filters .tchip { flex: none; }

/* ---------- Calques ---------- */
body.has-ov { overflow: hidden; }
.ov { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; animation: slideup .22s ease-out; }
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } }
.ov-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ov-t { flex: 1; font-weight: 750; font-size: 17px; min-width: 0; }
.ov-s { font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ov-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px calc(10px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.ov-foot .btn { flex: 0 1 auto; }
.ov-foot .btn.primary { flex: 1 1 auto; max-width: 340px; margin-left: auto; }
.steps { display: flex; gap: 4px; }
.steps i { width: 18px; height: 5px; border-radius: 3px; background: #e2ded6; }
.steps i.done { background: var(--accent-2); }
.steps i.cur { background: var(--accent); width: 26px; }
.wz-pad { padding: 18px 16px 24px; max-width: 760px; margin: 0 auto; }
.wz-h { font-size: 21px; font-weight: 780; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.wz-h.sm { font-size: 16px; margin: 22px 0 10px; }
.plan-step { display: flex; flex-direction: column; height: 100%; }
.plan-box { flex: 1; min-height: 0; }
.pin-bar { padding: 10px 14px; font-size: 14px; background: var(--surface); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.ov-body.step-place { overflow: hidden; display: flex; flex-direction: column; }
.recap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; border-top: 5px solid var(--c); }
.recap-row { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.recap-row:last-child { border-bottom: 0; }
.recap-row .lbl { margin: 0; width: 108px; flex: none; }
.recap-row > b, .recap-row > span:not(.lbl) { flex: 1; min-width: 0; }
.recap-row .ico { color: var(--muted); }
.tdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); margin-right: 7px; }

.sheet-wrap { position: fixed; inset: 0; z-index: 70; }
.sheet-bg { position: absolute; inset: 0; background: rgba(15,25,32,.0); transition: background .2s; }
.sheet-wrap.show .sheet-bg { background: rgba(15,25,32,.28); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + var(--safe-b)); box-shadow: var(--shadow-l); transform: translateY(100%); transition: transform .22s ease;
  max-width: 640px; margin: 0 auto;
}
.sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: #d6d1c8; margin: -6px auto 12px; }
.sheet-wrap.show .sheet { transform: none; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-def { display: flex; align-items: center; gap: 12px; }
.sheet-ph { width: 70px; height: 70px; flex: none; }
.sheet-ph .ph { width: 100%; height: 100%; }
.sheet-txt { flex: 1; min-width: 0; }

.viewer { position: fixed; inset: 0; z-index: 80; background: #0d1418; color: #fff; display: flex; flex-direction: column; }
.viewer-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 10px 8px; }
.viewer-top > span { flex: 1; text-align: center; font-weight: 600; opacity: .8; }
.viewer-img { flex: 1; position: relative; display: grid; place-items: center; min-height: 0; padding: 0 8px calc(12px + var(--safe-b)); }
.viewer-frame { position: relative; max-width: 100%; max-height: 100%; width: auto; height: 100%; aspect-ratio: 4 / 3; }
.viewer-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer-frame .ann-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vnav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.vnav.prev { left: 10px; }
.vnav.next { right: 10px; }

.annot { position: fixed; inset: 0; z-index: 90; background: #0d1418; color: #fff; display: flex; flex-direction: column; }
.annot-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 10px 8px; }
.annot-title { flex: 1; text-align: center; font-weight: 700; }
.annot-canvas-wrap { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; padding: 6px; }
.annot-canvas-wrap canvas { touch-action: none; display: block; border-radius: 4px; }
.annot-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); padding: 6px 12px; border-radius: 999px; font-size: 13px; pointer-events: none; transition: opacity .2s; }
.annot-tools { display: grid; gap: 10px; padding: 10px 12px calc(12px + var(--safe-b)); }
.annot-colors { display: flex; gap: 12px; justify-content: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px rgba(255,255,255,.3); }
.swatch.on { border-color: #0d1418; box-shadow: 0 0 0 3px #fff; }
.annot-actions { display: flex; gap: 8px; justify-content: center; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 20px); transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 100; transition: all .25s; box-shadow: var(--shadow-l); max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--bad); }
.has-ov .toast { bottom: calc(90px + var(--safe-b)); }

.reauth { position: fixed; inset: 0; z-index: 95; background: rgba(15,25,32,.4); display: grid; place-items: center; padding: 20px; }
.reauth-card { background: #fff; border-radius: 18px; padding: 18px; max-width: 380px; width: 100%; display: grid; gap: 8px; box-shadow: var(--shadow-l); }
.reauth-card .form { gap: 8px; }

/* ---------- Connexion ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 80% at 50% 0%, #e2ebee 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: 22px; padding: 26px 22px; box-shadow: var(--shadow-l); }
.auth-h { font-size: 24px; margin: 22px 0 8px; }
.auth .form { margin-top: 14px; }
