/* Viewer plotter : pensé d'abord pour le téléphone (Firefox Android), le même sur PC. */
:root {
  --fond: #f4f4f2;
  --texte: #1e1e1e;
  --barre: rgba(255, 255, 255, 0.93);
  --bord: #d2d2cd;
  --accent: #e8590c;
  --ok: #2b8a3e;
  --attente: #f08c00;
  --erreur: #c92a2a;
  --erreur-fond: #fff1f1;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1b1c1e;
    --texte: #e9e9e6;
    --barre: rgba(36, 37, 40, 0.93);
    --bord: #3b3c40;
    --erreur-fond: #2c1717;
  }
}
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.3 system-ui, sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
#app {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--hauteur-visible, 100dvh);
  overflow: hidden;
}
#toile, #calque {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#calque { cursor: crosshair; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 44px;
  touch-action: manipulation;
  cursor: pointer;
}
button[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: #fff; }
a.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 200px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--bord);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}
model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--fond);
}

#haut {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: calc(env(safe-area-inset-top) + 6px) 10px 6px;
  pointer-events: none;
}
#titre {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 4px var(--fond), 0 0 8px var(--fond);
}
.pastille {
  pointer-events: auto;
  min-height: 0;
  padding: 3px 10px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  background: var(--bord);
  white-space: nowrap;
}
.pastille.construction { background: var(--attente); color: #000; }
.pastille.pret { background: var(--ok); color: #fff; }
.pastille.erreur { background: var(--erreur); color: #fff; }
.pastille.defauts { background: var(--attente); color: #000; font-weight: 600; }

#erreur {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 44px);
  left: 8px;
  right: 8px;
  max-height: 45dvh;
  overflow: auto;
  margin: 0;
  padding: 8px;
  background: var(--erreur-fond);
  color: var(--erreur);
  border: 1px solid var(--erreur);
  border-radius: 10px;
  font: 12px/1.35 ui-monospace, monospace;
  white-space: pre-wrap;
}

#barre {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 4px;
  justify-content: space-around;
  padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px);
  background: var(--barre);
  border-top: 1px solid var(--bord);
}
#barre button { flex: 1; max-width: 140px; min-width: 0; padding: 8px 2px; white-space: nowrap; overflow: hidden;
               text-overflow: ellipsis; }

.panneau, #selection, #defaut, #bandeau-camera, #bandeau-dessin {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(env(safe-area-inset-bottom) + 68px);
  background: var(--barre);
  border: 1px solid var(--bord);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}
@media (min-width: 700px) {
  .panneau, #selection, #defaut, #bandeau-camera, #bandeau-dessin { right: auto; width: 420px; }
}
#vues, #coupe, #eclate, #anim { padding: 8px; }
.grille4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.rangee {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.rangee button { flex: 1; }
.rangee:first-child { margin-top: 0; }
.curseur {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 4px 4px;
}
.curseur span {
  min-width: 5.5em;
  font-variant-numeric: tabular-nums;
}
.curseur input[type="range"] {
  flex: 1;
  height: 32px;
  accent-color: var(--accent);
}
#pieces {
  max-height: 60dvh;
  display: flex;
  flex-direction: column;
}
#pieces .entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid var(--bord);
}
#arbre { overflow: auto; padding: 4px 0 8px; }
#arbre details > summary { list-style: none; }
#arbre details > summary::-webkit-details-marker { display: none; }
.noeud {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding-right: 8px;
}
.noeud .oeil {
  min-width: 40px;
  min-height: 36px;
  padding: 0;
  border: none;
  font-size: 18px;
  opacity: 0.9;
}
.noeud .oeil[aria-pressed] { background: none; color: inherit; }
.noeud .oeil[aria-pressed="false"] { opacity: 0.3; }
.noeud .nom {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.noeud .pastille-couleur {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}
.noeud.choisi .nom { color: var(--accent); font-weight: 600; }
.groupe > summary .nom::before { content: "▸ "; }
.groupe[open] > summary .nom::before { content: "▾ "; }

#defauts {
  max-height: 60dvh;
  display: flex;
  flex-direction: column;
}
#defauts .entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--bord);
}
#liste-defauts { overflow: auto; padding: 4px; }
.ligne-defaut {
  display: block;
  width: 100%;
  margin: 2px 0;
  text-align: left;
  border: none;
  border-radius: 8px;
  font-size: 14px;
}
.ligne-defaut .sorte { color: var(--attente); font-weight: 600; margin-right: 6px; }
.ligne-defaut.voulu { opacity: 0.75; }
.ligne-defaut.voulu .sorte { color: var(--ok); }
.titre-voulus { margin: 10px 8px 4px; font-size: 13px; opacity: 0.8; }
.ligne-mesure { margin: 2px 8px; font-size: 14px; }
#bandeau-camera { font-size: 14px; }
#bandeau-camera span { flex: 1; min-width: 0; }
#selection, #defaut, #bandeau-camera, #bandeau-dessin {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 6px 6px 12px;
}
#defaut-texte {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#defaut button { min-width: 44px; padding: 8px; }
#selection { flex-wrap: wrap; }
#selection-texte {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#selection-nom {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* fiche de la sélection (tools/selection.py, par le serveur) : une ligne courte, le détail sous ⓘ */
#selection-info {
  font-size: 13px;
  opacity: 0.8;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#selection-info:empty { display: none; }
