:root{--violet:#7924e5;--orange:#ff7b0a;--ink:#151c31;--muted:#686d81;--border:#e5e5f0;--wash:#f6f5fb;--shadow:0 12px 36px #30234d08;font-family:Inter,Arial,system-ui,sans-serif;color:var(--ink);background:var(--wash)}
*{box-sizing:border-box}
body{margin:0}
button,input,select{font:inherit}
button,a,input,select{touch-action:manipulation}
button{border:1px solid var(--border);border-radius:12px;padding:12px 16px;background:white;color:var(--ink);cursor:pointer;min-height:44px;font-weight:600}
button:hover{border-color:var(--violet);background:#faf7ff}
button:disabled{opacity:.35;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ffab55;outline-offset:3px}
input,select{width:100%;min-width:0;min-height:46px;padding:12px;border:1px solid #dcdde9;border-radius:11px;background:white;color:var(--ink);font-size:16px}
label{display:block;margin:16px 0 8px;font-size:14px;font-weight:650}
h1,h2,p{margin:0}
p{line-height:1.55}
header{background:#fff;border-bottom:1px solid var(--border);padding:16px max(4%,calc((100vw - 1420px)/2));display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:54px;width:54px;object-fit:contain}
.brand strong{font-size:18px;font-weight:800;letter-spacing:-.4px}
.brand small{display:block;font-size:12px;color:var(--orange);letter-spacing:1.2px;margin-top:5px}
.install{color:var(--violet);border-color:#e3cef9}
.primary{background:var(--violet);color:white;border:0}
.primary:hover{background:#6420bc;color:white}
.gradient{background:linear-gradient(110deg,#ff8700,#9c33ca);color:white;border:0;box-shadow:0 6px 20px #a946bb25}
.gradient:hover{background:linear-gradient(110deg,#f47b00,#892ab8);color:white}
main{max-width:1420px;margin:auto;padding:30px 4%}
.pagehead{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px}
.eyebrow{font-size:12px;color:var(--violet);font-weight:800;letter-spacing:1.6px;margin-bottom:9px}
.pagehead h1{font-size:30px;letter-spacing:-1px;margin-bottom:8px}
.pagehead p{font-size:15px;color:var(--muted)}
.topactions{display:flex;gap:8px;flex-shrink:0}
.layout{display:grid;grid-template-columns:290px minmax(0,1fr);align-items:start;gap:22px}
.panel,.workspace{background:white;border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow)}
.panel{padding:20px}
.panel+.panel{margin-top:18px}
summary{font-size:16px;font-weight:750;cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:12px}
summary::-webkit-details-marker{display:none}
summary:after{content:'+';color:var(--violet)}
details[open]>summary:after{content:'−'}
summary small{font-size:13px;color:var(--muted);font-weight:500}
.duo{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.notice{font-size:13px;color:#8a5724;background:#fff7e9;border:1px solid #ffdfb0;padding:12px;border-radius:12px;margin-top:18px}
.presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px;max-height:415px;overflow:auto;padding:3px}
.presets button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;font-size:14px;text-align:center;padding:12px 6px;font-weight:600;min-height:85px}
.presets button.picked{background:#f2e9ff;border-color:var(--violet);color:var(--violet)}
.preseticon svg{width:26px;height:26px}
.workspace{padding:24px}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.toolbar h2{font-size:20px;letter-spacing:-.5px}
.badge{font-size:12px;padding:7px 10px;border-radius:20px;background:#f1e9fd;color:var(--violet);white-space:nowrap}
.rowtabs{display:flex;gap:7px;overflow:auto;padding:3px 2px 12px}
.rowtabs button{font-size:14px;min-height:38px;white-space:nowrap;padding:8px 12px;border-radius:9px}
.rowtabs button.active{background:var(--ink);border-color:var(--ink);color:white}
.board{background:linear-gradient(145deg,#f5f4f9,#ededf5);border:1px solid var(--border);border-radius:15px;padding:16px}
.rowtitle{display:flex;align-items:center;justify-content:space-between;margin:6px 0 10px;font-size:13px;color:var(--muted)}
.rowblock+.rowblock{margin-top:18px}
.stripscroll{overflow-x:auto;padding:4px 3px 10px;scrollbar-color:#c1abd9 #e9e5f0}
.strip{display:flex;width:max-content;box-shadow:0 3px 7px #3420470b}
.label{width:76px;height:112px;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:8px 6px;border:1px solid #d4cedf;border-top:4px solid var(--color);border-radius:0;position:relative;background:white;text-align:center;overflow:hidden}
.label:hover{background:#fbf8ff}
.label.active{background:#f4eaff;outline:2px solid var(--violet);outline-offset:-2px}
.label.empty{border-top-color:#d4cedf;color:#bbb5c6}
.label .number{position:absolute;left:5px;top:4px;font-size:9px;color:#8a8198;font-weight:400}
.label b{font-size:11px;line-height:1.2;font-weight:500;letter-spacing:.08px;color:#4d4358;overflow-wrap:anywhere;max-width:100%}
.label small{font-size:10px;line-height:1.2;font-weight:400;overflow-wrap:anywhere}
.icon{color:var(--color);display:block}
.icon svg{display:block;width:calc(var(--icon-size,1)*29px);height:calc(var(--icon-size,1)*29px)}
.boardhint{font-size:13px;color:var(--muted);margin:10px 0 22px}
.editor{border:1px solid #e0d3f0;border-radius:16px;padding:20px;background:#fdfbff}
.edithead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:15px;border-bottom:1px solid #eee6f7}
.edithead strong{display:block;font-size:17px}
.edithead small{display:block;font-size:12px;color:var(--muted);margin-top:5px}
.clear{font-size:13px;min-height:36px;padding:8px 12px;color:#7d738e;background:transparent}
.editgrid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:0 24px}
.widthcontrol{display:flex;gap:7px}
.widthcontrol button{width:44px;padding:0;color:var(--violet);font-size:22px;flex-shrink:0}
.widthcontrol select{font-weight:700}
.colors{display:flex;gap:10px;margin-top:10px;padding:4px 2px}
.color{width:34px;min-height:34px;height:34px;border-radius:50%;padding:0;border:4px solid white;box-shadow:0 0 0 1px #d9d2e1}
.color.chosen{box-shadow:0 0 0 3px var(--violet)}
.actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}
.status{font-size:13px;color:var(--violet);line-height:1.4}
.draft{font-size:12px;color:var(--muted);margin-top:18px}
.mobileonly{display:none}
footer{font-size:12px;color:#9790a2;padding:22px 0 8px}
.printsheet{display:none}
dialog{border:0;border-radius:22px;padding:28px;max-width:440px;width:calc(100% - 32px);color:var(--ink);box-shadow:0 20px 80px #16082c40}
dialog::backdrop{background:#170d2f88}
dialog h2{font-size:22px;margin-bottom:12px}
dialog p{color:var(--muted);font-size:15px;margin-bottom:16px}
dialog ol{padding-left:22px;line-height:1.6;font-size:15px}
dialog button{width:100%;margin-top:10px}
body{padding-bottom:env(safe-area-inset-bottom)}
@media(max-width:850px){main{padding:22px 14px}
.layout{grid-template-columns:1fr}
.workspace{grid-row:1;padding:16px;min-width:0}
.sidebar{grid-row:2}
.pagehead{align-items:flex-start;gap:12px}
.pagehead h1{font-size:25px}
.pagehead p{display:none}
.pagehead .eyebrow{font-size:10px}
.topactions{flex-direction:column}
.topactions button{font-size:13px;padding:10px 12px}
.mobileonly{display:block}
.editgrid{grid-template-columns:1fr 1fr;gap:0 12px}
.editor{padding:16px}
.board{padding:10px}
.toolbar h2{font-size:17px}
.toolbar .badge{font-size:10px}
.brand img{width:42px;height:42px}
.brand strong{font-size:16px}
.brand small{font-size:9px;letter-spacing:.7px}
header{padding:12px 16px}
.install{padding:10px;font-size:12px}
.label{height:110px}
.actions{align-items:stretch;flex-direction:column}
.actions button{width:100%}
.edithead strong{font-size:15px}
.boardhint{margin-bottom:16px}
.presets{max-height:330px;grid-template-columns:repeat(3,1fr)}
.panel{padding:18px}
.sidebar{display:grid;gap:14px}
.panel+.panel{margin:0}
.draft{font-size:11px}
.color{width:36px;height:36px;min-height:36px}
}
@media(max-width:420px){.editgrid{grid-template-columns:1fr}
.editor .duo{grid-template-columns:1fr 1fr}
.wide{grid-column:1/-1}
.pagehead h1{font-size:23px}
.brand small{max-width:145px}
.badge{white-space:normal}
.toolbar{align-items:flex-start}
}

@page{size:A4 landscape;margin:10mm}
@media print{body>*{display:none!important}
.printsheet{display:block!important;color:black}
.printbrand{display:flex;align-items:center;gap:4mm;margin-bottom:4mm}
.printbrand img{width:12mm;height:12mm;object-fit:contain}
.printbrand h2{font:14px Arial;margin:0}
.printblock{break-inside:avoid;margin-bottom:5mm}
.printblock p{font:9pt Arial;margin:0 0 2mm}
.printrow{display:flex}
.printlabel{flex-shrink:0;width:calc(var(--pitch)*1mm);height:calc(var(--height)*1mm);border:.2mm solid #999;border-top:1mm solid var(--color);display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;text-align:center;padding:.6mm;gap:.4mm;font:8pt Arial;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.printlabel .icon svg{width:calc(var(--icon-size,1)*5mm);height:calc(var(--icon-size,1)*5mm)}
.printlabel b{font-size:7pt;line-height:1.08;overflow-wrap:anywhere}
.printlabel small{font-size:6pt;line-height:1.1}
.calibration{width:100mm;border-top:.3mm solid black;font:8pt Arial;margin-top:8mm;padding-top:2mm}
}


.topactions{flex-wrap:wrap;max-width:430px;justify-content:flex-end}
.dossierline{display:flex;align-items:center;gap:12px;margin-top:18px;flex-wrap:wrap}
.dossierline button{font-size:13px;color:var(--violet)}
.dossierline span{font-size:12px;color:var(--muted)}
@media(max-width:850px){.pagehead{flex-wrap:wrap}
.topactions{flex-direction:row;width:100%;max-width:none;justify-content:flex-start}
.topactions button{flex:1;min-width:130px}
.topactions .mobileonly{flex-basis:100%}
.dossierline{align-items:flex-start;flex-direction:column}
}


.icon{display:flex;align-items:center;justify-content:center;gap:4px;max-width:100%}
.icon svg{flex-shrink:1;min-width:0}
.installlink{display:inline-flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #e3cef9;border-radius:12px;padding:10px 14px;text-decoration:none;font-size:14px;font-weight:650}
.installlink:hover{background:#faf5ff}
@media(max-width:850px){.installlink{font-size:12px;max-width:135px;text-align:center}
}


[hidden]{display:none!important}

.previewdialog{width:min(1120px,calc(100vw - 30px));max-width:none;height:min(92dvh,950px);max-height:92dvh;padding:0;border-radius:20px;overflow:hidden;flex-direction:column}
.previewdialog[open]{display:flex}
.previewhead{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid var(--border)}
.previewhead h2{font-size:21px;margin:0}
.previewhead p{margin:5px 0 0;font-size:13px;color:var(--muted)}
.previewhead button{width:auto;margin:0}
.previewtools{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 24px;border-bottom:1px solid var(--border);background:#faf8fe}
.pagecontrols{display:flex;gap:12px;align-items:center}
.pagecontrols button{font-size:13px;min-height:38px;padding:8px 12px;width:auto;margin:0}
.pagecontrols span{font-size:14px;white-space:nowrap}
.zoomcontrol{display:flex;gap:9px;align-items:center}
.zoomcontrol label{margin:0;font-size:13px;white-space:nowrap}
.zoomcontrol select{font-size:14px;min-height:38px;padding:8px;max-width:190px}
.previewstage{flex:1;min-height:0;overflow:auto;background:#e8e5ee;padding:20px;text-align:center}
.previewstage canvas{display:block;background:white;box-shadow:0 4px 24px #22152c25;margin:0 auto}
.previewstatus{font-size:13px;color:var(--violet);padding:0 24px;background:#faf8fe;min-height:0;line-height:1.5;margin:0}
.previewstatus:not(:empty){padding-top:8px;padding-bottom:8px}
.previewfoot{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 24px;border-top:1px solid var(--border)}
.previewfoot p{font-size:13px;color:var(--muted);margin:0;max-width:390px}
.previewactions{display:flex;align-items:center;gap:8px}
.previewactions button,.previewactions a{width:auto;margin:0;font-size:13px;white-space:nowrap}
.previewdialog .installlink{border:1px solid #e3cef9}
.topactions{max-width:580px}
.topactions #preview{color:var(--violet);border-color:#d9c2f5}
@media(max-width:850px){.previewdialog{width:calc(100vw - 12px);height:96dvh;max-height:96dvh;border-radius:16px}
.previewhead{padding:14px}
.previewhead h2{font-size:17px}
.previewhead p{font-size:11px}
.previewhead button{font-size:12px;padding:8px}
.previewtools{padding:10px 14px;flex-wrap:wrap;gap:10px}
.pagecontrols{justify-content:space-between;gap:8px;width:100%}
.zoomcontrol{width:100%;justify-content:space-between}
.previewstage{padding:10px}
.previewfoot{padding:12px 14px;flex-direction:column;align-items:stretch}
.previewfoot p{font-size:12px;max-width:none}
.previewactions{display:grid;grid-template-columns:1fr 1fr}
.previewactions button,.previewactions a{font-size:12px;white-space:normal}
.previewstatus{padding-left:14px;padding-right:14px}
.topactions{max-width:none}
}
@media print{.printsheet.monochrome .printlabel{border-top-color:#151c31}
.printsheet.monochrome .printlabel .icon{color:#151c31}
}

.icon{color:var(--icon-color,var(--color))}
.preseticon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#f3eaff,#fff3e5);color:#7924e5}
.preseticon svg{width:30px;height:30px}
.presets button{border-color:#eee8f5;transition:background .15s,border-color .15s}
.presets button:hover{background:#f9f3ff;border-color:#b790e5}
.iconcolors{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.iconcolors label{margin:0 0 7px;font-size:12px;color:var(--muted);font-weight:500}
.iconcolors input[type=color]{padding:5px;height:46px;cursor:pointer}
.label .icon svg{filter:drop-shadow(0 1px 0 #ffffff)}
@media print{.printlabel .icon svg{filter:none}
.printsheet.monochrome .printlabel .icon svg{filter:grayscale(1)}
}

header .installlink[hidden]{display:none!important}


.photodialog{width:min(900px,96vw);max-height:94dvh;border:0;border-radius:24px;padding:24px;color:#151c31;overflow:auto}
.photodialog::backdrop{background:#1b0b39b8;backdrop-filter:blur(5px)}
.phototools{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:16px 0}
.phototools label{display:block}
.phototools select{min-width:140px}
.photostatus{background:#f3edfc;padding:14px;border-radius:12px;font-weight:600}
.photocanvaswrap{text-align:center;background:#f5f3fa;border-radius:16px;padding:8px}
.photocanvaswrap canvas{max-width:100%;max-height:60dvh;width:auto;height:auto;touch-action:manipulation}
.photoreviewrow{border:1px solid #e6def2;border-radius:16px;padding:16px;margin:12px 0}
.photoreviewrow p{margin:5px 0;font-size:14px}
.photoreviewrow pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;color:#5e6572}
.photocheck{display:flex;gap:10px;margin:20px 0;align-items:flex-start}
.photocheck input{width:20px;height:20px;flex-shrink:0}
.photodialog [hidden]{display:none!important}
@media(max-width:600px){.photodialog{padding:16px;border-radius:18px}
.photodialog .previewhead{gap:8px}
.photodialog h2{font-size:22px}
.phototools button{flex:1;min-width:130px}
}


.photocalibration{background:white;border:1px solid #e6def2;border-radius:18px;padding:16px;margin:16px 0}
.photocalibration h3{margin:0 0 8px}
.photocalibration>label{display:block;margin-top:14px}
.photocalibration select{width:100%;min-height:48px;margin-top:6px}
.photostrip{overflow-x:auto;border-radius:12px;background:#f3edfc;padding:6px}
.photostrip canvas{display:block;height:150px;width:auto;max-width:none}
.photostepper{display:flex;align-items:center;gap:18px;margin-top:8px}
.photostepper button{min-width:64px;min-height:54px;font-size:28px;border-radius:14px;background:#f3edfc;color:#7924e5;font-weight:700}
.photostepper strong{font-size:28px;min-width:42px;text-align:center}
.photocalibration .draft{margin:12px 0}
.photocalibration .clear{min-height:44px}


.worktools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 16px}
.worktools .badge{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.projectdialog,.actionsdialog{width:min(960px,96vw);max-height:94dvh;overflow:auto;padding:24px;border:0;border-radius:24px;color:#151c31}
.projectdialog::backdrop,.actionsdialog::backdrop{background:#1b0b39b8;backdrop-filter:blur(5px)}
.projectform{padding:18px;background:#f6f1ff;border-radius:18px;margin:18px 0}
.projectform label{display:block;margin:12px 0 6px}
.projectform input{width:100%;min-height:44px}
.projectform button{margin-top:14px}
.projecttemplates{border:1px solid #e6def2;border-radius:14px;padding:16px}
.projecttemplates summary{font-weight:700;cursor:pointer}
.projectfilters{display:flex;gap:10px;margin-top:22px}
.projectfilters input{flex:1;min-width:0;min-height:44px}
.projectlist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.projectcard{border:1px solid #e6def2;border-radius:18px;padding:16px;box-shadow:0 5px 18px #28114508}
.projectcard h3{margin:0 0 8px;overflow-wrap:anywhere}
.projectcard p{font-size:13px;color:#5e6572;overflow-wrap:anywhere}
.projectmini{background:#faf8ff;border-radius:10px;padding:8px;margin:12px 0}
.projectminirow{display:flex;margin:4px 0;gap:2px;height:26px}
.projectminirow span{display:flex;align-items:center;justify-content:center;min-width:0;background:white;border:1px solid #e6def2;border-top-width:3px}
.projectminirow svg{height:17px;width:17px}
.projectactions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.projectactions button{min-height:44px}
.actionsdialog>button,.actionsdialog>select{display:block;width:100%;min-height:48px;margin:12px 0}
.actionsdialog>label{display:block;margin-top:18px}
.actionsdialog>p{font-size:14px}
.previewactions{flex-wrap:wrap}
@media(max-width:600px){.projectdialog,.actionsdialog{padding:16px;border-radius:18px}
.projectlist{grid-template-columns:1fr}
.worktools button{flex:1;min-height:44px}
.worktools .badge{flex-basis:100%}
.projectfilters{flex-wrap:wrap}
.projectfilters input{flex-basis:100%}
.topactions button{min-height:44px}
}


.photofine{border:1px solid #e6def2;border-radius:12px;padding:12px;margin:12px 0}
.photofine summary{font-weight:600;cursor:pointer}
.photofine input[type=range]{width:100%;min-height:48px;accent-color:#ff7b0a}
.photoreviewedit{display:grid;grid-template-columns:90px 1fr 1fr;gap:8px;margin:10px 0;align-items:center}
.photoreviewedit input,.photoreviewedit select{min-width:0;min-height:44px;width:100%}
.photoreviewedit select{grid-column:2/-1}
@media(max-width:600px){.photoreviewedit{grid-template-columns:1fr 1fr}
.photoreviewedit strong{grid-column:1/-1}
.photoreviewedit select{grid-column:1/-1}
}


/* Atelier premium 1.4 */
.premiumshortcuts,.multibar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:16px 0;padding:14px;border:1px solid #e5d7fa;border-radius:18px;background:linear-gradient(120deg,#f3ecff,#fff5ea)}

.multibar[hidden]{display:none}
.multibar strong{flex-basis:100%}
.multibar select,.premiumshortcuts select{width:auto;min-width:100px}
.label.multi-picked{outline:3px solid #7924e5;outline-offset:-3px;background:#f1e8ff}
.label.multi-picked .number:after{content:' ✓';color:#7924e5;font-weight:800}

.favpreview{display:flex;gap:10px}
.favpreview svg{width:40px;height:40px}
.checkitem{display:block;width:100%;text-align:left;margin:10px 0;white-space:normal}
.projectcard button{margin:4px}
#iconsearch{margin-bottom:8px}
#iconsearchcount{font-size:12px;color:#686d81}
#presets button[hidden]{display:none}

@media(max-width:850px){.worktools{gap:8px}
.worktools button{min-height:44px}
.premiumshortcuts button{flex:1}
.multibar button{min-height:44px}
.projectdialog{max-height:90dvh;overflow:auto}
.checkitem{min-height:48px}
}


.trashshortcut,.trashdelete{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px}
.trashshortcut svg,.trashdelete svg{width:22px;height:22px;flex-shrink:0}
.trashshortcut{color:#7924e5;border:1px solid #cfb0f4;background:#f3eaff;font-weight:700}
.trashdelete{color:#a52635;border:1px solid #efc3c9;background:#fff2f3}
.projectfilters{position:sticky;top:0;z-index:2;background:#fff;padding:12px 0;flex-wrap:wrap}
.projectfilters input{flex-basis:100%}
.projectfilters button[aria-pressed="true"]{background:#7924e5;color:white;border-color:#7924e5}
#trashhelp{flex-basis:100%;margin:0;color:#686d81;font-size:14px}
.projectform[hidden],.projecttemplates[hidden],#trashhelp[hidden]{display:none}


/* Plein écran chantier */
#focusdock[hidden]{display:none}
body.focusmode header,body.focusmode .pagehead,body.focusmode .sidebar,body.focusmode footer,body.focusmode .worktools,body.focusmode .boardhint,body.focusmode .dossierline,body.focusmode .draft{display:none}
body.focusmode main{max-width:none;padding:12px 12px 128px}
body.focusmode .layout{display:block}
body.focusmode .workspace{width:100%;min-width:0}
body.focusmode .rowtabs{position:sticky;top:0;z-index:3;background:#fff;padding:8px 0}
body.focusmode .toolbar{margin-bottom:8px}
#focusdock{position:fixed;bottom:0;left:0;right:0;z-index:10;display:flex;justify-content:center;flex-wrap:wrap;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -5px 25px #34204420;border-top:1px solid #e1d3f4}
#focusdock button{min-height:44px;font-size:13px;padding:9px 12px}
#focusexit{background:#7924e5;color:#fff;border-color:#7924e5}
body.focusmode .stripscroll{scroll-padding:12px}
body.focusmode .editor{margin-bottom:12px}
@media(min-width:851px){body.focusmode main{padding-bottom:90px}
#focusdock{justify-content:flex-end}
}


.label{position:relative}
.draghandle{position:absolute;right:1px;top:22px;width:28px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#f0e6fb;color:#7924e5;font-size:24px;touch-action:none;cursor:grab;z-index:1}
.dragtarget{outline:3px dashed #ff7b0a!important;outline-offset:-3px}
.draghint{font-size:12px;color:#686d81;margin:12px 0}
#dragghost{position:fixed;width:145px;z-index:1000;pointer-events:none;background:#7924e5;color:white;padding:12px;border-radius:14px;box-shadow:0 8px 25px #34204440;font-size:13px}
.label.empty .draghandle{display:none}
body.focusmode .draghint{display:none}

.chantierphoto{margin-top:20px}
.chantierphoto summary{font-weight:700}
.chantierphoto img{width:100%;max-height:320px;object-fit:contain;border-radius:16px;background:#f5f1fa;margin-top:12px;cursor:zoom-in}
.chantierphoto img[hidden]{display:none}
#chantierphotolarge{width:100%;max-height:70dvh;object-fit:contain;border-radius:12px}
body.focusmode .chantierphoto{display:none}

#emailbody{width:100%;box-sizing:border-box;border:1px solid #d9cbea;border-radius:12px;padding:12px;font:inherit;line-height:1.5;resize:vertical}
#emaildialog input{width:100%}
#emailstatus{color:#686d81;line-height:1.5}

#clientnotes{box-sizing:border-box;width:100%;resize:vertical;min-height:100px;border:1px solid #dcd5e7;border-radius:12px;padding:12px;font:inherit;background:#faf8fd;color:#242033}
#dictate{margin-top:8px;width:100%}
#voicetext{width:100%;box-sizing:border-box;margin-bottom:16px}


.statusbadge{display:inline-block;padding:5px 10px;border-radius:99px;font-size:12px;font-weight:600;margin:0 0 8px;background:#f0e8fc;color:#7924e5}
.statusbadge.review{background:#fff0df;color:#965000}
.statusbadge.done{background:#e8f5ed;color:#246742}
#statusfilter{min-width:150px}
.beforephoto img{max-width:100%;max-height:320px;object-fit:contain;border-radius:12px}
#beforephotolarge{width:100%;max-height:70vh;object-fit:contain}


.workspacebox{border:1px solid #e3d9f1;background:#fbf9fe;border-radius:18px;padding:18px;margin:16px 0}
.workspacebox h3{color:#61417e}
.workspacebox input:not([type=checkbox]),.workspacebox select{box-sizing:border-box;width:100%;margin-bottom:10px}
.workspacebox button{margin:6px 6px 6px 0}
.changeitems{max-height:360px;overflow:auto;background:white;border-radius:12px;padding:12px;margin:12px 0}
.changeitems p{border-bottom:1px solid #eee8f4;padding:8px 0;margin:0;font-size:13px;overflow-wrap:anywhere}
.searchcircuit{width:100%;text-align:left;margin:6px 0;padding:16px;border-radius:14px;background:#faf7ff;line-height:1.5}
#globalquery{width:100%;box-sizing:border-box;margin:12px 0}

.clientview{width:min(1120px,95vw);max-height:94dvh;border:0;border-radius:22px;padding:24px;background:#fff;color:#252034}
.clientviewhead{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid #e4d9f3;border-radius:18px;background:#faf6ff}
.clientviewhead img{width:44px;max-height:64px;object-fit:contain}
.clientviewhead h2{margin:4px 0;font-size:22px}
.clientviewhead p{margin:5px 0}
.clientviewhead button{margin-left:auto}
.clientintro{padding:16px 0}
.clientphotos{display:flex;flex-wrap:wrap;gap:16px}
.clientphotos figure{flex:1 1 220px;margin:0;padding:16px;border-radius:18px;background:#faf8fd;border:1px solid #e7dfef}
.clientphotos img{width:100%;height:250px;object-fit:contain}
.clientphotos figcaption{padding:10px 0 0;color:#675a78}
.clientrow{margin:20px 0;border:1px solid #e5dbef;background:#faf8fd;padding:16px;border-radius:18px}
.clientrow h3{color:#7924e5;margin:0 0 12px}
.clienttrack{display:grid;gap:6px;overflow-x:auto;padding-bottom:10px}
.clientcell{background:white;border:1px solid #e7dfef;border-top:4px solid #7924e5;border-radius:10px;padding:10px 6px;text-align:center;min-height:140px;overflow-wrap:anywhere}
.clientcell small{color:#766785;font-size:10px}
.clientcell strong{font-size:13px;display:block}
.clientcell p{font-size:11px;line-height:1.4;margin:8px 0}
.clienticon{display:flex;align-items:center;justify-content:center;min-height:40px}
.clienticon svg{width:28px;height:28px}
.clientfree{opacity:.55;border-top-color:#d5ccdd!important}
.clientnotes{padding:18px;background:#faf6ff;border-radius:16px}
.clientnotes p{white-space:pre-line;line-height:1.7}
#clientviewcontact{padding:20px 4px;color:#76578d;font-size:13px;line-height:1.7}
.checkitem{display:block;width:100%;text-align:left;margin:8px 0;padding:14px;line-height:1.5}
@media(max-width:600px){.clientview{padding:12px;width:96vw;border-radius:16px}
.clientviewhead{flex-wrap:wrap;padding:14px;gap:10px}
.clientviewhead button{width:100%;margin:4px 0}
.clientviewhead h2{font-size:19px}
.clientrow{padding:12px}
.clientphotos img{height:220px}
}


.syncbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:linear-gradient(120deg,#f2eafa,#fff5e8);border:1px solid #e5d8f4;border-radius:20px;padding:18px;margin:0 0 20px}
.syncbar>div{flex:1;min-width:200px}
.syncbar p{margin:5px 0;color:#5e536b;font-size:13px}
.syncbar strong{color:#6526aa}
#syncpassword{width:100%;margin:10px 0}


/* Web 3.2.1: actions centred across the desktop workspace. */
@media(min-width:900px){
 .pagehead{display:flex;flex-direction:column;align-items:stretch;gap:22px;margin-top:26px;margin-bottom:26px}

 .pagehead>div:first-child{text-align:center;width:100%}

 .pagehead .topactions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%;max-width:1180px;margin:0 auto;flex-shrink:1;justify-content:initial;align-items:stretch}

 .pagehead .topactions>button{width:100%;min-width:0;min-height:48px;margin:0;white-space:normal;display:flex;align-items:center;justify-content:center;text-align:center;gap:7px;line-height:1.3}

 .pagehead .topactions>.mobileonly{display:none}

 .pagehead .topactions>button svg{flex-shrink:0}

}

@media(min-width:1300px){.pagehead .topactions{grid-template-columns:repeat(5,minmax(0,1fr))}
}


/* Equal action widths, including reduced desktop windows. */
@media(min-width:601px) and (max-width:899px){
 .pagehead{flex-direction:column;align-items:stretch;gap:20px}

 .pagehead>div:first-child{text-align:center}

 .pagehead .topactions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:none;gap:10px;justify-content:initial}

 .pagehead .topactions>button{width:100%;min-width:0;min-height:48px;flex:none;white-space:normal;text-align:center;line-height:1.3}

 .pagehead .topactions>.mobileonly{display:none}

}

.pagehead .topactions>#clientmode{grid-column:auto;flex:none}

.draghandle svg{display:block;width:16px;height:16px;pointer-events:none}


/* Uniform height: no grouped actions stretching a neighbouring button. */
@media(min-width:601px){
 .pagehead .topactions{align-items:start;grid-auto-rows:52px}

 .pagehead .topactions>button{height:52px;min-height:52px;max-height:52px;align-self:start;grid-row:auto}

 .pagehead .topactions>.projectactions{display:contents}

}

.label:not(.empty){touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}

.label:not(.empty):active{cursor:grabbing}


/* WB soft lavender actions and a distinct soft red bin. */
.primary{background:#f1e9fd;color:#7924e5;border:1px solid #d9c2f5;box-shadow:none}

.primary:hover{background:#e8dafb;color:#6420bc;border-color:#c7a5ee}

.trashshortcut,#projecttrash,.trashdelete,#deleterow,#clearboard{background:#fff0f0;color:#b94a57;border:1px solid #f0cbd0;box-shadow:none}

.trashshortcut:hover,#projecttrash:hover,.trashdelete:hover,#deleterow:hover,#clearboard:hover{background:#fbe2e5;color:#a63b49;border-color:#e9b4bd}


/* Unified atelier actions, including photo/PDF and dialog close buttons. */
.pagehead .topactions>button:not(.trashshortcut),.previewhead>button{background:#f1e9fd;color:#7924e5;border:1px solid #d9c2f5;box-shadow:none}

.pagehead .topactions>button:not(.trashshortcut):hover,.previewhead>button:hover{background:#e8dafb;color:#6420bc;border-color:#c7a5ee}

.pagehead .topactions>#trashshortcut{order:99}
