:root{color-scheme:dark;--bg:#090e14;--panel:#111923;--line:#2a3641;--muted:#8d9ba9;--white:#eef5f5;--teal:#20e1cf}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--white);font-family:Inter,Segoe UI,Arial,sans-serif}button,input{font:inherit}button{cursor:pointer}.topbar{height:78px;border-bottom:1px solid #25313b;display:flex;align-items:center;padding:0 3%;gap:46px;background:#0b1118}.brand{display:flex;align-items:center;color:white;text-decoration:none;font-size:20px;font-weight:850;letter-spacing:-1px;line-height:1}.brand-mark{font-size:39px;color:var(--teal);font-weight:400;margin-right:10px}.brand-light{font-weight:350}.brand small{display:block;color:#97a5b1;font-size:8px;letter-spacing:2.5px;margin-top:7px}.header-center{font-size:10px;letter-spacing:2px;font-weight:700;color:#a9b6be}.header-center span{padding:0 12px;color:#41505a}.header-right{margin-left:auto;font-size:9px;letter-spacing:1.5px;color:#a9b8be}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--teal);box-shadow:0 0 10px #20e1cf;margin-right:8px}.edition{border-left:1px solid #35414b;margin-left:20px;padding-left:20px;color:#677782}.layout{display:grid;grid-template-columns:minmax(0,1fr) 410px;min-height:calc(100vh - 78px)}.stage{padding:38px 3.5% 0;min-width:0;display:flex;flex-direction:column;background:radial-gradient(ellipse at 48% 56%,#1c303b 0%,#101a23 40%,#0b1118 75%)}.stage-top{display:flex;justify-content:space-between;align-items:end}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:#a6b4bf}.line{display:inline-block;width:27px;height:2px;background:var(--teal);vertical-align:middle;margin-right:10px}.teal{color:var(--teal)}h1{font-size:clamp(27px,3vw,42px);letter-spacing:-1.5px;margin:15px 0 6px;line-height:1.05}h1 em{font-style:normal;font-weight:350;color:#b5c3cb}.stage-top p,.panel-header p{color:#95a4af;font-size:13px;margin:9px 0}.stage-index{font-size:12px;color:#c7d7dc;letter-spacing:2px}.stage-index i{font-style:normal;color:#51626b;margin:0 5px}.viewer{flex:1;min-height:470px;position:relative;overflow:hidden}.viewer:before{content:"";position:absolute;inset:9% 12%;border-radius:50%;background:radial-gradient(ellipse,#6aa7aa1b,transparent 66%);pointer-events:none}.viewer:after{content:"";position:absolute;width:62%;height:16%;left:19%;bottom:4%;background:radial-gradient(ellipse,#04080bba,transparent 70%);pointer-events:none}canvas{position:absolute;width:100%;height:100%;z-index:1;touch-action:none}.viewer-label{position:absolute;left:0;top:32px;font-size:9px;letter-spacing:1.7px;color:#91a6ad;z-index:2}.view-controls{position:absolute;left:0;bottom:42px;z-index:2;display:flex;gap:4px;background:#111c25dd;border:1px solid #34424d;border-radius:6px;padding:4px}.view-controls button{background:transparent;border:0;color:#91a1ac;font-size:9px;letter-spacing:1px;padding:10px 13px}.view-controls button.active{background:#2e454b;color:#d8fffa;border-radius:3px}.viewer-actions{position:absolute;right:0;bottom:42px;z-index:2;display:flex;gap:8px}.viewer-actions button{border:1px solid #43525c;background:#15222bdc;color:white;border-radius:5px;padding:10px 12px;font-size:17px}.viewer-actions button span{font-size:10px;vertical-align:middle;margin-left:4px}.viewer-actions button.on{color:var(--teal);border-color:var(--teal)}.viewer-help{position:absolute;bottom:13px;left:0;z-index:2;color:#70838e;font-size:8px;letter-spacing:1.1px}.viewer-help span{color:var(--teal);margin:0 5px}.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:10px;font-size:10px;letter-spacing:2px;color:#b2cbc9;z-index:4;pointer-events:none}.loading.hidden{display:none}.stage-footer{border-top:1px solid #2c3b45;padding:20px 0 24px;display:flex;justify-content:space-between;align-items:center}.stage-footer>div{display:flex;align-items:center;gap:12px}.footer-icon{color:var(--teal);font-size:23px}.stage-footer b{font-size:9px;letter-spacing:1.2px}.stage-footer small{display:block;color:#778c98;font-size:11px;margin-top:5px}.footer-note{color:#758792;font-size:9px;letter-spacing:1px}.footer-note b{color:var(--teal);font-size:16px;margin-left:10px}.panel{background:#111922;border-left:1px solid #283640;display:flex;flex-direction:column;max-height:calc(100vh - 78px)}.panel-header{padding:30px 30px 18px}.panel-header h2{font-size:30px;letter-spacing:-1px;line-height:1.08;margin:13px 0 8px}.panel-header h2 span{color:var(--teal)}.panel-scroll{overflow:auto;padding:0 30px 16px;scrollbar-width:thin;scrollbar-color:#3b4c55 transparent}.section-title{display:flex;align-items:flex-start;gap:11px;margin:14px 0}.section-title>span{color:var(--teal);font-size:10px;font-weight:700;padding-top:3px}.section-title h3{font-size:15px;margin:0}.section-title p{color:#8395a0;font-size:11px;margin:4px 0 0}.color-row{display:flex;align-items:center;justify-content:space-between;margin:13px 0}.color-row strong{font-size:12px;font-weight:600}.swatches{display:flex;gap:7px;align-items:center}.swatch{width:23px;height:23px;border:1px solid #61717d;border-radius:50%;padding:0;background:var(--c)}.swatch.active{outline:2px solid var(--teal);outline-offset:2px}.custom-color{width:24px;height:24px;padding:0;border:1px solid #697681;border-radius:50%;overflow:hidden;background:none}.custom-color::-webkit-color-swatch-wrapper{padding:0}.custom-color::-webkit-color-swatch{border:0;border-radius:50%}.divider{height:1px;background:#2b3943;margin:20px 0}.patterns{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.patterns button{padding:4px;background:#17242d;color:#a8b6bd;border:1px solid #34434c;border-radius:5px}.patterns button.selected{border-color:var(--teal);color:white}.patterns b{display:block;font-size:10px;font-weight:500;margin:5px 0}.pattern{height:38px;display:block;border-radius:3px;background-color:#21333e}.pattern.diagonal{background:linear-gradient(145deg,transparent 35%,#27b5ad 36% 49%,transparent 50% 60%,#27b5ad 61% 67%,transparent 68%),#172c3b}.pattern.stripes{background:repeating-linear-gradient(90deg,#1a3040 0 14px,#2b9f9c 14px 21px)}.accent-label{font-size:11px;display:flex;justify-content:space-between;align-items:center;margin-top:13px;color:#a6b5bd}.accent-label input,.inline-fields input[type=color]{width:25px;height:25px;border:0;background:none;padding:0}details{border:1px solid #35434c;border-radius:5px;margin:8px 0;background:#19242d}summary{list-style:none;display:flex;align-items:center;gap:12px;padding:12px;cursor:pointer}summary::-webkit-details-marker{display:none}.detail-icon{font-size:22px;color:#d4eeeb;width:25px;text-align:center}summary b{font-size:12px}summary small{display:block;color:#8b9da6;font-size:10px;margin-top:3px}.chevron{margin-left:auto;color:#aebfc6;font-size:20px}.detail-body{padding:0 14px 14px;color:#9eb0b9;font-size:11px}.detail-body label{display:block;margin:10px 0}.detail-body input:not([type=file]):not([type=color]){width:100%;margin-top:6px}.detail-body input[type=text],.detail-body input:not([type]){background:#101920;border:1px solid #3a4c55;color:white;padding:8px;border-radius:3px}.detail-body input[type=range]{accent-color:var(--teal)}.upload{display:inline-block!important;padding:9px 11px;border:1px solid #536970;border-radius:4px;cursor:pointer}.upload input{display:none}.text-button{background:none;border:0;color:var(--teal);font-size:11px}.inline-fields{display:flex;gap:20px}.panel-bottom{margin-top:auto;padding:16px 30px 20px;border-top:1px solid #2d3b44;background:#111922}.primary{width:100%;background:var(--teal);border:0;border-radius:4px;color:#071819;font-weight:750;font-size:12px;padding:16px;text-align:left}.primary span{float:right;font-size:17px}.reset{display:block;border:0;background:none;color:#a5b7bf;font-size:10px;margin:13px auto}.panel-footnote{text-align:center;font-size:8px;letter-spacing:1.3px;color:#657984}@media(max-width:800px){.topbar{height:62px;padding:0 18px}.header-center{display:none}.header-right{font-size:8px}.edition{display:none}.layout{display:block}.stage{padding:28px 18px 0}.stage-top h1{font-size:30px}.stage-index{display:none}.viewer{height:55vh;min-height:350px}.viewer-label{top:15px}.viewer-help{font-size:7px}.viewer-actions button span{display:none}.stage-footer{padding:15px 0}.footer-note{display:none}.panel{max-height:none;border-left:0}.panel-scroll{overflow:visible}.panel-header{padding-top:26px}.panel-header h2 br{display:none}.panel-bottom{padding-bottom:25px}}@media(max-width:400px){.swatches{gap:5px}.swatch{width:20px;height:20px}.panel-scroll,.panel-header,.panel-bottom{padding-left:18px;padding-right:18px}.viewer-help{letter-spacing:0}.view-controls button{padding:9px}}
.viewer:fullscreen,.viewer.expanded{position:fixed;inset:0;width:100vw;height:100vh;background:radial-gradient(ellipse at center,#233c47,#0b1118 70%);z-index:100;padding:20px}.viewer:fullscreen .viewer-label,.viewer.expanded .viewer-label{left:25px}.viewer:fullscreen .view-controls,.viewer.expanded .view-controls{left:25px}.viewer:fullscreen .viewer-actions,.viewer.expanded .viewer-actions{right:25px}.viewer:fullscreen .viewer-help,.viewer.expanded .viewer-help{left:25px}
.stage{background:linear-gradient(180deg,rgba(8,15,22,.58),rgba(8,15,22,.28) 35%,rgba(8,15,22,.20) 58%,rgba(8,15,22,.5)),url('./public/images/stade-nuit-01.png') center center / 100% 100% no-repeat}
.viewer:fullscreen,.viewer.expanded{background:linear-gradient(180deg,rgba(8,15,22,.20),rgba(8,15,22,.40)),url('./public/images/stade-nuit-01.png') center center / cover no-repeat}
/* Le décor est maintenant rendu dans la scène 3D, sans calques fixes sur le viewer. */
.stage {background:#0b1118}
.viewer:before,.viewer:after {content:none}
.viewer:fullscreen,.viewer.expanded {background:#0b1820}
.environment-error{position:absolute;top:58px;left:12px;z-index:4;color:#fff;background:#612e2e;padding:8px 12px;border-radius:4px;font-size:11px}
.stripe-options{margin-top:15px;padding:14px;border:1px solid #30434b;border-radius:5px;background:#16232b}.stripe-options[hidden]{display:none}.stripe-options-heading{font-size:9px;letter-spacing:1.3px;font-weight:700;color:#7fa8a8;margin-bottom:12px}.stripe-options label{display:block;margin-top:11px;font-size:11px;color:#c5d3d7}.stripe-options label span{display:flex;justify-content:space-between;align-items:center}.stripe-options output{color:var(--teal);font-size:10px}.stripe-options input{display:block;width:100%;margin:8px 0 0;accent-color:var(--teal)}
.zone-hint{position:absolute;z-index:5;pointer-events:none;background:#10252deF;border:1px solid #39cbbd;color:#e9fffc;font-size:11px;font-weight:600;padding:8px 10px;border-radius:4px;white-space:nowrap;box-shadow:0 4px 18px #0008}.zone-hint[hidden]{display:none}canvas.zone-active{cursor:pointer}.zone-focused{animation:zone-focus 1.1s ease-out}@keyframes zone-focus{0%,25%{box-shadow:0 0 0 2px #20e1cf,0 0 16px #20e1cf66}100%{box-shadow:0 0 0 0 transparent}}
.layout:fullscreen,.layout.expanded{display:grid;grid-template-columns:minmax(0,1fr) 410px;position:fixed;inset:0;width:100vw;height:100vh;min-height:0;background:#0b1118;z-index:100;overflow:hidden}.layout:fullscreen .stage,.layout.expanded .stage{padding:18px 20px 0;min-height:0}.layout:fullscreen .stage-top,.layout:fullscreen .stage-footer,.layout.expanded .stage-top,.layout.expanded .stage-footer{display:none}.layout:fullscreen .panel,.layout.expanded .panel{max-height:100vh}.layout:fullscreen .viewer,.layout.expanded .viewer{min-height:0}@media(max-width:800px){.layout:fullscreen,.layout.expanded{display:block;overflow:auto}.layout:fullscreen .stage,.layout.expanded .stage{height:60vh;padding:10px 16px 0}.layout:fullscreen .panel,.layout.expanded .panel{max-height:none}}
.viewer-help .hover-desktop,.viewer-help .touch-mobile{color:#70838e;margin:0}.touch-mobile{display:none}@media(hover:none){.hover-desktop{display:none}.touch-mobile{display:inline}}
.panel-tabs{display:flex;gap:0;padding:0 20px;border-bottom:1px solid #2c3b45;overflow-x:auto;scrollbar-width:none;flex-shrink:0}.panel-tabs::-webkit-scrollbar{display:none}.panel-tabs button{position:relative;flex:0 0 auto;padding:13px 10px;background:transparent;border:0;border-bottom:2px solid transparent;color:#8fa2ad;font-size:11px;font-weight:600;white-space:nowrap}.panel-tabs button[aria-selected="true"]{color:#e9fffc;border-bottom-color:var(--teal)}.panel-tabs button:focus-visible{outline:2px solid var(--teal);outline-offset:-3px}.tab-panel[hidden]{display:none}.tab-panel .detail-body{padding:0 0 14px}.tab-panel .detail-body>label:not(.upload){margin:16px 0}.tab-panel .detail-body small{display:block;line-height:1.5}.tab-panel .text-button{padding:8px 5px}.panel-scroll{padding-top:8px}@media(max-width:400px){.panel-tabs{padding:0 10px}.panel-tabs button{padding:12px 8px;font-size:10px}}

/* Mise en page tactile : commandes accessibles et aperçu dimensionné à l'écran. */
@media (max-width: 800px) {
  .topbar {gap:12px}
  .brand {flex-shrink:0}
  .header-right {white-space:nowrap}
  .stage {padding-top:22px}
  .viewer {flex:none;height:clamp(340px, 50svh, 520px);min-height:0}
  .viewer-label {left:10px;top:14px}
  .view-controls {left:8px;bottom:54px;gap:0}
  .view-controls button {min-width:46px;min-height:44px;padding:8px 10px}
  .viewer-actions {right:8px;bottom:54px;gap:6px}
  .viewer-actions button {min-width:44px;min-height:44px;padding:8px}
  .viewer-help {left:8px;right:8px;bottom:10px;font-size:9px;line-height:1.35;letter-spacing:.2px;text-shadow:0 1px 3px #000}
  .panel {min-width:0}
  .panel-tabs button {min-height:48px;font-size:12px}
  .section-title h3,.color-row strong {font-size:14px}
  .section-title p,.accent-label,.stripe-options label,.detail-body {font-size:13px}
  .color-row {display:block;margin:18px 0}
  .color-row strong {display:block;margin-bottom:5px}
  .swatches {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;max-width:400px}
  .swatch,.custom-color {width:100%;height:44px;min-width:0;border:0;border-radius:0;padding:9px;background:var(--c);background-clip:content-box}
  .swatch.active {outline:0;box-shadow:inset 0 0 0 2px var(--teal);border-radius:50%}
  .custom-color {background:none;padding:9px}
  .custom-color::-webkit-color-swatch {border-radius:50%}
  .custom-color::-moz-color-swatch {border:0;border-radius:50%}
  .patterns button {min-height:62px}
  .stripe-options input[type=range],.detail-body input[type=range] {min-height:32px}
  .detail-body input[type=text],.detail-body input:not([type]) {font-size:16px;min-height:44px}
  .text-button,.upload {min-height:44px}
}
@media (max-width:360px) {
  .header-right {display:none}
  .swatches {grid-template-columns:repeat(4,minmax(0,1fr));max-width:240px}
  .swatch,.custom-color {width:44px;justify-self:start}
  .view-controls button {min-width:43px;padding:8px}
}
@media (hover:none), (pointer:coarse) {
  .hover-desktop {display:none}
  .touch-mobile {display:inline}
}
/* Paysage court : garder le maillot et les réglages visibles côte à côte. */
@media (min-width:600px) and (max-height:500px) {
  .topbar {height:52px}
  .header-center {display:none}
  .layout,.layout:fullscreen,.layout.expanded {display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,38%);height:calc(100svh - 52px);min-height:0;overflow:hidden}
  .stage,.layout:fullscreen .stage,.layout.expanded .stage {height:auto;min-height:0;padding:8px}
  .stage-top,.stage-footer {display:none}
  .viewer,.layout:fullscreen .viewer,.layout.expanded .viewer {flex:1;height:auto;min-height:0}
  .panel,.layout:fullscreen .panel,.layout.expanded .panel {height:100%;max-height:none;min-height:0;border-left:1px solid #283640}
  .panel-header {padding:10px 18px 4px}
  .panel-header .eyebrow,.panel-header p {display:none}
  .panel-header h2 {font-size:20px;margin:0}
  .panel-header h2 br {display:none}
  .panel-tabs {padding:0 8px}
  .panel-tabs button {padding:9px 7px;min-height:40px;font-size:11px}
  .panel-scroll {flex:1;min-height:0;overflow:auto;padding:4px 18px 12px}
  .panel-bottom {padding:8px 18px}
  .primary {padding:10px}
  .reset {margin:5px auto}
  .panel-footnote {display:none}
}
@media (min-width:600px) and (max-height:500px) {
  .layout:fullscreen,.layout.expanded {height:100svh}
}
@media (max-width:800px) {
  .swatch {position:relative;background:none;padding:0}
  .swatch::after {content:"";position:absolute;inset:9px;border-radius:50%;background:var(--c);border:1px solid #61717d}
}
@media (max-width:800px) {
  .viewer-help {bottom:6px;padding:4px 6px;border-radius:3px;background:#0a1821c9;color:#c1d2d5}
  .viewer-help .hover-desktop,.viewer-help .touch-mobile {color:inherit}
}
@media (min-width:600px) and (max-height:500px) {
  .viewer-label {left:8px;top:10px}
  .view-controls {left:8px;bottom:42px}
  .view-controls button {min-height:40px}
  .viewer-actions {right:8px;bottom:42px}
  .viewer-help {left:8px;right:8px;bottom:6px;padding:4px 6px;background:#0a1821c9;border-radius:3px;color:#c1d2d5;font-size:9px;letter-spacing:.1px}
  .viewer-help .hover-desktop,.viewer-help .touch-mobile {color:inherit}
  .color-row {display:block;margin:10px 0}
  .color-row strong {display:block;margin-bottom:4px}
  .swatches {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0}
  .swatch,.custom-color {width:100%;height:40px;min-width:0;border:0;padding:8px;border-radius:0}
  .swatch {position:relative;background:none;padding:0}
  .swatch::after {content:"";position:absolute;inset:8px;border-radius:50%;background:var(--c);border:1px solid #61717d}
  .swatch.active {outline:0;box-shadow:inset 0 0 0 2px var(--teal);border-radius:50%}
  .custom-color {background:none}
  .custom-color::-webkit-color-swatch {border-radius:50%}
  .custom-color::-moz-color-swatch {border:0;border-radius:50%}
  .detail-body input[type=text],.detail-body input:not([type]) {font-size:16px}
}