#selection-plus[aria-pressed="true"] { color: var(--accent); }
#selection-details {
  flex-basis: 100%;
  font-size: 13px;
  margin-top: 2px;
  padding: 4px 6px 2px 0;
  border-top: 1px solid var(--bord);
  max-height: 40vh;
  overflow: auto;
  user-select: text;
}
#selection-details div { padding: 2px 0; }
#selection-details .titre { font-weight: 600; margin-top: 4px; }

/* --- Chat Claude (chat.js) : au téléphone, feuille en bas ; à moitié, la 3D garde la place au-dessus -------- */
#app { --hauteur-chat: 55%; }
#app.chat-plein { --hauteur-chat: calc(100% - 46px); }
#app.chat-ouvert #toile, #app.chat-ouvert #calque { height: calc(100% - var(--hauteur-chat)); }
#app.chat-ouvert #barre { display: none; }
#app.chat-ouvert .panneau, #app.chat-ouvert #selection, #app.chat-ouvert #defaut, #app.chat-ouvert #bandeau-camera {
  bottom: calc(var(--hauteur-chat) + 8px);
}
#chat {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;            /* la marge du bas d'écran comprise dans la hauteur */
  height: var(--hauteur-chat);
  display: flex;
  flex-direction: column;
  background: var(--fond);
  border-top: 1px solid var(--bord);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.15);
  padding-bottom: env(safe-area-inset-bottom);
}
/* Écran large (PC, tablette ou téléphone couchés) : le chat en colonne à droite ; la 3D, sa barre et ses panneaux
   gardent la place à gauche. ▸ / ◂ : colonne élargie ou non. Même seuil dans chat.js (LARGE). */
