/* Direction retenue : ardoise minérale. Une palette unique, commune à toute l'interface. */
:root {
  --ink: #253444;
  --muted: #6b7c8d;
  --green: #56697b;
  --line: #c7d1da;
  --accent: #b98d74;
  --slate: #2d333b;
  --viewer: #e2e8ed;
  background: var(--viewer);
}
body { height: 100dvh; overflow: hidden; background: var(--viewer); }
.header { height: 68px; padding: 0 28px; background: #edf2f6; border-color: #d6dfe6; }
.brand > svg { stroke: #34485d; }
.brand-dot { color: var(--accent); }
.header-label { color: #708191; }
.header .status-dot { background: #8295a7; }
.header .button.quiet { color: #42596f; border: 1px solid #c5d0da; }
.header .button.quiet:hover { background: #e1e8ee; }
.header .button.outlined { color: #fff; border-color: #b4866b; background: #af7b5e; box-shadow: 0 2px 3px #71472c0a; }
.header .button.outlined:hover { background: #9d6c50; }
.workspace { height: calc(100dvh - 68px); min-height: 0; grid-template-columns: minmax(0, 1fr) 382px; }
.visual-area { position: static; height: 100%; min-height: 0; max-height: none; padding: 0; }
.intro { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding: 25px 28px 9px; flex-shrink: 0; }
.intro h1 { font-size: clamp(25px, 2.5vw, 36px); font-weight: 650; letter-spacing: -1.1px; margin: 0; white-space: nowrap; }
.intro p { font-size: 11px; color: #708293; text-align: right; }
.viewer { min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.viewer-tag { color: #53697b; border-color: #c8d4dd; background: #f3f7fae6; }
.viewer-tag .status-dot { background: #899dad; }
.viewer-side-tools, .camera-presets, .reset-view { border-color: #ccd6de; background: #f6f9fce8; }
.viewer-side-tools { padding: 5px; border-radius: 10px; right: 22px; }
.icon-button { color: #61778c; }
.icon-button:hover { background: #e0e8ef; }
.icon-button[aria-pressed=true] { background: #dce5ee; color: #4e6882; }
.viewer-side-tools > span { background: #d6dfe6; }
.camera-presets button { color: #677b8d; }
.camera-presets button.active { color: #344f6a; background: #e1e9f1; box-shadow: none; }
.gesture-hint, .live-label { color: #748695; }
.dimension-readout { color: #65798b; background: #f0f5f9de; }
.dimension-readout .emphasized { color: #975f41; }
.dimension-readout .subdued { color: #8b97a3; }
.project-strip { flex-shrink: 0; padding: 20px 28px; gap: 18px; background: #edf2f6; border-top: 1px solid #d6dfe6; border-bottom: 0; }
.project-strip > div + div { border-left: 1px solid #c8d3dd; padding-left: 20px; }
.project-strip strong { color: #293e53; font-size: clamp(12px, 1.15vw, 17px); font-weight: 600; letter-spacing: -.15px; }
.project-strip .project-indicator { color: #344b62; font-size: 12px; }
.metric-label, .project-strip .project-strip-end { color: #62788c; }
.metric-label { font-size: 10px; }
.project-indicator .status-dot { background: #8295a7; }
.project-strip .project-strip-end { display: none; }
.visual-footnote { padding: 12px 28px; color: #7b8b99; background: #edf2f6; }
.visual-footnote > span:first-child { color: #718597; font-family: inherit; font-style: normal; }

.configuration {
  --line: #48535f;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 26px 24px 18px;
  color: #eaf0f5;
  background: var(--slate);
  border-left: 1px solid #465360;
  color-scheme: dark;
}
.panel-title { padding-bottom: 18px; flex-shrink: 0; }
.panel-title .eyebrow { color: #a8bacb; font-size: 8px; letter-spacing: 1.6px; }
.panel-title h2 { color: #f3f6f9; font-family: inherit; font-size: 26px; font-weight: 650; letter-spacing: -.8px; margin: 10px 0 8px; }
.panel-title p { color: #b1c0ce; font-size: 12px; }
.config-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr .7fr; gap: 3px; padding: 3px; border: 1px solid #1c262f; border-radius: 5px; background: #232c35; flex-shrink: 0; }
.config-tabs button { min-width: 0; min-height: 41px; background: transparent; color: #c3cfda; border: 1px solid transparent; border-radius: 3px; font-size: 11px; padding: 7px 5px; }
.config-tabs button:hover { color: #f2f5f7; background: #353e4a; }
.config-tabs button[aria-selected=true] { color: #fff; background: #52677c; border-color: #6b8298; box-shadow: inset 0 -2px var(--accent); }
#configuration-form { display: block; flex: 1; min-height: 0; overflow-y: auto; margin-top: 9px; scrollbar-width: thin; scrollbar-color: #637386 var(--slate); }
.config-tab-panel[hidden] { display: none !important; }
.config-tab-panel .control-section { padding: 20px 0; }
.config-tab-panel[data-config-panel=dimensions] .control-section { padding: 16px 0; }
.config-tab-panel .control-section:first-child { border-top: 0; }
.configuration .control-section h3 { color: #eef3f8; font-size: 14px; font-weight: 600; gap: 0; margin-bottom: 16px; }
.configuration .section-number { display: none; }
.configuration .unit-note { font-size: 9px; color: #98a6b7; }
.configuration .control-label { color: #cad3de; font-size: 12px; }
.configuration .control-label small { color: #8e9eb1; }
.configuration .number-wrapper { background: #edf2f6; border-color: #b3c0cd; padding: 6px 7px; min-height: 33px; color-scheme: light; }
.configuration .number-wrapper input { color: #263747; font-size: 13px; width: 68px; }
.configuration .number-wrapper span { color: #708294; font-size: 10px; }
.configuration .range-limits { color: #9cabbc; font-size: 9px; }
.configuration input[type=range] { background-image: linear-gradient(to right, #b98d74 var(--progress), #4e5b6a var(--progress)); }
.configuration input[type=range]::-webkit-slider-thumb { border-color: #d0a58b; background: #f4f0ed; }
.configuration input[type=range]::-moz-range-thumb { border-color: #d0a58b; background: #f4f0ed; }
.configuration .dimension-controls { gap: 14px; }
.configuration .dimension-control input[type=range] { margin-top: 6px; }
.configuration .dimension-explanation { color: #a7b5c5; font-size: 10px; margin-top: 12px; }
.configuration .dimension-validation { color: #efb997; }
.configuration .installation-card { border-color: #536474; background: #36424e; padding: 8px 10px 10px; color: #e3eaf2; }
.configuration .installation-card:hover { background: #3b4755; }
.configuration .installation-card.selected { background: #52677c; border-color: var(--accent); }
.configuration .installation-card > svg { height: 43px; width: 70px; margin: 0 0 4px; stroke: #a3b1c3; }
.configuration .installation-card.selected > svg { stroke: #d7e0e9; }
.configuration .installation-card strong { font-size: 11px; }
.configuration .installation-card > span { color: #a6b4c5; font-size: 9px; }
.configuration .wall-fill { fill: #4e5c6c; stroke: #8e9caf; }
.configuration .choice-check { border-color: #68778c; }
.configuration .selected .choice-check { background: #b7927b; border-color: #b7927b; }
.configuration .color-name { color: #adbac9; font-size: 10px; }
.configuration .ral-label { color: #9eafc3; font-size: 9px; }
.configuration .swatches { margin-top: 17px; gap: 14px; }
.configuration .swatch { width: 34px; height: 34px; border-color: var(--slate); outline-color: #63778b; }
.configuration .swatch.selected { outline: 2px solid var(--accent); }
.configuration .blade-finish { margin-top: 26px; }
.configuration .blade-finish select { background: #e8edf2; border-color: #a9b8c8; color: #2c3c4e; min-height: 36px; font-size: 11px; color-scheme: light; }
.configuration .blade-angle { padding-top: 30px; }
.configuration .blade-angle label .icon { color: #b5c2d2; }
.configuration output { color: #d5dfeb; font-size: 13px; }
.configuration .side-choices { gap: 5px; margin: 17px 0; }
.configuration .side-choices button, .configuration .closure-choices button { color: #e2eaf2; background: #36424e; border-color: #566a7d; font-size: 11px; }
.configuration .side-choices button { min-height: 62px; }
.side-icon { display: block; width: 29px; height: 29px; margin: 0 auto 8px; stroke: #afc0d0; stroke-width: 1; stroke-linejoin: round; fill: none; }
.side-face { fill: #afc0d020; stroke: none; }
.selected .side-icon { stroke: #e2eaf1; }
.selected .side-face { fill: #e0eaf233; }
.configuration .side-choices small { color: #acbbcd; font-size: 9px; }
.configuration .side-choices button:hover, .configuration .closure-choices button:hover { background: #414e5e; }
.configuration .side-choices .selected, .configuration .closure-choices .selected { color: #fff; background: #52677c; border-color: var(--accent); box-shadow: inset 0 0 0 .5px var(--accent); }
.configuration .side-heading { margin: 21px 0 15px; gap: 8px; }
.configuration .side-heading strong { font-size: 13px; }
.configuration .side-heading span { color: #a9b9cc; font-size: 10px; }
.configuration .closure-choices { gap: 8px; }
.configuration .closure-choices button { min-height: 48px; }
.configuration .control-help { color: #b3c2d0; font-size: 11px; line-height: 1.7; }
.configuration .closure-warning { color: #f0c3a4; background: #4a3e36; border: 1px solid #6d5543; font-size: 11px; }
.configuration .sun-height { margin-top: 28px; }
.configuration .sun-section input { margin-top: 17px; }
.configuration .options-section { flex-shrink: 0; padding: 10px 0; border-top: 1px solid #424c59; }
.configuration .demo-assumptions { color: #adb9c8; font-size: 10px; }
.configuration .demo-assumptions summary { color: #abbacc; }
.configuration .demo-assumptions p { color: #afbdcd; font-size: 10px; }
.configuration .demo-assumptions[open] { max-height: 150px; overflow-y: auto; padding-right: 8px; }
.configuration .deferred-note { display: none; }
.panel-footer { flex-shrink: 0; padding-top: 12px; gap: 8px; }
.panel-footer > .primary { background: #566e86; color: #fff; height: 46px; font-size: 12px; }
.panel-footer > .primary:hover { background: #657f99; }
.panel-footer > span { color: #a2b0c1; font-size: 9px; }
.panel-footer .text-button { color: #a5b4c7; font-size: 10px; }
.toast { background: #344559; }
.mobile-preview-link { color: #445c75; border-color: #b4c1ce; }
dialog { background: #f1f5f8; border-color: #cbd6df; }
dialog::backdrop { background: #1d2b3a70; }
.dialog-heading h2 { font-family: inherit; font-weight: 600; font-size: 25px; }
dialog .eyebrow, dialog dt, .dialog-note { color: #6a7f92; }
dialog .button.primary { background: #566e86; }
dialog .button.primary:hover { background: #435c74; }

/* Cotes : clic pour saisir, glissement horizontal pour ajuster. */
.dimension-label { pointer-events: auto; box-shadow: 0 1px 4px #26384b12; }
.dimension-value { width: 100%; height: 100%; padding: 0 4px; border-radius: inherit; background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; cursor: ew-resize; touch-action: none; user-select: none; }
.dimension-label:hover { border-color: #b98d74 !important; }
.dimension-label.dragging { cursor: ew-resize; box-shadow: 0 0 0 2px #b98d743d; }
.dimension-label.editing { z-index: 3; border-color: #b98d74 !important; box-shadow: 0 0 0 2px #b98d743d; }
.dimension-input { width: calc(100% - 27px); min-width: 0; height: 100%; padding: 0 3px 0 5px; border: 0; border-radius: 4px; background: transparent; color: #354657; font-size: 16px; font-weight: 550; outline-offset: 1px; appearance: textfield; -moz-appearance: textfield; }
.dimension-input::-webkit-inner-spin-button { appearance: none; }
.dimension-unit { font-size: 10px; padding-right: 5px; color: #6b7c8d; }
.dimension-error { position: absolute; top: calc(100% + 5px); left: 0; width: 190px; max-width: calc(100vw - 15px); padding: 8px; border: 1px solid #c79a7e; border-radius: 4px; background: #fff4eb; color: #925a3e; white-space: normal; font-size: 11px; font-weight: 500; line-height: 1.4; box-shadow: 0 2px 8px #26384b20; }
.dimension-label > [hidden] { display: none; }
.dimension-label[data-align=right] .dimension-error { left: auto; right: 0; }
.dimension-value:focus-visible { outline-offset: 1px; }

@media (max-width: 1150px) and (min-width: 851px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 348px; }
  .configuration { padding: 23px 18px 14px; }
  .intro { padding: 23px 22px 8px; }
  .intro p { display: none; }
  .project-strip { padding: 18px 22px; gap: 12px; }
  .project-strip > div + div { padding-left: 13px; }
  .project-strip strong { font-size: 12px; }
  .project-strip .project-indicator { font-size: 10px; }
  .metric-label { font-size: 9px; }
  .visual-footnote { padding-left: 22px; padding-right: 22px; }
}
@media (max-height: 740px) and (min-width: 851px) {
  .configuration { padding-top: 15px; }
  .panel-title { padding-bottom: 11px; }
  .panel-title h2 { font-size: 22px; margin: 7px 0 0; }
  .panel-title p { display: none; }
  .config-tab-panel .control-section { padding: 15px 0; }
  .configuration .dimension-controls { gap: 9px; }
  .configuration .installation-card > svg { height: 32px; }
  .configuration .dimension-explanation { margin-top: 7px; }
  .configuration .options-section { padding: 7px 0; }
  .panel-footer { gap: 6px; padding-top: 9px; }
  .config-tab-panel[data-config-panel=dimensions] .control-section { padding: 8px 0; }
  #panel-dimensions .number-wrapper { min-height: 29px; padding-top: 4px; padding-bottom: 4px; }
  #panel-dimensions .installation-card > svg { display: none; }
  #panel-dimensions .control-section h3 { margin-bottom: 12px; }
  .configuration .dimension-controls { gap: 4px; }
  .configuration .dimension-explanation { display: none; }
  .configuration .side-heading { margin: 14px 0 10px; }
  .configuration .side-choices { margin: 12px 0; }
  .side-icon { display: none; }
}
@media (max-width: 850px) {
  body { height: var(--app-height, 100dvh); overflow: hidden; }
  .header { position: relative; z-index: 10; height: 56px; padding: 0 16px; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,44%) minmax(0,1fr); height: calc(var(--app-height,100dvh) - 56px); min-height: 0; overflow: hidden; }
  .visual-area { height: 100%; min-height: 0; padding: 0; }
  .intro, .project-strip, .visual-footnote { display: none; }
  .viewer { height: 100%; min-height: 0; flex: 1; }
  .viewer-top { top: 10px; left: 10px; right: 10px; }
  .live-label, .dimension-readout { display: none; }
  .viewer-bottom { bottom: 8px; left: 8px; right: 8px; }
  .camera-presets button { min-height: 32px; }
  .viewer-side-tools { right: 8px; padding: 3px; }
  .viewer-side-tools .icon-button { width: 32px; height: 32px; }
  .configuration { display: block; height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 10px 20px 20px; border-left: 0; border-top: 1px solid #4a5564; scrollbar-width: thin; scrollbar-color: #637386 var(--slate); }
  .panel-title { display: none; }
  .config-tabs { position: sticky; top: 0; z-index: 4; box-shadow: 0 -10px var(--slate), 0 0 0 5px var(--slate); }
  .config-tabs button { min-height: 43px; font-size: 11px; }
  #configuration-form { flex: none; overflow: visible; margin: 5px 0 0; }
  .configuration .dimension-controls { gap: 18px; }
  .configuration .number-wrapper { min-height: 36px; }
  .configuration .number-wrapper input { font-size: 14px; }
  .configuration .range-limits { font-size: 10px; }
  .configuration .installation-card > svg { height: 48px; }
  .configuration .control-section h3 { font-size: 13px; }
  .configuration .side-choices button { font-size: 12px; }
  .configuration .side-choices small { font-size: 9px; }
  .configuration .closure-choices button { min-height: 45px; font-size: 12px; }
  .panel-footer { width: 100%; max-width: none; }
  .panel-footer > .primary { height: 45px; }
  .mobile-preview-link { display: none; }
}
@media (max-width: 520px) {
  .intro { padding: 18px 16px 6px; }
  .intro h1 { font-size: 27px; letter-spacing: -.8px; }
  .project-strip { padding: 17px 16px; gap: 10px; }
  .project-strip > div + div { padding-left: 10px; }
  .project-strip > div:nth-child(2) { border-left: 0; padding-left: 0; }
  .project-strip > div:nth-child(2) { flex: 1.25; }
  .project-strip strong { font-size: 11px; }
  .metric-label { font-size: 8px; letter-spacing: 0; }
  .configuration { padding: 10px 16px 22px; }
  .viewer-top { left: 13px; right: 13px; }
}
@media (max-width: 850px) and (max-height: 500px) and (orientation: landscape) {
  .header { height: 48px; }
  .workspace { height: calc(var(--app-height,100dvh) - 48px); grid-template-columns: minmax(0,1fr) minmax(270px,43%); grid-template-rows: minmax(0,1fr); }
  .configuration { border-top: 0; border-left: 1px solid #4a5564; padding-left: 12px; padding-right: 12px; }
  .config-tabs button { font-size: 10px; }
  .viewer-side-tools .icon-button { width: 28px; height: 28px; }
}
