/* La maquette d'un projet (src/maquette.js) : la fenêtre de la topo (src/topo3d.css, direction « Instrument »)
   posée sur une scène BLANCHE (maquette blanche à la BIG) ; les panneaux suivent la scène : clairs sur la blanche, fumés sur la sombre (variables --tp-*, src/topo3d.css). */
.mq .tp-scene { background: #FFFFFF; }
.mq.mq-sombre .tp-scene { background: #0B0C0E; }
/* le dépôt du fichier IFC, au centre de la vue */
.mq-depot { position: absolute; left: 50%; top: 50%; z-index: 4; width: min(420px, calc(100% - 40px)); transform: translate(-50%, -50%); padding: 22px 24px; text-align: center; }
.mq-depot[hidden] { display: none; }
.mq-depot-titre { margin: 0 0 6px; font-size: var(--t-17); font-weight: 600; }
.mq-depot-note { margin: 0 0 14px; font-size: var(--t-13); line-height: 1.5; color: rgb(var(--tp-v) / 0.6); }
.mq-depot .bouton { margin: 0; height: var(--h-bouton); border: 0; border-radius: var(--r-moyen); background: var(--tp-encre); color: var(--tp-sur-encre); font-size: var(--t-14); font-weight: 600; box-shadow: none; }
.mq.mq-survol .tp-scene { outline: 3px dashed rgb(var(--tp-n) / 0.5); outline-offset: -12px; }
/* chiffres clés : la surface de plancher en grand, quatre repères, le verdict PLU en lignes */
.mq-cles { padding: 16px 18px 14px; }
.mq-cles:empty { display: none; }
.mq-src { color: rgb(var(--tp-v) / 0.35); }
.mq-verdict { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid rgb(var(--tp-v) / 0.08); display: grid; gap: 6px; }
.mq-verdict li { display: flex; align-items: center; gap: 8px; font-size: var(--t-13); }
.mq-verdict li span { flex: 1; min-width: 0; }
.mq-verdict li small { color: rgb(var(--tp-v) / 0.45); }
.mq-verdict li b { font-weight: 500; font-size: var(--t-12); color: rgb(var(--tp-v) / 0.6); white-space: nowrap; }
.mq-verdict li i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--tp-v) / 0.35); }
.mq-verdict li.mq-conforme i { background: #7FB58A; }
.mq-verdict li.mq-depasse i { background: #E06C5B; }
.mq-verdict li.mq-depasse b { color: var(--tp-erreur); }
.mq-verdict li.mq-a-verifier i { background: #E0B45B; }
.mq-source { margin: 10px 0 0; font-size: var(--t-12); line-height: 1.45; color: rgb(var(--tp-v) / 0.45); }
.mq-niveaux { margin: 10px 0 0; font-size: var(--t-12); }
.mq-niveaux summary { cursor: pointer; color: rgb(var(--tp-v) / 0.6); }
.mq-niveaux ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; }
.mq-niveaux li { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.mq-niveaux li small { color: rgb(var(--tp-v) / 0.45); }
.mq-niveaux li b { font-weight: 500; }
.mq-actions { display: flex; gap: 6px; margin-top: 14px; }
.mq-actions .bouton { flex: 1; height: var(--h-bouton, 30px); margin: 0; padding: 0 8px; border: 0; border-radius: var(--r-bouton); background: rgb(var(--tp-v) / 0.08); box-shadow: none; color: var(--tp-encre); font-size: var(--t-13); font-weight: 500; }
.mq-actions .bouton-primaire { flex: 1 0 100%; background: var(--tp-encre); color: var(--tp-sur-encre); }
.mq-actions { flex-wrap: wrap; }
/* la liste des maquettes (versions) */
.mq-versions { padding: 14px 12px 12px; }
.mq-versions .tpi-lib { margin: 0 6px 6px; }
.mq-versions > .bouton { width: 100%; height: var(--h-bouton); margin: 8px 0 0; border: 0; border-radius: var(--r-moyen); background: rgb(var(--tp-v) / 0.08); box-shadow: none; color: var(--tp-encre); font-size: var(--t-13); }
.mq-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mq-liste li { display: flex; align-items: center; gap: 2px; border-radius: var(--r-bouton); }
.mq-liste li.mq-courante { background: rgb(var(--tp-v) / 0.08); }
.mq-ouvrir { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 7px 8px; border: 0; border-radius: var(--r-bouton); background: none; color: var(--tp-encre); font: inherit; font-size: var(--t-13); text-align: left; cursor: pointer; }
.mq-ouvrir:hover { background: rgb(var(--tp-v) / 0.06); }
.mq-ouvrir b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mq-ouvrir small { font-size: var(--t-11); color: rgb(var(--tp-v) / 0.45); }
.mq-liste .tp-x { flex: none; font-size: var(--t-15); }
/* le calage : la carte en plan et ses champs */
.mq-calage[hidden] { display: none !important; }
.mq-calage .tp-plan { cursor: crosshair; }
.mq-xy { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mq-xy label { display: grid; gap: 3px; font-size: var(--t-12); color: rgb(var(--tp-v) / 0.5); }
.mq-xy input { height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-bouton); background: rgb(var(--tp-v) / 0.08); color: var(--tp-encre); font: inherit; font-size: var(--t-13); font-variant-numeric: tabular-nums; }
.mq-calage .bouton:not(.tp-charger) { height: var(--h-bouton); margin: 0; border: 0; border-radius: var(--r-moyen); background: rgb(var(--tp-v) / 0.08); box-shadow: none; color: var(--tp-encre); font-size: var(--t-13); }
.mq-calage .tp-charger[hidden] { display: none; }
/* la visite : le pad est celui de la topo (.tp-aide) ; le viseur n'existe pas ici */
@media (max-width: 899px) {
  .mq .tpi-feuille { max-height: 46svh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .mq .tpi-feuille::-webkit-scrollbar { display: none; }
  .mq .tpi-feuille .mq-cles { position: static; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mq .tpi-feuille .tpi-gros { font-size: 34px; }
  .mq .tpi-feuille .tpi-quatre { margin-top: 10px; padding-top: 10px; gap: 8px 12px; }
  .mq .tpi-feuille .tpi-quatre dd { font-size: var(--t-15); }
  .mq .tpi-feuille .mq-niveaux { display: none; }
  /* les actions fixées en bas de la feuille */
  .mq .tpi-feuille .mq-actions { position: sticky; bottom: 0; margin: 12px -14px -14px; padding: 10px 14px 14px; background: rgb(var(--tp-n) / 0.96); }
  .mq .tpi-feuille .mq-actions .bouton { height: 44px; font-size: var(--t-13); }
  .mq .tp-aide { bottom: calc(46svh + 16px); }
  .mq .mq-versions { position: absolute; right: 64px; top: calc(env(safe-area-inset-top) + 62px); z-index: 7; width: min(280px, calc(100vw - 84px)); }
  .mq .tp-info { position: absolute; left: 12px; right: 64px; top: calc(env(safe-area-inset-top) + 62px); z-index: 6; }
  .mq .tpi-droite { position: static; width: auto; }
}

/* la feuille du téléphone : les quatre repères en grille (src/topo3d.css les remet en ligne pour l'altimétrie de la topo) */
@media (max-width: 899px) {
  .mq .tpi-feuille .tpi-quatre { display: grid; grid-template-columns: 1fr 1fr; grid-column: auto; grid-row: auto; text-align: left; }
  .mq .tpi-feuille .tpi-quatre > div { display: flex; flex-direction: column; }
  .mq .tpi-feuille .tpi-quatre > div::after, .mq .tpi-feuille .tpi-quatre > div::before { content: none; }
  .mq .tpi-feuille .tpi-quatre > div:nth-child(4), .mq .tpi-feuille .tpi-quatre dt { display: block; }
  .mq .tpi-feuille .tpi-quatre dd { display: block; font-size: 16px; font-weight: 500; }
}
.mq-calage { scrollbar-width: none; }
.mq-calage::-webkit-scrollbar { display: none; }