@media (min-width: 900px) and (orientation: landscape) {
  #app { --largeur-chat: clamp(360px, 34%, 560px); }
  #app.chat-plein { --largeur-chat: 60%; }
  #app.chat-ouvert #toile { width: calc(100% - var(--largeur-chat)); height: 100%; }
  #app.chat-ouvert #barre { display: flex; right: var(--largeur-chat); }
  #app.chat-ouvert #haut { right: var(--largeur-chat); }
  #app.chat-ouvert #erreur { right: calc(var(--largeur-chat) + 8px); }
  #app.chat-ouvert .panneau, #app.chat-ouvert #selection, #app.chat-ouvert #defaut, #app.chat-ouvert #bandeau-camera {
    bottom: calc(env(safe-area-inset-bottom) + 68px);
  }
  #chat {
    top: 0;
    left: auto;
    width: var(--largeur-chat);
    height: auto;
    border-top: none;
    border-left: 1px solid var(--bord);
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.15);
    padding-top: env(safe-area-inset-top);
  }
}
#chat-entete {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 12px;
  border-bottom: 1px solid var(--bord);
}
#chat-entete button { min-height: 36px; padding: 4px 10px; }
#chat-statut { flex: 1; min-width: 0; font-size: 13px; opacity: 0.8; white-space: nowrap; overflow: hidden; }
#chat-statut.occupe { color: var(--attente); opacity: 1; }
#chat-statut.hors { color: var(--erreur); opacity: 1; }
#chat-mode, #chat-modele {
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: none;
  border: 1px solid var(--bord);
  border-radius: 8px;
  padding: 6px 4px;
  max-width: 9.5em;
}
#chat-jauge { height: 4px; background: var(--bord); }
#chat-jauge > div { height: 100%; width: 0; background: var(--ok); transition: width 0.4s; }
#chat-jauge[data-niveau="moyen"] > div { background: var(--attente); }
#chat-jauge[data-niveau="haut"] > div { background: var(--erreur); }
#chat-entete [data-chat=aides] { padding: 4px 6px; margin-left: -4px; }
#chat-aides { padding: 8px 12px; border-bottom: 1px solid var(--bord); background: var(--barre); font-size: 13px; }
#chat-aides p { margin: 4px 0 8px; }
#chat-aides .modele { opacity: 0.75; }
#chat-aides .modele.choisi { opacity: 1; }
#chat-aides .modele.choisi b::after { content: " ✓"; color: var(--ok); }
#chat-menu, #chat-sessions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--bord);
  background: var(--barre);
}
#chat-sessions { max-height: 60%; overflow: auto; touch-action: pan-y; }
#chat-sessions .titre { font-weight: 600; font-size: 14px; }
#chat-sessions .session { display: flex; gap: 8px; text-align: left; min-height: 40px; }
#chat-sessions .date { flex: none; opacity: 0.7; font-size: 13px; }
#chat-sessions .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chat-fil {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.msg { margin: 6px 0; line-height: 1.4; overflow-wrap: anywhere; }
.msg.moi {
  margin-left: 15%;
  padding: 8px 10px;
  border-radius: 12px 12px 2px 12px;
  background: var(--accent);
  color: #fff;
}
.msg.moi .corps { white-space: pre-wrap; }
.msg.moi .contexte { margin-top: 4px; font-size: 12px; opacity: 0.85; }
.msg.claude > :first-child { margin-top: 0; }
.msg.claude > :last-child { margin-bottom: 0; }
.msg.claude pre, .carte pre {
  overflow-x: auto;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--barre);
  border: 1px solid var(--bord);
  font: 12px/1.35 ui-monospace, monospace;
  touch-action: pan-x pan-y;
}
.msg.claude code { font: 13px ui-monospace, monospace; }
.msg.claude table { border-collapse: collapse; font-size: 13px; display: block; overflow-x: auto; }
.msg.claude th, .msg.claude td { border: 1px solid var(--bord); padding: 3px 6px; }
.chat-ligne { margin: 3px 0; font-size: 13px; }
.chat-ligne.outil { font-family: ui-monospace, monospace; font-size: 12px; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-ligne.outil::before { content: "⏳ "; }
.chat-ligne.outil[data-etat="ok"]::before { content: "✓ "; color: var(--ok); }
.chat-ligne.outil[data-etat="erreur"]::before { content: "✗ "; color: var(--erreur); }
.chat-ligne.systeme, .chat-ligne.fin { opacity: 0.6; font-style: italic; }
.chat-ligne.erreur { color: var(--erreur); }
.chat-ligne.telechargement { display: inline-block; margin: 4px 6px 4px 0; padding: 6px 10px; border-radius: 8px;
  border: 1px solid currentColor; text-decoration: none; color: inherit; font-size: 14px; }
.chat-image img { display: block; max-width: 100%; margin: 6px 0; border: 1px solid var(--bord); border-radius: 8px; }
.msg.moi .fichiers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.msg.moi .fichiers img { max-height: 160px; margin: 0; }
.msg.moi .fichier { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.2); font-size: 13px; }
#chat-pieces { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 8px 0; }
#chat-pieces .piece {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 2px 2px 6px;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: var(--barre);
  font-size: 13px;
}
#chat-pieces .piece[data-etat="erreur"] { border-color: var(--erreur); color: var(--erreur); }
#chat-pieces img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
#chat-pieces .nom { max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chat-pieces .etat { opacity: 0.75; white-space: nowrap; }
#chat-pieces button { min-height: 28px; padding: 0 6px; border: none; background: none; }
#chat.depot { outline: 3px dashed var(--accent); outline-offset: -6px; }
.carte {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid var(--attente);
  border-radius: 12px;
  background: var(--barre);
}
.carte.repondue { border-color: var(--bord); opacity: 0.8; }
.carte .titre { font-weight: 600; }
.carte .description { font-size: 13px; opacity: 0.8; margin: 2px 0 4px; }
.carte .details { max-height: 30vh; white-space: pre-wrap; }
.carte .question { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.carte .question .intitule { width: 100%; }
.carte .question .description { width: 100%; margin-top: -2px; }
.carte .plan { max-height: 40vh; overflow: auto; touch-action: pan-y; font-size: 14px; }
.carte input.autre, #chat-saisie, #fleche-texte {
  font: inherit;
  font-size: 16px;
  color: inherit;
  background: var(--fond);
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 8px 10px;
}
.carte input.autre { width: 100%; box-sizing: border-box; margin-top: 4px; }
.carte .actions { display: flex; gap: 6px; margin-top: 8px; }
.carte .actions button { flex: 1; }
.carte .actions .principal { background: var(--accent); border-color: transparent; color: #fff; }
.carte .decision { font-size: 13px; }
#chat-contexte {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 8px;
  font-size: 13px;
}
#chat-contexte span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.8; }
#chat-contexte button { min-height: 28px; padding: 0 8px; border: none; }
#chat-saisie-zone { display: flex; gap: 6px; align-items: flex-end; padding: 6px 8px; }
#chat-saisie { flex: 1; resize: none; min-height: 44px; max-height: 140px; box-sizing: border-box; touch-action: pan-y; }
#chat-saisie-zone button { min-width: 44px; }
#chat-saisie-zone button.stop { background: var(--erreur); border-color: transparent; color: #fff; }

