:root{--green:#173e35;--mint:#e9f0eb;--ink:#203730;--muted:#6b7872;--border:#dce4dd;--cream:#f8faf7}*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:var(--cream);color:var(--ink);font-size:14px}button,input,select,textarea{font:inherit}button,.button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 17px;border:1px solid var(--border);border-radius:7px;background:#fff;color:var(--ink);font-weight:600;text-decoration:none}button:hover,.button:hover{border-color:#77998b;background:#f0f5ef}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--green);border-color:var(--green);color:white}.primary:hover{background:#285547;color:#fff}.danger{color:#a74232}.light{background:transparent}header{height:85px;background:white;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;padding:0 34px;position:relative;z-index:2}.brand{display:flex;align-items:center;gap:13px;color:var(--green);text-decoration:none;font-size:20px;font-weight:800;letter-spacing:1.5px}.brand-mark{background:var(--green);color:white;width:40px;height:44px;display:grid;place-items:center;border-radius:12px 3px 12px 3px;font-family:Georgia;font-size:30px}.brand small{display:block;font-size:11px;letter-spacing:1px;font-weight:400;margin-top:5px}.header-right{display:flex;align-items:center;gap:20px}.muted,.hint{color:var(--muted);font-size:12px;line-height:1.6}.shell{display:grid;grid-template-columns:235px 1fr;min-height:calc(100vh - 85px)}aside{background:white;border-right:1px solid var(--border);padding:32px 19px;position:relative}.nav-label{font-size:10px;letter-spacing:1.4px;color:var(--muted);padding:0 12px;margin-bottom:17px}nav{display:grid;gap:7px}nav button{justify-content:flex-start;border:0;font-weight:500;font-size:13px;min-height:46px;padding:12px}nav button.selected{background:var(--mint);color:var(--green);font-weight:700}nav span{margin-left:auto;border-radius:12px;padding:2px 6px;background:white}.aside-note{border-top:1px solid var(--border);margin:40px 10px 0;padding-top:25px;font-size:12px;line-height:1.6}.aside-note p,.aside-note small{color:var(--muted)}.build{font-size:10px;color:var(--muted);padding:40px 10px}main{padding:36px 42px;max-width:1500px;width:100%;margin:auto}h1{font-size:32px;letter-spacing:-1px;margin:8px 0 12px;font-weight:600}h2{font-size:17px;margin:0 0 17px}.eyebrow{font-size:10px;letter-spacing:1.7px;color:#638476;font-weight:700}.page-head p{color:var(--muted);margin-bottom:25px}.mode-switch{display:flex;gap:3px;padding:4px;background:#eaf0e9;border-radius:8px;max-width:500px;margin:22px 0}.mode-switch button{flex:1;border:0;background:none;font-size:12px;padding:11px}.mode-switch button.active{background:white;box-shadow:0 1px 4px #163b3211}.card{padding:25px;border:1px solid var(--border);background:white;border-radius:10px;margin-bottom:20px;box-shadow:0 4px 20px #173e3503}label{display:block;font-size:12px;font-weight:600;margin-bottom:16px}input,textarea,select{display:block;width:100%;border:1px solid #ccd8d0;border-radius:6px;padding:11px 12px;margin-top:7px;background:white;color:var(--ink);outline:none;font-size:14px}input:focus,textarea:focus,select:focus{border-color:#356d57;box-shadow:0 0 0 3px #dcecdf}textarea{resize:vertical;line-height:1.4}input::placeholder,textarea::placeholder{color:#93a097}.row{display:flex;gap:10px}.row input{margin:0}.row button{white-space:nowrap}.row+ .hint{margin-top:10px}.editor-layout{display:grid;grid-template-columns:minmax(320px,1fr) minmax(280px,1fr);gap:28px;align-items:start}.section-title{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:8px}.badge{font-size:10px;background:var(--mint);padding:5px 7px;border-radius:4px;color:#466e5e}.fields{display:grid;gap:12px}.two{grid-template-columns:1fr 1fr}.editor-actions{display:flex;gap:14px;align-items:end;border-top:1px solid var(--border);padding-top:20px;margin-top:20px}.editor-actions label{width:95px;margin:0}.editor-actions button{flex:1;height:43px}details{border-top:1px solid #edf1ec;padding-top:15px;margin-top:12px}summary{cursor:pointer;font-size:12px;color:var(--muted);margin-bottom:14px}.preview-column{position:sticky;top:20px}.preview-header{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1px;color:var(--muted);margin:6px 0 15px}.preview{padding:25px;background:#ecf0e9;border-radius:9px;min-height:290px;display:flex;align-items:center;justify-content:center}.preview svg{display:block;width:100%;max-height:460px;filter:drop-shadow(0 6px 7px #00000017)}.preview.vasque svg{max-width:300px}.full{width:100%;margin-top:8px}.source-details{font-size:12px;line-height:1.7;padding:20px 0;color:var(--muted)}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.toolbar input{width:300px;margin:0}.toolbar label{margin:0}.error{color:#ae3426;font-size:12px;line-height:1.6;margin-top:12px}.result-button{width:100%;justify-content:space-between;text-align:left;margin-top:9px;font-weight:400}.result-button b{display:block;font-size:13px}.result-button small{display:block;color:var(--muted);margin-top:5px}#results{max-height:350px;overflow:auto}#notice{padding:13px 18px;background:#e1efe2;border:1px solid #c4dcc5;border-radius:7px;margin-bottom:20px;line-height:1.5}#notice.error{background:#fff0e9;border-color:#f0c2b9}.queue-item,.archive-item{display:flex;align-items:center;gap:18px;background:white;border:1px solid var(--border);border-radius:8px;padding:17px;margin:10px 0}.queue-item .thumb{width:110px;min-width:110px}.queue-item .thumb svg{width:100%;max-height:85px}.item-info{flex:1}.item-info b{display:block;margin-bottom:5px}.item-info small{color:var(--muted)}.queue-item input{width:68px;margin:0}.queue-item button,.archive-item button{padding:9px}.empty{text-align:center;padding:60px 30px;color:var(--muted);border:1px dashed #cbd7cc;background:white;border-radius:9px}.sheet-previews{overflow:auto;max-width:100%;margin-top:25px}.sheet-previews .paper{zoom:.42;margin:15px auto}.paper{width:297mm;height:210mm;background:white;position:relative;box-shadow:0 3px 15px #0002;margin-bottom:20px;overflow:hidden}.print-label{position:absolute}.print-label svg{width:100%;height:100%;display:block}#print-root{display:none}.dropzone{border:1px dashed #a7bfad;background:#f6faf4;padding:32px;text-align:center;cursor:pointer}.dropzone span{display:block;font-weight:400;color:var(--muted);margin-top:12px}.dropzone input{max-width:350px;margin:20px auto 0}.import-table{overflow:auto;max-height:500px;background:white;border:1px solid var(--border)}table{border-collapse:collapse;width:100%;font-size:12px}th,td{padding:11px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}th{background:#edf3ec;position:sticky;top:0}td input{width:18px}footer{border-top:1px solid var(--border);margin-top:40px;padding:22px 0;color:#8a978f;letter-spacing:1px;font-size:9px}footer span{float:right;letter-spacing:0}#camera{max-width:480px;margin:auto}#camera video{width:100%}[hidden]{display:none!important}
@media(max-width:1100px){main{padding:28px 22px}.shell{grid-template-columns:200px 1fr}.editor-layout{grid-template-columns:1fr}.preview-column{position:static;grid-row:1}.preview svg{max-width:650px}.preview{min-height:0}.header-right .muted{display:none}}
@media(max-width:650px){header{padding:15px;height:75px}.brand{font-size:16px}.brand small{font-size:9px}.shell{display:block}aside{padding:10px;border:0;border-bottom:1px solid var(--border)}nav{display:flex;overflow:auto;gap:4px}nav button{white-space:nowrap;font-size:11px;padding:8px;min-height:35px}.nav-label,.aside-note,.build{display:none}main{padding:22px 14px}h1{font-size:28px}.card{padding:17px}.row{flex-wrap:wrap}.row input{flex-basis:100%}.row button{flex:1}.editor-layout{gap:15px}.two{gap:9px}.queue-item{flex-wrap:wrap}.queue-item .thumb{width:80px;min-width:80px}.archive-item{flex-wrap:wrap}.preview{padding:12px}.header-right a{font-size:11px;padding:10px}.sheet-previews .paper{zoom:.25}}
@page{size:A4 landscape;margin:0}@media print{body{background:white}body>header,.shell{display:none!important}#print-root{display:block}.paper{margin:0;box-shadow:none;break-after:page;page-break-after:always}.paper:last-child{break-after:auto;page-break-after:auto}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
/* Mobile: intrinsic form widths must not enlarge the editor grid. Desktop unchanged. */
@media(max-width:650px){
 .editor-layout{grid-template-columns:minmax(0,1fr)}
 .editor-layout>*,.fields>label{min-width:0}
 .editor-layout .two{grid-template-columns:repeat(2,minmax(0,1fr))}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px;min-width:0}
 nav button{min-height:44px}
}
/* Retour explicite au portail, sans comprimer les commandes sur téléphone. */
@media(max-width:650px){header{height:auto;min-height:75px;flex-wrap:wrap;gap:10px}.header-right{gap:8px;flex-wrap:wrap;max-width:100%}}

.copy-step{display:inline-flex;gap:.3rem;align-items:center}.copy-step button{min-width:46px;min-height:46px;font-size:1.35rem}.copy-step input{width:4.5rem;text-align:center;min-height:46px;font-size:16px}.copy-step input::-webkit-inner-spin-button{appearance:none}#loaded-product,#results{scroll-margin-top:5.5rem}#loaded-product{overflow-wrap:anywhere}
#photo-open{margin:.6rem 0}#photo-panel{margin:.6rem 0;scroll-margin-top:5rem}#photo-panel input[type=file]{max-width:100%;display:block}#photo-preview{display:block;max-width:100%;max-height:50vh;width:auto;height:auto;background:white;margin:1rem auto;box-shadow:0 1px 6px #888}#photo-controls>label{display:block;margin:.6rem 0}#photo-panel button{min-height:44px}
