/* ---------- Page Patronage ---------- */
/* Même direction artistique que le reste de l'app : fond noir, encadrés
   translucides à bord fin, titres en Hussar, gris qui passent au blanc
   lumineux au survol. */
#page-patronage.active {
  display: block;
  position: relative;
}

/* Page des projets : voir « Page des projets » en fin de fichier */
#page-patronage.editor-open .pat-landing { display: none; }

/* ---------- Outil de conception ---------- */
.pe {
  --pe-card: rgba(255, 255, 255, 0.03);
  --pe-border: rgba(255, 255, 255, 0.1);
  --pe-border-strong: rgba(255, 255, 255, 0.3);
  --pe-text: #e6ebf2;
  --pe-muted: #6b6b6b;
  --pe-soft: #9ea8b8;
  --pe-glow: 0 0 14px rgba(255, 255, 255, 0.12);
  --pe-danger: #ff8a80;

  position: absolute;
  inset: 44px 0 0 0;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 8px 12px 8px;
  font-family: var(--dv-font-text);
  font-weight: 400;
  font-size: 12px;
  color: var(--pe-text);
  user-select: none;
}
#page-patronage.editor-open .pe {
  display: flex;
  animation: pe-fade 0.45s ease-out both;
}

.pe ::-webkit-scrollbar { width: 8px; height: 8px; }
.pe ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
.pe ::-webkit-scrollbar-track { background: transparent; }

/* Encadrés (même style que la zone de discussion de Génération) */
.pe-toolbar,
.pe-panel,
.pe-canvas-wrap {
  background: var(--pe-card);
  border: 1px solid var(--pe-border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

/* Barre d'outils */
.pe-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 8px;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  animation: pe-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pe-group {
  display: flex;
  gap: 2px;
  padding-right: 6px;
  border-right: 1px solid var(--pe-border);
}
.pe-group:last-child { border-right: none; padding-right: 0; }
.pe-spacer { flex: 1; }

.pe-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--pe-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pe-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pe-btn:hover { color: #fff; }
.pe-btn:hover svg { filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.55)); }
.pe-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--pe-border-strong);
  box-shadow: var(--pe-glow);
}
.pe-btn.active svg { filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)); }
.pe-btn:disabled { opacity: 0.25; cursor: default; }
.pe-btn:disabled svg { filter: none; }

/* Flèche retour + nom du projet */
.pe-group-project { align-items: center; gap: 4px; }
.pe-back { color: #9ea8b8; }
.pe-project {
  max-width: 180px;
  padding: 0 8px 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 12px var(--dv-font);
  letter-spacing: 0.06em;
  color: #c8c8cc;
}
/* Corps : panneaux + zone de dessin */
.pe-body {
  position: relative;
  flex: 1;
  display: flex;
  gap: 0;
  min-height: 0;
}

.pe-panel {
  width: 220px;
  flex-shrink: 0;
  overflow-y: auto;
  backdrop-filter: blur(8px);
  animation: pe-rise 0.6s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pe-right { width: 256px; }

.pe-panel-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px 10px;
  font: 700 11px var(--dv-font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pe-muted);
  background: rgba(8, 8, 9, 0.92);
  border-bottom: 1px solid var(--pe-border);
  border-radius: 16px 16px 0 0;
}

.pe-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pe-border);
}
.pe-section:last-child { border-bottom: none; }
.pe-section-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font: 700 12px var(--dv-font);
  letter-spacing: 0.06em;
  color: #fff;
}
.pe-count { color: var(--pe-muted); }
.pe-empty { color: var(--pe-muted); font-style: italic; padding: 2px 0; }

.pe-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--pe-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pe-item:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.pe-item.selected {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}
.pe-swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 6px currentColor; }
.pe-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-item-meta { color: var(--pe-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pe-item-meta.warn, .pe-warn { color: #ffb36b; }

.pe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0;
  min-height: 26px;
}
.pe-row-label { color: var(--pe-soft); flex-shrink: 0; }
.pe-row-input { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pe-row-value { font-variant-numeric: tabular-nums; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-unit { color: var(--pe-muted); width: 18px; }

.pe input[type="number"],
.pe input[type="text"] {
  width: 90px;
  height: 26px;
  padding: 0 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--pe-border);
  border-radius: 8px;
  color: var(--pe-text);
  font: inherit;
  user-select: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pe input[type="text"] { width: 132px; }
.pe input:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); box-shadow: var(--pe-glow); }
.pe input[readonly] { color: var(--pe-muted); }
.pe input[type="color"] {
  width: 40px;
  height: 26px;
  padding: 0 2px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--pe-border);
  border-radius: 8px;
  cursor: pointer;
}
.pe input[type="checkbox"] { accent-color: #fff; width: 14px; height: 14px; cursor: pointer; }

.pe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.pe-action {
  height: 30px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: var(--pe-soft);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, text-shadow 0.2s;
}
.pe-action:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: var(--pe-glow);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}
.pe-action.danger { color: var(--pe-danger); }
.pe-action.danger:hover { border-color: rgba(255, 138, 128, 0.5); box-shadow: 0 0 14px rgba(255, 138, 128, 0.15); }
.pe-action.wide { grid-column: 1 / -1; }
.pe-action.primary {
  background: var(--dv-accent);
  border-color: var(--dv-accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(31, 111, 194, 0.245);
}
.pe-action.primary:hover { color: #000; text-shadow: none; box-shadow: 0 0 22px rgba(255, 255, 255, 0.55); }

.pe-keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  color: var(--pe-soft);
}
.pe-keys kbd {
  justify-self: start;
  padding: 1px 6px;
  font: inherit;
  font-size: 11px;
  color: var(--pe-text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

/* Zone de dessin */
.pe-canvas-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
  overflow: hidden;
  animation: pe-rise 0.6s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pe-canvas-wrap canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  touch-action: none;
}

/* Barre d'état */
.pe-status {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 18px;
  padding: 0 6px;
  flex-shrink: 0;
  color: var(--pe-muted);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}
#pe-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#pe-hint.warn { color: #ffb36b; }
#pe-coords, #pe-zoom { font-variant-numeric: tabular-nums; }

/* Boîte de dialogue */
.pe-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  animation: pe-fade 0.2s both;
}
.pe-modal {
  width: 270px;
  padding: 18px;
  background: rgba(20, 20, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.05), 0 20px 60px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  animation: pe-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pe-modal h3 {
  margin-bottom: 12px;
  font: 700 14px var(--dv-font);
  letter-spacing: 0.06em;
  color: #fff;
}
.pe-modal-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pe-modal-buttons .pe-action { padding: 0 16px; }

/* ---------- Nouveautés : modes, mesures, versions, champs ---------- */
.pe-mode {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--pe-border);
  border-radius: 12px;
}
.pe-mode-btn {
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--pe-muted);
  font: 700 11px var(--dv-font);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, text-shadow 0.2s;
}
.pe-mode-btn:hover { color: #fff; }
.pe-mode-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.pe-group.dim { opacity: 0.35; }

.pe-badge {
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--pe-muted);
  vertical-align: 1px;
}
.pe-subtitle {
  margin: 10px 0 4px;
  font: 700 10px var(--dv-font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pe-muted);
}
.pe-unit {
  width: auto;
  min-width: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pe input.pe-num { width: 90px; }
.pe input.pe-formula { width: 110px; font-family: Consolas, "Segoe UI", monospace; font-size: 11px; }
.pe input.invalid,
.pe select.invalid {
  border-color: rgba(255, 138, 128, 0.8);
  box-shadow: 0 0 12px rgba(255, 138, 128, 0.25);
}
.pe select {
  max-width: 150px;
  height: 26px;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--pe-border);
  border-radius: 8px;
  color: var(--pe-text);
  font: inherit;
  cursor: pointer;
}
.pe select:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); }
.pe select option { background: #141416; }

.pe-notes {
  width: 100%;
  min-height: 70px;
  padding: 8px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--pe-border);
  border-radius: 10px;
  color: var(--pe-text);
  font: 12px/1.45 var(--dv-font-text);
  user-select: text;
}
.pe-notes:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); }

