* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; height: 100dvh; overflow: hidden;
  font-family: "Segoe UI", Calibri, sans-serif; background: #0c0e14; color: #e8eaef;
  overscroll-behavior: none; touch-action: manipulation; color-scheme: dark;
}
body { display: flex; flex-direction: column; min-height: 0; }
button, input, select, textarea { font: inherit; }
.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; margin: 0; width: 100%;
  background: #c41e1e; color: #fff; flex-shrink: 0;
}
.banner-id { min-width: 0; }
.banner-id strong { display: block; font-size: 18px; letter-spacing: .02em; color: #fff; }
.banner-id span, .banner-id #project-line { display: inline; font-size: 12px; color: #ffe4e4; opacity: 1; font-weight: 600; }
.banner-status {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  margin-left: 8px; font-size: 12px; font-weight: 800;
}
.led { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.led i {
  width: 10px; height: 10px; border-radius: 50%; background: #7f1d1d;
  box-shadow: 0 0 0 2px rgba(255,255,255,.25); display: inline-block;
}
.led.on i { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.35); }
.led.warn i { background: #f59e0b; }
.led.off i { background: #7f1d1d; }
.xfer { color: #fff; white-space: nowrap; }
.banner-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.banner-proj {
  margin-left: 0; background: #fff; color: #c41e1e; border: 0;
  border-radius: 8px; padding: 8px 12px; font-weight: 800; cursor: pointer;
}
.banner-proj.ghost { background: transparent; color: #fff; border: 2px solid #fff; }
.app-logo-tile {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: color-mix(in srgb, #c41e1e 16%, #0c0e14);
  border: 1px solid color-mix(in srgb, #c41e1e 42%, #2a3142);
}
.banner img.app-logo {
  height: 22px; width: 22px; background: transparent; border-radius: 0;
  padding: 0; display: block;
}
.layout {
  display: grid; grid-template-columns: 200px 1fr; flex: 1; min-height: 0;
  overflow: hidden;
}
.panel {
  padding: 12px 10px; background: #fff; border-right: 1px solid #d8d6d2;
  overflow: hidden; min-height: 0; display: flex; flex-direction: column;
}
.panel.rail .btn { margin-top: 0; margin-bottom: 10px; }
.kicker {
  margin: 14px 0 8px; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: #c41e1e; font-weight: 800;
}
.panel .kicker:first-child { margin-top: 0; }
.panel label, .panel h3, .modal-box label, .field-label {
  display: block; font-size: 12px; color: #444; margin: 8px 0 4px; font-weight: 700;
}
.panel input, .panel select, .modal-box input, .modal-box textarea, .modal-box select {
  width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 6px; background: #fff;
}
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pad {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 6px;
  margin: 8px 0 10px;
}
.pad-u { grid-column: 2; grid-row: 1; }
.pad-l { grid-column: 1; grid-row: 2; }
.pad-r { grid-column: 3; grid-row: 2; }
.pad-d { grid-column: 2; grid-row: 3; }
.pad button {
  padding: 10px 4px; border: 1px solid #ccc; border-radius: 8px; background: #fff;
  font-weight: 800; font-size: 12px; cursor: pointer;
}
.pad button.on { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.pad button[disabled] { opacity: .35; cursor: not-allowed; }
.walk-list { list-style: none; padding: 0; margin: 8px 0 0; }
.walk-list li {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 6px 8px; border: 1px solid #eee; border-radius: 6px; margin-bottom: 4px; font-size: 12px;
}
.walk-list li.join { border-color: #c41e1e; background: #fff5f5; }
.tip { margin: 0 0 8px; font-size: 12px; color: #666; line-height: 1.35; }
.calc { margin: 10px 0; padding: 8px 10px; background: #111; color: #fff; border-radius: 8px; font-weight: 700; font-size: 13px; }
.btn { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 0; border-radius: 8px; background: #c41e1e; color: #fff; font-weight: 700; cursor: pointer; }
.btn.ghost { background: #f0efec; color: #222; }
.btn.danger { background: #7f1d1d; }
.danger-ghost { color: #7f1d1d; }
.btn.file { text-align: center; cursor: pointer; }
.photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.photos img, .thumb img { width: 72px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #ddd; display: block; }
.thumb { position: relative; display: inline-block; }
.thumb-x {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #7f1d1d; color: #fff; font-size: 13px; line-height: 20px; padding: 0; cursor: pointer;
}
.room-list { list-style: none; padding: 0; margin: 0; flex: 1; min-height: 0; overflow: hidden; }
.room-list li { padding: 10px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; position: relative; }
.room-list .thumb-x { position: static; flex-shrink: 0; }
.room-list li .btn { width: auto; margin-top: 0; padding: 6px 8px; font-size: 11px; }
.room-list li.on { border-color: #c41e1e; background: #fff5f5; }
.stage {
  padding: 6px 8px 6px; display: flex; flex-direction: column;
  min-width: 0; min-height: 0; overflow: hidden;
}
.stage-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.stage-head h2 { margin: 0 0 2px; font-size: 20px; line-height: 1.2; }
.hint { margin: 0; color: #666; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.steps { display: flex; gap: 8px; flex-wrap: nowrap; margin: 0 0 6px; flex-shrink: 0; }
.stage-head { flex-shrink: 0; }
.steps button {
  padding: 10px 16px; border-radius: 999px; background: #eee; font-size: 14px; font-weight: 800; color: #666;
  border: 0; cursor: pointer;
}
.steps button.on { background: #c41e1e; color: #fff; }
.steps button.done { background: #111; color: #fff; }
.head-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; position: relative; z-index: 3; }
.act {
  width: auto; margin: 0; padding: 10px 14px; border: 1px solid #ccc; background: #fff;
  border-radius: 10px; cursor: pointer; font-weight: 800; font-size: 14px; color: #222;
}
.act.primary { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.act.on { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.view-switch { display: flex; gap: 6px; flex-shrink: 0; }
#btn-equerre { padding: 8px 10px; }
.view-switch button, .wall-chips button, .cats button {
  padding: 8px 10px; border: 1px solid #ccc; background: #fff; border-radius: 8px; cursor: pointer;
}
.view-switch button.on, .wall-chips button.on, .cats button.on, #btn-equerre.on { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.wall-chips { flex-shrink: 0; overflow: hidden; }
.wall-chips, .cats { display: flex; gap: 6px; margin: 8px 0 0; flex-wrap: wrap; }
.cats { margin: 0 0 8px; }
.cats button { flex: 1; min-width: 90px; font-weight: 700; font-size: 13px; }
.win[hidden] { display: none !important; }
.win {
  position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; padding: 8px;
  overflow: hidden;
}
.win-box {
  background: #fff; border-radius: 14px; width: min(560px, calc(100vw - 16px));
  box-shadow: 0 12px 40px rgba(0,0,0,.25); max-height: calc(100dvh - 16px);
  display: flex; flex-direction: column; min-height: 0;
}
.win-box.win-wide { width: min(980px, calc(100vw - 16px)); }
.win-box.win-cotes { width: min(520px, calc(100vw - 16px)); }
.win-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: #c41e1e; color: #fff; border-radius: 12px 12px 0 0;
}
.win-x { border: 0; background: #fff; color: #c41e1e; border-radius: 6px; padding: 6px 10px; font-weight: 800; cursor: pointer; }
.win-body { padding: 10px 12px 12px; overflow-x: hidden; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.win-body .four-box { max-width: 100%; width: 100%; margin: 0; }
.trav-line {
  border: 1px solid #e6e4e0; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: #fafaf8;
}
.trav-line.on { border-color: #c41e1e; background: #fff5f5; }
.trav-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.trav-head strong { font-size: 13px; }
.trav-head small { color: #666; }
.trav-extra { margin-top: 8px; }
.trav-extra[hidden] { display: none !important; }
.scope-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.scope-row button { padding: 5px 8px; border: 1px solid #ccc; border-radius: 6px; background: #fff; font-size: 11px; cursor: pointer; }
.scope-row button.on { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.canvas-wrap {
  flex: 1; min-height: 0; margin: 8px 0 0; background: #fff;
  border: 1px solid #d8d6d2; border-radius: 10px; overflow: hidden;
  position: relative; touch-action: none; overscroll-behavior: none;
}
.canvas-wrap svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; display: block;
}
.plan-zoom-bar {
  display: flex; align-items: center; gap: 6px; margin: 6px 0 0;
}
.plan-zoom-bar[hidden] { display: none !important; }
.plan-zoom-bar .act { padding: 8px 12px; }
.plan-zoom-bar span { font-size: 12px; font-weight: 800; min-width: 64px; }
.canvas-wrap.resizing { user-select: none; }
.ask-split { display: none !important; }
.empty-cta {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; background: #fafaf8; text-align: center; padding: 24px;
}
.empty-cta[hidden] { display: none !important; }
.empty-cta .btn { width: auto; min-width: 220px; padding: 14px 22px; font-size: 16px; }
.wall-hot, .floor-hot { cursor: pointer; }
.icons {
  background: #fff; border: 1px solid #d8d6d2; border-radius: 10px; padding: 6px 8px;
  flex-shrink: 0; overflow: hidden;
}
.pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 6px;
}
.pick button {
  height: 52px; padding: 3px 2px; border: 1px solid #d4d4d4; border-radius: 10px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10px; line-height: 1.15; cursor: pointer; color: #222;
}
.pick button.on { border-color: #c41e1e; background: #fff5f5; color: #c41e1e; font-weight: 700; box-shadow: 0 0 0 2px #c41e1e33; }
.pick svg { width: 22px; height: 22px; min-height: 0; display: block; }
.fiche { display: none !important; }
.fiche[hidden], .modal[hidden], #icons[hidden], #view-switch[hidden], #wall-chips[hidden], #fiche[hidden], #walk-start[hidden], #walk-next[hidden] { display: none !important; }
.fiche h3 { margin: 0 0 4px; font-size: 15px; }
.fiche-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.fiche-card { border: 1px solid #e6e4e0; border-radius: 8px; padding: 10px; cursor: pointer; background: #fafaf8; }
.fiche-card:hover { border-color: #c41e1e; background: #fff; }
.fiche-card header { font-size: 13px; margin-bottom: 4px; }
.fiche-card p { margin: 0 0 6px; font-size: 12px; color: #444; }
.fiche-card.dot { border-color: #c41e1e66; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 8px; z-index: 20; overflow: hidden; }
.modal-box { background: #fff; border-radius: 12px; padding: 12px 14px 14px; width: min(720px, 100%); max-height: calc(100dvh - 16px); overflow: auto; min-height: 0; }
.modal-box h3 { margin: 0 0 4px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.modal-grid .full { grid-column: 1 / -1; }
.photo-block { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; }
#modal-scale { margin: 0 0 4px; }
#modal-check { margin: 0 0 8px; font-size: 13px; }
.scale-ok { color: #166534; font-weight: 700; }
.scale-bad { color: #991b1b; font-weight: 700; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions .btn { flex: 1; margin-top: 0; }
.choices, .mini-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  align-items: start;
}
.mini-choices { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.choice {
  border: 1px solid #d8d6d2; border-radius: 10px; padding: 6px;
  background: #fff; font-size: 12px; line-height: 1.25; cursor: pointer;
  text-align: center; color: #222; height: auto;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
}
.choice.pict { min-height: 0; }
.mini-choices .choice { min-height: 0; padding: 5px 3px; font-size: 10px; }
.choice svg {
  width: 100%; height: auto; max-height: 72px; min-height: 0;
  display: block; background: #faf8f4; border-radius: 6px;
}
.mini-choices .choice svg { width: 40px; height: 26px; min-height: 0; }
.choice-name { font-weight: 800; font-size: 13px; }
.choice-say { font-size: 11px; color: #555; font-weight: 400; }
.choice.on { border-color: #c41e1e; background: #fff5f5; color: #7f1d1d; box-shadow: 0 0 0 2px #c41e1e22; }
.choice.on .choice-name { color: #7f1d1d; }
.choice .swatch { width: 36px; height: 18px; border-radius: 4px; border: 1px solid #bbb; display: block; }
.field-block { margin-top: 4px; }
.where-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; }
.where-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.zone-pick {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px;
}
.zone-pick .where-card { min-height: 72px; padding: 12px 8px; }
.zone-pick .where-card strong { font-size: 16px; }
.zone-pick .where-card small { font-size: 12px; }
.type-board {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 0 12px;
}
.where-card {
  border: 2px solid #e4e2de; border-radius: 12px; padding: 8px 6px 10px; background: #fff;
  cursor: pointer; text-align: center; color: #222; font-size: 13px; line-height: 1.2;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.where-card svg { width: 100%; height: 44px; min-height: 0; display: block; }
.where-card strong { font-size: 13px; }
.where-card small { display: block; color: #666; font-size: 11px; font-weight: 400; }
.where-card.on { border-color: #c41e1e; background: #fff5f5; color: #7f1d1d; box-shadow: 0 0 0 3px #c41e1e22; }
#level-block[hidden], #room-level-block[hidden], #four-block[hidden], #walk-block[hidden], #wel-base-block[hidden], #wel-form[hidden], #wel-list[hidden], #welcome.done { display: none !important; }
.proj-list { list-style: none; padding: 0; margin: 0 0 10px; }
.proj-list li {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 10px; border: 1px solid #e6e4e0; border-radius: 8px; margin-bottom: 6px; background: #fff; cursor: pointer;
}
.proj-list li:hover, .proj-list li.on { border-color: #c41e1e; background: #fff5f5; }
.proj-list button { flex-shrink: 0; }
#welcome {
  position: fixed; inset: 0; z-index: 40; background: #f4f3ef;
  overflow: hidden; padding: 12px 14px;
  display: flex; flex-direction: column;
}
#welcome .welcome-box { flex: 1; min-height: 0; overflow: auto; }
.welcome-box { max-width: 620px; margin: 0 auto; }
.welcome-logo { height: 42px; background: #fff; border-radius: 6px; padding: 4px 8px; }
.welcome-box h1 { margin: 14px 0 6px; font-size: 24px; }
.four-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
  width: 100%;
  max-width: 100%;
}
.four-face { grid-column: 1; grid-row: 1; }
.four-g { grid-column: 1; grid-row: 2; }
.four-d { grid-column: 2; grid-row: 1; }
.four-me { grid-column: 2; grid-row: 2; }
.four-box > * { min-width: 0; max-width: 100%; }
.four-box label { margin: 0; }
.cote-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: #333; min-width: 0; }
.cote-line { display: flex; gap: 4px; align-items: stretch; min-width: 0; }
.cote-line input {
  flex: 1 1 0; min-width: 0; width: 0; padding: 8px 8px; border: 2px solid #ccc;
  border-radius: 10px; background: #fff; font-size: 17px; font-weight: 800;
}
.cote-line input.laser-wait { border-color: #c41e1e; background: #fff5f5; box-shadow: 0 0 0 3px #c41e1e33; }
.cote-line input.laser-got { border-color: #1a7f37; background: #f0faf3; }
.laser-btn {
  width: 40px; flex: 0 0 40px; border: 2px solid #c41e1e; background: #fff; color: #c41e1e;
  border-radius: 10px; font-size: 16px; font-weight: 800; cursor: pointer; line-height: 1;
  padding: 0;
}
.laser-btn.on { background: #c41e1e; color: #fff; animation: laser-pulse 1s ease infinite; }
@keyframes laser-pulse {
  0%, 100% { box-shadow: 0 0 0 0 #c41e1e55; }
  50% { box-shadow: 0 0 0 6px #c41e1e00; }
}
.canvas-wrap.ask-on::before {
  content: 'Travaux demandés';
  position: absolute; left: 8px; top: 8px; z-index: 7;
  background: #c41e1e; color: #fff; font-size: 11px; font-weight: 800;
  padding: 4px 8px; border-radius: 6px; pointer-events: none;
}
.ask-dock {
  position: absolute; top: 8px; right: 8px; z-index: 8;
  width: min(400px, 56%); max-height: 56%;
  display: flex; flex-direction: column; min-height: 0;
  background: rgba(255,255,255,.98); border: 2px solid #c41e1e; border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,.2); overflow: hidden;
}
.ask-dock[hidden] { display: none !important; }
.ask-dock-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: #c41e1e; color: #fff; flex-shrink: 0;
}
.ask-dock-body, .ask-place { padding: 6px 8px 8px; flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.want-layer { stroke: #c41e1e; stroke-dasharray: 5 3; }
.ask-place { background: #fff8f0; }
.ask-surf { margin: 0 0 6px; padding: 5px 8px; background: #111; color: #fff; border-radius: 6px; font-size: 11px; font-weight: 700; }
.ask-alert {
  margin: 0 0 10px; padding: 10px 12px; background: #fff5f5; border: 1px solid #c41e1e;
  color: #7f1d1d; border-radius: 8px; font-weight: 700; font-size: 13px; line-height: 1.35;
}
.ask-alert[hidden] { display: none !important; }
.ask-choices { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.ask-q { font-size: 16px; font-weight: 800; margin: 4px 0 4px; line-height: 1.25; }
.ask-choices { gap: 5px; margin: 6px 0; }
.ask-btn { padding: 9px 10px; font-size: 14px; }
.ask-progress { font-size: 11px; font-weight: 700; color: #c41e1e; margin: 0 0 4px; }
.ask-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.ask-btn {
  padding: 12px 12px; border-radius: 12px; border: 2px solid #ddd; background: #fff;
  font-size: 15px; font-weight: 800; cursor: pointer; text-align: left;
}
.ask-btn.oui { border-color: #1a7f37; color: #1a7f37; }
.ask-btn.non { border-color: #999; color: #555; }
.ask-btn.on { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.ask-btn.on.oui { background: #1a7f37; color: #fff; border-color: #1a7f37; }
.ask-btn.on.non { background: #555; color: #fff; border-color: #555; }
.ask-scope { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ask-scope button {
  padding: 8px 10px; border: 1px solid #ccc; border-radius: 8px; background: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.ask-scope button.on { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.win-body textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 8px; font: inherit; }
.cote-lbl {
  font-size: 11px; font-weight: 800; fill: #111;
  paint-order: stroke; stroke: #fff; stroke-width: 3px;
}
.mur-no {
  fill: #c41e1e; paint-order: stroke; stroke: #fff; stroke-width: 3px;
}
.vtx { cursor: pointer; }
.vtx.on { stroke: #c41e1e; stroke-width: 3; }
#volet-extra[hidden] { display: none !important; }
.toasts {
  position: fixed; left: 0; right: 0; bottom: 16px; z-index: 60;
  pointer-events: none; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.toasts .bip { position: relative; left: auto; bottom: auto; transform: none; }
.bips {
  position: absolute; inset: 0; pointer-events: none; z-index: 12; overflow: hidden;
}
.bip {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: #111; color: #fff; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 700; max-width: min(72%, 340px);
  box-shadow: 0 8px 20px rgba(0,0,0,.28); line-height: 1.3; text-align: center;
  animation: bip-in .18s ease;
}
.bip-ok { background: #1a7f37; }
.bip-warn { background: #c41e1e; }
.bip-pin {
  bottom: auto; transform: translate(-50%, -118%);
  background: #c41e1e; max-width: 200px;
}
.bip-pin::after {
  content: ''; position: absolute; left: 50%; bottom: -6px;
  border: 7px solid transparent; border-top-color: #c41e1e;
  transform: translateX(-50%);
}
.bip-pin.bip-ok::after { border-top-color: #1a7f37; }
.bip.out { opacity: 0; transition: opacity .32s; }
@keyframes bip-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.bip-pin.bip-in, .bip-pin { animation: none; }
.say-win { z-index: 50; }
.say-box { width: min(400px, 100%); }
.say-box #say-msg { margin: 0 0 12px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.say-actions { display: flex; gap: 8px; }
.say-actions .btn { flex: 1; margin-top: 0; }
#plafond-box .where-card { padding: 8px 6px; }
#plafond-box .where-card small { font-size: 11px; }
.icons { max-height: 18vh; }

@media (max-width: 1100px) {
  .type-board { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .panel.rail {
    border-right: 0; border-bottom: 1px solid #d8d6d2; display: flex; flex-direction: row;
    flex-wrap: nowrap; gap: 8px; align-items: center; padding: 6px 8px; overflow: hidden;
    max-height: none;
  }
  .panel.rail .kicker { margin: 0; }
  .panel.rail .btn { width: auto; margin: 0; flex-shrink: 0; }
  .panel.rail .room-list {
    display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; flex: 1; margin: 0; min-height: 0;
  }
  .panel.rail .room-list li { margin: 0; min-width: 108px; flex-shrink: 0; }
  .type-board { grid-template-columns: repeat(4, 1fr); }
  .stage-head { flex-wrap: wrap; }
  .head-actions { width: 100%; }
  .icons { max-height: 16vh; }
  .ask-dock { width: min(380px, 58%); }
  .modal-grid { grid-template-columns: 1fr; }
  .hint { max-width: 100%; }
}
@media (max-width: 720px) {
  .type-board, .zone-pick { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .ask-dock { width: min(360px, 70%); max-height: 52%; top: 6px; right: 6px; }
}
@media (orientation: portrait) and (max-width: 980px) {
  .ask-dock {
    top: auto; bottom: 6px; right: 6px; left: 6px;
    width: auto; max-height: 44%;
  }
  .canvas-wrap.ask-on::before { top: 6px; }
}
.rapport-toolbar { margin: 0 0 12px; }
.rapport-actions { display: flex; gap: 8px; }
.rapport-actions .btn { flex: 1; margin-top: 0; }
.rapport-client {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px;
}
.rapport-client label { margin: 0; font-size: 12px; font-weight: 700; color: #444; }
.rapport-client input {
  width: 100%; padding: 10px; border: 2px solid #ccc; border-radius: 8px; font-size: 15px; font-weight: 700;
}
.assign-card {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  margin: 0 0 12px; padding: 12px 14px; border-radius: 10px;
  background: #fff5f5; border: 2px solid #c41e1e;
}
.assign-card.ok { background: #ecfdf5; border-color: #15803d; }
.assign-card .btn { width: auto; margin: 0; padding: 10px 14px; }
.assign-card #assign-line { margin: 0; font-weight: 700; font-size: 13px; }
.assign-list { list-style: none; padding: 0; margin: 8px 0 0; max-height: 46vh; overflow: auto; }
.assign-list li { margin: 0 0 6px; }
.assign-pick {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  border: 1px solid #ddd; border-radius: 8px; background: #fff; cursor: pointer;
}
.assign-pick:hover, .assign-pick.on { border-color: #c41e1e; box-shadow: 0 0 0 2px #c41e1e22; }
.assign-pick strong { display: block; }
.assign-pick span { display: block; font-size: 12px; color: #555; margin-top: 2px; }
.assign-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.assign-flag {
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
}
.assign-flag.ok { background: #dcfce7; color: #166534; }
.assign-flag.no { background: #fee2e2; color: #991b1b; }
.chantier-pick {
  display: block; width: 100%; text-align: left; margin: 0 0 6px; padding: 10px;
  border: 1px solid #ccc; border-radius: 8px; background: #fff; cursor: pointer; font-weight: 700;
}
.chantier-pick.on { border-color: #c41e1e; background: #fff5f5; }
.work-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.work-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px;
  border: 1px solid #bbb; border-radius: 4px; background: #fff; font-size: 12px;
  font-weight: 700; cursor: pointer;
}
.work-chip i { width: 14px; height: 10px; display: block; border: 1px solid #333; }
.work-chip.on { border-color: #1a1a1a; box-shadow: 0 0 0 2px #1a1a1a22; background: #f4f4f2; }
.win-edl .win-bar { background: #1a1a1a; }
.edl-links { margin: 6px 0 10px !important; font-size: 13px; }
.edl-links a { color: #1a1a1a; font-weight: 700; }
.calque-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 8px; padding: 8px 10px; background: #fff5f5; border: 1px solid #e8b4b4; border-radius: 8px;
  font-size: 12px; font-weight: 700;
}
.calque-bar[hidden] { display: none !important; }
.calque-bar .act.on { background: #c41e1e; color: #fff; border-color: #c41e1e; }
.plans-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 10px; }
.plans-toolbar label { font-size: 12px; font-weight: 700; }
.plans-toolbar select { display: block; min-width: 160px; padding: 8px; font-weight: 700; }
.plans-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.plans-zoom { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.plans-stage {
  background: #c5c5c2; border: 1px solid #999; min-height: 62vh; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center; padding: 14px;
}
.plans-zoom-box { transform: none; width: 100%; display: flex; justify-content: center; }
.plans-zoom-box svg {
  width: min(100%, 1100px); height: auto; max-height: 68vh;
  background: #fff; display: block; box-shadow: 0 2px 14px rgba(0,0,0,.28);
}
.plans-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
.plans-photos img { width: 100%; height: auto; min-height: 180px; object-fit: contain; background: #111; cursor: zoom-in; }
.plans-print-opt { margin-top: 12px; border-top: 1px solid #ddd; padding-top: 10px; }
.plans-print-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.plans-print-row label { font-size: 12px; font-weight: 700; }
.plans-print-row select { display: block; padding: 8px; }
.plans-print-row .btn { width: auto; margin: 0; padding: 10px 16px; }
#photo-box {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px;
}
#photo-box[hidden] { display: none !important; }
#photo-box img {
  max-width: 88vw; max-height: 82vh; object-fit: contain;
  touch-action: none; transform-origin: center center;
}
#photo-box p { color: #fff; font-weight: 700; margin: 10px 0 0; }
#photo-box .win-x { position: absolute; top: 12px; right: 12px; }
.photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 64px; border: 0; border-radius: 8px;
  background: #fff; color: #c41e1e; font-size: 36px; font-weight: 800; cursor: pointer; line-height: 64px;
}
#photo-prev { left: 12px; }
#photo-next { right: 12px; }
body.printing-plans > *:not(#plans-print) { display: none !important; }
#plans-print { background: #fff; }
.edl-legal { margin: 0 0 10px; font-size: 12px; color: #444; line-height: 1.4; }
.edl-note-lab { display: block; font-size: 12px; font-weight: 700; color: #1a1a1a; margin: 0 0 14px; }
.edl-note-lab textarea, .edl-room-note, textarea.edl-room-note {
  width: 100%; padding: 10px 12px; border: 1px solid #c41e1e55; border-radius: 4px;
  font: inherit; font-size: 13px; color: #1a1a1a; min-height: 72px;
  background: rgba(196, 30, 30, 0.06);
}
.edl-doc {
  background: #fff; border: 1px solid #bbb; border-radius: 0; padding: 0 0 28px;
  color: #1a1a1a; font-size: 13px; line-height: 1.45; overflow: hidden;
}
.edl-cover { min-height: 70vh; }
.edl-cover-grid {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px;
  margin: 8px 0 0;
}
.edl-cover-kicker {
  margin: 0 0 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; font-weight: 800; opacity: .92;
}
.dt-print-banner {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  margin: 0; background: #c41e1e; color: #fff; width: 100%;
}
.dt-print-banner img {
  height: 36px; width: 36px; background: transparent; border-radius: 0; padding: 0;
}
.dt-print-banner h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .01em; color: #fff; }
.dt-print-kicker { margin: 0 0 2px; font-size: 10px; letter-spacing: .16em; font-weight: 800; opacity: .92; }
.dt-print-ref { margin-left: auto; text-align: right; font-size: 12px; }
.dt-print-ref strong { display: block; font-size: 14px; }
.dt-print-sub { display: flex; gap: 10px; padding: 8px 16px; background: rgba(196, 30, 30, 0.12); color: #7f1d1d; font-size: 12px; font-weight: 700; }
.dt-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 16px; }
.dt-party { border: 1px solid #c41e1e66; padding: 12px 14px; background: rgba(196, 30, 30, 0.06); }
.dt-party.dt-party-co { border-color: #c41e1e66; background: rgba(196, 30, 30, 0.04); }
.dt-party h3 {
  margin: 0 0 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #c41e1e;
}
.dt-party p { margin: 0 0 3px; font-size: 13px; }
.edl-head { padding: 0 16px 14px; }
.edl-brand { margin: 0 0 4px; font-size: 11px; letter-spacing: .14em; font-weight: 800; color: #c41e1e; }
.edl-head h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: .02em; font-family: Georgia, "Times New Roman", serif; }
.edl-sub { margin: 0 0 10px; font-size: 12px; color: #444; }
.edl-disc { margin: 10px 16px 12px; font-size: 12px; color: #1a1a1a; background: rgba(196, 30, 30, 0.06); border-left: 4px solid #c41e1e; padding: 8px 10px; }
.edl-id { width: calc(100% - 32px); border-collapse: collapse; margin: 0 16px 8px; }
.edl-id th { text-align: left; width: 28%; padding: 4px 8px 4px 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #555; vertical-align: top; }
.edl-id td { padding: 4px 0; font-weight: 600; }
.edl-cover-hero {
  min-height: 62vh; display: flex; flex-direction: column; justify-content: center;
  padding: 28px 24px 12px;
}
.edl-cover-hero h1 {
  margin: 18px 0 8px; font-size: 32px; font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; color: #c41e1e; line-height: 1.15;
}
.edl-cover-hero .edl-cover-doc {
  margin: 0 0 18px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: #7f1d1d; font-weight: 800;
}
.edl-cover-meta { margin: 0 0 6px; font-size: 15px; color: #1a1a1a; }
.edl-toc-page { padding: 18px 22px 12px; }
.edl-toc-page h2 {
  margin: 0 0 16px; font-size: 22px; font-family: Georgia, "Times New Roman", serif; color: #c41e1e;
}
.edl-toc { margin: 0; padding: 0; list-style: none; }
.edl-toc li { margin: 0; padding: 0; }
.toc-row {
  display: flex; align-items: baseline; gap: 0; padding: 5px 0 4px; font-size: 14px; color: #1a1a1a;
}
.toc-row.toc-sub { padding-left: 28px; font-size: 12.5px; color: #333; }
.toc-n { font-weight: 800; min-width: 2.2em; color: #c41e1e; }
.toc-row.toc-sub .toc-n { color: #1d4ed8; font-weight: 700; }
.toc-title { white-space: nowrap; }
.toc-dots {
  flex: 1; border-bottom: 1px dotted #9a9a9a; margin: 0 8px 3px; min-width: 24px; height: 0;
}
.toc-pg { font-variant-numeric: tabular-nums; color: #444; min-width: 1.6em; text-align: right; }
.edl-page { padding: 0 0 8px; }
.edl-lieu { margin: 18px 16px 0; padding: 0 0 8px; }
.edl-lieu-h {
  background: rgba(196, 30, 30, 0.10); color: #7f1d1d; padding: 10px 14px; margin: 0 0 12px;
  border-left: 4px solid #c41e1e;
}
.edl-lieu-h h2 { margin: 0 0 4px; font-size: 18px; font-family: Georgia, "Times New Roman", serif; color: #7f1d1d; }
.edl-lieu-h p { margin: 0; font-size: 12px; color: #444; }
.edl-sec {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 8px; padding: 7px 10px; color: #1a1a1a; font-size: 13px;
  letter-spacing: .04em; text-transform: uppercase; font-weight: 800;
  background: rgba(196, 30, 30, 0.08); border-left: 4px solid #c41e1e;
}
.edl-sec span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 22px; background: #c41e1e; color: #fff;
  font-size: 12px; border-radius: 3px;
}
.edl-sec-devis { background: rgba(127, 29, 29, 0.10); border-color: #7f1d1d; }
.edl-sec-devis span { background: #7f1d1d; }
.edl-sec-constat { background: rgba(29, 78, 216, 0.10); border-color: #1d4ed8; }
.edl-sec-constat span { background: #1d4ed8; }
.edl-sec-defaut { background: rgba(196, 30, 30, 0.10); border-color: #c41e1e; }
.edl-sec-defaut span { background: #c41e1e; }
.edl-sec-demande { background: rgba(180, 83, 9, 0.10); border-color: #b45309; }
.edl-sec-demande span { background: #b45309; }
.edl-sec-analyse { background: rgba(21, 128, 61, 0.10); border-color: #15803d; }
.edl-sec-analyse span { background: #15803d; }
.edl-sec-plans { background: rgba(51, 65, 85, 0.10); border-color: #334155; }
.edl-sec-plans span { background: #334155; }
.edl-sec-note { background: rgba(196, 30, 30, 0.08); border-color: #c41e1e; }
.edl-sec-note span { background: #c41e1e; }
.edl-sec-synthese { background: rgba(15, 118, 110, 0.10); border-color: #0f766e; }
.edl-sec-synthese span { background: #0f766e; }
.edl-sec-suites { background: rgba(109, 40, 217, 0.10); border-color: #6d28d9; }
.edl-sec-suites span { background: #6d28d9; }
.edl-sec-concl { background: rgba(196, 30, 30, 0.10); border-color: #c41e1e; }
.edl-sec-concl span { background: #c41e1e; }
.edl-qty { background: rgba(127, 29, 29, 0.06); border: 1px solid rgba(127, 29, 29, 0.22); padding: 8px 10px 2px; margin: 0 0 12px; }
.edl-avis { margin: 0 0 8px !important; font-size: 13px !important; font-weight: 700; color: #1a1a1a; }
.diag-point { margin: 0 0 12px; padding: 8px 0 10px; border-bottom: 1px solid #eee; }
.diag-point p { margin: 0 0 6px; }
.diag-risk { background: #fff8f4; border-left: 3px solid #c2410c; padding: 8px 10px; margin: 8px 0 12px; }
.edl-tab tr.diag-bloc td { background: #fff5f5; font-weight: 600; }
.edl-lieu h3 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #1a1a1a; }
.edl-line { margin: 0 0 4px; }
.edl-line span { display: inline-block; min-width: 88px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #666; font-weight: 700; }
.edl-ul { margin: 0 0 8px; padding-left: 18px; }
.edl-ol { margin: 0 0 8px; padding-left: 22px; }
.edl-ol li { margin: 0 0 6px; }
.edl-hint { margin: 0 0 8px; font-size: 12px; color: #444; }
.edl-item-h {
  margin: 14px 0 6px; padding: 6px 10px; font-size: 14px; font-weight: 800;
  color: #1d4ed8; background: rgba(29, 78, 216, 0.10); border-left: 4px solid #1d4ed8;
}
.edl-fiche th { width: 38%; font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 700; color: #444; border-bottom: 1px solid #eee; padding: 4px 8px 4px 0; }
.edl-tab {
  width: 100%; border-collapse: collapse; margin: 0 0 14px;
  font-size: 13px;
}
.edl-tab th {
  text-align: left; font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 1.4px solid #111; padding: 6px 8px 6px 0; color: #222; font-weight: 800;
}
.edl-tab td {
  border-bottom: 1px solid #ddd; padding: 7px 8px 7px 0; vertical-align: top;
}
.edl-tab td:first-child { width: 2.2em; color: #555; font-variant-numeric: tabular-nums; }
.edl-tab tr.edl-theme td {
  border-bottom: 1px solid #111; padding-top: 12px; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: #111;
}
.rp-shot figcaption { font-size: 11px; font-weight: 700; margin: 4px 0 0; color: #333; }
.edl-obs { background: rgba(196, 30, 30, 0.06); border-left: 3px solid #c41e1e; padding: 8px 10px; color: #1a1a1a; }
.edl-fig { margin: 10px 0 14px; background: #f4f3ef; border: 1px solid #ccc; padding: 6px; }
.edl-fig figcaption { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 6px; color: #333; }
.edl-walls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edl-fig-wall svg, svg.rp-wall { display: block; width: 100%; height: auto; min-height: 340px; background: #ecece8; }
.edl-foot { margin: 22px 0 0; padding-top: 10px; border-top: 1px solid #ccc; font-size: 11px; color: #666; }
.rapport-preview { background: #fff; }
.rapport-preview .rp-meta { font-size: 12px; color: #555; }
.rapport-preview .rp-alert { background: #fff5f5; border: 1px solid #c41e1e; border-radius: 8px; padding: 8px 10px; color: #7f1d1d; font-weight: 700; }
.rp-plan-wrap { margin: 10px 0 14px; background: #fff; border: 1px solid #d8d6d2; border-radius: 10px; padding: 8px; }
.rp-plan-wrap .kicker { margin: 0 0 6px; }
svg.rp-plan, .rp-plan-wrap svg.rp-plan, .edl-fig svg.rp-plan {
  display: block; width: 100%; height: auto; min-height: 420px; max-height: 78vh;
  background: #f4f3ef; border-radius: 6px;
}
.edl-legende { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.edl-legende li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.edl-sw { width: 22px; height: 14px; border: 1px solid #111; display: inline-block; }
.rapport-preview .rp-photos {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px;
}
.rapport-preview .rp-shot { display: block; }
.rapport-preview .rp-photos img {
  width: 100%; height: auto; min-height: 160px; max-height: 42vh; object-fit: contain;
  background: #111; border-radius: 8px; border: 1px solid #ccc;
}
.sync-ok { color: #1a7f37; font-weight: 800; }
.sync-wait { color: #c41e1e; font-weight: 800; }
@media (max-width: 720px) {
  .rapport-client { grid-template-columns: 1fr; }
  .edl-walls { grid-template-columns: 1fr; }
  .dt-parties { grid-template-columns: 1fr; }
  .assign-card { flex-direction: column; align-items: stretch; }
}
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body {
    height: auto !important; min-height: 0 !important; overflow: visible !important;
    display: block !important; background: #fff !important; margin: 0 !important;
  }
  body.printing-rapport > *:not(#rapport-print),
  body:not(.printing-plans):not(.printing-rapport) > *:not(#rapport-print) { display: none !important; }
  body.printing-plans > *:not(#plans-print) { display: none !important; }
  .vallon-eco-bar { display: none !important; }
  #rapport-print, #rapport-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #rapport-print, #rapport-print[hidden] {
    display: block !important; position: static !important; inset: auto !important;
    background: #fff; color: #111; padding: 0; overflow: visible !important;
    height: auto !important; max-height: none !important; border: 0 !important;
  }
  #rapport-print .edl-doc { border: 0; }
  #rapport-print .dt-print-banner { margin: 0; width: 100%; }
  #rapport-print .edl-cover { min-height: 297mm; }
  #rapport-print .edl-cover-hero { padding: 22mm 16mm 14mm; }
  #plans-print { display: block !important; position: static; height: auto !important; overflow: visible !important; }
  #rapport-print .edl-page {
    display: block; break-before: page; page-break-before: always;
    break-inside: auto; page-break-inside: auto;
  }
  #rapport-print .edl-page:first-child { break-before: auto; page-break-before: auto; }
  #rapport-print .edl-fig { break-inside: avoid; page-break-inside: avoid; }
  #rapport-print svg.rp-plan { min-height: 70mm; max-height: 140mm; width: 100%; }
  #rapport-print .edl-walls { grid-template-columns: 1fr 1fr; }
  #rapport-print svg.rp-wall { min-height: 50mm; max-height: 90mm; }
  #rapport-print .rp-photos { grid-template-columns: 1fr 1fr; }
  #rapport-print .rp-photos img { max-width: 100%; min-height: 40mm; max-height: 80mm; object-fit: contain; }
  #rapport-print .edl-tab { font-size: 11px; }
  #rapport-print .edl-tab th { font-size: 9px; }
  #rapport-print .edl-links { display: none; }
  #rapport-print textarea { border: 1px solid #c41e1e55; background: rgba(196, 30, 30, 0.06); }
  #rapport-print .dt-print-banner img { filter: brightness(0) invert(1); }
}

/* Mode sombre — même base que l’écobar */
.auth-gate {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 10, 16, .94);
}
.auth-gate[hidden] { display: none !important; }
.auth-box {
  width: min(420px, 92vw); background: #141820; color: #e8eaef;
  border: 1px solid #2a3142; border-radius: 14px; padding: 22px 20px 18px;
}
.auth-box h1 { margin: 10px 0 6px; font-size: 22px; }
.auth-box label { display: block; margin: 10px 0 0; font-size: 12px; font-weight: 700; color: #aeb6c8; }
.auth-box input {
  width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #2a3142; background: #0c0e14; color: #e8eaef;
}
.auth-err { min-height: 1.2em; color: #fca5a5; font-size: 13px; font-weight: 700; }
body.auth-locked .layout, body.auth-locked .banner-actions { pointer-events: none; opacity: .35; }

html.theme-dark, body.theme-dark, body {
  background: #0c0e14; color: #e8eaef; color-scheme: dark;
}
body.theme-dark input, body.theme-dark textarea, body.theme-dark select,
body input, body textarea, body select {
  background: #0c0e14; color: #e8eaef; border-color: #2a3142; color-scheme: dark;
}
body.theme-dark input::placeholder, body.theme-dark textarea::placeholder,
body input::placeholder, body textarea::placeholder { color: #6b7388; }
body.theme-dark .banner {
  background: #141820; color: #e8eaef; border-bottom: 1px solid #2a3142;
}
body.theme-dark .banner-id strong { color: #fff; }
body.theme-dark .banner-id span, body.theme-dark .banner-id #project-line { color: #8b92a8; }
body.theme-dark .led, body.theme-dark .xfer { color: #c9ceda; }
body.theme-dark .banner-proj { background: #c41e1e; color: #fff; }
body.theme-dark .banner-proj.ghost { background: transparent; color: #e8eaef; border-color: #3a4256; }
body.theme-dark .layout { background: #0c0e14; }
body.theme-dark .panel { background: #141820; border-right-color: #2a3142; }
body.theme-dark .kicker { color: #f87171; }
body.theme-dark .panel label, body.theme-dark .panel h3, body.theme-dark .modal-box label, body.theme-dark .field-label { color: #aeb6c8; }
body.theme-dark .panel input, body.theme-dark .panel select,
body.theme-dark .modal-box input, body.theme-dark .modal-box textarea, body.theme-dark .modal-box select {
  background: #0c0e14; color: #e8eaef; border-color: #2a3142;
}
body.theme-dark .pad button, body.theme-dark .act,
body.theme-dark .view-switch button, body.theme-dark .wall-chips button, body.theme-dark .cats button {
  background: #1a1f2b; color: #e8eaef; border-color: #2a3142;
}
body.theme-dark .pad button.on, body.theme-dark .act.primary, body.theme-dark .act.on,
body.theme-dark .view-switch button.on, body.theme-dark .wall-chips button.on,
body.theme-dark .cats button.on, body.theme-dark #btn-equerre.on {
  background: #c41e1e; color: #fff; border-color: #c41e1e;
}
body.theme-dark .btn.ghost { background: #1a1f2b; color: #e8eaef; }
body.theme-dark .tip, body.theme-dark .hint { color: #8b92a8; }
body.theme-dark .walk-list li, body.theme-dark .room-list li {
  border-color: #2a3142; background: #1a1f2b;
}
body.theme-dark .walk-list li.join, body.theme-dark .room-list li.on {
  border-color: #c41e1e; background: rgba(196,30,30,.16);
}
body.theme-dark .stage-head h2 { color: #fff; }
body.theme-dark .steps button { background: #1a1f2b; color: #8b92a8; }
body.theme-dark .steps button.on { background: #c41e1e; color: #fff; }
body.theme-dark .steps button.done { background: #0c0e14; color: #e8eaef; border: 1px solid #2a3142; }
body.theme-dark .canvas-wrap { background: #1a1f2b; border-color: #2a3142; }
body.theme-dark .empty-cta { background: #141820; color: #e8eaef; }
body.theme-dark .icons { background: #141820; border-color: #2a3142; }
body.theme-dark .pick button { background: #1a1f2b; border-color: #2a3142; color: #e8eaef; }
body.theme-dark .pick button.on { background: rgba(196,30,30,.18); color: #fca5a5; border-color: #c41e1e; }
body.theme-dark .win-box, body.theme-dark .modal-box { background: #141820; color: #e8eaef; }
body.theme-dark .win-x { background: #1a1f2b; color: #e8eaef; }
body.theme-dark .trav-line, body.theme-dark .fiche-card { background: #1a1f2b; border-color: #2a3142; }
body.theme-dark .trav-line.on { background: rgba(196,30,30,.16); border-color: #c41e1e; }
body.theme-dark .scope-row button, body.theme-dark .choice, body.theme-dark .where-card {
  background: #1a1f2b; border-color: #2a3142; color: #e8eaef;
}
body.theme-dark .choice.on, body.theme-dark .where-card.on {
  background: rgba(196,30,30,.16); color: #fca5a5; border-color: #c41e1e;
}
body.theme-dark .proj-list li { background: #1a1f2b; border-color: #2a3142; }
body.theme-dark .proj-list li:hover, body.theme-dark .proj-list li.on {
  background: rgba(196,30,30,.16); border-color: #c41e1e;
}
body.theme-dark .welcome { background: #0c0e14; }
body.theme-dark .welcome-logo { background: #1a1f2b; }
body.theme-dark .cote-line input { background: #0c0e14; color: #e8eaef; border-color: #2a3142; }
body.theme-dark .laser-btn { background: #1a1f2b; color: #f87171; }
body.theme-dark .ask-dock { background: #141820; }
body.theme-dark .ask-place { background: #1a1f2b; }
body.theme-dark .ask-btn { background: #1a1f2b; border-color: #2a3142; color: #e8eaef; }
body.theme-dark .ask-scope button { background: #1a1f2b; color: #e8eaef; border-color: #2a3142; }
body.theme-dark .edl-doc { background: #141820; color: #e8eaef; border-color: #2a3142; }
body.theme-dark .plan-zoom-bar span { color: #e8eaef; }
body.theme-dark .assign-card { background: #1a1f2b; border-color: #c41e1e; color: #e8eaef; }
body.theme-dark .assign-card.ok { background: #13241c; border-color: #15803d; }
body.theme-dark .edl-legal, body.theme-dark .edl-hint { color: #8b92a8; }
body.theme-dark .calque-bar { color: #e8eaef; background: #1a1f2b; border-color: #3a2a2a; }
body.theme-dark #welcome { background: #0c0e14; color: #e8eaef; }
body.theme-dark .welcome-box h1, body.theme-dark #welcome h1 { color: #fff; }
body.theme-dark .cote-field { color: #aeb6c8; }
body.theme-dark .cote-line input { background: #0c0e14 !important; color: #e8eaef !important; border-color: #2a3142; }
body.theme-dark .cote-line input.laser-wait { background: #2a1515 !important; }
body.theme-dark .cote-line input.laser-got { background: #13241c !important; color: #bbf7d0 !important; }
body.theme-dark .laser-btn { background: #1a1f2b; color: #f87171; border-color: #c41e1e; }
body.theme-dark .win-body textarea, body.theme-dark .edl-note-lab textarea,
body.theme-dark .edl-room-note, body.theme-dark textarea.edl-room-note {
  background: #0c0e14; color: #e8eaef; border-color: #2a3142;
}
body.theme-dark .edl-note-lab { color: #aeb6c8; }
body.theme-dark .rapport-client label { color: #aeb6c8; }
body.theme-dark .rapport-client input {
  background: #0c0e14; color: #e8eaef; border-color: #2a3142;
}
body.theme-dark .assign-pick, body.theme-dark .chantier-pick, body.theme-dark .work-chip {
  background: #1a1f2b; color: #e8eaef; border-color: #2a3142;
}
body.theme-dark .assign-pick:hover, body.theme-dark .assign-pick.on,
body.theme-dark .chantier-pick.on { border-color: #c41e1e; background: rgba(196,30,30,.16); }
body.theme-dark .assign-pick span { color: #8b92a8; }
body.theme-dark .assign-flag.ok { background: #14532d; color: #bbf7d0; }
body.theme-dark .assign-flag.no { background: #7f1d1d; color: #fecaca; }
body.theme-dark .work-chip.on { background: #252a38; border-color: #e8eaef; }
body.theme-dark .choice svg { background: #0c0e14; }
body.theme-dark .choice-say, body.theme-dark .where-card small, body.theme-dark .trav-head small { color: #8b92a8; }
body.theme-dark .choice.on .choice-name { color: #fca5a5; }
body.theme-dark .photo-block { border-top-color: #2a3142; }
body.theme-dark .ask-dock { background: #141820; border-color: #c41e1e; }
body.theme-dark .ask-q, body.theme-dark .ask-progress { color: #fca5a5; }
body.theme-dark .ask-alert { background: #2a1515; color: #fca5a5; }
body.theme-dark .ask-btn.oui { color: #86efac; border-color: #15803d; }
body.theme-dark .ask-btn.non { color: #aeb6c8; border-color: #3a4256; }
body.theme-dark .scale-ok { color: #86efac; }
body.theme-dark .scale-bad { color: #fca5a5; }
body.theme-dark .plans-toolbar label, body.theme-dark .plans-print-row label { color: #aeb6c8; }
body.theme-dark .plans-toolbar select, body.theme-dark .plans-print-row select {
  background: #0c0e14; color: #e8eaef; border: 1px solid #2a3142;
}
body.theme-dark .plans-stage { background: #0c0e14; border-color: #2a3142; }
body.theme-dark .plans-print-opt { border-top-color: #2a3142; }
body.theme-dark #assign-q, body.theme-dark .win-body input[type="search"],
body.theme-dark .win-body input[type="text"] {
  background: #0c0e14; color: #e8eaef; border-color: #2a3142;
}
body.theme-dark .win-edl .win-bar { background: #0c0e14; }
body.theme-dark .rapport-preview { background: #141820; color: #e8eaef; }
body.theme-dark .rapport-preview .rp-alert { background: #2a1515; color: #fca5a5; }
body.theme-dark .rp-plan-wrap { background: #1a1f2b; border-color: #2a3142; }
body.theme-dark .panel.rail { border-color: #2a3142; }
body.theme-dark .say-box { background: #141820; color: #e8eaef; }
body.theme-dark .modal { background: rgba(0,0,0,.65); }
body.theme-dark .win { background: rgba(0,0,0,.65); }
body.theme-dark .fiche-card p { color: #8b92a8; }
body.theme-dark .pick svg { stroke: #e8eaef; }
body.theme-dark .dt-print-sub { background: #2a1515; color: #fca5a5; }
body.theme-dark .edl-cover-hero h1, body.theme-dark .edl-cover-meta { color: #e8eaef; }
body.theme-dark .edl-cover-hero .edl-cover-doc { color: #fca5a5; }
body.theme-dark .dt-party { background: #1a1f2b; color: #e8eaef; }
body.theme-dark .edl-toc-page h2, body.theme-dark .toc-row { color: #e8eaef; }
body.theme-dark .toc-row.toc-sub { color: #aeb6c8; }
body.theme-dark .edl-sec { color: #e8eaef; }
body.theme-dark .edl-obs { color: #e8eaef; background: #2a1515; }
body.theme-dark .edl-foot { color: #8b92a8; border-top-color: #2a3142; }

/* Rapport écran — texte clair ; le PDF print reste clair (bloc @media print) */
body.theme-dark .rapport-preview,
body.theme-dark .rapport-preview .edl-doc,
body.theme-dark .win-edl .edl-doc {
  background: #141820; color: #e8eaef; border-color: #2a3142;
}
body.theme-dark .edl-head h1,
body.theme-dark .edl-avis,
body.theme-dark .edl-lieu h3,
body.theme-dark .edl-disc,
body.theme-dark .edl-id td,
body.theme-dark .edl-line,
body.theme-dark .edl-ul,
body.theme-dark .edl-ol,
body.theme-dark .edl-item-h,
body.theme-dark .rapport-preview .rp-meta,
body.theme-dark .toc-row {
  color: #e8eaef;
}
body.theme-dark .edl-sub,
body.theme-dark .edl-id th,
body.theme-dark .edl-line span,
body.theme-dark .edl-lieu-h p,
body.theme-dark .toc-pg,
body.theme-dark .edl-fiche th,
body.theme-dark .edl-tab td:first-child,
body.theme-dark .edl-fig figcaption,
body.theme-dark .rp-shot figcaption {
  color: #aeb6c8;
}
body.theme-dark .edl-links a { color: #fca5a5; }
body.theme-dark .edl-disc { background: #2a1515; }
body.theme-dark .edl-lieu-h h2 { color: #fca5a5; }
body.theme-dark .edl-tab { color: #e8eaef; border-color: #2a3142; }
body.theme-dark .edl-tab th {
  color: #aeb6c8; background: #1a1f2b; border-color: #2a3142;
}
body.theme-dark .edl-tab td { color: #e8eaef; border-color: #2a3142; }
body.theme-dark .edl-tab tr.diag-bloc td,
body.theme-dark .edl-tab tr.edl-theme td {
  background: #2a1515; color: #fca5a5;
}
body.theme-dark .edl-fig { background: #1a1f2b; border-color: #2a3142; }
body.theme-dark .edl-qty { background: #1a1f2b; border-color: #3a2a2a; color: #e8eaef; }
body.theme-dark .rapport-preview .rp-alert { background: #2a1515; color: #fca5a5; border-color: #c41e1e; }
body.theme-dark .dt-print-sub { background: #2a1515; color: #fca5a5; }
body.theme-dark .dt-party p { color: #e8eaef; }
body.theme-dark .edl-note-lab { color: #aeb6c8; }
body.theme-dark .edl-note-lab textarea,
body.theme-dark .edl-room-note,
body.theme-dark textarea.edl-room-note {
  background: #0c0e14; color: #e8eaef; border-color: #2a3142;
}

@media print {
  body.theme-dark #rapport-print,
  body.theme-dark #rapport-print .edl-doc {
    background: #fff !important; color: #1a1a1a !important;
  }
  body.theme-dark #rapport-print .edl-head h1,
  body.theme-dark #rapport-print .edl-avis,
  body.theme-dark #rapport-print .edl-lieu h3,
  body.theme-dark #rapport-print .edl-disc,
  body.theme-dark #rapport-print .edl-id td,
  body.theme-dark #rapport-print .edl-line,
  body.theme-dark #rapport-print .edl-ul,
  body.theme-dark #rapport-print .edl-ol,
  body.theme-dark #rapport-print .toc-row,
  body.theme-dark #rapport-print .edl-tab td,
  body.theme-dark #rapport-print .edl-cover-hero h1,
  body.theme-dark #rapport-print .edl-cover-meta,
  body.theme-dark #rapport-print .dt-party,
  body.theme-dark #rapport-print .dt-party p {
    color: #1a1a1a !important; background: transparent;
  }
  body.theme-dark #rapport-print .edl-sub,
  body.theme-dark #rapport-print .edl-id th,
  body.theme-dark #rapport-print .edl-line span,
  body.theme-dark #rapport-print .edl-lieu-h p,
  body.theme-dark #rapport-print .toc-pg,
  body.theme-dark #rapport-print .edl-fiche th,
  body.theme-dark #rapport-print .edl-fig figcaption,
  body.theme-dark #rapport-print .rp-shot figcaption {
    color: #444 !important;
  }
  body.theme-dark #rapport-print .edl-tab th {
    color: #444 !important; background: #f4f4f2 !important;
  }
  body.theme-dark #rapport-print .edl-fig {
    background: #f4f3ef !important; border-color: #ccc !important;
  }
  body.theme-dark #rapport-print .edl-obs {
    color: #1a1a1a !important; background: rgba(196, 30, 30, 0.06) !important;
  }
  body.theme-dark #rapport-print .edl-lieu-h h2 { color: #7f1d1d !important; }
}
