.pt-directory, .pt-atelier {
  --pt-paper: #fafcf9;
  --pt-warn: #9b2925;
  box-sizing: border-box;
  color: var(--pt-ink);
  font-family: PlacecoBody, system-ui, sans-serif;
  font-size: 14px;
}
.pt-atelier *, .pt-directory * { box-sizing: border-box; }
.pt-directory h1, .pt-atelier h1, .pt-directory h2, .pt-atelier h2, .pt-atelier h3, .pt-directory strong, .pt-atelier strong {
  font-family: PlacecoHeading, system-ui, sans-serif; margin: 0; line-height: 1.2;
}
.pt-atelier p, .pt-directory p { margin: 0; line-height: 1.5; }
.pt-directory button, .pt-atelier button, .pt-atelier select, .pt-directory input, .pt-atelier input {
  font: inherit; color: inherit; border: 1px solid var(--pt-line);
  padding: 8px 11px; border-radius: 5px; background: #fff; min-height: 42px;
}
.pt-directory input, .pt-atelier input, .pt-atelier select { width: 100%; font-size: 16px; }
.pt-directory button, .pt-atelier button { font-family: PlacecoButton, system-ui, sans-serif; cursor: pointer; }
.pt-directory button:hover, .pt-atelier button:hover { border-color: #417658; }
.pt-directory button:disabled, .pt-atelier button:disabled { opacity: .45; cursor: default; }
.pt-atelier :focus-visible, .pt-directory :focus-visible { outline: 3px solid #2863c9; outline-offset: 2px; }
.pt-directory .pt-primary, .pt-atelier .pt-primary { background: var(--pt-accent); border-color: #3a7955; color: #16271c; }
.pt-atelier button[aria-pressed="true"] { background: var(--pt-mint); border-color: #42785a; }
.pt-atelier .pt-tool, .pt-directory .pt-tool { display: inline-flex; flex: none; gap: 7px; align-items: center; justify-content: center; white-space: nowrap; }
.pt-atelier .pt-tool svg, .pt-directory .pt-tool svg { flex: none; }
.pt-atelier .pt-compact { min-width: 42px; padding: 8px; }
.pt-atelier .pt-compact span { display: none; }
.pt-directory { position: fixed; inset: 0; z-index: 3; overflow: auto; background: var(--pt-fog); }
.pt-directory-header { display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left)); background: #fff; border-bottom: 1px solid var(--pt-line); }
.pt-directory-body { display: grid; gap: 19px; width: min(1040px, 100%); margin: auto; padding: clamp(16px, 4vw, 36px); }
.pt-directory-intro { display: flex; gap: 15px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.pt-directory-intro h1 { font-size: clamp(26px, 5vw, 42px); margin-bottom: 5px; }
.pt-directory-intro p { color: #4e5952; }
.pt-project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; }
.pt-directory .pt-project { display: grid; min-height: 110px; gap: 6px; text-align: left; padding: 15px; }
.pt-project svg { color: #347653; }
.pt-project strong { font-size: 17px; }
.pt-project span, .pt-build { font-size: 12px; color: #566359; }
.pt-new-project { display: grid; width: min(100%, 540px); gap: 11px; padding: 18px; border: 1px solid var(--pt-line); background: #fff; border-radius: 7px; }
.pt-directory label, .pt-atelier label { display: grid; gap: 4px; font-family: PlacecoHeading, system-ui, sans-serif; }
.pt-atelier { position: fixed; inset: 0; z-index: 4; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100dvh; background: #fff; overflow: hidden; }
.pt-workspace-head { min-width: 0; }
.pt-sheet-bar { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 5px max(9px, env(safe-area-inset-right)) 5px max(9px, env(safe-area-inset-left)); border-bottom: 1px solid var(--pt-line); }
.pt-sheet-tabs { display: flex; gap: 5px; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-inline: contain; }
.pt-atelier .pt-sheet-tabs button { display: grid; gap: 1px; align-content: center; flex: 0 0 auto; max-width: min(245px, 58vw); text-align: left; min-height: 43px; }
.pt-sheet-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-sheet-tabs button small { font-size: 11px; }
.pt-atelier .pt-sheet-tabs [aria-current] { border-color: #42785a; background: var(--pt-mint); }
.pt-sheet-form { display: grid; gap: 9px; }
.pt-plinth-tool { display: flex; flex: 0 0 auto; gap: 2px; align-items: stretch; }
.pt-atelier .pt-plinth-arrow { min-width: 42px; padding-inline: 7px; }
.pt-plinth-arrow span { font-size: 19px; line-height: 1; }
.pt-plinth-menu { position: absolute; z-index: 9; left: 12px; bottom: 12px; width: min(240px, calc(100% - 24px));
  display: grid; gap: 5px; padding: 6px; border: 1px solid var(--pt-line); border-radius: 7px; background: #fff; }
.pt-plinth-mode, .pt-plinth-spans { padding: 8px 0; border-bottom: 1px solid var(--pt-line); }
.pt-plinth-mode p { margin-top: 4px; }
.pt-plinth-spans button { display: block; width: 100%; margin-top: 5px; text-align: left; }
.pt-roof-actions { position: absolute; z-index: 3; right: 8px; bottom: 57px; display: flex; flex-wrap: wrap;
  justify-content: flex-end; gap: 4px; max-width: calc(100% - 70px); }
.pt-bar { display: flex; align-items: center; gap: 10px; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); border-bottom: 1px solid var(--pt-line); }
.pt-title { flex: 1; min-width: 0; }
.pt-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(16px, 2.2vw, 22px); }
.pt-title span { color: #486755; font-size: 11px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.pt-bar-actions { display: flex; gap: 5px; align-items: center; }
.pt-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--pt-paper); }
.pt-paper { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: crosshair; }
.pt-paper text { font-family: PlacecoHeading, system-ui, sans-serif; user-select: none; }
.pt-north { position: absolute; bottom: 12px; right: 12px; display: grid; justify-items: center; padding: 4px 8px; background: white; border: 1px solid var(--pt-line); border-radius: 6px; pointer-events: none; }
.pt-north span { color: var(--pt-ink); font-size: 24px; line-height: 1; }
.pt-north b { font-size: 12px; }
.pt-stage-top { display: flex; pointer-events: none; align-items: flex-start; justify-content: space-between; gap: 8px; position: absolute; inset: 9px 10px auto; }
.pt-stage-tools { display: flex; gap: 5px; pointer-events: auto; }
.pt-hint { background: #fffffff0; padding: 7px 10px; display: grid; gap: 2px; max-width: 330px; border: 1px solid var(--pt-line); border-radius: 5px; }
.pt-hint span { font-size: 12px; color: #455249; }
.pt-room-chooser { pointer-events: auto; color: var(--pt-ink); }
.pt-room-chooser summary { display: list-item; cursor: pointer; align-content: center; min-height: 44px; font-size: 13px; font-weight: 700; }
.pt-room-chooser > div { display: grid; gap: 6px; padding: 0 0 6px; }
.pt-room-chooser label { font-size: 12px; }
.pt-room-chooser select, .pt-room-chooser input:not([type="checkbox"]) { display: block; width: 100%; min-height: 40px; }
.pt-zoom { display: grid; gap: 4px; position: absolute; bottom: 12px; left: 9px; }
.pt-selection { position: absolute; bottom: 12px; right: 10px; display: flex; gap: 8px; align-items: center; background: #fff; padding: 5px; border: 1px solid var(--pt-line); border-radius: 6px; max-width: calc(100% - 66px); }
.pt-selection span { padding-left: 5px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-selection button { white-space: nowrap; }
.pt-polygon { position: absolute; bottom: 10px; right: 10px; }
.pt-status { z-index: 5; position: absolute; left: 59px; bottom: 68px; right: 12px; margin-right: auto; width: max-content; max-width: calc(100% - 72px); border-radius: 5px; padding: 7px 9px; background: #f7eddb; border: 1px solid #e4cfaa; font-size: 12px; pointer-events: none; }
.pt-conflict { z-index: 7; position: absolute; padding: 14px; display: flex; flex-wrap: wrap; gap: 9px; bottom: 9px; left: min(17vw, 120px); right: 10px; background: #fff6e3; border: 1px solid #c69d57; border-radius: 6px; }
.pt-conflict strong { width: 100%; }
.pt-pane { position: absolute; z-index: 6; top: 54px; right: 9px; bottom: 9px; width: min(375px, calc(100% - 72px)); overflow: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--pt-line); border-radius: 7px; box-shadow: 0 6px 25px #24372b25; }
.pt-pane > header { z-index: 1; position: sticky; top: 0; display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 11px; border-bottom: 1px solid var(--pt-line); background: #fff; }
.pt-pane > header h2 { font-size: 17px; }
.pt-pane > p, .pt-pane > button { margin: 10px; }
.pt-inspector-content { display: grid; gap: 10px; padding: 12px; }
.pt-properties { padding: 0; }
.pt-position { border-top: 1px solid var(--pt-line); padding-top: 9px; }
.pt-position summary { cursor: pointer; min-height: 42px; padding-block: 9px; font-weight: 600; }
.pt-inspector-content fieldset { display: grid; gap: 9px; padding: 0; border: 0; margin: 0; min-width: 0; }
.pt-inspector-content h3 { font-size: 16px; }
.pt-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 7px; }
.pt-atelier .pt-check { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.pt-check input[type="checkbox"], .pt-layer-controls input[type="range"] { width: auto; min-height: auto; accent-color: #317851; }
.pt-check input[type="checkbox"] { width: 19px; height: 19px; flex: none; padding: 0; }
.pt-missing, .pt-warning { color: var(--pt-warn); }
.pt-missing input { border-color: #cb766e; background: #fff6f5; }
.pt-atelier .pt-danger-button { color: var(--pt-warn); }
.pt-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pt-layer { padding-bottom: 8px; border-bottom: 1px solid var(--pt-line); }
.pt-layer i, .pt-symbols i, .pt-active-layer i { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 2px; }
.pt-layer-controls { display: flex; justify-content: space-between; gap: 7px; align-items: center; }
.pt-layer-controls input { width: 75px !important; }
.pt-layer-controls label { font-size: 11px; }
.pt-layer-controls button { min-height: 37px; }
.pt-symbols { grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); }
.pt-symbols button { display: flex; align-items: center; gap: 6px; text-align: left; }
.pt-measure { display: grid; gap: 3px; padding: 9px; border: 1px solid var(--pt-line); background: #f6faf6; border-radius: 5px; }
.pt-media-list { display: grid; gap: 6px; }
.pt-bottom { z-index: 8; display: flex; align-items: center; flex-wrap: wrap; min-width: 0; gap: 6px 10px; border-top: 1px solid var(--pt-line); padding: 6px max(9px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left)); background: #fff; }
.pt-atelier .pt-fold { min-height: 34px; font-size: 11px; padding: 4px 7px; }
.pt-active-layer { display: flex; align-items: center; min-width: 0; gap: 5px; font-size: 12px; }
.pt-atelier .pt-active-layer select { width: auto; font-size: 13px; min-height: 34px; padding: 4px 5px; }
.pt-toolbar { flex: 1 1 330px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-inline: contain; }
.pt-toolbar .pt-tool { flex-direction: column; gap: 2px; min-width: 53px; font-size: 11px; padding: 4px 6px; }
.pt-toolbar .pt-tool svg { width: 20px; height: 20px; }
.pt-original { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; background: #171f19b0; padding: 15px; }
.pt-original > div { display: grid; padding: 10px; gap: 8px; min-width: min(100%, 280px); background: #fff; border-radius: 6px; }
.pt-original img { max-width: min(85vw, 800px); max-height: 65vh; object-fit: contain; }
.pt-original .pt-tool { justify-self: end; }
.pt-load { padding: 25px; display: grid; gap: 8px; place-content: center; text-align: center; }
@media (max-width: 1040px) {
  .pt-bar-actions { min-width: 0; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-inline: contain; }
  .pt-bar-actions .pt-tool:not(.pt-compact) { flex-direction: column; min-width: 48px; font-size: 10px; gap: 2px; line-height: 1.15; }
}
@media (max-width: 610px) {
  .pt-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px; padding-inline: 6px; }
  .pt-bar-actions { grid-column: 1 / -1; }
  .pt-bar-actions .pt-tool { padding: 5px; }
  .pt-bar-actions .pt-tool:not(.pt-compact) { flex-direction: column; min-width: 43px; font-size: 8px; gap: 1px; line-height: 1.1; }
  .pt-bar-actions .pt-tool:not(.pt-compact) span { display: inline; }
  .pt-bar .pt-tool svg { width: 19px; height: 19px; }
  .pt-title span { font-size: 10px; }
  .pt-hint { max-width: min(52vw, 250px); }
  .pt-hint span { font-size: 10px; line-height: 1.3; }
  .pt-atelier .pt-stage-tools .pt-tool { min-width: 36px; min-height: 37px; padding: 5px; }
  .pt-stage-top { gap: 4px; inset: 6px 6px auto; }
  .pt-zoom { bottom: 7px; left: 6px; }
  .pt-selection { right: 6px; bottom: 7px; font-size: 12px; }
  .pt-pane { top: auto; max-height: 65%; bottom: 6px; right: 6px; width: min(398px, calc(100% - 43px)); }
  .pt-toolbar { flex-basis: 100%; }
}
@media (orientation: landscape) and (max-height: 530px) {
  .pt-bar { padding-block: 4px; }
  .pt-bottom { flex-wrap: nowrap; padding-block: 3px; }
  .pt-toolbar { flex-basis: 100px; }
  .pt-zoom { grid-auto-flow: column; }
  .pt-zoom .pt-tool { min-height: 37px; min-width: 37px; padding: 5px; }
  .pt-pane { top: 4px; max-height: none; }
}

.pt-elevation { width: 100%; height: 185px; background: #f7faf7; border: 1px solid var(--pt-line); border-radius: 5px; }

.pt-work-area {
  --pt-notebook-track: clamp(min(225px, 35%), var(--pt-notebook-size, 34%), 61%);
  display: grid; grid-template: "plan" minmax(0, 1fr) / minmax(0, 1fr); min-width: 0; min-height: 0;
}
.pt-work-area > .pt-stage { grid-area: plan; }
.pt-work-area[data-notebook="docked"] {
  grid-template: "plan resize notes" minmax(0, 1fr) / minmax(0, 1fr) 23px var(--pt-notebook-track);
}
.pt-work-area[data-notebook="docked"][data-notebook-side="left"] {
  grid-template: "notes resize plan" minmax(0, 1fr) / var(--pt-notebook-track) 23px minmax(0, 1fr);
}
.pt-work-area[data-notebook="full"] > .pt-stage { visibility: hidden; }
.pt-work-area[data-notebook="full"] > .pt-notebook { grid-area: plan; }
.pt-notebook-divider {
  grid-area: resize; z-index: 1; display: grid; place-items: center; cursor: col-resize;
  background: var(--pt-fog); border-inline: 1px solid var(--pt-line); touch-action: none;
}
.pt-notebook-divider span { width: 4px; height: 42px; border-radius: 2px; background: #547262; }
.pt-notebook-divider:hover, .pt-notebook-divider:focus-visible { background: var(--pt-mint); }
.pt-notebook { grid-area: notes; display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; background: #fff; }
.pt-notebook[hidden] { display: none; }
.pt-notebook > header { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: space-between; padding: 8px; border-bottom: 1px solid var(--pt-line); }
.pt-notebook > header h2 { font-size: 17px; }
.pt-notebook-body { display: flex; flex-direction: column; align-items: stretch; gap: 9px; min-height: 0; overflow: auto; padding: 10px 10px 25px; overscroll-behavior: contain; }
.pt-notebook-status { font-size: 13px; margin: 0; color: #365c47; }
.pt-notebook-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pt-notebook-actions .pt-tool { white-space: normal; }
.pt-notebook .pt-sheet-tabs { min-height: 45px; flex: none; }
.pt-notebook-body label { display: grid; gap: 4px; font-size: 14px; }
.pt-notebook textarea { resize: vertical; min-height: 86px; width: 100%; font-size: 16px; border: 1px solid var(--pt-line); border-radius: 5px; padding: 8px; font: inherit; }
.pt-notebook-pad { display: grid; gap: 6px; }
.pt-notebook-pad > svg { width: 100%; aspect-ratio: 10 / 7; background: #fff; border: 1px solid var(--pt-line); border-radius: 5px; touch-action: none; }
@media (max-width: 660px) {
  .pt-work-area { --pt-notebook-track: clamp(min(120px, 35%), var(--pt-notebook-size, 34%), 61%); }
  .pt-work-area[data-notebook="docked"] {
    grid-template: "plan" minmax(0, 1fr) "resize" 23px "notes" var(--pt-notebook-track) / minmax(0, 1fr);
  }
  .pt-work-area[data-notebook="docked"][data-notebook-side="left"] {
    grid-template: "notes" var(--pt-notebook-track) "resize" 23px "plan" minmax(0, 1fr) / minmax(0, 1fr);
  }
  .pt-notebook-divider { cursor: row-resize; border-inline: 0; border-block: 1px solid var(--pt-line); }
  .pt-notebook-divider span { width: 42px; height: 4px; }
}

.pt-title .pt-workshop-mode { width: fit-content; background: var(--pt-mint); color: #143c28; border-radius: 4px; padding: 2px 5px; font-weight: 700; }
.pt-title .pt-workshop-mode[data-editing="true"] { background: #ffebc6; color: #533107; }
.pt-face { cursor: pointer; outline: 0; }
.pt-face:focus-visible > rect { stroke: #103578; stroke-width: 3px; }
.pt-alert-item { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--pt-line); border-left: 4px solid var(--pt-accent); border-radius: 6px; }
.pt-alert-item[data-severity="avertissement"] { border-left-color: #a26414; }
.pt-alert-item[data-severity="erreur"] { border-left-color: #ab2525; }
.pt-alert-item > span { color: #435349; font-size: .85em; }
.pt-alert-item button { justify-self: start; margin-top: 4px; }
