/* Small reversible header and editor presentation changes. */
:root{--header-h:112px}
.header .brand-mark,.editor-active .header .brand-mark{width:88px;height:88px}
body[data-logo-outline=on]:not([data-ui-theme=wood]) .brand-logo-mark{filter:url(#logo-white-keyline)}
.nav-cart{width:23px;height:23px;flex-shrink:0;fill:currentColor}#nav a[href="#panier"]{display:inline-flex;align-items:center;gap:6px}#basket-nav-count{font-size:.65em;font-weight:400;align-self:flex-start;line-height:1.4;min-width:.7em}
.saved-compact{display:none}.saved-wide{display:inline}.heading-actions #restore{white-space:nowrap}
.object-context-actions{justify-content:flex-end;gap:6px}.object-context-actions .icon-action{flex:0 0 34px;width:34px;height:34px;min-height:34px;padding:6px}.icon-action svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#font-label{margin-bottom:12px}#font-label>label{margin:0 0 5px}#font-picker>summary{display:flex;align-items:center;min-height:42px;padding:8px 10px;cursor:pointer;border:1px solid #7891a4;border-radius:6px;background:#102d4b;color:#f3eddd;list-style:none}#font-picker>summary::after{content:'▾';margin-left:auto}#font-current{display:block;min-width:0;width:85%}#font-current svg{display:block;width:100%;height:24px;fill:currentColor}
.font-picker-menu{margin-top:4px;padding:6px;border:1px solid #7891a4;border-radius:6px;background:#102d4b;color:#f3eddd}#font-specimens{display:flex;flex-direction:column;margin:0;gap:4px;max-height:180px;overflow:auto}#font-specimens [role=option]{flex:none;width:100%;min-height:42px;justify-content:flex-start;color:inherit;background:transparent;border:1px solid transparent}#font-specimens [aria-selected=true]{border-color:#e5bd82;background:#244f78}#font-specimens svg{height:24px;max-width:100%;fill:currentColor}.font-picker-menu>small{display:block;font-size:11px;line-height:1.4;margin:7px 0 2px}.font-picker-menu #font-apply{min-height:34px;padding:5px 10px;font-size:12px;margin-top:5px}
#private-interface-controls{border-top:1px solid #7a96b740;margin-top:12px;padding-top:10px}#private-interface-controls label{font-size:12px!important}#private-interface-controls .setting-check{font-size:11px!important}
@media(max-width:900px){:root{--header-h:88px}.header .brand-mark,.editor-active .header .brand-mark{width:60px;height:64px}.saved-wide{display:none}.saved-compact{display:inline}.object-context-actions .icon-action{flex-basis:40px;width:40px;height:40px;min-height:40px}}

/* Shared command geometry: padded, regular corners in both interface themes. */
.editor-active .toolbar{align-items:center;background:transparent!important;box-shadow:none!important;border:0!important;min-height:50px}
.editor-active .edit-controls{align-items:center;padding:5px 8px;border:1px solid #8ca6c166;border-radius:12px;background:#123354e8;min-height:50px}
.editor-active .edit-controls button,.editor-active .edit-controls #undo,.editor-active .edit-controls #redo,.editor-active .view-controls button{min-height:38px;height:38px;margin:0}
.editor-active .view-controls{min-height:50px}
#status:empty{display:none}
#private-interface-controls>label:first-child{font-size:14px!important;font-weight:600}#private-interface-controls select{font-weight:400}
@media(max-width:900px){.editor-active .edit-controls{min-height:42px;padding:3px 5px}.editor-active .edit-controls button,.editor-active .edit-controls #undo,.editor-active .edit-controls #redo,.editor-active .view-controls button{height:34px;min-height:34px}.editor-active .view-controls{min-height:42px}}

/* Small descriptive marks share the normal settings rows. */
.settings-panel .setting-check{width:100%;gap:7px}
.setting-symbol{display:block;flex:0 0 28px;width:28px;height:24px;margin-left:auto;fill:none;stroke:currentColor;stroke-width:.85;stroke-linecap:round;stroke-linejoin:round;overflow:visible;pointer-events:none}
.setting-symbol text{stroke:none;fill:currentColor;font:5.5px Arial,sans-serif;text-anchor:middle}
.settings-panel .ambience-audio{border:0;padding:0;margin:0}
.settings-panel .ambience-audio .setting-check:has(input:disabled){opacity:.65;cursor:default}

/* One compact centred command rail, with wrapping on narrow screens. */
.editor-active .toolbar{display:flex;justify-content:center;align-items:center;gap:0;width:max-content;max-width:calc(100% - 28px);min-height:50px;margin:10px auto 0;padding:5px 8px;border:1px solid #8ca6c166!important;border-radius:12px;background:#123354e8!important;pointer-events:auto}
.editor-active .toolbar :is(.edit-controls,.view-controls){display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:3px;border:0;border-radius:0;min-height:38px;padding:0;background:transparent!important;box-shadow:none!important}
.editor-active .toolbar .edit-controls{border-right:1px solid #8ca6c166;padding-right:6px;margin-right:6px}
.editor-active .toolbar button{white-space:nowrap}
.music-row{display:flex;align-items:center}.settings-panel .music-row>label{display:flex;align-items:center;gap:7px;margin:0!important;flex:1}
.settings-panel .music-speaker{flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:4px;background:transparent;box-shadow:none;border:1px solid transparent;color:inherit}.music-speaker .setting-symbol{margin:0;width:26px;height:24px}.music-speaker[aria-pressed=true]{border-color:currentColor}
#music-credit{font-size:10px;line-height:1.35;margin:5px 0 0}
@media(max-width:600px){.editor-active .toolbar{flex-wrap:wrap;max-width:calc(100% - 16px);gap:3px;padding:4px 5px;margin-top:6px}.editor-active .toolbar :is(.edit-controls,.view-controls){min-height:32px;gap:2px}.editor-active .toolbar .edit-controls{margin:0;padding:0;border:0}.editor-active .toolbar button{min-height:32px;height:32px;padding:3px 5px!important;font-size:11px}.editor-active .toolbar #zoom-label{font-size:12px;min-width:36px}}

.header .brand-name .brand-l-light{color:#d5ae6f!important;-webkit-text-stroke:.35px #745330;text-shadow:0 1px 1px #34200f40}
.header .brand-name .brand-l-dark{color:#6f4024!important;-webkit-text-stroke:.35px #efdab4;text-shadow:0 1px 1px #34200f40}
.header #nav,.header #nav :is(a,button){background:transparent!important;background-image:none!important;box-shadow:none!important;border-color:transparent!important;text-shadow:0 1px #fff2}
.header #nav a[aria-current]{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
.music-row{justify-content:flex-end}.music-speaker[aria-pressed=false] .speaker-waves{display:none}.music-speaker[aria-pressed=true] .speaker-slash{display:none}.music-speaker .speaker-slash{stroke-width:1.4}
@media(max-width:900px){body:not([data-ui-theme=wood]) .header #nav.open{background:#0b223d!important}}

/* Welcome is a wooden plaque in both interface themes. */
#welcome-dialog{width:min(560px,92vw);background-color:#e7ce9f;background-image:linear-gradient(115deg,#fff5,#fff1),var(--ui-wood-image,linear-gradient(3deg,transparent 48%,#94734a0a 50%,transparent 52%));background-size:auto,240px 360px;border:2px solid #211c16;color:#30271e;box-shadow:inset 0 1px #fff9,0 3px 0 #9c7e55,0 20px 65px #0005}
#welcome-dialog .eyebrow,#welcome-dialog #welcome-copy{color:#443524}#welcome-dialog #welcome-title{font-size:clamp(24px,4vw,30px);line-height:1.2}
#welcome-dialog .welcome-actions{display:grid;grid-template-columns:1fr 1.2fr;gap:10px}#welcome-dialog .welcome-actions button{width:100%;font:600 15px Arial,Helvetica,sans-serif;background:#f1dfbd;color:#34291e;border:1px solid #85683f;box-shadow:inset 0 1px #fff9,0 2px 0 #ab8b5f;padding:9px}#welcome-dialog .welcome-actions .primary{background:#d6b17a}
.logo-wait{position:relative;display:inline-block;width:110px;aspect-ratio:398/433;vertical-align:middle;flex-shrink:0}.logo-wait img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}.logo-wait-alternate{filter:invert(1) sepia(1) saturate(.55) brightness(.9);animation:logo-tone-swap 2.4s ease-in-out infinite alternate}
@keyframes logo-tone-swap{0%,15%{opacity:0}85%,100%{opacity:1}}
#wood-loader{background:#152537ed;backdrop-filter:none}#wood-loader .loader-card{color:#f2e6ce}#wood-loader .loader-card p{color:#e7d9bf}#wood-loader .logo-wait{margin:auto;width:110px}
#export-test-svg[aria-busy=true]::before{display:none}#export-test-svg .logo-wait{width:24px;margin-right:5px}
#tutorial{transition:opacity .18s ease,transform .18s ease}#tutorial.tutorial-finishing{opacity:0;transform:translateY(5px)}#tutorial-result{margin:10px 0 0}#tutorial-result-canvas{display:block;width:100%;height:155px;background:#e9e1d4;border-radius:7px}#tutorial-result figcaption{font-size:11px;margin:4px 0;color:inherit}.tutorial-dots{margin-top:14px}
@media(prefers-reduced-motion:reduce){.logo-wait-alternate{animation:none;opacity:0}#tutorial{transition:none}}
@media(max-width:400px){#welcome-dialog{padding:20px}#welcome-dialog .welcome-actions button{font-size:13px;padding:8px 5px}}

/* Wide desktop: existing rail shares the stage/navigation row. */
@media(min-width:1280px){
 body.editor-active[data-toolbar-inline=true] .editor-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;height:58px;padding:4px 14px}
 body.editor-active[data-toolbar-inline=true] .creation-steps{display:flex;flex-wrap:nowrap;gap:5px}
 body.editor-active[data-toolbar-inline=true] .creation-steps button{font-size:13px;padding:6px 9px;white-space:nowrap}
 body.editor-active[data-toolbar-inline=true] .editor-heading .toolbar{justify-self:center;max-width:100%;margin:0;padding:4px 6px;min-height:40px}
 body.editor-active[data-toolbar-inline=true] .toolbar :is(.edit-controls,.view-controls){min-height:30px}
 body.editor-active[data-toolbar-inline=true] .toolbar button,body.editor-active[data-toolbar-inline=true] .toolbar .edit-controls :is(#undo,#redo){min-height:30px;height:30px;font-size:12px;padding:3px 6px}
 body.editor-active[data-toolbar-inline=true] .toolbar .edit-controls :is(#undo,#redo){width:30px;font-size:23px;padding:0}
 body.editor-active[data-toolbar-inline=true] .toolbar #zoom-label{font-size:12px;min-width:39px}
 body.editor-active[data-toolbar-inline=true] .heading-actions button{font-size:12px;min-height:36px;padding:5px 8px}
 body.editor-active[data-toolbar-inline=true] #scene-viewport{top:30px}
}
@media(min-width:901px){
 body.editor-active{--panel-centred-limit:max(220px,calc(100dvh - 2 * (var(--header-h) + 80px)))}
 .editor-active .tools,.editor-active .settings-panel{position:fixed;top:50%;bottom:auto;transform:translateY(-50%);max-height:var(--panel-centred-limit)}
 .editor-active .tools{height:var(--panel-centred-limit)}
}
.editor-active #step-finalize{opacity:1;color:#f2eadb}

/* Simplification des deux premières étapes, sans changement du modèle. */
.editor-active .tools-shell{position:fixed;z-index:3;left:18px;width:300px;top:calc((100dvh + var(--editor-work-top,180px))/2);transform:translateY(-50%);display:flex;flex-direction:column;gap:10px;max-height:calc(100dvh - var(--editor-work-top,180px) - 24px);min-height:0}
.editor-active .tools-shell>.tools{position:relative;inset:auto;width:100%;height:auto;max-height:calc(100dvh - var(--editor-work-top,180px) - 90px);min-height:0;transform:none;flex:0 1 auto}
.editor-active .tools-shell .inspector-body{flex:0 1 auto;overflow-y:auto;min-height:0;padding-top:4px}
.editor-active .tools-shell .face-controls{display:grid;flex:0 0 auto;height:auto!important;min-height:50px;padding:7px 12px!important;position:relative}
.editor-active .tools-shell>.project-actions{display:flex;justify-content:center;flex:0 0 auto;padding:0!important;margin:0;border:0;background:none!important;box-shadow:none!important}
.editor-active .tools-shell #save{width:auto;max-width:100%;font-size:13px;padding:7px 14px;min-height:38px}
.editor-active .step-navigation{flex:0 0 auto;justify-content:space-between;padding:6px 12px;gap:8px}
.editor-active .step-navigation button{flex:0 0 44px;width:44px;min-height:36px;font-size:22px;padding:0 8px}
.editor-active .tools[data-step=object] .step-navigation{justify-content:flex-end}
.editor-active .header .brand{align-self:center;align-items:center;transform:translateY(3px)}
#proportions-lock{display:flex;align-self:end;align-items:center;justify-content:center;width:32px;min-height:42px;margin:0 0 12px;padding:5px}
#proportions-lock svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#proportions-lock[aria-pressed=true] .chain-open,#proportions-lock[aria-pressed=false] .chain-closed{display:none}
#icon-dimensions{grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);align-items:end;gap:5px}
#properties .center-object{width:100%;font-size:13px!important;margin-top:12px}
#properties .advanced{margin:10px 0;padding-top:8px}#properties .advanced>summary{font-size:13px;margin-bottom:8px}
#properties .delete-object{display:flex;width:100%;align-items:center;justify-content:center;margin-top:12px;gap:6px}
.delete-object svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.tone-options label::before{content:'';flex:0 0 10px;width:10px;height:10px;border-radius:50%;background:#b2926f;border:1px solid #67503d55}
.tone-options label:has([value="0.65"])::before{background:#845734}.tone-options label:has([value="1"])::before{background:#3f281b}
.tone-options input{position:absolute;width:1px!important;height:1px!important;min-height:0!important;clip-path:inset(50%)}
.tone-options label:has(input:focus-visible){outline:2px solid currentColor;outline-offset:2px}
@media(min-width:901px) and (max-width:1150px){.editor-active .tools-shell{width:260px}}
@media(max-width:900px){.editor-active .tools-shell{left:8px;right:8px;width:auto;top:auto;bottom:88px;transform:none;max-height:40dvh;gap:6px}.editor-active .tools-shell>.tools{max-height:calc(40dvh - 48px);min-height:100px}.editor-active .tools-shell #save{font-size:12px;min-height:34px;padding:5px 10px}.editor-active .tools-shell .inspector-heading{min-height:30px;padding:5px 12px}}

.more-shapes-icon{width:17px;height:17px;flex-shrink:0}#more-forms{gap:7px}#border-density label{display:flex;justify-content:space-between;font-size:13px}#border-count{width:100%;padding:0;min-height:32px;cursor:ew-resize}#border-density small{font-size:10px;display:block;color:inherit;opacity:.8}#border-count-value{font-variant-numeric:tabular-nums}#group-border .small:empty{display:none}

/* Targeted finishes: flat command keys, independent save action, solid night scene. */
.editor-active .toolbar button,body[data-ui-theme=wood].editor-active .toolbar button{box-shadow:none!important;background-image:none!important;border-radius:5px!important;text-shadow:none!important}
.editor-active .tools-shell{gap:16px}
body[data-background=night] .forest-scene,body[data-ui-theme=wood].editor-active[data-background=night]{background:#0b1c32!important;background-image:none!important}
#border-depth{width:100%;padding:0;min-height:32px;cursor:ew-resize}#border-depth-value{font-variant-numeric:tabular-nums}#border-density label[for=border-depth]{margin-top:14px}
@media(max-width:900px){.editor-active .tools-shell{gap:12px}}

/* Settings share one checkbox, text and icon grid in both interface themes. */
.settings-panel .background-settings .setting-check{display:grid;grid-template-columns:18px minmax(0,1fr) 28px;align-items:center;column-gap:8px;width:100%;min-height:30px}
.settings-panel .background-settings .setting-check>.setting-symbol{grid-column:3;justify-self:center;align-self:center;display:block;width:28px;height:24px;margin:0;flex:none}
.settings-panel .background-settings .music-row{justify-content:normal;margin-bottom:0}