/* Tableau des mesures */
.pe-measures { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; }
.pe-measure {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 38px 18px;
  gap: 4px;
  align-items: center;
}
.pe .pe-measure input { width: 100%; height: 24px; padding: 0 6px; font-size: 11px; }
.pe .pe-measure input.pe-m-formula { font-family: Consolas, "Segoe UI", monospace; }
.pe-m-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--pe-soft); font-size: 11px; }
.pe-m-value.warn { color: #ffb36b; }
.pe-m-del {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--pe-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.pe-m-del:hover { color: var(--pe-danger); }

/* Versions de sécurité */
.pe-versions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 4px;
}
.pe-version {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  color: var(--pe-soft);
  font-size: 11px;
}
.pe-link {
  border: none;
  background: none;
  color: var(--pe-muted);
  font: 700 10px var(--dv-font);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.pe-link:hover { color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }

.pe-modal-error { min-height: 14px; margin-top: 6px; color: #ff9f8f; font-size: 11px; }
.pe-modal { width: 320px; }

/* Saisie d'une longueur pendant un tracé */
.pe-len-input {
  position: absolute;
  z-index: 5;
  display: none;
  width: 180px;
  height: 28px;
  padding: 0 10px;
  background: rgba(10, 10, 12, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 12px Consolas, "Segoe UI", monospace;
}
.pe-len-input.show { display: block; }
.pe-len-input:focus { outline: none; }
.pe-len-input.invalid { border-color: rgba(255, 138, 128, 0.9); }
/* ---------- Ergonomie ---------- */
/* Sections repliables */
.pe-section-title { cursor: pointer; align-items: center; gap: 6px; user-select: none; }
.pe-section-name { flex: 1; }
.pe-chevron {
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 1.5px solid var(--pe-muted);
  border-bottom: 1.5px solid var(--pe-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}
.pe-section.collapsed .pe-chevron { transform: rotate(-45deg); }
.pe-section.collapsed > :not(.pe-section-title) { display: none; }
.pe-section.collapsed .pe-section-title { margin-bottom: 0; }
.pe-section-title:hover .pe-section-name { text-shadow: 0 0 8px rgba(255, 255, 255, 0.35); }

/* Infobulles */
.pe-tip {
  position: absolute;
  z-index: 80;
  max-width: 280px;
  padding: 9px 11px;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.pe-tip.show { opacity: 1; transform: none; }
.pe-tip-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 700 12px var(--dv-font);
  letter-spacing: 0.04em;
  color: #fff;
}
.pe-tip-desc { margin-top: 5px; color: var(--pe-soft); font-size: 11.5px; line-height: 1.45; }
.pe kbd,
.pe-tip kbd {
  padding: 1px 6px;
  font: 11px var(--dv-font-text);
  color: var(--pe-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  white-space: nowrap;
}

/* Menu contextuel */
.pe-ctx {
  position: absolute;
  z-index: 30;
  min-width: 210px;
  padding: 5px;
  background: rgba(16, 16, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  animation: pe-fade 0.12s both;
}
.pe-ctx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--pe-text);
  font: 12px var(--dv-font-text);
  text-align: left;
  cursor: pointer;
}
.pe-ctx-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.pe-ctx-item.danger { color: var(--pe-danger); }
.pe-ctx-item kbd { font-size: 10px; color: var(--pe-muted); }
.pe-ctx-sep { height: 1px; margin: 4px 6px; background: rgba(255, 255, 255, 0.1); }

/* Palette de commandes */
.pe-palette-ov { align-items: flex-start; padding-top: 12vh; }
.pe-palette {
  width: min(560px, 92%);
  background: rgba(16, 16, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.06), 0 24px 70px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: pe-rise 0.2s both;
}
.pe input.pe-palette-input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: none;
  font-size: 14px;
  box-shadow: none;
}
.pe-palette-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.pe-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--pe-soft);
  cursor: pointer;
}
.pe-palette-item.active { background: rgba(255, 255, 255, 0.08); color: #fff; }
.pe-palette-empty { padding: 14px; color: var(--pe-muted); font-style: italic; }

/* Aide des raccourcis */
.pe-help {
  width: min(760px, 94%);
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px 22px;
  background: rgba(16, 16, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
  animation: pe-rise 0.2s both;
}
.pe-help h3 { margin-bottom: 8px; font: 700 15px var(--dv-font); letter-spacing: 0.06em; color: #fff; }
.pe-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; }

/* Accueil d'un projet vide */
.pe-welcome {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  pointer-events: none;
}
.pe-welcome.show { display: flex; animation: pe-fade 0.35s both; }
.pe-welcome > * { pointer-events: auto; }
.pe-welcome-title { font: 700 22px var(--dv-font); letter-spacing: 0.05em; color: #fff; text-shadow: 0 0 14px rgba(255, 255, 255, 0.3); }
.pe-welcome-sub { margin: 6px 0 22px; color: var(--pe-soft); font-size: 13px; }
.pe-welcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; }
.pe-welcome-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: var(--pe-soft);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, color 0.2s;
}
.pe-welcome-card:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  color: #fff;
}
.pe-welcome-card svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pe-welcome-card-title { font: 700 14px var(--dv-font); letter-spacing: 0.04em; color: #fff; }
.pe-welcome-card-desc { font-size: 11.5px; line-height: 1.4; color: var(--pe-muted); }
.pe-welcome-hint { margin-top: 18px; font-size: 11px; color: var(--pe-muted); }

/* Barre d'état */
.pe-selinfo { color: var(--pe-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30%; }
.pe-chip {
  height: 18px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: none;
  color: var(--pe-soft);
  font: 10.5px var(--dv-font-text);
  cursor: pointer;
  white-space: nowrap;
}
.pe-chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.pe-chip.off { color: var(--pe-muted); border-style: dashed; }

/* ---------- Vue 3D ---------- */
.pe-3d-wrap {
  position: relative;
  display: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: #060607;
  border: 1px solid var(--pe-border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.pe.with-3d .pe-3d-wrap { display: block; animation: pe-fade 0.3s both; }
.v3d-canvas { position: absolute; inset: 0; display: block; cursor: grab; }
.v3d-canvas:active { cursor: grabbing; }
.v3d-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.v3d-btn {
  height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 10, 12, 0.7);
  color: var(--pe-soft);
  font: 700 10.5px var(--dv-font);
  letter-spacing: 0.06em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.v3d-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.36); }
.v3d-btn.active { color: #fff; border-color: rgba(255, 255, 255, 0.4); box-shadow: 0 0 12px rgba(255, 255, 255, 0.12); }
.v3d-btn.primary { background: var(--dv-accent); color: #fff; border-color: var(--dv-accent); box-shadow: 0 0 14px rgba(31, 111, 194, 0.245); }
.v3d-sep { width: 1px; height: 18px; margin: 0 4px; background: rgba(255, 255, 255, 0.14); }
.v3d-seg { display: inline-flex; }
.v3d-seg .v3d-btn { border-radius: 0; }
.v3d-seg .v3d-btn:first-child { border-radius: 14px 0 0 14px; }
.v3d-seg .v3d-btn:last-child { border-radius: 0 14px 14px 0; margin-left: -1px; }
.v3d-seg .v3d-btn.active { background: rgba(255, 255, 255, 0.14); }
.v3d-select {
  height: 28px;
  padding: 0 26px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 10, 12, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aaa' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--pe-soft);
  font: 700 10.5px var(--dv-font);
  letter-spacing: 0.06em;
  cursor: pointer;
  appearance: none;
  outline: none;
}
.v3d-select:hover, .v3d-select:focus { color: #fff; border-color: rgba(255, 255, 255, 0.36); }
.v3d-select option { background: #111; color: #ddd; }
.v3d-status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: var(--pe-muted);
  font-size: 11px;
  pointer-events: none;
}
.v3d-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; color: var(--pe-muted); text-align: center; }
@keyframes pe-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pe-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fenêtre étroite : on masque l'explorateur */
@media (max-width: 980px) {
  .pe-left { display: none; }
}

/* ---------- Vue 3D : modes d'affichage (façon Blender), gizmo, statistiques ---------- */
.v3d-right { margin-left: auto; }
.v3d-shading {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(6px);
}
.v3d-shade {
  width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--pe-soft);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.v3d-shade svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.v3d-shade:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.v3d-shade.active { color: #fff; background: var(--dv-accent); box-shadow: 0 0 10px rgba(31, 111, 194, 0.245); }
.v3d-shade-opt { width: 20px; }
.v3d-shade-opt svg { width: 12px; height: 12px; }
.v3d-pop {
  position: absolute;
  top: 46px;
  right: 10px;
  z-index: 5;
  width: 250px;
  padding: 8px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(14, 14, 16, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  display: none;
  font-size: 11.5px;
  color: var(--pe-soft);
}
.v3d-pop.show { display: block; animation: pe-rise 0.16s ease-out; }
.v3d-pop-title { margin: 8px 0 4px; font: 700 9.5px var(--dv-font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--pe-muted); }
.v3d-pop-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; cursor: default; }
.v3d-pop-row input[type="checkbox"] { accent-color: #fff; }
.v3d-pop-seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; overflow: hidden; }
.v3d-pop-seg button { border: 0; background: transparent; color: var(--pe-soft); font: inherit; padding: 3px 8px; cursor: pointer; }
.v3d-pop-seg button.active { background: var(--dv-accent); color: #fff; }
.v3d-gizmo {
  position: absolute;
  top: 84px;
  right: 8px;
  width: 92px;
  height: 92px;
  cursor: pointer;
}
.v3d-nav {
  position: absolute;
  top: 180px;
  right: 38px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v3d-nav-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--pe-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.v3d-nav-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.v3d-nav-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.v3d-nav-btn.active { background: var(--dv-accent); color: #fff; }
.v3d-stats {
  position: absolute;
  top: 88px;
  left: 12px;
  display: none;
  white-space: pre;
  font: 11px/1.55 "Consolas", "Segoe UI", monospace;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.v3d-stats.show { display: block; }

/* ---------- Matières ---------- */
.pe-mat-tools { display: flex; gap: 6px; padding: 2px 12px 8px; flex-wrap: wrap; }
.pe-mini {
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: transparent;
  color: var(--pe-soft);
  font: 700 10px var(--dv-font);
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
}
.pe-mini:hover { color: #fff; border-color: rgba(255, 255, 255, 0.36); }
.pe-mat-item { cursor: grab; }
.pe-mat-thumb { width: 22px; height: 22px; border-radius: 5px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }
.pe-mat-thumb.small { width: 20px; height: 20px; }
.pe-mat-preview { position: relative; margin: 4px 12px 10px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.pe-mat-preview canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.pe-mat-scale { position: absolute; left: 8px; bottom: 6px; font-size: 10px; color: #fff; text-shadow: 0 1px 3px #000; }
.pe-mat-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pe-mat-row select { flex: 1; min-width: 0; }
.pe-range { width: 100%; accent-color: #fff; }
.pe-note { padding: 2px 12px 10px; font-size: 11px; line-height: 1.5; color: var(--pe-muted); }
.pe-modal-sub { margin: -4px 0 12px; font-size: 12px; color: var(--pe-muted); }
.pe-mat-gallery { width: min(720px, 92vw); }
.pe-mat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding: 2px;
}
.pe-mat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--pe-soft);
  font: 11px "Segoe UI", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.pe-mat-card:hover { border-color: rgba(255, 255, 255, 0.4); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); color: #fff; }
.pe-mat-card canvas, .pe-mat-import { width: 100%; aspect-ratio: 1; border-radius: 6px; display: block; }
.pe-mat-import { display: grid; place-items: center; border: 1px dashed rgba(255, 255, 255, 0.3); }
.pe-mat-import svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* Matières : grammage */
.pe-gsm { display: flex; align-items: center; gap: 8px; width: 100%; }
.pe-gsm .pe-range { flex: 1; min-width: 60px; }
.pe-gsm .pe-num { width: 58px; flex: none; }
.pe-mat-card-gsm { margin-top: -4px; font-size: 10px; color: var(--pe-muted); }
.v3d-canvas { touch-action: none; }


/* Pièce (patrons unis) */
.pe-badge-group { border-color: rgba(255, 255, 255, 0.45); color: #fff; }

/* ---------- Espace de travail modulable (redimensionner, déplacer, agrandir) ---------- */
.pe-gutter {
  position: relative;
  flex: 0 0 10px;
  cursor: col-resize;
  touch-action: none;
}
.pe-gutter::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 4px;
  width: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0);
  transition: background 0.15s, box-shadow 0.15s, top 0.2s, bottom 0.2s;
}
.pe-gutter:hover::after, .pe-gutter.active::after {
  top: 4%;
  bottom: 4%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
}
body.pe-ws-resizing, body.pe-ws-resizing * { cursor: col-resize !important; user-select: none !important; }
body.pe-ws-dragging, body.pe-ws-dragging * { cursor: grabbing !important; user-select: none !important; }
.pe-ws-hidden { display: none !important; }
.pe-ws-moving { opacity: 0.45; outline: 1px dashed rgba(255, 255, 255, 0.4); outline-offset: -1px; }
.pe-ws-drop {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  z-index: 40;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
  pointer-events: none;
}
.pe-ws-handle { cursor: grab; touch-action: none; }
.pe-panel-title.pe-ws-handle { display: flex; align-items: center; gap: 8px; }
.pe-ws-dots {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  opacity: 0.45;
  background: radial-gradient(circle, currentColor 1px, transparent 1.4px) 0 0 / 5px 5px;
  transition: opacity 0.15s;
}
.pe-panel-title.pe-ws-handle:hover .pe-ws-dots { opacity: 1; }
.pe-ws-grip {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 25;
  width: 58px;
  height: 11px;
  margin-left: -29px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  opacity: 0.35;
  transition: opacity 0.15s, background 0.15s;
}
.pe-ws-grip .pe-ws-dots { width: 20px; height: 6px; opacity: 1; background-size: 5px 5px; }
.pe-canvas-wrap:hover > .pe-ws-grip, .pe-3d-wrap:hover > .pe-ws-grip { opacity: 0.8; }
.pe-ws-grip:hover { opacity: 1 !important; background: rgba(255, 255, 255, 0.16); }
.pe-ws-max > .pe-ws-grip { background: rgba(255, 255, 255, 0.2); opacity: 0.9; }
.pe-zip-pct { width: 44px; flex: none; text-align: right; font-variant-numeric: tabular-nums; }

/* Matières en boules (galerie, explorateur, panneau) */
.pe-mat-gallery .pe-mat-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
.pe-mat-cats { max-height: min(62vh, 640px); overflow-y: auto; padding-right: 4px; }
.pe-mat-cat { margin: 14px 2px 8px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pe-muted); }
.pe-mat-cats > .pe-mat-grid:first-child { margin-bottom: 4px; }
.pe-ball-slot { display: inline-grid; place-items: center; flex: none; }
.pe-ball-slot canvas { width: 100% !important; height: 100% !important; aspect-ratio: 1; border-radius: 50% !important; }
.pe-mat-card-ball { align-items: center; text-align: center; background: radial-gradient(circle at 50% 38%, rgba(255,255,255,0.06), transparent 70%), rgba(255,255,255,0.02); }
.pe-mat-card-ball .pe-ball-slot { margin: 2px auto 2px; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.55)); transition: transform 0.2s; }
.pe-mat-card-ball:hover .pe-ball-slot { transform: scale(1.05) rotate(-3deg); }
.pe-mat-duo { display: flex; align-items: center; gap: 10px; }
.pe-mat-duo > canvas { flex: 1; min-width: 0; width: auto !important; height: 104px !important; object-fit: cover; border-radius: 8px; }
.pe-mat-thumb.pe-ball-slot { border-radius: 50%; }
.pe-print-row { display: flex; gap: 8px; margin-bottom: 4px; }
.pe-print-row .pe-print-text { flex: 1; width: auto; text-align: left; }
.pe-print-row .pe-select { width: 170px; }

.pe-render-modal { width: min(92vw, 1100px); }
.pe-render-img { display: block; width: 100%; max-height: 68vh; object-fit: contain; border-radius: 10px; background: #0a0c10; }
/* réglages du rendu HD (point 81) */
.pe-render-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 10px; font-size: 12px; }
.pe-render-opt { display: inline-flex; align-items: center; gap: 6px; }
.pe-render-opt input[type=range] { width: 110px; }
.pe-render-opt input:disabled { opacity: 0.45; }
.pe-render-val { min-width: 34px; font-variant-numeric: tabular-nums; opacity: 0.8; }
a.pe-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.pe-print-inside { display: flex; align-items: center; gap: 8px; margin: 10px 2px 2px; cursor: pointer; color: var(--pe-soft); }

/* ==========================================================================
   Refonte graphique (même direction artistique que l'accueil) : graphite, typographie
   Segoe UI Variable, bordures fines, rayons généreux, accents froid → mauve.
   Aucune position ne change : seules les couleurs, typos, rayons et ombres évoluent.
   ========================================================================== */
.pat-landing, .pe { inset: var(--dv-top) 0 0 0; }
.pe {
  --pe-card: rgba(23, 27, 34, 0.94);
  --pe-border: var(--dv-line-2);
  --pe-border-strong: rgba(31, 111, 194, 0.294);
  --pe-text: var(--dv-text);
  --pe-muted: var(--dv-muted);
  --pe-soft: var(--dv-soft);
  --pe-glow: 0 0 0 3px rgba(31, 111, 194, 0.07);
  padding: 2px 24px 12px;
  gap: 12px;
  font-family: var(--dv-font-text);
  font-weight: 400;
}
.pe-toolbar, .pe-panel, .pe-canvas-wrap, .pe-3d-wrap {
  border-radius: 18px;
  border: 1px solid var(--dv-line);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}
.pe-toolbar { height: 54px; padding: 0 10px; background: rgba(21, 21, 23, 0.94); }
.pe-panel { background: var(--pe-card); }
.pe-canvas-wrap, .pe-3d-wrap { background: #0c0f13; }
.pe-body { gap: 0; }
.pe-panel-title {
  padding: 14px 16px 12px;
  background: rgba(21, 21, 23, 0.97);
  border-bottom: 1px solid var(--dv-line);
  border-radius: 18px 18px 0 0;
  font: 600 11px var(--dv-font);
  letter-spacing: 0.1em;
  color: var(--dv-soft);
}
.pe-group { border-right-color: var(--dv-line); }
.pe-btn { border-radius: 10px; color: var(--dv-soft); }
.pe-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.pe-btn:hover svg, .pe-btn.active svg { filter: none; }
.pe-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(31, 111, 194, 0.112), rgba(31, 111, 194, 0.154));
  border-color: rgba(31, 111, 194, 0.245);
  box-shadow: none;
}
.pe-project { font: 700 14px var(--dv-font); letter-spacing: -0.01em; color: var(--dv-text); }
.pe-back { color: var(--dv-soft); }
.pe-section { border-bottom-color: var(--dv-line); padding: 14px 16px; }
.pe-section-title, .pe-section-name { font-family: var(--dv-font); font-weight: 600; color: var(--dv-text); }
.pe-item { border-radius: 10px; }
.pe-item:hover { background: rgba(255, 255, 255, 0.04); }
.pe-item.selected { background: linear-gradient(135deg, rgba(31, 111, 194, 0.07), rgba(31, 111, 194, 0.098)); border-color: rgba(31, 111, 194, 0.21); }
.pe input[type="number"], .pe input[type="text"], .pe input[type="color"], .pe select, .pe textarea {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--dv-line-2);
  border-radius: 9px;
  color: var(--dv-text);
}
.pe input:focus, .pe select:focus, .pe textarea:focus { outline: none; border-color: rgba(31, 111, 194, 0.35); box-shadow: 0 0 0 3px rgba(31, 111, 194, 0.07); }
.pe input[type="checkbox"] { accent-color: var(--dv-teal); }
.pe-action {
  height: 32px;
  border-radius: 10px;
  border-color: var(--dv-line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dv-soft);
  font-weight: 600;
}
.pe-action:hover { color: #fff; border-color: rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.07); box-shadow: none; text-shadow: none; }
.pe-action.primary { background: var(--dv-accent); border-color: var(--dv-accent); color: #fff; box-shadow: none; }
.pe-action.primary:hover { background: var(--dv-accent-hi); border-color: var(--dv-accent-hi); color: #fff; box-shadow: 0 8px 24px rgba(31, 111, 194, 0.21); }
.pe-mini { border-radius: 14px; }
.pe-chip { border-radius: 13px; }
.pe-status { color: var(--dv-muted); }
.pe-modal-overlay { background: rgba(5, 5, 6, 0.72); backdrop-filter: blur(6px); }
.pe-modal {
  background: var(--dv-panel);
  border: 1px solid var(--dv-line-2);
  border-radius: 22px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.pe-modal h3 { font: 700 22px var(--dv-font); letter-spacing: -0.03em; }
.pe-modal-sub { color: var(--dv-soft); }
.pe-mat-card { border-radius: 16px; background: var(--dv-card); border-color: var(--dv-line); }
.pe-mat-card:hover { border-color: rgba(31, 111, 194, 0.245); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4); }
.pe-ctx, .pe-palette, .pe-tip { background: rgba(21, 21, 23, 0.97); border-color: var(--dv-line-2); border-radius: 14px; }
.pe-ctx-item:hover, .pe-palette-item.active { background: linear-gradient(135deg, rgba(31, 111, 194, 0.084), rgba(31, 111, 194, 0.112)); }
.pe-tip-title { font: 600 12.5px var(--dv-font); }
.pe-help h3 { font: 700 16px var(--dv-font); letter-spacing: -0.01em; }

/* Écran « Commencer un patron » */
.pe-welcome-title { font: 700 clamp(26px, 3vw, 40px) var(--dv-font); letter-spacing: -0.04em; text-shadow: none; }
.pe-welcome-sub { font-size: 14px; color: var(--dv-soft); }
.pe-welcome-card { padding: 18px 20px; border-radius: 18px; background: var(--dv-card); border-color: var(--dv-line); }
.pe-welcome-card:hover { border-color: rgba(31, 111, 194, 0.245); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4); }
.pe-welcome-card-title { font: 700 16px var(--dv-font); letter-spacing: -0.02em; }

/* Vue 3D */
.v3d-btn, .v3d-select { height: 30px; border-radius: 15px; font: 600 12px var(--dv-font); letter-spacing: 0; background-color: rgba(14, 14, 16, 0.78); border-color: var(--dv-line-2); color: var(--dv-soft); }
.v3d-btn:hover, .v3d-select:hover { color: #fff; border-color: rgba(255, 255, 255, 0.26); }
.v3d-btn.active { color: #fff; background: linear-gradient(135deg, rgba(31, 111, 194, 0.126), rgba(31, 111, 194, 0.154)); border-color: rgba(31, 111, 194, 0.245); box-shadow: none; }
.v3d-btn.primary { background: var(--dv-accent); border-color: var(--dv-accent); color: #fff; box-shadow: none; }
.v3d-pop-title { font: 600 10px var(--dv-font); letter-spacing: 0.1em; }

/* ==========================================================================
   Page des projets (même direction artistique que l'accueil)
   ========================================================================== */
.pat-landing {
  position: absolute;
  inset: var(--dv-top) 0 0 0;
  overflow-y: auto;
  padding: 26px 24px 60px;
}
.pat-landing::-webkit-scrollbar { width: 8px; }
.pat-landing::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
.pat-wrap {
  min-height: 100%;
  padding: 56px clamp(24px, 5vw, 96px) 64px;
  border-radius: 28px;
  background:
    radial-gradient(520px 380px at 85% 0%, rgba(31, 111, 194, 0.098), transparent 70%),
    radial-gradient(480px 360px at 0% 100%, rgba(31, 111, 194, 0.088), transparent 70%),
    var(--dv-panel);
  border: 1px solid var(--dv-line);
}
.pat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  animation: pe-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pat-eyebrow { margin: 0 0 14px; font: 600 11.5px var(--dv-font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dv-accent-ink); }
.pat-h1 { margin: 0; font: 700 clamp(40px, 5vw, 68px) / 1 var(--dv-font); letter-spacing: -0.05em; color: var(--dv-text); }
.pat-grad {
  background: linear-gradient(90deg, #c3d3e3 0%, #6f93b8 45%, #3a5f84 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pat-sub { margin: 14px 0 0; font: 14px var(--dv-font-text); color: var(--dv-soft); }
.pat-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  width: 260px;
  padding: 0 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--dv-line-2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pat-search:focus-within { border-color: rgba(31, 111, 194, 0.35); box-shadow: 0 0 0 3px rgba(31, 111, 194, 0.07); }
.pat-search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--dv-muted); stroke-width: 1.8; stroke-linecap: round; }
.pat-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--dv-text); font: 13.5px var(--dv-font-text); }
.pat-search input::placeholder { color: var(--dv-muted); }
.pat-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px 0 16px;
  border-radius: 22px;
  background: var(--dv-accent);
  border: 1px solid var(--dv-accent);
  color: #fff;
  font: 600 14px var(--dv-font);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.pat-open:hover { background: var(--dv-accent-hi); border-color: var(--dv-accent-hi); box-shadow: 0 8px 24px rgba(31, 111, 194, 0.21); }
.pat-open:active { background: var(--dv-accent-lo); }
.pat-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.pat-history { margin-top: 44px; }
.pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.pat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--dv-card);
  border: 1px solid var(--dv-line);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: pe-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pat-card:hover, .pat-card:focus-visible {
  border-color: rgba(31, 111, 194, 0.245);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}
.pat-preview {
  position: relative;
  flex: none;
  aspect-ratio: 16 / 10;
  background-color: #0c0f13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 16px 16px;
  border-bottom: 1px solid var(--dv-line);
}
.pat-preview svg { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); overflow: visible; }
.pat-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(31, 111, 194, 0.154), rgba(31, 111, 194, 0.182));
  border: 1px solid rgba(31, 111, 194, 0.245);
  color: #fff;
  font: 600 10.5px var(--dv-font);
  letter-spacing: 0.04em;
}
.pat-info { display: flex; align-items: center; gap: 12px; padding: 14px 16px 15px; min-width: 0; }
.pat-info-txt { flex: 1; min-width: 0; }
.pat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px var(--dv-font); letter-spacing: -0.01em; color: var(--dv-text); }
.pat-meta { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px var(--dv-font-text); color: var(--dv-muted); }
.pat-go {
  flex: none;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid var(--dv-line-2);
  color: var(--dv-soft);
  font: 600 12px var(--dv-font);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.pat-card:hover .pat-go { color: #fff; border-color: rgba(31, 111, 194, 0.315); background: rgba(31, 111, 194, 0.07); }
.pat-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--dv-line-2);
  border-radius: 14px;
  background: rgba(11, 11, 12, 0.8);
  color: var(--dv-soft);
  font: 13px var(--dv-font-text);
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}
.pat-card:hover .pat-delete, .pat-card:focus-within .pat-delete, .pat-card.confirm .pat-delete { opacity: 1; }
.pat-delete:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.pat-card.confirm .pat-delete { color: #ff8a80; border-color: rgba(255, 138, 128, 0.55); font-size: 11px; }

/* Tuile « Nouveau projet » */
.pat-new {
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 240px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  box-shadow: none;
  text-align: center;
  font: inherit;
  color: inherit;
}
.pat-new:hover, .pat-new:focus-visible { border-style: solid; background: rgba(31, 111, 194, 0.035); }
.pat-new-ico {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(31, 111, 194, 0.14), #173049);
  border: 1px solid rgba(31, 111, 194, 0.21);
}
.pat-new-ico svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.pat-new-t { font: 700 17px var(--dv-font); letter-spacing: -0.02em; color: var(--dv-text); }
.pat-new-s { font: 12.5px var(--dv-font-text); color: var(--dv-muted); }
.pat-empty { margin: 30px 0 0; text-align: center; font: 14px var(--dv-font-text); color: var(--dv-soft); }

@media (max-width: 700px) {
  .pat-landing { padding: 16px 16px 40px; }
  .pat-wrap { padding: 36px 20px 40px; }
  .pat-search { width: 100%; }
  .pat-actions { width: 100%; }
}

/* ==========================================================================
   Fiche technique : fenêtre d'informations, préparation, aperçu
   ========================================================================== */
.pe-tp-dialog { width: min(1200px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.pe-tp-cols { display: grid; grid-template-columns: 280px 1fr; gap: 22px; margin-top: 6px; }
.pe-tp-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pe-tp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.pe-tp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pe-tp-field.wide { grid-column: 1 / -1; }
.pe-tp-field > span { font: 600 11px var(--dv-font); letter-spacing: 0.02em; color: var(--dv-soft); }
.pe-tp-field input, .pe-tp-field select, .pe-tp-field textarea, .pe-tp-mats input {
  width: 100%; min-width: 0; height: 34px; padding: 0 10px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--dv-line-2); color: var(--dv-text);
  font: 13px var(--dv-font-text); outline: none;
}
.pe-tp-field textarea { height: auto; padding: 8px 10px; resize: vertical; }
.pe-tp-field input[type="color"] { padding: 3px; cursor: pointer; }
.pe-tp-field input:focus, .pe-tp-field select:focus, .pe-tp-field textarea:focus, .pe-tp-mats input:focus { border-color: rgba(31, 111, 194, 0.35); box-shadow: 0 0 0 3px rgba(31, 111, 194, 0.07); }
.pe-tp-logo { display: flex; flex-direction: column; gap: 8px; }
.pe-tp-logo-img {
  height: 96px; display: grid; place-items: center; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.18);
  background: #f4f4f5; overflow: hidden;
}
.pe-tp-logo-img img { max-width: 86%; max-height: 80px; object-fit: contain; }
.pe-tp-logo-img span { color: #8a8a90; font: 12px var(--dv-font-text); }
.pe-tp-logo-btns { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pe-tp-mats { display: grid; grid-template-columns: 1.2fr 1.6fr 1.3fr 0.65fr 0.6fr 1.3fr 0.9fr 0.8fr; gap: 6px 8px; align-items: center; margin-bottom: 12px; }
.pe-tp-mats .h { font: 600 10.5px var(--dv-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dv-muted); }
.pe-tp-mats .n { display: flex; align-items: center; gap: 8px; min-width: 0; font: 600 12.5px var(--dv-font); color: var(--dv-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-tp-mats .n i { flex: none; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.2); }
.pe-tp-busy {
  position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: rgba(8, 8, 9, 0.72); backdrop-filter: blur(4px); color: var(--dv-text); font: 600 14px var(--dv-font);
}
.pe-tp-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: #3a5f84; animation: pe-tp-spin 0.9s linear infinite; }
@keyframes pe-tp-spin { to { transform: rotate(360deg); } }
.pe-tp-view {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #1c1d20; outline: none;
}
.pe-tp-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 20px;
  background: rgba(21, 21, 23, 0.97); border-bottom: 1px solid var(--dv-line);
}
.pe-tp-title b { display: block; font: 700 15px var(--dv-font); color: var(--dv-text); }
.pe-tp-title span { font: 12px var(--dv-font-text); color: var(--dv-muted); }
.pe-tp-acts { display: flex; gap: 8px; }
.pe-tp-acts .pe-action { height: 36px; padding: 0 14px; }
.pe-tp-frame { flex: 1; width: 100%; border: 0; background: #2a2b2e; }
.pe .pe-tp-dialog .pe-tp-field input, .pe .pe-tp-dialog .pe-tp-field select, .pe .pe-tp-dialog .pe-tp-field textarea, .pe .pe-tp-dialog .pe-tp-mats input {
  width: 100%; max-width: none; height: 34px; padding: 0 10px; font-size: 13px;
}
.pe .pe-tp-dialog .pe-tp-field textarea { height: auto; min-height: 52px; padding: 8px 10px; }
.pe .pe-tp-dialog .pe-tp-field input[type="color"] { width: 64px; padding: 3px; }
.pe-tp-cws { display: grid; gap: 6px 8px; align-items: center; margin-bottom: 8px; }
.pe-tp-cws .h { font: 600 10.5px var(--dv-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe .pe-tp-cws input[type="text"] { width: 100%; max-width: none; height: 34px; padding: 0 10px; font-size: 13px; }
.pe .pe-tp-cws input[type="color"] { width: 100%; height: 34px; padding: 3px; border-radius: 9px; border: 1px solid var(--dv-line-2); background: rgba(255, 255, 255, 0.035); cursor: pointer; }
.pe .pe-tp-cws input[type="color"]:disabled { opacity: 0.55; cursor: default; }
.pe-tp-cws .pe-action { height: 34px; padding: 0; }

/* ==========================================================================
   Disposition et thème inspirés de Blender
   Barre du haut (logo, menus Fichier/Édition/Affichage/Aide, onglets d'espace de travail),
   zones à coins arrondis séparées par un fin interstice sombre, chacune avec son entête
   (icône du type de zone, menus, bascules), colonne d'outils dans la vue 2D, Explorateur
   au-dessus des Propriétés à droite, barre d'état en bas. Couleurs de la page d'accueil :
   graphite presque noir, bordures fines, accent dégradé vert d'eau → bleu.
   ========================================================================== */
body:has(#page-patronage.active.editor-open) #taskbar { display: none; }
#page-patronage.editor-open .pe {
  inset: 0;
  padding: 0;
  gap: 0;
  animation: none;
}
.pe {
  --bl-gap: #0a0c10;
  --bl-top: #07090c;
  --bl-head: #13161c;
  --bl-region: #0f1217;
  --bl-panel: #171b22;
  --bl-widget: #1d222a;
  --bl-widget-hi: #262c36;
  --bl-field: #0a0c10;
  --bl-line: rgba(255, 255, 255, 0.07);
  --bl-line-2: rgba(255, 255, 255, 0.12);
  --bl-ring: rgba(31, 111, 194, 0.385);
  --bl-sel: rgba(31, 111, 194, 0.35);      /* sélection : bleu Devclo #3a5f84 */
  --bl-sel-hi: rgba(31, 111, 194, 0.476);
  --bl-sel-soft: rgba(31, 111, 194, 0.126);
  --bl-text: #f1f4f8;
  --bl-dim: #b8c2d0;
  --bl-muted: #8a94a4;
  --pe-text: var(--bl-text);
  --pe-soft: var(--bl-dim);
  --pe-muted: var(--bl-muted);
  --pe-border: rgba(255, 255, 255, 0.08);
  --pe-glow: none;
  background: var(--bl-gap);
  font: 400 12px var(--dv-font-text);
  color: var(--bl-text);
}
.pe ::-webkit-scrollbar { width: 6px; height: 6px; }
.pe ::-webkit-scrollbar-thumb { background: #5a5a5a; border-radius: 3px; }
.pe ::-webkit-scrollbar-thumb:hover { background: #6e6e6e; }

/* ---------- Barre du haut ---------- */
.pe .pe-toolbar {
  height: 30px;
  padding: 0 6px;
  gap: 2px;
  background: var(--bl-top);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: none;
  overflow: hidden;
}
.pe-menus { display: flex; align-items: center; gap: 1px; }
.pe-menu-btn {
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--bl-text);
  font: inherit;
  white-space: nowrap;
  cursor: default;
}
.pe-menu-btn:hover { background: rgba(255, 255, 255, 0.09); }
.pe-menu-btn.open { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pe-logo { padding: 0 7px; }
.pe-logo img { width: 16px; height: 16px; object-fit: contain; display: block; }

/* Onglets d'espace de travail (Patronage / Placement / 3D) */
.pe .pe-tabs {
  align-self: flex-end;
  height: 26px;
  margin-left: 14px;
  padding: 0;
  gap: 2px;
  border: 0;
  border-radius: 0;
}
.pe .pe-tabs .pe-mode-btn {
  height: 26px;
  padding: 0 14px;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #a9a9a9;
  font: 400 12px var(--dv-font-text);
  letter-spacing: 0;
  text-shadow: none;
}
.pe .pe-tabs .pe-mode-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.pe .pe-tabs .pe-mode-btn.active { color: #fff; background: var(--bl-head); }

/* Projet ouvert (comme le sélecteur de scène) */
.pe-scene {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  max-width: 240px;
  padding: 0 10px 0 7px;
  border-radius: 4px;
  background: var(--bl-field);
  color: var(--bl-text);
}
.pe-scene svg { width: 14px; height: 14px; flex: none; fill: none; stroke: #bdbdbd; stroke-width: 1.6; stroke-linejoin: round; }
.pe .pe-project { max-width: 200px; padding: 0; font: 400 12px var(--dv-font-text); letter-spacing: 0; color: var(--bl-text); }
.pe .pe-back { width: 24px; height: 22px; margin-right: 2px; border-radius: 4px; color: #c8c8c8; }
.pe .pe-back svg { width: 15px; height: 15px; }

/* ---------- Zones ---------- */
.pe .pe-body { padding: 4px 4px 0; gap: 0; }
.pe-area {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--bl-line);
  border-radius: 10px;
  background: var(--bl-region);
}
.pe-area-3d { display: none; }
.pe.with-3d .pe-area-3d { display: flex; }
.pe-area-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1px;
  height: 28px;
  padding: 0 4px;
  background: var(--bl-head);
  border-bottom: 1px solid var(--bl-line);
  overflow: hidden;
  white-space: nowrap;
}
.pe-area-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 22px;
  padding: 0 3px 0 5px;
  border-radius: 4px;
  color: #d6d6d6;
}
.pe-area-ico::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid #9a9a9a;
  margin-left: 2px;
}
.pe-area-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pe-area-ico:hover { background: rgba(255, 255, 255, 0.09); }
.pe-area-ico.pe-ws-handle { cursor: grab; }
.pe-area-name { margin: 0 10px 0 4px; color: var(--bl-dim); }
.pe-area-head .pe-spacer { flex: 1; }
.pe-hgroup { display: flex; gap: 1px; margin-left: 6px; }
.pe .pe-hbtn {
  width: 26px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: var(--bl-widget);
  color: var(--bl-dim);
  box-shadow: none;
}
.pe .pe-hbtn:first-child { border-radius: 4px 0 0 4px; }
.pe .pe-hbtn:last-child { border-radius: 0 4px 4px 0; }
.pe .pe-hbtn:only-child { border-radius: 4px; }
.pe .pe-hbtn svg { width: 15px; height: 15px; stroke-width: 1.6; }
.pe .pe-hbtn:hover { background: var(--bl-widget-hi); color: #fff; }
.pe .pe-hbtn.active { background: var(--bl-sel); color: #fff; }

/* Vue 2D */
.pe .pe-canvas-wrap {
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bl-region);
  animation: none;
}
/* Colonne d'outils (barre T de Blender) */
.pe-tbox {
  position: absolute;
  left: 24px;
  top: 24px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100% - 30px);
  overflow-y: auto;
  scrollbar-width: none;
  transition: opacity 0.15s;
}
.pe-tbox::-webkit-scrollbar { display: none; }
.pe-tbox.dim { opacity: 0.4; }
.pe-tgroup {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(21, 21, 23, 0.94);
  border: 1px solid var(--bl-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.pe .pe-tbox .pe-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--bl-dim);
  box-shadow: none;
}
.pe .pe-tbox .pe-btn svg { width: 18px; height: 18px; stroke-width: 1.5; }
.pe .pe-tbox .pe-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.pe .pe-tbox .pe-btn.active { background: var(--bl-sel); color: #fff; }

/* Vue 3D */
.pe .pe-3d-wrap {
  display: block;
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #0c0f13;
  animation: none;
}
.pe-area-head .v3d-bar {
  position: static;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
}
.pe .v3d-btn, .pe .v3d-select {
  height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background-color: var(--bl-widget);
  color: var(--bl-text);
  font: 400 12px var(--dv-font-text);
  letter-spacing: 0;
  box-shadow: none;
  backdrop-filter: none;
  white-space: nowrap;
}
.pe .v3d-btn:hover, .pe .v3d-select:hover { background-color: var(--bl-widget-hi); color: #fff; }
.pe .v3d-btn.active { background: var(--bl-sel); color: #fff; }
.pe .v3d-btn.active:hover { background: var(--bl-sel-hi); }
.pe .v3d-btn.primary { background: var(--dv-accent); color: #fff; }
.pe .v3d-btn.primary:hover { background: var(--dv-accent-hi); color: #fff; }
.pe .v3d-sep { width: 1px; height: 14px; margin: 0 5px; background: rgba(255, 255, 255, 0.12); }
.pe .v3d-seg { gap: 1px; }
.pe .v3d-seg .v3d-btn { border-radius: 0; margin: 0; }
.pe .v3d-seg .v3d-btn:first-child { border-radius: 4px 0 0 4px; }
.pe .v3d-seg .v3d-btn:last-child { border-radius: 0 4px 4px 0; margin-left: 0; }
.pe .v3d-shading { gap: 1px; padding: 0; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; }
.pe .v3d-shade { width: 26px; height: 22px; border-radius: 0; background: var(--bl-widget); color: var(--bl-text); }
.pe .v3d-shade:first-child { border-radius: 4px 0 0 4px; }
.pe .v3d-shade:last-child { border-radius: 0 4px 4px 0; }
.pe .v3d-shade svg { width: 15px; height: 15px; }
.pe .v3d-shade:hover { background: var(--bl-widget-hi); color: #fff; }
.pe .v3d-shade.active { background: var(--bl-sel); color: #fff; box-shadow: none; }
.pe .v3d-shade-opt { width: 18px; }
.pe .v3d-shade-opt svg { width: 11px; height: 11px; }
.pe .v3d-pop {
  top: 4px;
  right: 6px;
  width: 260px;
  padding: 6px 10px 8px;
  border: 1px solid var(--bl-line-2);
  border-radius: 6px;
  background: rgba(21, 21, 23, 0.97);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  color: var(--bl-text);
  font-size: 12px;
}
.pe .v3d-pop-title { margin: 8px 0 3px; font: 600 11px var(--dv-font-text); letter-spacing: 0; text-transform: none; color: var(--bl-dim); }
.pe .v3d-pop-row { min-height: 24px; }
.pe .v3d-pop-row input[type="checkbox"] { accent-color: var(--dv-teal); }
.pe .v3d-pop-seg { gap: 1px; border: 0; border-radius: 4px; }
.pe .v3d-pop-seg button { padding: 3px 8px; background: var(--bl-widget); color: var(--bl-text); }
.pe .v3d-pop-seg button:hover { background: var(--bl-widget-hi); }
.pe .v3d-pop-seg button.active { background: var(--bl-sel); color: #fff; }
.pe .v3d-gizmo { top: 6px; right: 6px; }
.pe .v3d-nav { top: 104px; right: 37px; gap: 4px; }
.pe .v3d-nav-btn { width: 28px; height: 28px; background: rgba(255, 255, 255, 0.07); color: var(--bl-dim); }
.pe .v3d-nav-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.pe .v3d-nav-btn.active { background: var(--bl-sel); color: #fff; }
.pe .v3d-stats { top: 8px; left: 10px; color: rgba(255, 255, 255, 0.85); }
.pe .v3d-status { left: 10px; bottom: 6px; color: rgba(255, 255, 255, 0.6); }

/* ---------- Colonne de droite : Explorateur au-dessus des Propriétés ---------- */
.pe-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pe .pe-side .pe-panel {
  width: auto;
  min-height: 70px;
  overflow-y: auto;
  border: 1px solid var(--bl-line);
  border-radius: 10px;
  background: var(--bl-region);
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}
.pe-hsplit { flex: 0 0 4px; cursor: row-resize; position: relative; }
.pe-hsplit::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
body.pe-ws-vresizing, body.pe-ws-vresizing * { cursor: row-resize !important; user-select: none !important; }
.pe .pe-panel-title {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: var(--bl-head);
  font: 400 12px var(--dv-font-text);
  letter-spacing: 0;
  text-transform: none;
  color: var(--bl-dim);
}
.pe .pe-panel-title .pe-area-ico { margin-right: 4px; }

/* Séparateurs entre zones : simple interstice, comme dans Blender */
.pe .pe-gutter { flex: 0 0 4px; }
.pe .pe-gutter::before { content: ""; position: absolute; top: 0; bottom: 0; left: -2px; right: -2px; }
.pe .pe-gutter::after { display: none; }
.pe-ws-drop { width: 2px; border-radius: 1px; background: #3a5f84; box-shadow: none; }
.pe .pe-ws-moving { opacity: 0.5; outline: 1px dashed rgba(255, 255, 255, 0.35); }

/* Panneaux repliables (Propriétés) */
.pe .pe-section {
  margin: 4px 5px;
  padding: 0 8px 6px;
  border: 0;
  border: 1px solid var(--bl-line);
  border-radius: 8px;
  background: var(--bl-panel);
}
.pe .pe-section.collapsed { padding-bottom: 0; }
.pe .pe-section-title {
  justify-content: flex-start;
  height: 24px;
  margin: 0 -8px 2px;
  padding: 0 8px 0 6px;
  border-radius: 4px;
  font: 400 12px var(--dv-font-text);
  letter-spacing: 0;
  color: var(--bl-text);
}
.pe .pe-section-name { font: inherit; color: inherit; }
.pe .pe-section-title:hover { background: rgba(255, 255, 255, 0.04); }
.pe .pe-section-title:hover .pe-section-name { text-shadow: none; }
.pe .pe-chevron {
  order: -1;
  width: 0;
  height: 0;
  margin: 0 4px 0 2px;
  border: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8a8a91;
  transform: none;
}
.pe .pe-section.collapsed .pe-chevron { transform: rotate(-90deg); }
.pe .pe-count { margin-left: auto; color: var(--bl-muted); }

/* Explorateur : arbre à plat, lignes alternées */
.pe .pe-left .pe-section { margin: 0; padding: 0 0 4px; border: 0; border-radius: 0; background: transparent; }
.pe .pe-left .pe-section-title { margin: 0; height: 22px; border-radius: 0; color: var(--bl-dim); }
.pe .pe-left .pe-item {
  height: 21px;
  gap: 6px;
  padding: 0 8px 0 22px;
  border: 0;
  border-radius: 0;
  color: var(--bl-text);
}
.pe .pe-left .pe-item:nth-child(odd) { background: rgba(255, 255, 255, 0.018); }
.pe .pe-left .pe-item:hover { background: rgba(255, 255, 255, 0.06); }
.pe .pe-left .pe-item.selected { background: var(--bl-sel-soft); color: #fff; }
.pe .pe-left .pe-empty { padding: 2px 8px 2px 22px; }
.pe .pe-left .pe-mat-tools { padding: 2px 8px 6px 22px; }
.pe .pe-item { border-radius: 4px; }
.pe .pe-item.selected { background: var(--bl-sel-soft); border-color: transparent; }
.pe .pe-swatch { width: 10px; height: 10px; border-radius: 2px; box-shadow: none !important; }
.pe .pe-badge { padding: 0 4px; border: 0; border-radius: 3px; background: rgba(255, 255, 255, 0.1); color: var(--bl-dim); font-size: 10px; }
.pe .pe-badge-group { background: rgba(71, 114, 179, 0.45); color: #fff; }
.pe .pe-item-meta { color: var(--bl-muted); }

/* Lignes de propriétés : étiquette alignée à droite, champ à droite (comme Blender) */
.pe .pe-row { margin: 2px 0; min-height: 22px; gap: 8px; justify-content: flex-start; }
.pe .pe-row-label { flex: 0 0 40%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; color: var(--bl-dim); }
.pe .pe-row-input { flex: 1; min-width: 0; justify-content: flex-start; }
.pe .pe-row-value { flex: 1; min-width: 0; text-align: left; color: var(--bl-text); }
.pe .pe-row-input > input[type="text"], .pe .pe-row-input > select { flex: 1; width: auto; min-width: 0; max-width: none; }
.pe .pe-unit { color: var(--bl-muted); }

/* Champs */
.pe input[type="number"], .pe input[type="text"], .pe textarea, .pe .pe-notes {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  background: var(--bl-field);
  color: var(--bl-text);
  box-shadow: none;
}
.pe textarea, .pe .pe-notes { height: auto; padding: 6px 7px; }
.pe input.pe-num { background: var(--bl-widget); text-align: center; }
.pe input.pe-num:hover { background: var(--bl-widget-hi); }
.pe input:focus, .pe textarea:focus, .pe input.pe-num:focus { outline: none; background: var(--bl-field); border: 0; box-shadow: 0 0 0 1px var(--bl-ring); text-align: left; }
.pe select {
  height: 20px;
  padding: 0 22px 0 7px;
  border: 0;
  border-radius: 4px;
  appearance: none;
  background: var(--bl-field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%23b0b0b0'/%3E%3C/svg%3E") no-repeat right 7px center;
  color: var(--bl-text);
}
.pe select:hover { background-color: #141416; }
.pe select:focus { box-shadow: 0 0 0 1px var(--bl-ring); border: 0; }
.pe select option { background: #13161c; color: var(--bl-text); }
.pe input[type="color"] { height: 20px; padding: 0 2px; border: 0; border-radius: 4px; background: var(--bl-widget); }
.pe input[type="checkbox"], .pe input[type="radio"] { accent-color: var(--dv-teal); }
.pe .pe-range { accent-color: var(--dv-teal); }
.pe input.invalid, .pe select.invalid { box-shadow: 0 0 0 1px #e05a5a; }

/* Boutons */
.pe .pe-actions { gap: 2px; margin-top: 6px; }
.pe .pe-action, .pe .pe-mini {
  height: 22px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: var(--bl-widget);
  color: var(--bl-text);
  font: 400 12px var(--dv-font-text);
  letter-spacing: 0;
  box-shadow: none;
  text-shadow: none;
}
.pe .pe-mini { height: 20px; font-size: 11.5px; }
.pe .pe-action:hover, .pe .pe-mini:hover { background: var(--bl-widget-hi); color: #fff; box-shadow: none; text-shadow: none; }
.pe .pe-action.primary { background: var(--dv-accent); color: #fff; }
.pe .pe-action.primary:hover { background: var(--dv-accent-hi); color: #fff; box-shadow: 0 8px 24px rgba(31, 111, 194, 0.21); }
.pe .pe-action.danger { color: #ffb0a8; }
.pe .pe-action.danger:hover { background: rgba(255, 138, 128, 0.18); color: #fff; box-shadow: none; }
.pe .pe-link { font: 400 11px var(--dv-font-text); letter-spacing: 0; color: #5fd0b9; }
.pe .pe-link:hover { color: #fff; text-shadow: none; }
.pe .pe-subtitle { margin: 8px 0 3px; font: 400 11px var(--dv-font-text); letter-spacing: 0; text-transform: none; color: var(--bl-dim); }
.pe .pe-empty, .pe .pe-note { color: var(--bl-muted); }
.pe kbd, .pe-tip kbd {
  padding: 0 5px;
  border: 1px solid var(--bl-line-2);
  border-radius: 3px;
  background: transparent;
  color: var(--bl-dim);
  font: 400 11px var(--dv-font-text);
}

/* ---------- Menus, menu contextuel, palette, infobulles ---------- */
.pe .pe-ctx {
  min-width: 200px;
  padding: 3px;
  border: 1px solid var(--bl-line-2);
  border-radius: 6px;
  background: rgba(21, 21, 23, 0.98);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  backdrop-filter: none;
  animation: none;
}
.pe .pe-menu { z-index: 70; }
.pe .pe-ctx-item {
  height: 22px;
  padding: 0 10px 0 6px;
  gap: 8px;
  border-radius: 3px;
  color: var(--bl-text);
  font: 400 12px var(--dv-font-text);
  justify-content: flex-start;
}
.pe .pe-ctx-item:hover:not(:disabled) { background: var(--bl-sel); color: #fff; }
.pe .pe-ctx-item:disabled { opacity: 0.4; cursor: default; }
.pe .pe-ctx-item kbd { margin-left: auto; padding: 0; border: 0; color: #9a9a9a; font-size: 11px; }
.pe .pe-ctx-item:hover:not(:disabled) kbd { color: #dfe8f7; }
.pe .pe-ctx-sep { height: 1px; margin: 3px 4px; background: rgba(255, 255, 255, 0.08); }
.pe-menu-label { flex: 1; white-space: nowrap; }
.pe-menu-ico { flex: none; width: 16px; height: 16px; display: grid; place-items: center; }
.pe-menu-ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pe-menu-ico.check { width: 12px; height: 12px; margin: 0 2px; border-radius: 3px; background: var(--bl-widget); box-shadow: inset 0 0 0 1px var(--bl-line-2); }
.pe-menu-ico.check.on { background: linear-gradient(135deg, #3a5f84, #628fbc); box-shadow: none; }
.pe-menu-ico.check.on::after { content: ""; width: 6px; height: 3px; margin-top: -2px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: rotate(-45deg); }
.pe .pe-palette { border: 1px solid var(--bl-line-2); border-radius: 6px; background: rgba(21, 21, 23, 0.98); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
.pe .pe-palette-ov { padding-top: 70px; }
.pe input.pe-palette-input { height: 30px; padding: 0 10px; border-radius: 0; background: var(--bl-field); font-size: 12px; box-shadow: none; text-align: left; }
.pe .pe-palette-list { max-height: 380px; padding: 3px; }
.pe .pe-palette-item { padding: 0 8px; height: 22px; border-radius: 3px; color: var(--bl-text); }
.pe .pe-palette-item.active { background: var(--bl-sel); color: #fff; }
.pe .pe-tip {
  max-width: 320px;
  padding: 6px 9px;
  border: 1px solid var(--bl-line-2);
  border-radius: 4px;
  background: rgba(21, 21, 23, 0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transform: none;
}
.pe .pe-tip-title { font: 400 12px var(--dv-font-text); letter-spacing: 0; color: #fff; }
.pe .pe-tip-desc { margin-top: 3px; font-size: 11.5px; color: var(--bl-dim); }

/* ---------- Boîtes de dialogue ---------- */
.pe .pe-modal-overlay { background: rgba(0, 0, 0, 0.35); backdrop-filter: none; }
.pe .pe-modal {
  padding: 12px 14px;
  border: 1px solid var(--bl-line-2);
  border-radius: 6px;
  background: var(--dv-panel);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  backdrop-filter: none;
  animation: none;
}
.pe .pe-modal h3 { margin-bottom: 10px; font: 600 13px var(--dv-font-text); letter-spacing: 0; color: #fff; }
.pe .pe-modal-sub { color: var(--bl-dim); }
.pe .pe-modal-buttons { gap: 2px; margin-top: 12px; }
.pe .pe-help { padding: 14px 16px; border: 1px solid var(--bl-line-2); border-radius: 6px; background: var(--dv-panel); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6); }
.pe .pe-help h3 { font: 600 13px var(--dv-font-text); }
.pe .pe-mat-card { border: 0; border-radius: 6px; background: var(--dv-card); box-shadow: none; }
.pe .pe-mat-card:hover { background: var(--dv-card-hi); box-shadow: 0 0 0 1px var(--bl-ring); transform: none; }
.pe .pe-mat-cat { font: 400 11px var(--dv-font-text); letter-spacing: 0; text-transform: none; color: var(--bl-dim); }
.pe .pe-tp-field input, .pe .pe-tp-field select, .pe .pe-tp-field textarea, .pe .pe-tp-mats input, .pe .pe-tp-cws input[type="text"] {
  height: 24px;
  border: 0;
  border-radius: 4px;
  background-color: var(--bl-field);
  font-size: 12px;
}
.pe .pe-tp-field > span, .pe .pe-tp-mats .h, .pe .pe-tp-cws .h { font: 400 11px var(--dv-font-text); letter-spacing: 0; text-transform: none; color: var(--bl-dim); }

/* Accueil d'un projet vide */
.pe .pe-welcome-title { font: 600 18px var(--dv-font-text); letter-spacing: 0; color: #fff; }
.pe .pe-welcome-sub { font-size: 12px; color: var(--bl-dim); }
.pe .pe-welcome-grid { gap: 4px; }
.pe .pe-welcome-card { padding: 12px 14px; border: 0; border-radius: 6px; background: var(--dv-card); }
.pe .pe-welcome-card:hover { background: var(--dv-card-hi); transform: none; box-shadow: 0 0 0 1px var(--bl-ring); }
.pe .pe-welcome-card-title { font: 600 12.5px var(--dv-font-text); letter-spacing: 0; }

/* Saisie d'une longueur pendant un tracé */
.pe .pe-len-input { height: 22px; border: 0; border-radius: 4px; background: var(--bl-field); box-shadow: 0 0 0 1px var(--bl-ring); }

/* ---------- Barre d'état ---------- */
.pe .pe-status {
  height: 24px;
  padding: 0 10px;
  gap: 14px;
  background: var(--bl-top);
  color: var(--bl-dim);
  font-size: 11.5px;
  letter-spacing: 0;
}
.pe .pe-selinfo { color: var(--bl-text); }
.pe .pe-chip { height: 18px; padding: 0 8px; border: 1px solid var(--bl-line-2); border-radius: 9px; background: transparent; color: var(--bl-dim); font: 400 11px var(--dv-font-text); }
.pe .pe-chip:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.pe .pe-chip.off { border-style: dashed; color: var(--bl-muted); background: transparent; }

@media (max-width: 980px) {
  .pe .pe-left, .pe .pe-hsplit { display: none; }
}

.pe-area-head .v3d-bar { overflow-x: auto; scrollbar-width: none; }
.pe-area-head .v3d-bar::-webkit-scrollbar { display: none; }
.pe-area-head > .v3d-shading { flex: none; margin-left: 6px; }
.pe .pe-badge-group { background: rgba(31, 111, 194, 0.098); color: #a9d2ee; }
.pe .pe-left .pe-item.selected .pe-badge { background: rgba(255, 255, 255, 0.14); color: #e8eefa; }
.pe-tbox.off { display: none; }
@media (max-width: 980px) {
  .pe .pe-side .pe-right { flex: 1 1 0 !important; }
}

/* Onglet actif et outil actif : même dégradé que les boutons actifs de l'accueil, liseré vert d'eau */
.pe .pe-tbox .pe-btn.active, .pe .pe-hbtn.active, .pe .v3d-btn.active, .pe .v3d-shade.active, .pe .v3d-pop-seg button.active { box-shadow: inset 0 0 0 1px rgba(31, 111, 194, 0.315); }
.pe .pe-tabs .pe-mode-btn.active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.pe .pe-panel-title { border-bottom: 1px solid var(--bl-line); }
.pe .pe-toolbar { border-bottom: 1px solid var(--bl-line); }
.pe .pe-status { border-top: 1px solid var(--bl-line); }

/* Matières des fermetures éclair */
.pe-zipmat { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 30px; padding: 0 8px 0 3px; border: 1px solid var(--bl-line-2, rgba(255,255,255,.12)); border-radius: 6px; background: var(--bl-widget, #1d222a); color: var(--bl-text, #f1f4f8); font: inherit; cursor: pointer; text-align: left; }
.pe-zipmat:hover { background: var(--bl-widget-hi, #262c36); border-color: rgba(24,180,154,.45); }
.pe-zipmat-ball { flex: none; width: 24px; height: 24px; }
.pe-zipmat-ball canvas { width: 24px; height: 24px; display: block; border-radius: 50%; }
.pe-zipmat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-zipmat-go { flex: none; color: var(--bl-muted, #8a94a4); font-size: 11px; }
.pe .pe-mat-card.pe-zipmat-on { box-shadow: 0 0 0 1px #3a5f84; }

/* Options 3D : choix du mannequin et import */
.v3d-pop { max-height: calc(100% - 16px); overflow-y: auto; }
.v3d-pop-row > span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3d-pop-del { border: 0; background: transparent; color: var(--pe-muted, #8a8f98); font: inherit; padding: 0 4px; cursor: pointer; }
.v3d-pop-del:hover { color: #ff6b6b; }
.v3d-pop-import { width: 100%; margin: 4px 0 2px; padding: 5px 8px; border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 5px; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.v3d-pop-import:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.04); }
.v3d-pop-msg { font-size: 10.5px; line-height: 1.35; color: var(--pe-muted, #8a8f98); }
.v3d-pop-msg:empty { display: none; }

/* Fiche technique : bouton mis en avant dans la barre du haut de l'atelier, même bleu que les options sélectionnées (--bl-sel) */
.pe .pe-tp-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  margin-right: 10px;
  padding: 0 13px 0 10px;
  border: 1px solid rgba(31, 111, 194, 0.315);
  border-radius: 6px;
  background: var(--bl-sel);
  color: #fff;
  font: 600 12.5px var(--dv-font-text);
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s, box-shadow 0.15s;
}
.pe .pe-tp-cta:hover { background: var(--bl-sel-hi); border-color: rgba(31, 111, 194, 0.42); }
.pe .pe-tp-cta:active { background: var(--bl-sel); }
.pe .pe-tp-cta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Assistant de l'atelier (conversation avec l'IA) ---------- */
.pe .pe-ai-btn { display: inline-flex; align-items: center; gap: 7px; height: 26px; margin-right: 8px; padding: 0 12px 0 9px; border: 1px solid var(--bl-line-2); border-radius: 6px; background: var(--bl-widget); color: var(--bl-text); font: 600 12.5px var(--dv-font-text); cursor: pointer; }
.pe .pe-ai-btn:hover { background: var(--bl-widget-hi); }
.pe .pe-ai-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pe .pe-ai-chat { position: absolute; right: 14px; bottom: 14px; z-index: 60; width: min(400px, calc(100% - 28px)); height: min(560px, calc(100% - 90px)); display: flex; flex-direction: column; border: 1px solid var(--bl-line-2); border-radius: 10px; background: var(--bl-panel); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); overflow: hidden; }
.pe .pe-ai-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 13px; border-bottom: 1px solid var(--bl-line); background: var(--bl-head); }
.pe .pe-ai-head b { font: 600 13px var(--dv-font-text); }
.pe .pe-ai-cost { flex: 1; font-size: 11px; color: var(--bl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe .pe-ai-x { width: 24px; height: 24px; border: 0; border-radius: 5px; background: none; color: var(--bl-text); font-size: 17px; cursor: pointer; }
.pe .pe-ai-x:hover { background: var(--bl-widget-hi); }
.pe .pe-ai-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.pe .pe-ai-empty { color: var(--bl-muted); font-size: 12.5px; line-height: 1.5; }
.pe .pe-ai-msg { max-width: 92%; padding: 8px 11px; border-radius: 9px; font-size: 12.8px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pe .pe-ai-msg.me { align-self: flex-end; background: var(--bl-sel); color: #fff; }
.pe .pe-ai-msg.ai { align-self: flex-start; background: var(--bl-widget); border: 1px solid var(--bl-line); }
.pe .pe-ai-msg.wait { color: var(--bl-muted); font-style: italic; }
.pe .pe-ai-done { margin: 7px 0 0; padding: 0; list-style: none; font-size: 12px; }
.pe .pe-ai-done li { color: #8fd19e; }
.pe .pe-ai-done li.ko { color: var(--pe-danger); }
.pe .pe-ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--bl-line); }
.pe .pe-ai-form textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 8px 10px; border: 1px solid var(--bl-line-2); border-radius: 7px; background: var(--bl-field); color: var(--bl-text); font: 400 13px var(--dv-font-text); outline: none; }
.pe .pe-ai-form textarea:focus { border-color: var(--bl-ring); }
.pe .pe-tp-lang-note { display: block; margin-top: 5px; font-size: 11.5px; color: var(--bl-muted); }

/* Liste des projets : « Ouvrir » d'un projet qui a des fiches techniques → choix patrons / fiche technique */
.pat-open-menu { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 5; display: grid; gap: 2px; max-height: calc(100% - 20px); overflow-y: auto; padding: 6px; border-radius: 14px; background: rgba(19, 22, 28, 0.97); border: 1px solid var(--dv-line-2); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); backdrop-filter: blur(10px); animation: dv-page-in 0.18s ease-out both; cursor: default; }
.pat-open-menu button { display: grid; gap: 1px; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--dv-text); text-align: left; cursor: pointer; }
.pat-open-menu button b { font: 600 13.5px var(--dv-font); }
.pat-open-menu button small { font: 12px var(--dv-font-text); color: var(--dv-muted); }
.pat-open-menu button:hover, .pat-open-menu button:focus-visible { background: rgba(31, 111, 194, 0.14); outline: none; }
.pat-open-menu button:hover small { color: var(--dv-soft); }
body > .pe-tp-view .pe-action { font-family: var(--dv-font-text); }

/* Titre « Vos projets » au même format que ceux de l'accueil et de la page IA (2026-10-13) */
.pat-eyebrow { font: 700 12px var(--dv-font); letter-spacing: 0.1em; color: #6f9dcb; }
.pat-h1 { font: 700 clamp(2rem, 3.4vw, 2.9rem) / 1.06 var(--dv-font); letter-spacing: -0.035em; color: #f1f4f8; }
.pat-h1 .pat-grad { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #6f9dcb; animation: none; }

/* ---------- Projets et atelier : palette de l'accueil et de la page IA (2026-10-13 ; couleurs seulement) ---------- */
#page-patronage {
  --dv-bg: #0a0c10;
  --dv-panel: #101318;
  --dv-card: #14181e;
  --dv-card-hi: #1a1f26;
  --dv-line: rgba(255, 255, 255, 0.08);
  --dv-line-2: rgba(255, 255, 255, 0.13);
  --dv-text: #f1f4f8;
  --dv-soft: #b8c2d0;
  --dv-muted: #8a94a4;
  --dv-accent: #3a5f84;
  --dv-accent-hi: #45709b;
  --dv-accent-lo: #314f6e;
  --dv-accent-ink: #7d9dbd;
  --dv-accent-soft: rgba(31, 111, 194, 0.112);
  --dv-accent-line: rgba(125, 157, 189, 0.35);
  --dv-teal: var(--dv-accent);
  --dv-mauve: #628fbc;
  background:
    radial-gradient(ellipse 60% 55% at 30% 6%, rgba(31, 111, 194, 0.126), transparent 70%),
    radial-gradient(circle at 92% 92%, rgba(31, 111, 194, 0.084), transparent 42%),
    #0a0c10;
}
#page-patronage .pat-wrap {
  background:
    radial-gradient(520px 380px at 85% 0%, rgba(31, 111, 194, 0.07), transparent 70%),
    rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#page-patronage .pat-card { background: rgba(255, 255, 255, 0.045); border-color: rgba(255, 255, 255, 0.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 40px rgba(0, 0, 0, 0.5); }
#page-patronage .pat-card:hover, #page-patronage .pat-card:focus-visible { border-color: rgba(125, 157, 189, 0.3); }
#page-patronage .pat-open { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.2); }

/* ---------- Assistant de l'atelier, refait (2026-10-13) : verre, logo animé pendant la réflexion ---------- */
.pe .pe-ai-chat {
  width: min(420px, calc(100% - 28px));
  height: min(620px, calc(100% - 90px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(16, 19, 24, 0.86);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: pe-ai-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes pe-ai-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.pe .pe-ai-head { gap: 10px; padding: 12px 10px 12px 14px; background: none; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.pe .pe-ai-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pe .pe-ai-title b { font: 700 14px var(--dv-font); color: #f1f4f8; }
.pe .pe-ai-cost { flex: none; font-size: 11.5px; color: #8a94a4; }
.pe .pe-ai-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: #b8c2d0; cursor: pointer; transition: background 0.2s, color 0.2s; }
.pe .pe-ai-icon:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.pe .pe-ai-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* logo Devclo (fixe) */
.pe .pe-ai-logo { display: block; flex: none; width: 46px; height: 46px; background: url("../images/logo-barre.png") center / 70% no-repeat; }
.pe .pe-ai-logo.sm { width: 28px; height: 28px; }
.pe .pe-ai-list { padding: 16px 14px; gap: 14px; }
.pe .pe-ai-list::-webkit-scrollbar { width: 8px; }
.pe .pe-ai-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
/* accueil de la conversation */
.pe .pe-ai-empty { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: #95a0b0; font-size: 13px; line-height: 1.5; }
.pe .pe-ai-empty .pe-ai-logo { width: 64px; height: 64px; }
.pe .pe-ai-empty b { font: 700 16px var(--dv-font); color: #f1f4f8; }
.pe .pe-ai-empty p { max-width: 300px; margin: 0; }
.pe .pe-ai-sugg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.pe .pe-ai-sugg button { min-height: 30px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 15px; background: rgba(255, 255, 255, 0.04); color: #e6ebf2; font: 500 12.5px var(--dv-font-text); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.pe .pe-ai-sugg button:hover { background: rgba(31, 111, 194, 0.07); border-color: rgba(125, 157, 189, 0.3); }
/* messages */
.pe .pe-ai-msg { max-width: 100%; padding: 0; border: 0; border-radius: 0; background: none; display: flex; gap: 9px; align-items: flex-start; animation: pe-ai-msg 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes pe-ai-msg { from { opacity: 0; transform: translateY(6px); } }
.pe .pe-ai-msg.me { align-self: flex-end; max-width: 86%; background: none; }
.pe .pe-ai-msg.ai { align-self: flex-start; max-width: 100%; background: none; border: 0; }
.pe .pe-ai-bub { min-width: 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: #e6ebf2; }
.pe .pe-ai-msg.me .pe-ai-bub { padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: rgba(31, 111, 194, 0.112); border: 1px solid rgba(125, 157, 189, 0.25); color: #f1f4f8; }
.pe .pe-ai-msg.ai .pe-ai-bub { padding: 4px 0 0; }
.pe .pe-ai-msg.err .pe-ai-bub { color: #ff9f8f; }
.pe .pe-ai-av { flex: none; width: 28px; height: 28px; background: url("../images/logo-barre.png") center / 74% no-repeat; }
/* pendant la réflexion : le logo animé (GIF transparent, entier) */
.pe .pe-ai-msg.wait .pe-ai-av { width: 38px; height: 38px; margin: -5px; background: url("../images/logo-anime.gif") center / contain no-repeat; }
.pe .pe-ai-msg.wait { font-style: normal; color: #95a0b0; }
.pe .pe-ai-msg.wait .pe-ai-bub { display: flex; align-items: center; gap: 10px; padding-top: 6px; color: #95a0b0; }
.pe .pe-ai-dots { display: inline-flex; gap: 4px; }
.pe .pe-ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: #b8c2d0; animation: pe-ai-dot 1.2s infinite ease-in-out; }
.pe .pe-ai-dots i:nth-child(2) { animation-delay: 0.15s; }
.pe .pe-ai-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pe-ai-dot { 0%, 80%, 100% { opacity: 0.25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
/* modifications appliquées */
.pe .pe-ai-done { margin: 9px 0 0; padding: 8px 10px; display: grid; gap: 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08); list-style: none; font-size: 12.3px; white-space: normal; }
.pe .pe-ai-done li { position: relative; padding-left: 20px; color: #a7d8b4; }
.pe .pe-ai-done li::before { content: ""; position: absolute; left: 3px; top: 0.32em; width: 9px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.pe .pe-ai-done li.ko { color: #ff9f8f; }
.pe .pe-ai-done li.ko::before { content: "×"; top: -1px; left: 3px; width: auto; height: auto; border: 0; transform: none; font-weight: 700; }
/* saisie : barre arrondie, bouton rond Envoyer / Arrêter */
.pe .pe-ai-form { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 12px 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.pe .pe-ai-box { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.13); background: rgba(255, 255, 255, 0.04); transition: border-color 0.2s, box-shadow 0.2s; }
.pe .pe-ai-box:focus-within { border-color: rgba(125, 157, 189, 0.5); box-shadow: 0 0 0 3px rgba(31, 111, 194, 0.07); }
.pe .pe-ai-form textarea { min-height: 34px; max-height: 140px; padding: 8px 0; border: 0; border-radius: 0; background: none; color: #f1f4f8; font: 400 13.5px var(--dv-font-text); line-height: 1.35; }
.pe .pe-ai-form textarea:focus { border: 0; }
.pe .pe-ai-form textarea::placeholder { color: #8a94a4; }
.pe .pe-ai-send { flex: none; height: 36px; padding: 0 10px 0 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; background: #3a5f84; color: #fff; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: background 0.2s; }
.pe .pe-ai-send:hover { background: #45709b; }
.pe .pe-ai-send-ico { display: grid; place-items: center; }
.pe .pe-ai-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pe .pe-ai-send .dv-cost { margin: 0; }
.pe .pe-ai-send.stop { background: #2a2f38; padding: 0 9px; }
.pe .pe-ai-send.stop svg { fill: currentColor; stroke: none; }
.pe .pe-ai-send.stop .dv-cost { display: none; }
.pe .pe-ai-hint { padding-left: 6px; font-size: 11px; color: #6f7a8a; }
/* retouches proposées : aperçu avant / après (point 104) */
.pe .pe-ai-prop { margin: 9px 0 0; padding: 9px 10px 10px; display: grid; gap: 8px; border-radius: 10px; background: rgba(38, 122, 178, 0.06); border: 1px solid rgba(125, 157, 189, 0.28); white-space: normal; }
.pe .pe-ai-prop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #e6ebf2; }
.pe .pe-ai-seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; overflow: hidden; }
.pe .pe-ai-seg button { padding: 3px 8px; border: 0; background: none; color: #b8c2d0; font: 500 11.5px var(--dv-font-text); cursor: pointer; }
.pe .pe-ai-seg button.on { background: #267ab2; color: #fff; }
.pe .pe-ai-prev { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.pe .pe-ai-prev figure { margin: 0; padding: 5px; border-radius: 8px; background: rgba(0, 0, 0, 0.18); border: 1px solid rgba(255, 255, 255, 0.07); }
.pe .pe-ai-prev svg { display: block; width: 100%; height: 120px; }
.pe .pe-ai-prev figcaption { margin-top: 3px; font-size: 11px; color: #95a0b0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe .pe-ai-prev polygon { stroke-width: 1.3px; stroke-linejoin: round; }
.pe .pe-ai-prev polygon.av { fill: none; stroke: #8a94a4; stroke-dasharray: 4 3; }
.pe .pe-ai-prev polygon.ap { fill: rgba(38, 122, 178, 0.22); stroke: #5fa8dc; }
.pe .pe-ai-prev polygon.ap.poche { fill: rgba(240, 180, 90, 0.25); stroke: #f0b45a; }
.pe .pe-ai-prev polygon.pince { fill: none; }
.pe .pe-ai-prop.av polygon.ap, .pe .pe-ai-prop.ap polygon.av { display: none; }
.pe .pe-ai-prop.av polygon.av { stroke-dasharray: none; stroke: #c3cad5; fill: rgba(255, 255, 255, 0.06); }
.pe .pe-ai-prop-leg { font-size: 11px; color: #8a94a4; }
.pe .pe-ai-prop .pe-ai-done { margin: 0; }
.pe .pe-ai-prop .pe-ai-done.plan li { color: #c9d6e4; }
.pe .pe-ai-prop .pe-ai-done.plan li.ko { color: #ff9f8f; }
.pe .pe-ai-prop-acts { display: flex; gap: 6px; }
.pe .pe-ai-prop-acts button { min-height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05); color: #e6ebf2; font: 600 12px var(--dv-font-text); cursor: pointer; }
.pe .pe-ai-prop-acts .pe-ai-apply { background: #267ab2; border-color: #267ab2; color: #fff; }
.pe .pe-ai-prop-acts .pe-ai-apply:hover { background: #2d8ac8; }
.pe .pe-ai-prop-acts .pe-ai-apply:disabled { opacity: 0.45; cursor: default; }
.pe .pe-ai-direct { display: flex; align-items: center; gap: 4px; padding-left: 6px; font-size: 11px; color: #8a94a4; cursor: pointer; }
.pe .pe-ai-direct input { margin: 0; }
@media (prefers-reduced-motion: reduce) { .pe .pe-ai-chat, .pe .pe-ai-msg { animation: none; } }

/* Fiche technique en préparation : logo Devclo animé (GIF transparent) à la place de la roue */
.pe-tp-spin { width: 92px; height: 92px; border: 0; border-radius: 0; background: url("../images/logo-anime.gif") center / contain no-repeat; animation: none; }

/* Page des projets : « Importer » / « Exporter tout » (tous les projets dans un fichier) */
.pat-ghost { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--dv-line-2); background: rgba(255, 255, 255, 0.04); color: var(--dv-text); font: 600 13.5px var(--dv-font); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.pat-ghost:hover { background: rgba(31, 111, 194, 0.07); border-color: rgba(125, 157, 189, 0.35); }

/* ---------- Barre d'outils 3D verticale (comme CLO) : Simuler, Déplacer, Épingler, Modifier en 3D | Zip 3D | Coloris ---------- */
.v3d-tools { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 6; display: flex; flex-direction: column; gap: 3px; padding: 5px; border-radius: 12px; background: rgba(20, 22, 26, 0.92); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }
.v3d-tool { position: relative; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #cfd5dd; cursor: pointer; transition: background 0.15s, color 0.15s; }
.v3d-tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.v3d-tool:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.v3d-tool.on { background: rgba(38, 122, 178, 0.28); color: #6cc4ff; box-shadow: inset 0 0 0 1px rgba(108, 196, 255, 0.35); }
.v3d-tools-sep { height: 1px; margin: 3px 5px; background: rgba(255, 255, 255, 0.12); }
.v3d-tooltip { position: absolute; z-index: 8; pointer-events: none; padding: 4px 9px; border-radius: 7px; background: rgba(20, 22, 26, 0.95); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; font-size: 12px; white-space: nowrap; }
.v3d-tooltip[hidden] { display: none; }
/* Cartes d'ajustement (point 46) : valeurs lues au clic sur plusieurs lignes, légende en bas à gauche */
.v3d-tooltip.fit { white-space: pre-line; line-height: 1.45; }
.v3d-fitleg { position: absolute; left: 10px; bottom: 30px; z-index: 6; width: 230px; padding: 7px 9px; border-radius: 8px; background: rgba(20, 22, 26, 0.88); border: 1px solid rgba(255, 255, 255, 0.12); color: #e8e8e8; font-size: 11px; pointer-events: none; }
.v3d-fitleg[hidden] { display: none; }
.v3d-fitleg-t { font-weight: 600; margin-bottom: 5px; }
.v3d-fitleg-bar { height: 9px; border-radius: 3px; }
.v3d-fitleg-k { display: flex; justify-content: space-between; margin-top: 3px; color: #c8c8c8; }
.v3d-fitleg-h { margin-top: 4px; color: #9a9a9a; }
/* Coloris : pastilles sous la vue 3D */
.v3d-cw { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 6; display: none; align-items: center; gap: 6px; padding: 6px; border-radius: 12px; background: rgba(20, 22, 26, 0.92); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }
.v3d-cw.open { display: flex; }
.cw-sw { width: 38px; height: 38px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: #2a2d33; cursor: pointer; }
.cw-sw canvas, .cw-sw .cw-plain { display: block; width: 100%; height: 100%; }
.cw-sw:hover { border-color: rgba(255, 255, 255, 0.35); }
.cw-sw.on { border-color: #6cc4ff; box-shadow: 0 0 0 1px rgba(108, 196, 255, 0.4); }
.cw-add, .cw-cmp { height: 38px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 9px; background: rgba(255, 255, 255, 0.06); color: #e6e9ee; font: 600 13px var(--dv-font, "Segoe UI", system-ui, sans-serif); cursor: pointer; }
.cw-add { width: 38px; padding: 0; font-size: 20px; }
.cw-add:hover, .cw-cmp:hover { background: rgba(38, 122, 178, 0.25); border-color: rgba(108, 196, 255, 0.4); color: #fff; }
.pe-cw-modal { width: 460px; }
.pe-cw-name { width: 100%; height: 34px; margin-top: 10px; }
.pe-cw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1.3fr); gap: 8px; align-items: center; margin: 12px 0 4px; }
.pe-cw-grid input[type="color"] { width: 44px; height: 30px; padding: 0; border: 0; background: none; }
.pe-cw-mat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Coloris : couleur par pièce, fil, boutons et imprimés (sections repliables) */
.pe-cw-modal { max-height: 88vh; overflow-y: auto; }
.pe-cw-sect { margin-top: 10px; border-top: 1px solid var(--pe-line, rgba(127, 127, 127, 0.25)); padding-top: 8px; }
.pe-cw-sect > summary { cursor: pointer; font-weight: 600; }
.pe-cw-hint { margin: 6px 0 0; font-size: 12px; opacity: 0.75; }
.pe-cw-sect .pe-cw-grid { margin-top: 8px; }
.pe-cw-reset:disabled { opacity: 0.45; cursor: default; }
/* Comparer les coloris : carrousel (coloris au centre, voisins estompés, pastilles en dessous) */
.pe .pe-modal-overlay.pe-cw-carousel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: radial-gradient(80% 70% at 50% 40%, rgba(38, 122, 178, 0.55), transparent 70%), rgba(8, 10, 14, 0.96); }
.cw-stage { display: flex; align-items: center; justify-content: center; gap: 26px; max-width: 100%; }
.cw-card { position: relative; width: min(40vw, 560px); border-radius: 18px; overflow: hidden; background: #dfe3e8; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); transition: transform 0.25s; }
.cw-card img { display: block; width: 100%; height: auto; }
.cw-card.side { width: min(16vw, 230px); opacity: 0.45; cursor: pointer; }
.cw-card.side:hover { opacity: 0.7; }
.cw-card-name { position: absolute; left: 12px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12.5px; font-weight: 600; }
.cw-bar { display: flex; gap: 8px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); }
.cw-bar .cw-sw { background: #ddd; }
.cw-bar .cw-sw.on { border-color: #267ab2; }
.cw-nav, .cw-close { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.cw-nav:hover, .cw-close:hover { background: rgba(255, 255, 255, 0.26); }
.cw-nav.prev { left: 24px; top: 50%; transform: translateY(-50%); }
.cw-nav.next { right: 24px; top: 50%; transform: translateY(-50%); }
.cw-close { top: 20px; right: 20px; font-size: 24px; }
/* Mesures 3D (outil Mesurer) */
.v3d-meas { position: absolute; left: 62px; top: 12px; z-index: 6; display: none; min-width: 210px; max-width: 280px; padding: 8px 10px; border-radius: 10px; background: rgba(20, 22, 26, 0.92); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); color: #e8e8ea; font-size: 12px; }
.v3d-meas.open { display: block; }
.v3d-meas-h { font-weight: 600; margin-bottom: 6px; color: #fff; }
.v3d-meas-empty { opacity: 0.7; margin-bottom: 6px; }
.v3d-meas-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.v3d-meas-n { width: 16px; height: 16px; border-radius: 50%; background: #ff7399; color: #1b1b1f; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.v3d-meas-k { flex: 1; opacity: 0.85; }
.v3d-meas-x { background: none; border: 0; color: #aaa; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.v3d-meas-x:hover { color: #fff; }
.v3d-meas-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.v3d-meas-btn { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #e8e8ea; border-radius: 6px; padding: 3px 8px; font-size: 11.5px; cursor: pointer; }
.v3d-meas-btn:hover { background: rgba(255, 255, 255, 0.16); }
.v3d-meas-vol { font-weight: 600; color: #fff; }
.v3d-meas-lbl { position: absolute; z-index: 5; pointer-events: none; padding: 2px 7px; border-radius: 6px; background: rgba(255, 115, 153, 0.95); color: #1b1b1f; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.v3d-meas-lbl[hidden] { display: none; }
/* Export 3D */
.pe-export3d { width: min(620px, 94vw); }
.pe-x3-sec { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid var(--pe-line, rgba(127, 127, 127, 0.25)); }
.pe-x3-sec h4 { margin: 0 0 4px; font-size: 13px; }
.pe-x3-sub { margin: 0 0 8px; font-size: 12px; opacity: 0.75; }
.pe-x3-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pe-x3-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.pe-x3-prog { font-size: 12px; opacity: 0.8; min-width: 40px; }
/* Coût de revient */
.pe-cost { width: min(980px, 96vw); max-height: 90vh; display: flex; flex-direction: column; }
.pe-cost-body { overflow: auto; }
.pe-cost-t { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 12.5px; }
.pe-cost-t th { text-align: left; font-weight: 600; opacity: 0.8; padding: 4px 8px; border-bottom: 1px solid rgba(127, 127, 127, 0.3); white-space: nowrap; }
.pe-cost-t td { padding: 4px 8px; border-bottom: 1px solid rgba(127, 127, 127, 0.14); white-space: nowrap; }
.pe-cost-in { width: 78px; }
.pe-cost-res td { text-align: right; }
.pe-cost-res td:first-child { text-align: left; font-weight: 600; }
.pe-cost-tot { font-weight: 700; }
/* Rendu par lots, taille en 3D */
.pe-batch { width: min(640px, 94vw); max-height: 92vh; overflow: auto; }
.pe-batch-sheet { display: block; max-width: 100%; margin: 8px 0; border-radius: 8px; }
/* Scripts et lots (API locale, point 97) */
.pe-batch.pe-scripts { width: min(820px, 96vw); }
.pe-scripts-tabs { display: flex; gap: 4px; margin: 6px 0 2px; border-bottom: 1px solid rgba(127, 127, 127, 0.25); }
.pe-scripts-tab.pe-action { border-radius: 6px 6px 0 0; border-bottom-color: transparent; }
.pe-scripts-tab.active { color: #fff; background: #267ab2; border-color: #267ab2; }
.pe-scripts-projs { display: flex; flex-direction: column; gap: 2px; max-height: 150px; overflow: auto; margin-bottom: 6px; }
.pe-scripts-projs .pe-x3-chk { min-width: 0; }
.pe-scripts-code { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; min-height: 220px; resize: vertical; font: 12px/1.45 Consolas, "Segoe UI", monospace; tab-size: 2; padding: 8px; border-radius: 6px; border: 1px solid rgba(127, 127, 127, 0.3); background: rgba(127, 127, 127, 0.08); color: inherit; }
.pe-scripts-dl { margin: 6px 0 0; font-size: 12px; }
.pe-scripts-dl dt { font-family: Consolas, "Segoe UI", monospace; font-weight: 600; margin-top: 6px; }
.pe-scripts-dl dd { margin: 1px 0 0 14px; opacity: 0.8; }
.pe-scripts-log { margin-top: 10px; max-height: 160px; min-height: 40px; overflow: auto; padding: 6px 8px; border-radius: 6px; background: rgba(127, 127, 127, 0.1); font: 11.5px/1.45 Consolas, "Segoe UI", monospace; white-space: pre-wrap; }
.pe-scripts-log:empty::before { content: "Journal : les étapes et les erreurs s'affichent ici."; opacity: 0.6; }
.pe-scripts-line.err { color: #e0575b; }
.pe-scripts-line.ok { color: #3fae6a; }
.pe-scripts-line.head { font-weight: 700; margin-top: 4px; }
.v3d-size { height: 24px; margin: 0 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: inherit; border: 1px solid rgba(255, 255, 255, 0.14); font-size: 12px; }
.v3d-size[hidden] { display: none; }
/* Options d'affichage 3D (isolement, transparence, vent) */
.v3d-viewopts { position: absolute; right: 12px; top: 44px; z-index: 7; width: 270px; padding: 10px 12px; border-radius: 10px; background: rgba(20, 22, 26, 0.95); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); color: #e8e8ea; font-size: 12px; }
.v3d-vo-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.v3d-vo-row > span:first-child { flex: 1; }
.v3d-vo-row input[type=range] { width: 100px; }
.v3d-vo-v { width: 52px; text-align: right; opacity: 0.85; }
.v3d-vo-h { margin: 8px 0 2px; font-weight: 600; color: #fff; }
.v3d-vo-note { margin-top: 6px; opacity: 0.7; }
/* Présentation pliée (point 28) */
.v3d-vo-row select { max-width: 160px; height: 24px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: inherit; border: 1px solid rgba(255, 255, 255, 0.14); font-size: 12px; }
.v3d-vo-row select option { background: #1d2026; }
.v3d-vo-acts { display: grid; gap: 6px; margin-top: 8px; }
.v3d-vo-btn { height: 26px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); color: inherit; font-size: 12px; text-align: left; white-space: nowrap; cursor: pointer; }
.v3d-vo-btn:hover { background: rgba(255, 255, 255, 0.12); }
.v3d-vo-btn.primary { background: #267ab2; border-color: #267ab2; color: #fff; text-align: center; }
.v3d-vo-btn.primary:hover { background: #2d88c4; }
.pe-x3-opts { flex: 1; min-width: 200px; }
.pe-x3-name { flex: 1; }
.pe-batch .pe-x3-chk { min-width: 150px; }
.v3d-ann-lbl { position: absolute; z-index: 5; pointer-events: none; max-width: 220px; padding: 2px 7px; border-radius: 6px; background: rgba(255, 209, 64, 0.95); color: #1b1b1f; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3d-ann-lbl[hidden] { display: none; }
.pe-body-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.pe-body-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.pe-lab-list { max-height: 55vh; overflow: auto; margin: 8px 0; }
.pe-lab-item { width: 100%; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; }
.pe-mat-lab { justify-content: flex-start; margin-top: 10px; }
.pe-curves { width: min(640px, 94vw); }
.pe-curves-graph { margin: 8px 0; color: var(--pe-muted, #888); }
.pe-curves-graph svg { display: block; max-height: 190px; }
.pe-curves-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; max-height: 40vh; overflow: auto; }
.pe-curves-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pe-curves-table th { text-align: left; font-weight: 600; padding: 2px 4px; }
.pe-curves-table td { padding: 2px 4px; }
.pe-curves-table input { width: 100%; box-sizing: border-box; }
.pe-curves-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pe-color { display: inline-flex; align-items: center; gap: 4px; }
.pe-color-more { padding: 0 6px; }
.pe-col-sw { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(127,127,127,0.4); }
.pe-col-pal { display: grid; grid-template-columns: repeat(auto-fill, 26px); gap: 5px; margin: 6px 0; }
.pe-col-chip { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(127,127,127,0.35); cursor: pointer; }
/* Accessoires 3D : vignette du modèle (vue de dessus) et couleurs de métal rapides */
.pe-trim-thumb { display: block; width: 112px; height: 112px; margin: 4px auto 8px; border-radius: 6px; background: rgba(255,255,255,0.035); }
.pe-trim-colors { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 8px; }
.pe-trim-colors .pe-col-chip { width: 20px; height: 20px; }
/* Préférences : raccourcis clavier et barres d'outils personnalisables (point 16) */
.pe .pe-prefs { width: min(720px, 94vw); max-height: 90vh; display: flex; flex-direction: column; }
.pe-prefs-tabs { display: flex; gap: 2px; margin-bottom: 8px; border-bottom: 1px solid var(--bl-line-2, rgba(255,255,255,0.12)); }
.pe-prefs-tab { padding: 6px 12px; border: 0; border-radius: 4px 4px 0 0; background: transparent; color: var(--bl-dim, #b8c2d0); font: 600 12px var(--dv-font-text, inherit); cursor: pointer; }
.pe-prefs-tab:hover { color: #fff; background: var(--bl-widget, #1d222a); }
.pe-prefs-tab.active { color: #fff; background: var(--bl-sel, rgba(31,111,194,0.35)); }
.pe-prefs-msg { min-height: 18px; margin: 0 0 6px; font-size: 12px; color: var(--bl-dim, #b8c2d0); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pe-prefs-msg.bad { color: #ffb38f; }
.pe-prefs-body { flex: 1; min-height: 0; overflow: auto; padding-right: 4px; }
.pe-prefs-top { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 0 8px; background: var(--dv-panel, #171b22); }
.pe-prefs-search { flex: 1; min-width: 180px; height: 26px; padding: 0 8px; border: 1px solid var(--bl-line-2, rgba(255,255,255,0.12)); border-radius: 4px; background: var(--bl-field, #0a0c10); color: var(--bl-text, #fff); font: 12px var(--dv-font-text, inherit); }
.pe-prefs-conf { font-size: 11px; color: var(--bl-muted, #8a94a4); }
.pe-prefs-conf.bad { color: #ff9f8f; font-weight: 600; }
.pe-prefs-group { margin: 10px 0 4px; font: 600 11px var(--dv-font-text, inherit); letter-spacing: 0.04em; text-transform: uppercase; color: var(--bl-muted, #8a94a4); }
.pe-prefs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 8px; min-height: 28px; padding: 1px 6px; border-radius: 4px; }
.pe-prefs-row:hover { background: rgba(255, 255, 255, 0.04); }
.pe-prefs-row.changed .pe-prefs-label { color: #fff; font-weight: 600; }
.pe-prefs-row.focus { background: var(--bl-sel-soft, rgba(31,111,194,0.126)); box-shadow: inset 0 0 0 1px var(--bl-ring, rgba(31,111,194,0.385)); }
.pe-prefs-row.capturing { background: var(--bl-sel-soft, rgba(31,111,194,0.126)); }
.pe-prefs-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--bl-dim, #b8c2d0); }
.pe-prefs-keys { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; }
.pe-prefs-chip { display: inline-flex; align-items: center; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 5px; background: var(--bl-widget, #1d222a); }
.pe-prefs-chip.conflict { border-color: #e0654f; background: rgba(224, 101, 79, 0.18); }
.pe-prefs-chip.shadow { border-style: dashed; }
.pe-prefs-kbd { min-width: 24px; height: 22px; padding: 0 7px; border: 0; background: transparent; color: var(--bl-text, #fff); font: 600 11px var(--dv-font-text, inherit); cursor: pointer; }
.pe-prefs-kbd:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.pe-prefs-kbd.capturing, .pe-prefs-add.capturing { color: #fff; background: var(--bl-sel-hi, rgba(31,111,194,0.476)); }
.pe-prefs-x { width: 18px; height: 22px; padding: 0; border: 0; border-left: 1px solid rgba(255, 255, 255, 0.1); background: transparent; color: var(--bl-muted, #8a94a4); cursor: pointer; }
.pe-prefs-x:hover { color: #ff9f8f; }
.pe-prefs-add { min-width: 24px; height: 24px; padding: 0 6px; border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 5px; background: transparent; color: var(--bl-dim, #b8c2d0); font-size: 12px; cursor: pointer; }
.pe-prefs-add:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.pe-prefs-add:disabled, .pe-prefs-reset:disabled, .pe-prefs .pe-mini:disabled { opacity: 0.3; cursor: default; }
.pe-prefs-reset { width: 24px; height: 24px; border: 0; border-radius: 4px; background: transparent; color: var(--bl-dim, #b8c2d0); cursor: pointer; }
.pe-prefs-reset:not(:disabled):hover { color: #fff; background: var(--bl-widget-hi, #262c36); }
.pe-prefs-empty { padding: 6px; font-size: 12px; color: var(--bl-muted, #8a94a4); }
.pe-prefs-fixed { margin-top: 6px; opacity: 0.85; font-size: 12px; }
.pe-prefs-sec { margin-bottom: 12px; }
.pe-prefs-barlist { display: flex; flex-direction: column; gap: 1px; }
.pe-prefs-brow { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.pe-prefs-brow:hover { background: rgba(255, 255, 255, 0.04); }
.pe-prefs-brow .pe-prefs-label { flex: 1; }
.pe-prefs-brow kbd { padding: 0 6px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 5px; font: 600 10px var(--dv-font-text, inherit); color: var(--bl-dim, #b8c2d0); }
.pe-prefs-brow.sep { min-height: 20px; }
.pe-prefs-seplab { flex: 1; color: var(--bl-muted, #8a94a4); font-size: 11px; }
.pe-prefs-ico { display: inline-flex; width: 20px; height: 20px; color: var(--bl-dim, #b8c2d0); }
.pe-prefs-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pe-prefs-bacts { display: inline-flex; gap: 2px; }
.pe-prefs-bacts .pe-mini { height: 22px; padding: 0 7px; }
.pe-prefs-bfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.pe-prefs-select { flex: 1; min-width: 200px; height: 26px; border: 1px solid var(--bl-line-2, rgba(255,255,255,0.12)); border-radius: 4px; background: var(--bl-field, #0a0c10); color: var(--bl-text, #fff); font: 12px var(--dv-font-text, inherit); }
/* barre perso (entête de la vue 2D) et barres masquées */
.pe-perso[hidden], .pe-tbox [hidden], .v3d-tools [hidden] { display: none !important; }
.pe .pe-perso { flex: 0 1 auto; min-width: 0; overflow: hidden; } /* (entête étroite : la barre perso se rogne, les bascules restent visibles) */
.pe .pe-perso > * { flex: none; }
.v3d-tools.empty { display: none; }
.pe .pe-perso-txt { height: 22px; padding: 0 8px; border: 0; border-radius: 4px; background: var(--bl-widget, #1d222a); color: var(--bl-dim, #b8c2d0); font: 500 11px var(--dv-font-text, inherit); white-space: nowrap; cursor: pointer; }
.pe .pe-perso-txt:hover { background: var(--bl-widget-hi, #262c36); color: #fff; }
.pe .pe-perso-txt + .pe-perso-txt, .pe .pe-perso .pe-btn + .pe-perso-txt, .pe .pe-perso .pe-perso-txt + .pe-btn { margin-left: 1px; }

/* Laçage (point 33) : schéma de laçage dans les propriétés */
.pe-lace-schema { display: flex; justify-content: center; margin: 4px 0 8px; }
.pe-lace-schema svg { background: #f4f5f7; border-radius: 4px; max-width: 100%; height: auto; }

/* Points d'arrangement (point 35) : fenêtre de la liste des points */
.pe-modal.pe-arr-dlg { width: 720px; max-width: calc(100vw - 32px); }
.pe-arr-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; margin: 6px 0 10px; }
.pe-arr-row, .pe-arr-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pe .pe-arr-row input.pe-arr-name { width: 150px; }
.pe .pe-arr-row select { max-width: 160px; }
.pe .pe-arr-row input.pe-num.pe-arr-off { width: 50px; }
.pe-arr-ax { color: var(--bl-dim, #b8c2d0); font-size: 11px; }
.pe-arr-use { min-width: 56px; color: var(--bl-dim, #b8c2d0); font-size: 11px; }
.pe .pe-mini.danger { color: #ffb0a8; }
/* Corps mou (point 41) : fenêtre des zones de chair */
.pe-softbody .pe-soft-row { display: grid; grid-template-columns: 150px 80px minmax(120px, 1fr) 190px; align-items: center; gap: 10px; padding: 3px 0; }
.pe-softbody .pe-soft-head { color: var(--pe-soft); font-size: 11px; }
.pe-softbody .pe-soft-name { cursor: help; }
.pe-softbody .pe-soft-val { color: var(--pe-soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.pe-avatar-morphs { max-height: 280px; overflow-y: auto; } /* (mannequin importé : formes de mélange, point 71) */
/* Pose du mannequin (point 72) : poses prêtes, curseurs des articulations, aperçu du squelette */
.pe-batch.pe-pose { width: min(940px, 96vw); }
.pe-pose .pe-pose-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-pose .pe-pose-wrap { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.pe-pose .pe-pose-joints { flex: 1 1 520px; max-height: 300px; overflow-y: auto; }
.pe-pose .pe-soft-row { grid-template-columns: 110px 120px minmax(100px, 1fr) 44px; }
.pe-pose .pe-pose-view { flex: 0 0 auto; width: 300px; height: 300px; max-width: 100%; background: var(--bl-bg-deep, #1d1f23); border-radius: 4px; }
/* Scène 3D (point 44) : fenêtre des objets (cintre, chaise, table) et du mannequin de vitrine */
.pe-scn3d .pe-scn3d-f { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.pe-scn3d .pe-scn3d-f .pe-cost-in { width: 62px; }
.pe-scn3d .pe-scn3d-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.pe-scn3d .pe-scn3d-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.pe-scn3d .pe-scn3d-name { min-width: 56px; font-weight: 600; cursor: help; }
.pe-scn3d input[type=color] { width: 30px; height: 22px; padding: 0; border: 0; background: none; }
/* Mouvement du mannequin (point 74) : barre en haut de la vue 3D (lire, enregistrer image par image, relire) */
.v3d-mvt { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 6; display: none; flex-wrap: wrap; align-items: center; gap: 6px; max-width: calc(100% - 150px); padding: 5px 8px; border-radius: 10px; background: rgba(20, 22, 26, 0.92); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); color: #e6e9ee; font-size: 12px; }
.v3d-mvt.open { display: flex; }
.v3d-mvt-btn { height: 26px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 7px; background: rgba(255, 255, 255, 0.06); color: #e6e9ee; font: 600 12px var(--dv-font, "Segoe UI", system-ui, sans-serif); white-space: nowrap; cursor: pointer; }
.v3d-mvt-btn:hover { background: rgba(38, 122, 178, 0.25); border-color: rgba(108, 196, 255, 0.4); color: #fff; }
.v3d-mvt-btn.on { background: rgba(38, 122, 178, 0.45); border-color: #6cc4ff; }
.v3d-mvt-lab { font-weight: 600; white-space: nowrap; }
.v3d-mvt-lab.link { cursor: pointer; text-decoration: underline dotted rgba(255, 255, 255, 0.4); text-underline-offset: 3px; }
.v3d-mvt-msg { color: #b8bec6; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v3d-mvt-sl { width: 220px; max-width: 36vw; }
/* images clés (point 75) : losanges de la timeline sous le curseur de lecture */
.v3d-mvt-kf { color: #ffd479; }
/* caméra animée (point 76) : étiquette de la trajectoire dans la barre du haut de la vue 3D */
.v3d-mvt-cam { color: #8fd0ff; }
.v3d-mvt-tl { position: relative; display: inline-flex; align-items: center; padding-bottom: 12px; }
.v3d-mvt-key { position: absolute; bottom: -2px; width: 14px; height: 14px; margin-left: -7px; padding: 0; border: 0; background: none; color: #ffd479; font-size: 10px; line-height: 14px; cursor: pointer; }
.v3d-mvt-key:hover { color: #fff; }
/* fenêtre « Images clés » (point 75) : une piste par encadré, une ligne par image clé */
.pe-kf-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.pe-kf-track { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border: 1px solid rgba(127, 127, 127, 0.28); border-radius: 8px; }
.pe-kf-track > .pe-x3-row strong { flex: 1; }
.pe-kf-key { gap: 6px; align-items: center; }

/* Préférences › Thème (point 114) : sombre, clair, selon le système */
.pe-prefs-theme { display: flex; flex-direction: column; gap: 6px; }
.pe-prefs-theme-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 1px solid var(--bl-line, rgba(255,255,255,0.07)); border-radius: 6px; cursor: pointer; }
.pe-prefs-theme-row:hover { background: var(--bl-sel-soft, rgba(31,111,194,0.126)); }
.pe-prefs-theme-row.active { border-color: var(--bl-ring, rgba(31,111,194,0.385)); background: var(--bl-sel-soft, rgba(31,111,194,0.126)); }
.pe-prefs-theme-row input { flex: none; margin: 0; }
.pe-prefs-theme-swatch { flex: none; width: 46px; height: 30px; border-radius: 5px; border: 1px solid var(--bl-line-2, rgba(255,255,255,0.12)); }
.pe-prefs-theme-swatch.sombre { background: linear-gradient(90deg, #0a0c10 0 30%, #171b22 30% 100%); box-shadow: inset 0 -8px 0 #267ab2; }
.pe-prefs-theme-swatch.clair { background: linear-gradient(90deg, #c3c8d0 0 30%, #f6f7f9 30% 100%); box-shadow: inset 0 -8px 0 #267ab2; }
.pe-prefs-theme-swatch.systeme { background: linear-gradient(135deg, #171b22 0 50%, #f6f7f9 50% 100%); box-shadow: inset 0 -8px 0 #267ab2; }
.pe-prefs-theme-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; color: var(--bl-dim, #b8c2d0); }
.pe-prefs-theme-txt b { color: var(--bl-text, #f1f4f8); font-weight: 600; }
.pe-prefs-note { margin-top: 6px; font-size: 11.5px; color: var(--bl-muted, #8a94a4); }

/* Lumières et environnement (point 82) : fenêtre à droite, vue 3D visible derrière (aperçu en direct) */
.pe .pe-modal-overlay.pe-light-ov { justify-content: flex-end; align-items: stretch; padding: 46px 12px 12px; background: transparent; pointer-events: none; }
.pe .pe-light { pointer-events: auto; width: 560px; max-width: calc(100% - 24px); max-height: 100%; overflow-y: auto; }
.pe-light .pe-light-f { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.pe-light .pe-light-f input[type=range] { width: 96px; }
.pe-light .pe-light-val { min-width: 34px; font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--bl-dim, #b8c2d0); }
.pe-light .pe-light-user { gap: 4px; }
.pe-light .pe-light-chip { display: inline-flex; gap: 1px; }
.pe-light .pe-light-name { width: 150px; }
.pe-light .pe-light-wrap { display: flex; gap: 12px; align-items: flex-start; }
.pe-light .pe-light-plan { flex: none; width: 220px; height: 220px; border: 1px solid var(--bl-line-2, rgba(255, 255, 255, 0.12)); border-radius: 50%; cursor: grab; touch-action: none; }
.pe-light .pe-light-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pe-light .pe-light-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-bottom: 6px; border-bottom: 1px solid var(--bl-line, rgba(127, 127, 127, 0.2)); }
.pe-light .pe-light-row input[type=color] { width: 30px; height: 22px; padding: 0; border: none; background: none; }
.pe-light .pe-light-name2 { flex: 1 0 100%; font-size: 12px; font-weight: 600; }
.pe-light .pe-light-msg { min-height: 1em; }
.pe-light input:disabled, .pe-light button:disabled { opacity: 0.45; }
@media (max-width: 760px) { .pe-light .pe-light-wrap { flex-direction: column; } }

/* ---------- Tablette (point 109) : cibles du doigt agrandies (classe posée par plateforme.js) ---------- */
.is-tactile .pe .pe-tbox .pe-btn { width: 42px; height: 42px; }
.is-tactile .pe .pe-tbox .pe-btn svg { width: 22px; height: 22px; }
.is-tactile .pe .pe-ctx-item, .is-tactile .pe-ctx-item { min-height: 40px; }
.is-tactile .pe .pe-toolbar { height: 40px; }
.is-tactile .pe-menu-btn { height: 34px; padding: 0 12px; }
.is-tactile .pe-area-head { height: 38px; }
.is-tactile .v3d-btn, .is-tactile .v3d-select { height: 32px; min-width: 32px; flex-shrink: 0; } /* (min-width remplace le « auto » des flex : sans flex-shrink, les libellés de la barre 3D étaient rognés) */
.is-tactile .pe .pe-gutter::before { left: -9px; right: -9px; } /* (bord à glisser : zone d'appui élargie, même largeur affichée) */
/* appui long sur les vues (menu contextuel) : ni loupe ni bulle de copie du navigateur (iPad) */
.is-tactile .pe-canvas-wrap canvas, .is-tactile .v3d-canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* ---------- Formation (point 113) : visite guidée, leçons pas à pas, documentation intégrée (formation.js) ---------- */
.pe-welcome-learn { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.pe-welcome-learn-t { font-size: 12px; color: var(--pe-soft); }
.pe-tour-ring { position: absolute; z-index: 60; pointer-events: none; border: 2px solid #267ab2; border-radius: 10px; box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.35); transition: left 0.25s, top 0.25s, width 0.25s, height 0.25s; }
.pe-tour { position: absolute; z-index: 61; width: 300px; max-width: calc(100% - 24px); padding: 14px 16px; background: rgba(23, 27, 34, 0.98); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); color: var(--pe-text); font-size: 12.5px; line-height: 1.45; animation: pe-fade 0.2s both; }
.pe-tour-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pe-tour-eyebrow { font: 700 10px var(--dv-font); letter-spacing: 0.08em; text-transform: uppercase; color: #5aa6dc; }
.pe-tour-n { margin-left: auto; font-size: 11px; color: var(--pe-muted); }
.pe-tour-t { margin-bottom: 6px; font: 700 14px var(--dv-font); color: #fff; }
.pe-tour-x { color: var(--pe-soft); }
.pe-tour-btns { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.pe-tour-sp { flex: 1; }
.pe-tour-skip { padding: 0; border: none; background: none; color: var(--pe-muted); font: inherit; font-size: 11.5px; cursor: pointer; }
.pe-tour-skip:hover { color: #fff; }
.pe-tour .pe-action { height: 28px; }
.pe-tour .pe-action:disabled { opacity: 0.4; cursor: default; }
.pe-tour-next { background: #267ab2; border-color: #267ab2; color: #fff; }
.pe-tour-next:hover { background: #2f8cc9; border-color: #2f8cc9; }
.pe-tour-close { width: 24px; height: 24px; margin-left: 4px; padding: 0; border: none; border-radius: 6px; background: none; color: var(--pe-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.pe-tour-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.pe-lecon { left: auto; top: auto; right: 16px; bottom: 40px; width: 330px; z-index: 45; } /* (sous les fenêtres de l'atelier : rien ne s'ouvre par-dessus une fenêtre) */
.pe-lecon-steps { margin: 4px 0 0; padding-left: 20px; }
.pe-lecon-steps li { margin: 6px 0; color: var(--pe-muted); }
.pe-lecon-steps li.cur { color: var(--pe-text); }
.pe-lecon-steps li.done { color: var(--pe-muted); text-decoration: line-through; }
.pe-lecon-row { display: flex; gap: 6px; margin-top: 6px; }
.pe-lecon-bravo { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(38, 122, 178, 0.18); color: var(--pe-text); }
.pe-doc { position: relative; display: flex; width: min(980px, calc(100% - 32px)); height: min(680px, calc(100% - 32px)); background: rgba(23, 27, 34, 0.98); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); overflow: hidden; animation: pe-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pe-doc-side { display: flex; flex-direction: column; flex: none; width: 250px; border-right: 1px solid rgba(255, 255, 255, 0.08); }
.pe-doc-search { margin: 12px; height: 30px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; background: rgba(0, 0, 0, 0.25); color: var(--pe-text); font: inherit; }
.pe-doc-nav { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.pe-doc-rub { margin: 12px 6px 4px; font: 700 10px var(--dv-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pe-muted); }
.pe-doc-link { display: block; width: 100%; padding: 5px 8px; border: none; border-radius: 6px; background: none; color: var(--pe-soft); font: inherit; text-align: left; cursor: pointer; }
.pe-doc-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.pe-doc-link.active { background: rgba(38, 122, 178, 0.3); color: #fff; }
.pe-doc-vide { padding: 8px; color: var(--pe-muted); }
.pe-doc-main { flex: 1; min-width: 0; overflow-y: auto; padding: 22px 28px; color: var(--pe-soft); font-size: 13px; line-height: 1.55; }
.pe-doc-main h3 { margin: 2px 0 12px; font: 700 18px var(--dv-font); color: #fff; }
.pe-doc-main p { margin: 0 0 10px; }
.pe-doc-eyebrow { font: 700 10px var(--dv-font); letter-spacing: 0.08em; text-transform: uppercase; color: #5aa6dc; }
.pe-doc-steps { padding-left: 20px; }
.pe-doc-steps li { margin: 6px 0; }
.pe-doc-main h4.pe-doc-h { margin: 18px 0 8px; font: 700 13.5px var(--dv-font); color: #fff; }
.pe-doc-list { margin: 0 0 10px; padding-left: 20px; }
.pe-doc-list li { margin: 4px 0; }
.pe-doc-main .pe-doc-note { margin: 12px 0; }
.pe-doc-table-w { margin: 4px 0 12px; overflow-x: auto; }
.pe-doc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pe-doc-table th, .pe-doc-table td { padding: 6px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); text-align: left; vertical-align: top; }
.pe-doc-table th { font: 700 11px var(--dv-font); letter-spacing: 0.03em; color: var(--pe-muted); background: rgba(255, 255, 255, 0.04); }
.pe-doc-table td:first-child { color: var(--pe-text); font-weight: 600; white-space: nowrap; }
.pe-doc-voir { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.pe-doc-voir-t { margin-right: 4px; font: 700 10px var(--dv-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pe-muted); }
.pe-doc-voir-l { padding: 3px 9px; border: 1px solid rgba(90, 166, 220, 0.35); border-radius: 999px; background: none; color: #5aa6dc; font: inherit; font-size: 12px; cursor: pointer; }
.pe-doc-voir-l:hover { background: rgba(38, 122, 178, 0.18); color: #fff; }
.pe-doc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pe-doc-acts kbd { margin-left: 8px; padding: 1px 5px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 4px; font: 10.5px var(--dv-font-mono, monospace); color: var(--pe-muted); }
.pe-doc-x { position: absolute; top: 10px; right: 10px; }
/* tutoriels vidéo : lecteur dans l'aide, démonstration animée (pointeur, barre de progression de l'étape) */
.pe-doc-video { position: relative; margin: 6px 0 4px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.pe-doc-video iframe, .pe-doc-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pe-doc-video.lien { aspect-ratio: auto; padding: 14px; background: rgba(0, 0, 0, 0.25); }
.pe-doc-video.lien a { text-decoration: none; }
.pe-doc-note { padding: 10px 12px; border-radius: 8px; background: rgba(38, 122, 178, 0.14); color: var(--pe-text); }
/* (démonstration sous les fenêtres de l'atelier, comme la leçon : une fenêtre ouverte passe par-dessus et la suspend) */
.pe-demo { z-index: 48; }
.pe-tour-ring.pe-demo-ring { z-index: 46; }
.pe-doc-video-ext { display: inline-block; margin: 2px 0 4px; font-size: 11.5px; color: var(--pe-muted); }
.pe-demo-bar { height: 3px; margin-top: 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.pe-demo-bar > i { display: block; height: 100%; width: 100%; background: #267ab2; transform-origin: left; transform: scaleX(0); }
@keyframes pe-demo-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pe-demo-ptr { position: absolute; z-index: 47; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid #fff; border-radius: 50%; background: rgba(38, 122, 178, 0.55); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); pointer-events: none; transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1), top 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.pe-demo-ptr[hidden] { display: none; }
.pe-demo-ptr.clic::after { content: ""; position: absolute; inset: -2px; border: 2px solid #5aa6dc; border-radius: 50%; animation: pe-demo-clic 0.6s 0.7s ease-out both; }
@keyframes pe-demo-clic { from { transform: scale(1); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
@media (max-width: 640px) {
  .pe-doc { flex-direction: column; }
  .pe-doc-side { width: auto; max-height: 40%; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .pe-doc-main { padding: 16px; }
  .pe-lecon { right: 8px; left: 8px; width: auto; }
}

/* ---------- Tableau de collection (point 95) : page des projets, vue « Collection » ---------- */
.pat-ghost.on { background: var(--dv-accent-soft); border-color: var(--dv-accent-line); color: var(--dv-text); }
.pat-history.col-mode { margin-top: 28px; }
.col-wrap { outline: none; }
.col-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.col-filters, .col-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.col-filters select, .col-btn { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--dv-line-2); background: var(--dv-card); color: var(--dv-text); font: 12.5px var(--dv-font-text); cursor: pointer; }
.col-filters select.on { border-color: var(--dv-accent-line); background: var(--dv-accent-soft); }
.col-btn:hover:not(:disabled) { border-color: var(--dv-accent-line); }
.col-btn:disabled { opacity: 0.45; cursor: default; }
.col-check { display: inline-flex; align-items: center; gap: 6px; font: 12.5px var(--dv-font-text); color: var(--dv-soft); cursor: pointer; }
.col-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.col-kpi { font: 600 13px var(--dv-font); color: var(--dv-text); margin-right: 8px; }
.col-st { height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--dv-line-2); background: var(--dv-card); color: var(--dv-soft); font: 12px var(--dv-font-text); cursor: pointer; }
.col-st-early { border-color: rgba(150, 150, 160, 0.5); }
.col-st-proto { border-color: rgba(58, 143, 200, 0.6); color: var(--dv-accent-ink); }
.col-st-late { border-color: rgba(214, 160, 40, 0.65); }
.col-st-ok { border-color: rgba(60, 170, 100, 0.7); }
.col-st-drop { border-color: rgba(200, 80, 80, 0.6); text-decoration: line-through; }
.col-scroll { overflow: auto; max-height: calc(100vh - 300px); border: 1px solid var(--dv-line-2); border-radius: 12px; background: var(--dv-panel); }
.col-table { width: 100%; border-collapse: collapse; font: 13px var(--dv-font-text); color: var(--dv-text); }
.col-table th { position: sticky; top: 0; z-index: 1; padding: 9px 8px; text-align: left; white-space: nowrap; font: 600 11px var(--dv-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dv-muted); background: var(--dv-card); border-bottom: 1px solid var(--dv-line-2); }
.col-table th.sortable { cursor: pointer; }
.col-table th.sortable:hover { color: var(--dv-text); }
.col-dir { color: var(--dv-accent-ink); }
.col-table td { padding: 5px 8px; border-bottom: 1px solid var(--dv-line); vertical-align: middle; }
.col-table tbody tr:hover td { background: var(--dv-accent-soft); }
.col-table .num { text-align: right; }
.col-table td input, .col-table td select { width: 100%; min-width: 90px; height: 28px; padding: 0 6px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--dv-text); font: 13px var(--dv-font-text); }
.col-table td input:hover, .col-table td select:hover { border-color: var(--dv-line-2); }
.col-table td input:focus, .col-table td select:focus { outline: none; border-color: var(--dv-accent-line); background: var(--dv-card); }
.col-table td select option { background: var(--dv-panel); color: var(--dv-text); }
.col-table td.num input { text-align: right; min-width: 80px; }
.col-table select.col-st-sel { min-width: 175px; border-left-width: 3px; }
.col-group td { padding: 10px 8px 6px; background: var(--dv-card); font: 12.5px var(--dv-font-text); color: var(--dv-soft); }
.col-group b { margin-right: 6px; font: 700 13.5px var(--dv-font); color: var(--dv-text); }
.col-ap { width: 56px; }
.col-ap svg { display: block; width: 48px; height: 36px; overflow: visible; }
.col-name { padding: 0; border: 0; background: none; color: var(--dv-text); font: 700 13.5px var(--dv-font); text-align: left; cursor: pointer; }
.col-name:hover { color: var(--dv-accent-ink); text-decoration: underline; }
.col-sub { display: block; color: var(--dv-muted); font-size: 11.5px; }
.col-cws { min-width: 150px; }
.col-cw { display: inline-flex; align-items: center; gap: 5px; margin: 2px 10px 2px 0; white-space: nowrap; font-size: 12px; color: var(--dv-soft); }
.col-sw { display: inline-flex; }
.col-sw i { width: 13px; height: 13px; margin-right: -3px; border-radius: 50%; border: 1px solid var(--dv-line-2); }
.col-date { white-space: nowrap; color: var(--dv-muted); font-size: 12px; }
.col-note { margin: 10px 2px 0; font: 12px var(--dv-font-text); color: var(--dv-muted); }
/* Stockage en ligne (point 93, synchro.js) : fenêtre ouverte depuis la page des projets */
.pe-modal-overlay.pe-sync-ov { position: fixed; z-index: 400; }
.pe-batch.pe-sync { width: min(640px, 96vw); max-height: 92vh; overflow: auto; }
.pe-sync .pe-action { height: 30px; padding: 0 12px; }
.pe-sync-state { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 8px; font: 13px var(--dv-font-text); color: var(--dv-text); }
.pe-sync-dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #8a8f98; }
.pe-sync-dot[data-etat="ok"] { background: #3fb57a; }
.pe-sync-dot[data-etat="en-cours"] { background: #267ab2; animation: pe-fade 0.8s ease-in-out infinite alternate; }
.pe-sync-dot[data-etat="indisponible"], .pe-sync-dot[data-etat="hors-ligne"] { background: #d8a03c; }
.pe-sync-dot[data-etat="erreur"], .pe-sync-dot[data-etat="plein"] { background: #e0675c; }
.pe-sync-note { margin: 4px 0 8px; font: 12px var(--dv-font-text); color: var(--dv-muted); }
.pe-sync-info { margin-top: 8px; font: 12px var(--dv-font-text); color: var(--dv-soft); }
.pe-sync-det { margin: 4px 0 0 18px; padding: 0; font: 12px var(--dv-font-text); color: var(--dv-soft); }
.pe-sync-ret { display: flex; flex-direction: column; gap: 4px; font: 12px var(--dv-font-text); color: var(--dv-soft); }
.pe-sync-ret .pe-x3-row { justify-content: space-between; }

/* ---------- Revue et partage (point 94, revue.js) : panneau de la vue 3D, pastilles des commentaires ---------- */
.rv-panel { position: absolute; right: 8px; top: 44px; max-height: calc(100% - 96px); width: 236px; z-index: 6; display: flex; flex-direction: column; gap: 6px; padding: 10px; overflow: auto; background: var(--bl-panel, #171b22); border: 1px solid var(--bl-line-2, rgba(255, 255, 255, 0.12)); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); font: 12px var(--dv-font-text); color: var(--dv-soft, #c9ced6); }
.rv-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #fff; }
.rv-head .rv-count { flex: 1; color: var(--dv-muted, #8a929e); font-size: 11px; }
.rv-x { background: none; border: 0; color: var(--dv-muted, #8a929e); font-size: 18px; line-height: 1; cursor: pointer; }
.rv-x:hover { color: #fff; }
.rv-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rv-row input { flex: 1; min-width: 0; }
.rv-mode.active { background: var(--bl-sel, rgba(31, 111, 194, 0.35)); color: #fff; }
.rv-chk { display: flex; gap: 4px; align-items: center; color: var(--dv-muted, #8a929e); }
.rv-msg, .rv-dmsg { padding: 6px 8px; border-radius: 4px; background: rgba(216, 160, 60, 0.14); color: #e7c27c; }
.rv-dmsg.ok { background: rgba(38, 122, 178, 0.16); color: #9cc8ea; }
.rv-source { padding: 6px 8px; border-radius: 4px; background: rgba(38, 122, 178, 0.14); display: flex; flex-direction: column; gap: 6px; }
.rv-list { display: flex; flex-direction: column; gap: 6px; }
.rv-item { padding: 6px 8px; border-radius: 4px; background: var(--bl-widget, #1d222a); border: 1px solid transparent; cursor: pointer; }
.rv-item.focus { border-color: #267ab2; }
.rv-item.resolu { opacity: 0.6; }
.rv-it-t { color: var(--dv-muted, #8a929e); font-size: 11px; }
.rv-it-t b { color: #fff; margin-right: 2px; }
.rv-it-txt { margin: 3px 0; color: #e8e8ea; white-space: pre-wrap; word-break: break-word; }
.rv-rep { margin: 2px 0 2px 8px; color: var(--dv-soft, #c9ced6); white-space: pre-wrap; word-break: break-word; }
.rv-a { background: none; border: 0; padding: 2px 4px; color: #6fb0e0; cursor: pointer; font: inherit; }
.rv-a:hover { text-decoration: underline; }
.rv-pins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.rv-pin { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; border: 2px solid #fff; background: #267ab2; color: #fff; font: 700 11px var(--dv-font-text); line-height: 18px; padding: 0; text-align: center; cursor: pointer; pointer-events: auto; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }
.rv-pin.resolu { background: #5a6370; }
.rv-pin.focus { background: #e0675c; }
.rv-pin.cache { opacity: 0.35; }
.rv-commenter canvas { cursor: crosshair; }
.rv-saisie { position: absolute; z-index: 7; width: 260px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bl-panel, #171b22); border: 1px solid #267ab2; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4); }
.rv-saisie-t { font: 600 12px var(--dv-font-text); color: #fff; }
.rv-saisie textarea, .rv-saisie input { width: 100%; box-sizing: border-box; resize: vertical; }
.rv-dialog { width: min(620px, 94vw); }
.rv-off { margin: 6px 0; padding: 8px 10px; border-radius: 4px; background: rgba(216, 160, 60, 0.14); color: #e7c27c; font: 12px var(--dv-font-text); }
.rv-version { display: flex; gap: 8px; align-items: center; padding: 6px 8px; margin: 4px 0; border-radius: 4px; background: rgba(38, 122, 178, 0.16); font: 12px var(--dv-font-text); }
.rv-url { flex: 1; min-width: 0; font: 12px var(--dv-font-mono, monospace); }
.rv-membre { justify-content: space-between; }
.rv-membre .rv-mail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-role { color: var(--dv-muted, #8a929e); font: 11px var(--dv-font-text); }
/* ---------- Rangement de l'interface : sous-menus, clavier, colonnes d'outils groupées, vue 3D allégée ---------- */
.pe .pe-menu { overflow-y: auto; scrollbar-width: thin; }
.pe .pe-ctx-item.focus:not(:disabled), .pe .pe-ctx-item.sub-open { background: var(--bl-sel); color: #fff; }
.pe .pe-ctx-item.focus:not(:disabled) kbd, .pe .pe-ctx-item.sub-open kbd { color: #dfe8f7; }
.pe-menu-sub { flex: none; width: 12px; height: 12px; margin-left: auto; display: grid; place-items: center; color: #9a9a9a; }
.pe-menu-sub svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pe .pe-ctx-item.sub-open .pe-menu-sub, .pe .pe-ctx-item.focus .pe-menu-sub { color: #fff; }
.pe .pe-ctx-item.pe-has-sub kbd { display: none; }
.pe .pe-submenu { z-index: 71; }
.pe-menu-empty { padding: 4px 10px; color: #8a8a8a; font: 400 12px var(--dv-font-text); }
.pe-menu-ico.check.radio { border-radius: 50%; }
.pe-menu-ico.check.radio.on::after { width: 4px; height: 4px; margin: 0; border: 0; border-radius: 50%; background: #fff; transform: none; }
.pe .pe-flyout .pe-ctx-item.on { color: #6cc4ff; }
.pe .pe-flyout .pe-ctx-item.on:hover, .pe .pe-flyout .pe-ctx-item.on.focus { color: #fff; }
/* colonnes d'outils groupées : un bouton par groupe, triangle = menu volant (clic long ou clic sur le triangle) */
.pe-tgroup, .v3d-tgroup { position: relative; }
.v3d-tgroup { display: flex; flex-direction: column; gap: 3px; }
.pe-tfly-mark { display: none; position: absolute; right: 1px; bottom: 1px; z-index: 1; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 2px; background: transparent; cursor: pointer; }
.pe-tfly-mark::before { content: ""; position: absolute; right: 2px; bottom: 2px; border: 3px solid transparent; border-right-color: rgba(255, 255, 255, 0.42); border-bottom-color: rgba(255, 255, 255, 0.42); }
.pe-tfly-mark:hover::before { border-right-color: #fff; border-bottom-color: #fff; }
.pe-fly > .pe-tfly-mark { display: block; }
.v3d-tgroup > .pe-tfly-mark { right: 2px; bottom: 2px; }
.is-tactile .pe-tfly-mark { width: 16px; height: 16px; }
.is-tactile .pe-tfly-mark::before { border-width: 5px; }
/* fenêtre « Options de la vue 3D » : toutes les sections, défilement si la zone est basse */
.v3d-pop { max-height: calc(100% - 56px); overflow-y: auto; scrollbar-width: thin; }
.v3d-pop-title { scroll-margin-top: 6px; }
/* entête 3D : menus de zone puis Simuler, Réarranger, taille ; la barre ne défile plus que sur une zone très étroite */
.pe-area-head .v3d-bar { margin-left: 6px; }
@media (max-width: 980px) { .pe-menus .pe-menu-btn { padding: 0 6px; } .pe-ai-btn span { display: none; } }
/* barre du haut à 7 menus : Assistant IA et Fiche technique sur une ligne ; sous 1180 px, l'assistant en icône */
.pe .pe-ai-btn, .pe .pe-tp-cta { white-space: nowrap; flex: none; }
@media (max-width: 1180px) { .pe .pe-ai-btn { padding: 0 8px; gap: 0; } .pe .pe-ai-btn span { display: none; } }
.v3d-vo-top { display: flex; align-items: center; justify-content: space-between; margin-top: 0; }
.v3d-vo-x { flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #9a9a9a; font: 16px/1 var(--dv-font-text); cursor: pointer; }
.v3d-vo-x:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.pe-prefs-colrow { display: flex; align-items: center; gap: 8px; padding: 3px 2px; font: 12px var(--dv-font-text); color: var(--bl-text); cursor: pointer; }
/* entêtes de zone étroites (3D à côté de la 2D sur un petit écran) : le nom de la zone s'efface, puis Sélection et
   Ajouter (aussi dans la barre du haut : Édition › Sélection, Ajouter) ; les modes d'affichage restent visibles */
.pe-area-head { container-type: inline-size; }
.pe-area-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 480px) { .pe-area-head > .pe-area-name { display: none; } .pe-area-head > .pe-menu-btn { padding: 0 5px; } }
@container (max-width: 400px) { .pe-area-head > .pe-menu-btn ~ .pe-menu-btn { display: none; } }

/* Colonnes d'outils (05/11), au visuel d'origine : outils 2D par groupes, outils 3D dans une 2e colonne à côté */
.pe-tbox.pe-railbox { flex-direction: row; align-items: flex-start; gap: 6px; }
.pe-tcol { display: flex; flex-direction: column; gap: 6px; }
.pe-tcol:empty { display: none; }
.pe-rail-sep { height: 1px; margin: 2px 4px; background: rgba(255, 255, 255, 0.12); }
/* outils 3D dans la colonne de gauche : la barre de la vue 3D n'apparaît que si la colonne est cachée (3D agrandie, placement) */
.pe-area-2d:not(.pe-ws-hidden):has(.pe-tbox.pe-railbox:not(.off)) ~ .pe-area-3d .v3d-tools { display: none; }
/* Croquis de la page Dessin rattachés au projet (Explorateur, fenêtre du croquis) */
.pe .pe-croquis-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pe-croquis-thumb { flex: none; width: 22px; height: 31px; object-fit: contain; background: #fff; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 2px; }
.pe-croquis-modal { max-width: min(560px, 92vw); }
.pe-croquis-big { display: block; max-width: 100%; max-height: 62vh; margin: 8px auto 12px; background: #fff; border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4); }

/* Tableau de mesures par taille, marges par bord */
.pe-batch.pe-chart { width: min(860px, 96vw); }
.pe-chart-wrap { max-height: 56vh; overflow: auto; margin: 8px 0; border: 1px solid var(--pe-line, rgba(255,255,255,0.12)); border-radius: 8px; }
.pe-chart-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.pe-chart-table th, .pe-chart-table td { padding: 3px 6px; text-align: left; white-space: nowrap; }
.pe-chart-table th { position: sticky; top: 0; background: var(--pe-panel, #1b1b1f); z-index: 1; font-weight: 600; }
.pe-chart-table th.base { color: var(--dv-accent, #4aa3ff); }
.pe-chart-table tr:hover td { background: rgba(127, 127, 127, 0.1); }
.pe-chart-table .pe-chart-name { color: var(--pe-muted); }
.pe-chart-table input.pe-cost-in { width: 64px; }
/* Renommer un projet (clic droit sur sa carte) : le champ prend la place du nom */
.pat-rename { width: 100%; height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid rgba(125, 157, 189, 0.6); background: rgba(0, 0, 0, 0.35); color: #fff; font: 600 14px var(--dv-font); outline: none; box-shadow: 0 0 0 3px rgba(31, 111, 194, 0.18); }
html[data-theme="clair"] .pat-rename { background: #fff; color: #111418; }