#dessin-texte { flex: 1; min-width: 0; font-size: 14px; }
/* Saisie du texte d'une flèche : le champ et ✓ remplacent le reste du bandeau */
#bandeau-dessin .saisie-fleche, #bandeau-dessin.saisie > :not(.saisie-fleche) { display: none; }
#bandeau-dessin.saisie .saisie-fleche { display: block; }
#fleche-texte { flex: 1; min-width: 0; min-height: 44px; box-sizing: border-box; }
#bandeau-dessin [data-action="fleche-ok"] { min-width: 44px; }
#bandeau-dessin [data-action="outil-fleche"] { padding: 8px; }
#bandeau-dessin [data-action="outil-fleche"] svg { display: block; }

/* --- Panneau « Cotes » (tools/parametres.py) : les curseurs des axes, puis les cotes, comme un tableur ----------- */
#cotes { max-height: 62dvh; display: flex; flex-direction: column; }
#cotes .entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bord);
}
#cotes-etat { font-size: 13px; opacity: 0.8; text-align: right; }
#cotes-etat.erreur { color: var(--erreur); opacity: 1; }
#poses { padding: 2px 8px; border-bottom: 1px solid var(--bord); }
#poses:empty { display: none; }
#poses .curseur { margin: 4px 4px; }
#poses .curseur span { min-width: 7.5em; }
#cotes-recherche {
  margin: 6px 8px;
  font: inherit;
  font-size: 16px;
  color: inherit;
  background: var(--fond);
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 6px 10px;
}
#liste-cotes { overflow: auto; padding-bottom: 8px; touch-action: pan-y; }
#liste-cotes details > summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 12px;
  font-weight: 600;
  font-size: 14px;
  border-top: 1px solid var(--bord);
}
#liste-cotes details > summary::-webkit-details-marker { display: none; }
#liste-cotes details > summary::before { content: "▸ "; }
#liste-cotes details[open] > summary::before { content: "▾ "; }
#liste-cotes summary .compte { font-weight: 400; opacity: 0.6; }
#liste-cotes .fichier > summary { background: var(--fond); }
#liste-cotes .fichier .section > summary { padding-left: 24px; font-weight: 500; }
.note-cotes { font-size: 12px; opacity: 0.65; font-style: italic; padding: 2px 12px 2px 24px; }
.cote { padding: 4px 12px 8px 24px; }
.cote .tete { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cote .nom { font-family: ui-monospace, monospace; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.cote .badge { font-size: 11px; padding: 1px 6px; border-radius: 8px; color: #fff; background: var(--attente); }
.cote .desc { font-size: 13px; opacity: 0.75; margin: 2px 0 4px; }
.cote .valeurs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cote input {
  width: 5.4em;
  box-sizing: border-box;
  font: inherit;
  font-size: 16px;
  padding: 4px 6px;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: var(--fond);
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.cote input.attente { opacity: 0.5; }
.cote input.refus { border-color: var(--erreur); background: var(--erreur-fond); }
.cote .calc { font-size: 15px; opacity: 0.6; font-variant-numeric: tabular-nums; padding: 4px 2px; }
.cote .paren { opacity: 0.45; }
.cote.modifiee .nom { color: var(--accent); }
.cote .revenir { min-height: 30px; padding: 2px 8px; font-size: 13px; }
.cote .erreur-cote { font-size: 12px; color: var(--erreur); margin-top: 2px; }
/* Au téléphone, panneau « Cotes » ouvert : la 3D prend la place au-dessus (on voit la machine bouger), comme avec le
   chat ; le panneau, le reste au-dessus de la barre. */
@media (max-width: 699px) {
  #app.cotes-ouvert:not(.chat-ouvert) { --hauteur-cotes: 56%; }
  #app.cotes-ouvert:not(.chat-ouvert) #toile, #app.cotes-ouvert:not(.chat-ouvert) #calque {
    height: calc(100% - var(--hauteur-cotes));
  }
  #app.cotes-ouvert:not(.chat-ouvert) #cotes {
    max-height: none;
    height: calc(var(--hauteur-cotes) - 76px - env(safe-area-inset-bottom));
    box-sizing: border-box;
  }
}
.filtre-cotes {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  font-size: 14px;
  font-weight: 600;
  border-top: 1px solid var(--bord);
  border-bottom: 1px solid var(--bord);
}
.filtre-cotes span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.filtre-cotes button { min-height: 36px; padding: 2px 10px; }
.separateur-cotes { font-size: 12px; opacity: 0.65; padding: 8px 12px 2px; border-top: 1px dashed var(--bord); }
.cote .badge.mesure { background: var(--ok); }
.cote .partie { font-size: 11px; opacity: 0.55; }
/* Au téléphone, la bulle de la sélection : le nom et sa ligne en entier, les boutons dessous (5 avec « Cotes ») */
@media (max-width: 699px) {
  #selection-texte { flex: 1 1 100%; }
  #selection > button { flex: 1 1 auto; padding-left: 6px; padding-right: 6px; }
}

/* --- Partage (tools/partager.py) : la page publique d'un projet, en lecture seule ------------------------------------ */
.partage [data-action="dessin"], .partage [data-action="chat"], .partage #statut:not(.erreur), .partage #check,
.partage #poses, .partage [data-action="vue-camera"] { display: none !important; }
#haut a { pointer-events: auto; white-space: nowrap; flex: none; }
.cote .valeur { font-size: 15px; font-variant-numeric: tabular-nums; padding: 4px 6px; border: 1px solid var(--bord);
                border-radius: 8px; min-width: 3em; text-align: right; }
#haut a.accueil, #haut a.telecharger {
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 14px;
  background: var(--barre);
}
#selection-fichiers { flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; }
#selection-fichiers a.telecharger {
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
}
/* la vignette de l'accueil : la maquette seule */
.vignette #haut, .vignette #barre, .vignette .panneau, .vignette #selection { display: none !important; }
