/* Common extensible rail. Groups keep their control identities across stages. */
.editor-active .editor-heading{height:auto;min-height:58px;flex-wrap:wrap;gap:4px 12px;padding-bottom:0}
.editor-active .editor-heading .editor-toolbar{position:relative;inset:auto;display:flex;flex:0 0 100%;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:0;margin:0;padding:5px 0;min-height:52px;max-width:100%;overflow-x:auto;pointer-events:auto;background:transparent;scrollbar-width:thin}
.editor-active .editor-toolbar .toolbar-group{display:flex;flex:none;align-items:center;justify-content:flex-start;gap:4px;padding:0 8px;margin:0;border:0;border-right:1px solid #8ba5b355;border-radius:0;background:transparent;pointer-events:auto;white-space:nowrap}
.editor-active .editor-toolbar .toolbar-group:last-child{border-right:0}
.editor-active .editor-toolbar button{font-size:12px;min-height:40px;padding:5px 7px;white-space:nowrap;width:auto;margin:0;background:var(--surface);color:var(--ink)}
.editor-active .editor-toolbar button[aria-pressed=true]{border-color:#edc183;box-shadow:inset 0 -3px #dca85c;background:#36536a;color:#fff}
.editor-toolbar button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.editor-active .editor-toolbar .fields{display:flex;align-items:center;gap:5px;margin:0}
.editor-active .editor-toolbar label{display:flex;align-items:center;gap:5px;font-size:11px;line-height:1.1;margin:0;max-width:125px}
.editor-active .editor-toolbar input{width:68px;min-height:38px;margin:0;padding:4px;font-size:14px}
.editor-active .editor-toolbar output{font-size:13px;min-width:45px;color:inherit}
.editor-toolbar .treatment-dot{display:inline-block;width:14px;height:14px;border-radius:50%;background:#c79768;border:1px solid #67472f}
#treatment-medium .treatment-dot{background:#90633c}#treatment-dark .treatment-dot{background:#4a2c1c}#treatment-cut .treatment-dot{background:transparent;border:2px solid currentColor}
.toolbar-text-dialog{position:relative}.text-dialog-close{position:absolute;right:14px;top:12px}.toolbar-text-dialog h2{padding-right:40px}

.editor-active #scene-viewport{top:18px}
.editor-active #properties>.object-context-actions:empty{display:none}
@media(max-width:900px){.editor-active .editor-heading{min-height:54px;padding:4px 8px 0}.editor-active .editor-toolbar button{min-height:44px}.editor-active .editor-heading .editor-toolbar{min-height:54px}.editor-active #scene-viewport{top:16px}.editor-active .tools-shell{top:auto}}

.editor-toolbar [data-tools=objects] button{min-width:40px}
.editor-toolbar [data-tools=objects] button span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

.editor-active .editor-toolbar label{flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;width:76px;max-width:76px;line-height:1.1}
.editor-active .editor-toolbar label>span{white-space:nowrap;font-size:11px}
.editor-active .editor-toolbar input{min-height:30px;height:30px}
.editor-active .editor-toolbar #icon-dimensions{display:flex;align-items:center}
.editor-toolbar :is(#proportions-lock,#plate-proportions-lock){align-self:center;min-height:36px;height:36px;width:36px;margin:0!important}
#plate-proportions-lock[aria-pressed=true] .chain-open,#plate-proportions-lock[aria-pressed=false] .chain-closed{display:none}

/* Explicit palette after moving controls outside the original wooden inspector. */
body[data-ui-theme=wood].editor-active .editor-toolbar button{background:#f3e6cb;color:var(--ui-text);border-color:var(--ui-edge)}
body[data-ui-theme=wood].editor-active .editor-toolbar button[aria-pressed=true]{background:#d1ad73;color:#302316;border-color:#795529}
body[data-ui-theme=wood].editor-active .editor-toolbar .toolbar-group{border-right-color:#a98b5c66}
/* Floating rails: the central tools stay centred independently of the faces. */
.editor-active .editor-heading{min-height:52px;padding-bottom:4px}
.editor-active .floating-toolbars{position:absolute;z-index:7;top:6px;left:18px;right:18px;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:10px;pointer-events:none}
.editor-active .floating-toolbars .editor-toolbar{position:relative;inset:auto;display:flex;flex:none;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px 0;margin:0;padding:5px;min-height:54px;max-width:calc(100vw - 440px);overflow:visible;background:#102d48ed;color:#f4f1e7;border:1px solid #7d9bb480;border-radius:10px;box-shadow:0 3px 10px #07162645;pointer-events:auto}
.editor-active .floating-toolbars>.editor-toolbar{grid-column:2}
.editor-active .floating-toolbars>.face-toolbar{grid-column:3;justify-self:end;max-width:none;flex-wrap:nowrap;gap:5px;border-right:1px solid #7d9bb480}
.editor-active .floating-toolbars .editor-toolbar>.toolbar-group{background:transparent;box-shadow:none}
.editor-active .floating-toolbars .view-controls{color:inherit}
.editor-active .floating-toolbars button{min-height:44px}
.editor-active .floating-toolbars :is(#proportions-lock,#plate-proportions-lock){min-height:44px;height:44px;width:36px;flex-shrink:0}
.editor-active .floating-toolbars :is(.dimensions,#icon-dimensions){display:flex;align-items:center;gap:5px}
.editor-active #scene-viewport{top:calc(var(--floating-toolbar-height,60px) + 18px)}
.editor-active .settings-panel{top:calc(var(--floating-toolbar-height,60px) + 16px)}
@media(min-width:901px){
 .editor-active .tools-shell{top:calc((100dvh + var(--editor-work-top,156px) + var(--floating-toolbar-height,60px))/2);max-height:calc(100dvh - var(--editor-work-top,156px) - var(--floating-toolbar-height,60px) - 24px)}
 .editor-active .tools-shell>.tools{max-height:calc(100dvh - var(--editor-work-top,156px) - var(--floating-toolbar-height,60px) - 90px)}
}
@media(max-width:1250px){
 .editor-active .floating-toolbars{grid-template-columns:minmax(0,1fr);gap:6px}
 .editor-active .floating-toolbars>.editor-toolbar{grid-column:1;justify-self:center;max-width:100%;width:max-content}
 .editor-active .floating-toolbars>.face-toolbar{grid-column:1;justify-self:end;min-height:54px}
}
@media(max-width:900px){
 .editor-active .editor-heading{min-height:54px;padding:4px 8px}
 .editor-active .floating-toolbars{left:8px;right:8px}
 .editor-active .floating-toolbars .toolbar-group{padding:0 4px;gap:3px}
 .editor-active .floating-toolbars label{width:70px;max-width:70px}
 .editor-active .floating-toolbars input{width:64px}
 .editor-active .floating-toolbars button{padding:5px 6px}
}
body[data-ui-theme=wood].editor-active .floating-toolbars>.editor-toolbar{background-color:var(--ui-panel);background-image:linear-gradient(120deg,#fff6,#fff1),var(--ui-wood-image,none);background-size:auto,240px 360px;border-color:var(--ui-edge);color:var(--ui-text)}
body[data-ui-theme=wood].editor-active .floating-toolbars .editor-toolbar>.toolbar-group{background:transparent;box-shadow:none}

@media(min-width:901px){
 .editor-active .settings-panel{top:calc((100dvh + var(--editor-work-top,156px) + var(--floating-toolbar-height,60px))/2);max-height:calc(100dvh - var(--editor-work-top,156px) - var(--floating-toolbar-height,60px) - 24px)}
}
@media(max-width:900px){
 .editor-active .floating-toolbars [data-tools=treatment] button{font-size:11px;gap:3px;padding:5px 4px}
 .editor-active .floating-toolbars .treatment-dot{width:10px;height:10px}
 .editor-active .floating-toolbars [data-tools=objects] button{min-width:36px;padding:5px 4px}
}
@media(max-width:900px){
 /* Keep the scene usable: all tools remain reachable by swipe or keyboard focus. */
 .editor-active .floating-toolbars>.editor-toolbar:not(.face-toolbar){flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain}
}

/* Consolidated journey: commands stay discoverable in the left inspector. */
.personalization-additions{display:grid;gap:8px;margin-bottom:14px}
.personalization-additions button{width:100%;text-align:left;min-height:44px;font-weight:600}
.creation-steps #step-basket{display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit;padding:10px 14px;border:1px solid #a9bbc633;border-radius:10px;white-space:nowrap}
.editor-toolbar input[type=number]{text-align:center}
.editor-toolbar .view-controls>button{min-width:36px}
.editor-active .settings-panel{padding:4px;scrollbar-width:thin;scrollbar-color:#7d96ab #10283b;scrollbar-gutter:stable}
.background-settings{scrollbar-width:thin;scrollbar-color:#7d96ab #10283b;scrollbar-gutter:stable;padding-right:7px}
.background-settings::-webkit-scrollbar{width:6px}
.background-settings::-webkit-scrollbar-thumb{background:#7d96ab;border:1px solid #10283b;border-radius:6px}
.editor-assistance{position:absolute;z-index:20;bottom:12px;left:50%;translate:-50% 0;max-width:min(420px,calc(100% - 32px));padding:10px 38px 10px 14px;border:1px solid #cfbea4;border-radius:12px;background:#fff7e6;color:#403629;box-shadow:0 3px 16px #0002;font-size:13px}
.editor-assistance p{margin:0}.editor-assistance button{position:absolute;right:5px;top:5px;color:#403629;background:transparent;border:0;font-size:20px}
@media(max-width:900px){.creation-steps{flex-wrap:wrap}.creation-steps #step-basket{padding:8px;font-size:12px}.editor-assistance{bottom:78px;font-size:12px;padding:8px 32px 8px 10px}}

#border-controls>.setting-check{display:flex;align-items:center;gap:8px}#border-controls>.setting-check input{flex:none;width:18px;min-height:18px;height:18px;margin:0}
.creation-steps #step-basket{font-size:16px}
@media(max-width:900px){.creation-steps #step-basket{font-size:12px}}

/* Ergonomics: compact fields, independent rails and discoverable object tools. */
.editor-active .floating-toolbars :is(#proportions-lock,#plate-proportions-lock){width:30px;min-width:30px;height:30px;min-height:30px;align-self:flex-end;padding:4px}
.editor-active .floating-toolbars .view-controls{align-self:stretch}
.editor-active .floating-toolbars .view-controls>button{width:36px;min-width:36px;height:36px;min-height:36px;padding:4px}
.editor-active .floating-toolbars #zoom-label{width:48px;text-align:center;font-variant-numeric:tabular-nums}
.editor-active .floating-toolbars .toolbar-group[hidden]{display:none!important}
.editor-active .floating-toolbars>.editor-toolbar:not(.face-toolbar){grid-row:1}
.editor-active .floating-toolbars>.face-toolbar{grid-row:1}
@media(max-width:1250px){.editor-active .floating-toolbars>.face-toolbar{grid-row:2}}
#common-object-actions{margin:0 0 10px;padding:8px;border:1px solid #a9bbc655;border-radius:8px}
#common-object-actions>button{font-size:12px;margin:4px 2px 4px 0;min-height:36px}
#common-object-actions [aria-pressed=true]{box-shadow:inset 0 -3px #edc183;border:2px solid currentColor}
#common-object-actions .arrangement-commands{display:grid;grid-template-columns:1fr 1fr;gap:5px}
#common-object-actions .arrangement-commands button{min-height:36px;font-size:12px;margin:0;padding:5px}
#typography-controls{margin:10px 0;padding:8px;border:1px solid #a9bbc655;border-radius:8px}
#typography-controls legend{font-weight:700}#typography-controls label{margin-top:7px}
#properties .object-context-actions{display:flex;gap:6px;flex-wrap:wrap}
#properties .object-context-actions button{font-size:12px;padding:5px;min-height:36px}
#properties .object-context-actions svg{width:20px;height:20px;fill:none;stroke:currentColor}
#properties .object-rotation{display:block;margin:10px 0}
.creation-steps [aria-selected=true]{font-weight:800;text-decoration:underline;text-underline-offset:5px}
.creation-steps .step-number{font-size:1.1em;font-weight:800}
.editor-active .inspector-body{scrollbar-width:thin;scrollbar-color:#7d96ab #10283b;scrollbar-gutter:stable;padding-right:8px}
.editor-active :is(.inspector-body,.background-settings)::-webkit-scrollbar{width:6px}
.editor-active :is(.inspector-body,.background-settings)::-webkit-scrollbar-track{background:#10283b;border-radius:8px}
.editor-active :is(.inspector-body,.background-settings)::-webkit-scrollbar-thumb{background:#7d96ab;border:1px solid #10283b;border-radius:8px}
@media(pointer:coarse){.editor-active .floating-toolbars .view-controls>button,#common-object-actions button{min-height:44px}}
.placement-guides{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;overflow:visible}
#common-object-actions .setting-check{display:flex;align-items:center;gap:8px;margin:10px 0 2px;font-size:12px}
#common-object-actions .setting-check input{width:18px;height:18px;min-height:18px;margin:0}
#lock-object[aria-pressed=true]{border:2px solid currentColor;box-shadow:inset 0 -3px #edc183}
#properties [aria-disabled=true]{pointer-events:none;opacity:.55}
.panel-grip{touch-action:none;cursor:grab;user-select:none;flex:none;letter-spacing:2px}
.panel-grip:active{cursor:grabbing}
.editor-active .floating-toolbars .panel-grip{min-width:20px;width:20px;padding:0;min-height:32px;height:32px;background:transparent;color:inherit;border:0;font-size:22px}
.editor-active :is(.tools-shell,.settings-panel,.price-dock)>.panel-grip{position:absolute;top:4px;left:5px;z-index:3;margin:0;width:24px;min-height:28px;padding:0;background:transparent;color:inherit;border:0;font-size:23px}
.editor-active .tools-shell>.panel-grip{top:5px;color:#f4f1e7}
.editor-active .tools-shell>.panel-grip{z-index:6}
.editor-active .tools-shell .inspector-heading{padding-left:34px}
.editor-active .settings-panel .background-picker>summary{padding-left:34px}
.editor-active .price-dock{padding-left:34px}
#reset-panel-layout{width:100%;font-size:13px;min-height:36px}
@media(min-width:1251px){.editor-active .floating-toolbars>.editor-toolbar:not(.face-toolbar){max-width:calc(100vw - 2 * var(--face-toolbar-width,270px) - 56px)}}
.selection-mode-bar{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:8px}
.selection-mode-bar button{font-size:12px;min-height:36px;padding:5px}
.selection-mode-bar [aria-pressed=true]{border:2px solid currentColor;box-shadow:inset 0 -3px #edc183}
.snap-option{display:flex;align-items:center;gap:8px;margin:6px 0 10px;font-size:12px}
.snap-option input{width:18px;height:18px;min-height:18px;margin:0}
#properties [data-tools=treatment]{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:10px 0}
#properties [data-tools=treatment] button{min-height:36px;font-size:12px;padding:5px;display:flex;align-items:center;gap:5px}
#properties [data-tools=treatment] [aria-pressed=true]{border:2px solid currentColor;box-shadow:inset 0 -3px #edc183}
#properties .treatment-dot{display:inline-block;flex:none;width:14px;height:14px;border:1px solid #67472f;border-radius:50%;background:#c79768}
#properties #treatment-medium .treatment-dot{background:#90633c}#properties #treatment-dark .treatment-dot{background:#4a2c1c}#properties #treatment-cut .treatment-dot{background:transparent;border:2px solid currentColor}
/* Publication de la disposition validée en recette 6f6ff8eb90e6, 23 octobre 2026. */
@media(max-width:900px){
 .editor-active .tools-shell .inspector-heading{padding-left:12px}
 .editor-active .settings-panel .background-picker>summary{padding-left:10px}
 .editor-active .price-dock{padding-left:12px}
 .panel-grip{display:none!important}
 .editor-assistance{bottom:calc(34dvh + 88px);max-width:calc(100% - 32px);font-size:11px}
 .editor-active .tools-shell{max-height:34dvh;gap:6px}
 .editor-active .tools-shell>.tools{max-height:calc(34dvh - 42px)}
 .editor-active #scene-viewport{bottom:calc(34dvh + 100px)}
 .editor-active .settings-panel:has(.background-picker[open]){z-index:45}
}
