:root {
  --bg: #0f172a; --panel: #1e293b; --panel2: #273449; --line: #334155;
  --text: #e5e9f0; --muted: #94a3b8; --accent: #3b82f6; --accent-text: #fff;
  --ok: #22c55e; --warn: #f59e0b; --danger: #ef4444; --radius: 12px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f1f5f9; --panel: #ffffff; --panel2: #eef2f7; --line: #d5dce6; --text: #0f172a; --muted: #5b6b82; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
#app { min-height: 100%; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.1rem; } h3 { font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.hidden { display: none !important; }

/* Formulaires et boutons */
input, select, textarea { width: 100%; padding: .75rem .85rem; font: inherit; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line); border-radius: 10px; min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .8rem 0 .25rem; }
button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 10px; padding: .65rem 1rem; min-height: 46px; }
button:active { transform: scale(.98); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button.small { min-height: 36px; padding: .3rem .7rem; font-size: .85rem; }
button:disabled { opacity: .5; }
.row { display: flex; gap: .5rem; align-items: center; } .row > * { flex: 1; } .row > .fit { flex: 0 0 auto; }
.stack > * + * { margin-top: .6rem; }

/* Écrans */
.screen { max-width: 640px; margin: 0 auto; padding: calc(var(--safe-top) + 1rem) 1rem calc(var(--safe-bottom) + 2rem); }
.topbar { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.topbar h1 { margin: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .8rem; }
.card.click { cursor: pointer; }
.card h2 { margin-bottom: .2rem; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--panel2); color: var(--muted); }
.badge.live { background: rgba(34,197,94,.18); color: var(--ok); }
.badge.alert { background: var(--danger); color: #fff; }
.banner { background: var(--accent); color: #fff; border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .8rem; display: flex; gap: .6rem; align-items: center; }
.banner button { flex: 0 0 auto; }
.error { color: var(--danger); font-size: .9rem; margin-top: .5rem; min-height: 1.2em; }
.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; } .tabs button { flex: 1; } .tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.code { font: 700 1.9rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-align: center; padding: .9rem; background: var(--panel2); border-radius: 10px; user-select: all; }
.member { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.member .grow { flex: 1; min-width: 0; } .member .name { font-weight: 600; } .member .sub { font-size: .8rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; } .dot.on { background: var(--ok); } .dot.stale { background: var(--warn); }

.chat { max-height: 38vh; overflow-y: auto; display: flex; flex-direction: column; gap: .35rem; padding: .3rem 0; }
.msg { background: var(--panel2); border-radius: 10px; padding: .4rem .7rem; max-width: 88%; word-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; }
.msg .who { font-size: .72rem; opacity: .75; } .msg.quick { font-weight: 600; }
.quicks { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0; } .quicks button { min-height: 38px; padding: .3rem .8rem; font-size: .88rem; }

/* Écran opération */
.opscreen { position: fixed; inset: 0; background: var(--bg); }
#map { position: absolute; inset: 0; }
.optop { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--safe-top) + .5rem) .5rem .5rem; display: flex; gap: .4rem; align-items: center; pointer-events: none; }
.optop > * { pointer-events: auto; }
.pill { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; font-size: .9rem; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.pill.title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pill.offline { background: var(--warn); color: #000; border-color: var(--warn); }
.round { width: 46px; height: 46px; border-radius: 50%; padding: 0; background: var(--panel); box-shadow: 0 2px 8px rgba(0,0,0,.3); font-size: 1.1rem; }
.opbar { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem .5rem calc(var(--safe-bottom) + .5rem); display: flex; gap: .4rem; background: linear-gradient(transparent, rgba(0,0,0,.35)); }
.opbar button { flex: 1; min-width: 0; padding: .4rem .15rem; font-size: .88rem; min-height: 54px; position: relative; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.3); background: var(--panel); }
.opbar .sos { background: var(--danger); border-color: var(--danger); color: #fff; }
.opbar .unread { position: absolute; top: 4px; right: 8px; background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .4rem; }

/* Fenêtre du bas */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--panel); width: 100%; max-width: 640px; max-height: 82vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 1rem 1rem calc(var(--safe-bottom) + 1rem); border: 1px solid var(--line); }
.sheet .head { display: flex; align-items: center; margin-bottom: .6rem; } .sheet .head h2 { flex: 1; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; } .grid button { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .7rem .3rem; }

/* Marqueurs sur la carte */
.mk { display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: opacity .3s; }
.mk .bubble { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; display: flex; align-items: center; justify-content: center;
  font: 700 12px/1 system-ui; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); background: #2563eb; }
.mk .tag { margin-top: 2px; font: 600 11px/1.15 system-ui; background: rgba(15,23,42,.88); color: #fff; padding: 1px 6px; border-radius: 6px; white-space: nowrap; text-align: center; }
.mk .tag small { display: block; font-weight: 500; opacity: .85; font-size: 10px; }
.mk.me .bubble { background: var(--ok); } .mk.chief .bubble { box-shadow: 0 0 0 3px #facc15, 0 2px 6px rgba(0,0,0,.5); }
.mk.stale { opacity: .8; } .mk.stale .tag small { color: #fbbf24; }
.mk.old { opacity: .5; } .mk.old .bubble { background: #64748b; } .mk.old .tag small { color: #fca5a5; }
.mk.static .bubble { border-radius: 8px; }

/* Alerte plein écran */
.alertbox { position: fixed; inset: 0; z-index: 40; background: rgba(127,29,29,.985); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 1.5rem; gap: .8rem; animation: pulse 1s infinite; }
.alertbox h1 { font-size: 2rem; } .alertbox .big { font-size: 1.4rem; font-weight: 700; }
.alertbox .row { width: 100%; max-width: 420px; }
@keyframes pulse { 50% { background: rgba(185,28,28,.99); } }

/* Notifications */
#toasts { position: fixed; z-index: 60; left: 0; right: 0; top: calc(var(--safe-top) + 8px); display: flex; flex-direction: column; align-items: center; gap: .4rem; pointer-events: none; }
.toast { pointer-events: auto; background: #111827; color: #fff; border: 1px solid #374151; padding: .6rem .9rem; border-radius: 12px; max-width: 92vw; display: flex; gap: .7rem; align-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.toast button { min-height: 32px; padding: 0 .7rem; background: var(--accent); border: 0; color: #fff; }

/* attribution de la carte au-dessus de la barre du bas */
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { margin-bottom: calc(var(--safe-bottom) + 72px); }

/* Pose d'un marqueur : croix de visée au centre + barre d'action */
.crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 4; pointer-events: none; --c: #3b82f6; }
.crosshair::before { content: ''; position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid var(--c); border-radius: 50%; box-shadow: 0 0 0 2px #fff, inset 0 0 0 2px #fff; }
.crosshair .cross-h { position: absolute; width: 70px; height: 3px; margin: -1.5px 0 0 -35px; background: var(--c); box-shadow: 0 0 0 1px #fff; }
.crosshair .cross-v { position: absolute; width: 3px; height: 70px; margin: -35px 0 0 -1.5px; background: var(--c); box-shadow: 0 0 0 1px #fff; }
.crosshair .cross-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; border: 2px solid var(--c); }
.placebar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: .8rem .8rem calc(var(--safe-bottom) + .8rem);
  background: var(--panel); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; gap: .55rem; box-shadow: 0 -4px 14px rgba(0,0,0,.3); }
.opscreen.placing .opbar { display: none; }
.opscreen.placing .mk { pointer-events: none; }
.opscreen.placing .maplibregl-canvas-container, .opscreen.placing .maplibregl-canvas-container.maplibregl-interactive { cursor: crosshair !important; }
.placebar .row button { padding: .4rem .3rem; white-space: nowrap; }

/* Barre d'actions flottante au-dessus d'un marqueur sélectionné */
.mk.selected, .mkw.selected { z-index: 10; }
.mk.selected .bubble { box-shadow: 0 0 0 4px rgba(250,204,21,.95), 0 2px 6px rgba(0,0,0,.5); }
.mk .actions,
.mkw .actions { position: absolute; bottom: calc(100% - 2px); left: 50%; transform: translateX(-50%); margin-bottom: 4px; display: flex; gap: 6px; padding: 5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 3px 12px rgba(0,0,0,.45); cursor: default; }
.mk .actions::after,
.mkw .actions::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; background: var(--panel); border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.mk .actions button,
.mkw .actions button { position: relative; z-index: 1; width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--panel2); color: var(--text); }
.mk .actions button.primary,
.mkw .actions button.primary { background: var(--accent); color: #fff; }
.mk .actions button.danger,
.mkw .actions button.danger { color: var(--danger); }
.mk .actions button.danger.confirm,
.mkw .actions button.danger.confirm { background: var(--danger); color: #fff; border-color: var(--danger); }
.mk .actions .ico,
.mkw .actions .ico { display: flex; }
.mk .actions svg, .mkw .actions svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk .actions.editing input,
.mkw .actions.editing input { position: relative; z-index: 1; width: 170px; min-height: 46px; border-radius: 999px; padding: 0 .9rem; }

.navlist button { width: 100%; justify-content: flex-start; text-align: left; min-height: 54px; margin-bottom: .5rem; font-weight: 600; }
.navlist .row button { justify-content: center; text-align: center; font-weight: 500; }
.alertbox .row { flex-wrap: wrap; } .alertbox .row > * { min-width: 120px; }

/* Icônes, favoris, contacts, médias */
.ico { display: inline-flex; } .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk .tag .ico svg { width: 11px; height: 11px; vertical-align: -1px; stroke: #fff; }
.mk .actions .ico svg,
.mkw .actions .ico svg { width: 24px; height: 24px; }
.star { font-size: 1.25rem; line-height: 1; padding: 0 .55rem; background: transparent; } .star.on { color: #f59e0b; }
.member { flex-wrap: wrap; } .member .grow { min-width: 140px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .4rem 1rem; border: 1px solid var(--line); background: var(--panel2);
  color: var(--text); border-radius: 10px; text-decoration: none; font-weight: 600; text-align: center; }
.contact { border-top: 1px solid var(--line); padding: .8rem 0; } .contact:first-of-type { border-top: 0; }
.contact .name { font-weight: 600; } .contact .sub { font-size: .8rem; color: var(--muted); }
.chatimg { display: block; max-width: min(240px, 100%); max-height: 220px; border-radius: 8px; cursor: zoom-in; margin-top: .2rem; }
.play { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .2rem .9rem; border-radius: 999px; background: rgba(255,255,255,.2); color: inherit; border-color: transparent; margin-top: .2rem; }
.msg:not(.me) .play { background: var(--panel); border-color: var(--line); }
.recbar { display: flex; align-items: center; gap: .6rem; }
.recbar .recdot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
.recbar .rectime { flex: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes blink { 50% { opacity: .25; } }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.93); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 1rem; }
.lightbox img { max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: 6px; }
.lb-close { position: absolute; top: calc(var(--safe-top) + .6rem); right: .6rem; color: var(--text); }
.lb-cap { color: #fff; font-weight: 600; } .lb-actions { display: flex; gap: .6rem; }
.warn { color: var(--warn); font-weight: 600; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--panel2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 34px; height: 34px; min-height: 0; background: rgba(0,0,0,.65); color: #fff; }

/* Contrôles de carte (3D, nord) */
.mapctl { position: absolute; right: .5rem; top: calc(var(--safe-top) + 4rem); z-index: 4; display: flex; flex-direction: column; gap: .5rem; }
.round.txt { font-weight: 800; font-size: .95rem; letter-spacing: .02em; }
.mapctl .round.on { background: var(--accent); color: #fff; }
.mapctl .round svg { width: 24px; height: 24px; transition: transform .15s; }

/* Bâtiments annotés */
.palette { display: flex; gap: .5rem; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.swatch svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.swatch.none { background: var(--panel2); color: var(--text); }
/* capsule sur un bâtiment : symboles photo / notes avec leur nombre */
.ftxt, .bnote { transform-origin: 50% 100%; }
.ftxt { background: rgba(17,24,39,.93); color: #fff; border: 2px solid var(--bc, #fff); border-radius: 6px; padding: 2px 8px; font-size: .78rem; font-weight: 600; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(0,0,0,.45); cursor: pointer; }
.bnote { display: flex; align-items: center; gap: 10px; background: rgba(17,24,39,.93); color: #fff; border: 2px solid var(--bc, #fff); border-radius: 999px; padding: 6px 12px; font-size: .85rem; box-shadow: 0 2px 8px rgba(0,0,0,.45); cursor: pointer; }
.bn-k { display: inline-flex; align-items: center; gap: 4px; }
.bn-k svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sheet.medium { max-height: 64vh; }
.strip { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; -webkit-overflow-scrolling: touch; }
.sthumb { flex: none; width: 140px; height: 140px; min-height: 0; padding: 0; border-radius: 12px; overflow: hidden; scroll-snap-align: start; background: var(--panel2); border: 1px solid var(--line); cursor: zoom-in; }
.sthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vnote { border-top: 1px solid var(--line); padding: .55rem 0; } .vnote:first-child { border-top: 0; } .vnote .sub { font-size: .75rem; color: var(--muted); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: var(--text); font-size: 1.8rem; line-height: 1; }
.lb-prev { left: .6rem; } .lb-next { right: .6rem; }
.lb-count { color: #cbd5e1; font-size: .85rem; }

.lb-nav { width: 56px; height: 56px; z-index: 2; }
.lightbox img { cursor: pointer; }

/* Recherche d'adresse */
.searchbar { position: absolute; left: .5rem; right: .5rem; top: calc(var(--safe-top) + .5rem); z-index: 8; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.45); padding: .5rem; }
.searchbar.hidden { display: none; }
.sr-row { display: flex; gap: .5rem; align-items: center; }
.sr-row input { flex: 1; min-width: 0; }
.sr-list { max-height: 44vh; overflow-y: auto; margin-top: .4rem; }
.sr-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .6rem .3rem; min-height: 48px; }
.sr-item .name { font-weight: 600; } .sr-item .sub { font-size: .75rem; color: var(--muted); }
.pin { display: flex; flex-direction: column; align-items: center; }
.pin-card { background: var(--panel); color: var(--text); border: 2px solid var(--accent); border-radius: 12px; padding: .45rem .6rem; max-width: 240px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.pin-t { font-size: .85rem; font-weight: 600; margin-bottom: .4rem; word-break: break-word; }
.pin-card .row { display: flex; gap: .4rem; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; margin-top: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* Zones et carroyages */
.mkw.lbl { pointer-events: none; }
.ztxt { background: rgba(17,24,39,.85); color: #fff; border: 2px solid var(--bc, #fff); border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 700; white-space: nowrap; transform-origin: 50% 50%; }
.gl { background: var(--bc, #3b82f6); color: #fff; border-radius: 6px; min-width: 22px; text-align: center; padding: 1px 6px; font-size: .78rem; font-weight: 800; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.palette.sm .swatch { width: 34px; height: 34px; }
.placebar input { width: 100%; margin: .4rem 0; }

/* Panneau latéral */
.sb-back { position: absolute; inset: 0; z-index: 9; background: rgba(0,0,0,.4); }
.sb-back.hidden { display: none; }
.sidebar { position: absolute; left: 0; top: 0; bottom: 0; width: min(88vw, 360px); z-index: 10; background: var(--panel); border-right: 1px solid var(--line); box-shadow: 4px 0 24px rgba(0,0,0,.5); transform: translateX(-102%); transition: transform .22s ease; display: flex; flex-direction: column; padding-top: var(--safe-top); visibility: hidden; }
.sidebar.open { transform: none; visibility: visible; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.sb-head h2 { margin: 0; font-size: 1.05rem; }
.sb-body { overflow-y: auto; padding: .6rem .6rem calc(var(--safe-bottom) + 1rem); flex: 1; }
.sb-create { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .8rem; }
.sb-create button { flex: 1; min-width: 0; padding: .5rem .2rem; font-weight: 700; }
.tg { border-top: 1px solid var(--line); padding: .35rem 0; }
.tg summary { cursor: pointer; font-weight: 700; padding: .5rem .2rem; list-style: none; }
.tg summary::before { content: '▾ '; color: var(--muted); } .tg:not([open]) summary::before { content: '▸ '; }
.tr { display: flex; align-items: center; gap: .5rem; padding: .35rem .2rem; min-height: 48px; }
.tr.child { margin-left: 1.4rem; min-height: 40px; }
.tr .name { font-weight: 600; word-break: break-word; } .tr .sub { font-size: .75rem; color: var(--muted); word-break: break-word; }
.tr .tdot { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); }
.tr .glyph { flex: none; width: 28px; height: 28px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .72rem; }
.round.eye { flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; }
.round.eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round.eye.trash { color: var(--danger); }
.tr .grow { flex: 1; min-width: 0; }
.round.eye.trash { background: var(--panel); border-color: var(--line); }

/* Carroyage : libellés de cases, poignées, tracé */
.gc { color: #fff; font-size: .8rem; font-weight: 800; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 5px #000; white-space: nowrap; opacity: .95; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.chip { min-height: 38px; padding: .2rem .7rem; border-radius: 999px; font-size: .85rem; }
.ghandle { width: 48px; height: 48px; border-radius: 50%; background: #f59e0b; color: #111827; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.ghandle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ghandle.size { background: #fff; }
.opscreen.drawing .maplibregl-canvas-container, .opscreen.drawing .maplibregl-canvas-container.maplibregl-interactive { cursor: crosshair !important; }

/* Fiche zone / carroyage, poignées de zone */
.mkw.lbl.tap { pointer-events: auto; cursor: pointer; }
.opscreen.placing .mkw.lbl.tap { pointer-events: none; }
.ztxt, .gname { box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.gname { background: var(--bc, #3b82f6); color: #fff; border-radius: 6px 6px 6px 0; padding: 3px 9px; font-size: .78rem; font-weight: 800; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; transform-origin: 0 100%; }
.actgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.act { display: flex; align-items: center; gap: .5rem; min-height: 54px; padding: .4rem .7rem; text-align: left; font-weight: 600; }
.act svg { width: 24px; height: 24px; flex: none; }
.act.del { color: var(--danger); }
.act.del.confirm { background: var(--danger); color: #fff; border-color: var(--danger); }
.zh { display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; }
.zh.vx { width: 40px; height: 40px; } .zh.vx span { width: 20px; height: 20px; border-radius: 50%; background: #f59e0b; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.6); }
.zh.mid { width: 34px; height: 34px; } .zh.mid span { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.9); border: 2px solid #f59e0b; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.zh.mv { width: 48px; height: 48px; border-radius: 50%; background: #f59e0b; color: #111827; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.6); }
.zh.mv svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.placebar .row button.on { background: var(--accent); color: #fff; }

/* Barres d'outils de tracé : symboles seuls */
.ibrow { justify-content: space-around; align-items: center; }
.placebar .row button.ib, .ib { flex: none; width: 58px; height: 58px; min-height: 0; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.ib svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ib.primary, .ib.add, .ib.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ib:disabled { opacity: .4; }
.lockbar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 4.2rem); z-index: 5; background: rgba(17,24,39,.92); color: #fff; font-size: .8rem; padding: .35rem .7rem; border-radius: 999px; max-width: calc(100% - 1.2rem); text-align: center; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.opscreen.locked .opbar button:nth-child(3) { opacity: .45; }
.sb-create button:last-child:nth-child(odd) { grid-column: 1 / -1; }
