/* outils.css — interface des outils Affiche et Photo produit (aperçu vivant, designs, édition directe, Pass) */
.tool-top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 24px;flex-wrap:wrap;padding:18px 0 4px}
.tool-top h1{font-family:var(--display);font-size:clamp(28px,4.6vw,46px);font-weight:700;letter-spacing:-.03em;line-height:1.05;color:var(--ink)}
.tool-top .lead{margin-top:8px;font-size:clamp(15px,1.7vw,18px)}
.pass-state{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;border-radius:99px;padding:8px 14px;background:var(--amber-d);color:var(--amber);white-space:nowrap}
.pass-state.on{background:var(--green-d);color:var(--green)}

.studio{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,420px);gap:28px;align-items:start;margin-top:16px}
.panel{display:flex;flex-direction:column;gap:14px;min-width:0}
.stage{position:sticky;top:66px;display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0}
.stage-frame{position:relative;display:flex;justify-content:center;width:100%}
.stage canvas.view{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100vh - 230px);border-radius:16px;
  box-shadow:0 18px 50px rgba(0,0,0,.22);background:#fff;touch-action:none;cursor:pointer;user-select:none;-webkit-user-select:none}
.stage-tools{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap}
.icon-btn{display:inline-flex;align-items:center;gap:6px;border:0;background:var(--bg4);color:var(--ink);border-radius:99px;padding:8px 14px;font-size:14px;font-weight:600;cursor:pointer}
.icon-btn:hover{background:var(--bhi)}
.hint{font-size:13px;color:var(--muted);text-align:center}

.selbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:center;background:var(--ink);color:var(--bg2);border-radius:16px;padding:8px;width:100%;max-width:420px}
.selbar b{font-size:14px;margin-right:auto;padding-left:6px}
.selbar small{flex:1;min-width:0;text-align:left;font-size:12px;line-height:1.35;opacity:.75}
.selrow{order:9;flex-basis:100%;display:flex;align-items:center;gap:10px;padding:2px 4px 0}
.place{display:grid;grid-template-columns:repeat(3,22px);gap:3px;flex-shrink:0}
.place[hidden]{display:none}
.selbar .place button{min-width:0;width:22px;height:22px;padding:0;border-radius:6px;display:flex;align-items:center;justify-content:center}
.selbar .place button::after{content:'';width:7px;height:7px;border-radius:2px;background:currentColor;opacity:.85}
.selbar .place button:hover,.selbar .place button:focus-visible{background:#FF9500;color:#1d1d1f}
.selbar button{border:0;background:rgba(255,255,255,.14);color:inherit;border-radius:10px;min-width:36px;height:36px;padding:0 9px;font-size:15px;font-weight:700;cursor:pointer}
@media (prefers-color-scheme:dark){.selbar button{background:rgba(0,0,0,.12)}}

.export{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;max-width:420px}
.export .btn{width:100%}
.export .wide{grid-column:1/-1}
.pro-tag{display:inline-flex;align-items:center;font-size:11px;font-weight:800;letter-spacing:.02em;border-radius:99px;padding:2px 8px;background:#1d1d1f;color:#ffd60a;vertical-align:middle}
.btn .pro-tag{margin-left:2px}
.pass-on .pro-tag{display:none}

.progress{position:absolute;inset:auto 12% 46%;background:rgba(0,0,0,.78);color:#fff;border-radius:14px;padding:14px 16px;text-align:center;font-size:14px;font-weight:600}
.progress div{height:6px;border-radius:9px;background:rgba(255,255,255,.2);margin-top:10px;overflow:hidden}
.progress i{display:block;height:100%;width:0;background:#ff9500;transition:width .15s}

.step-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.step-h .lbl{margin:0;font-size:15px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{border:1.5px solid transparent;background:var(--bg3);color:var(--ink);border-radius:99px;padding:9px 15px;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap}
.card .chip{background:var(--bg4)}
.chip.on{border-color:var(--accent);background:var(--amber-d)}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);background:var(--bg4);border-radius:12px;padding:3px;gap:3px}
.seg button{border:0;background:transparent;border-radius:10px;padding:9px 6px;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer}
.seg button.on{background:var(--bg2);color:var(--ink);box-shadow:0 1px 4px rgba(0,0,0,.14)}

.designs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.thumb{position:relative;border:0;padding:0;background:transparent;border-radius:12px;cursor:pointer;outline:2.5px solid transparent;outline-offset:2px;transition:transform .15s,outline-color .15s}
.thumb:hover{transform:translateY(-2px)}
.thumb canvas{display:block;width:100%;height:auto;border-radius:10px;box-shadow:0 4px 14px rgba(0,0,0,.14)}
.thumb.on{outline-color:var(--accent)}
.thumb span{display:block;font-size:12px;font-weight:600;color:var(--muted);text-align:center;margin-top:6px}
.scenes{grid-template-columns:repeat(3,minmax(0,1fr))}

.swatches{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.swatch{width:36px;height:36px;border-radius:50%;border:3px solid var(--bg2);box-shadow:0 0 0 1px var(--bhi);cursor:pointer;padding:0}
.swatch.on{box-shadow:0 0 0 3px var(--accent)}
.color-pick{position:relative;width:36px;height:36px;border-radius:50%;overflow:hidden;box-shadow:0 0 0 1px var(--bhi);background:conic-gradient(red,yellow,lime,cyan,blue,magenta,red)}
.color-pick input{position:absolute;inset:-8px;width:52px;height:52px;opacity:0;cursor:pointer}

.ai-box{display:flex;gap:8px}
.ai-box input{flex:1;min-width:0}
.ai-out{margin-top:12px;background:var(--bg3);border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.5;white-space:pre-wrap}
.ai-out .btns{margin-top:10px}

.photo-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.photo-row input[type=file]{display:none}
.strip{display:flex;gap:10px;overflow-x:auto;padding:6px 2px}
.prod{position:relative;flex:0 0 auto;width:84px;height:84px;border-radius:14px;border:0;padding:0;overflow:hidden;cursor:pointer;background:var(--bg3);outline:2.5px solid transparent;outline-offset:2px}
.prod.on{outline-color:var(--accent)}
.prod canvas{display:block;width:100%;height:100%}
.prod-x{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:15px;line-height:22px;text-align:center}
.prod.add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:2px dashed var(--bhi);background:transparent;color:var(--muted);font-size:12px;font-weight:600}
.prod.add b{font-size:26px;line-height:1;color:var(--amber)}
.status{font-size:14px;color:var(--muted);margin-top:8px}

.lockcard{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}

/* Fenêtres : Pass et réécriture d'un texte */
.sheet-wrap{position:fixed;inset:0;z-index:400;background:rgba(0,0,0,.45);display:flex;align-items:flex-end;justify-content:center;padding:0}
.sheet{position:relative;background:var(--bg2);color:var(--text);width:100%;max-width:520px;max-height:92vh;overflow:auto;border-radius:24px 24px 0 0;padding:26px 22px calc(24px + env(safe-area-inset-bottom,0px))}
.sheet-x{position:absolute;top:12px;right:14px;width:36px;height:36px;border-radius:50%;border:0;background:var(--bg4);font-size:22px;line-height:1;cursor:pointer}
.ps-list{list-style:none;display:flex;flex-direction:column;gap:8px;margin:16px 0}
.ps-list li{font-size:14px;color:var(--muted);line-height:1.45;padding:8px 10px;border-radius:10px}
.ps-list li b{color:var(--ink)}
.ps-list li.on{background:var(--amber-d)}
.ps-prices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ps-price{display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:16px;padding:14px;background:var(--bg4);color:var(--ink)}
.ps-price b{font-size:24px;letter-spacing:-.02em}
.ps-price span{font-size:13px;color:var(--muted)}
.ps-price.best{background:var(--accent);color:#1d1d1f}
.ps-price.best span{color:#1d1d1f;opacity:.75}
.pop textarea{width:100%;min-height:120px;background:var(--field);border:1px solid var(--bhi);border-radius:12px;padding:12px 14px;font-size:17px;line-height:1.45;resize:vertical}
@media(min-width:700px){.sheet-wrap{align-items:center;padding:20px}.sheet{border-radius:24px}}

@media(max-width:900px){
  .studio{grid-template-columns:minmax(0,1fr);gap:16px}
  .stage{order:-1;top:52px;z-index:20;background:var(--bg);padding:8px 0 10px;margin:0 -20px;width:calc(100% + 40px);border-bottom:1px solid var(--b)}
  .stage canvas.view{max-height:40vh;border-radius:12px}
  .stage canvas.view[data-format=carre]{max-height:34vh}
  .export{position:fixed;left:0;right:0;bottom:0;z-index:60;max-width:none;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));background:var(--bg2);border-top:1px solid var(--b);box-shadow:0 -6px 24px rgba(0,0,0,.08)}
  .export .btn{min-height:46px;font-size:15px;padding:10px 8px}
  .export .wide{grid-column:auto}
  .hide-m{display:none}
  .designs{grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:92px;overflow-x:auto;padding:4px 4px 10px;scroll-snap-type:x proximity}
  .designs .thumb{scroll-snap-align:start}
  .scenes{grid-auto-columns:84px}
  .chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
  .tool-page .site-foot{padding-bottom:96px}
  .tool-top{padding-top:6px}
}
@media(max-width:600px){.stage{margin:0 -16px;width:calc(100% + 32px)}}
@media(prefers-reduced-motion:reduce){.thumb{transition:none}}
.linkish{border:0;background:none;padding:0;font:inherit;color:var(--amber);font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.selbar .selrow .sel-reset{min-width:0;height:28px;padding:0 10px;font-size:12px;font-weight:600;flex-shrink:0;border-radius:8px}
.selbar button.on{background:#FF9500;color:#1d1d1f}
/* Couleurs des textes, style d'animation (v8.10) */
.lbl-sm{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:8px}
.motion-row{margin-top:16px}
.ink-row{margin-top:16px}
.inks{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.ink-dot{position:relative;width:30px;height:30px;border-radius:50%;border:2px solid var(--bg2);box-shadow:0 0 0 1px var(--bhi);cursor:pointer;padding:0;flex-shrink:0}
.ink-dot.on{box-shadow:0 0 0 2.5px var(--accent)}
.ink-pick{background:conic-gradient(#ff3b30,#ff9500,#ffd60a,#30d158,#0a84ff,#7c3aed,#ff2d55,#ff3b30);overflow:hidden}
.ink-pick input{position:absolute;inset:-8px;width:46px;height:46px;opacity:0;cursor:pointer}
.ink-auto{border:1.5px solid var(--bhi);background:var(--bg4);color:var(--ink);border-radius:99px;height:30px;padding:0 12px;font-size:13px;font-weight:600;cursor:pointer}
.ink-auto.on{border-color:var(--accent);background:var(--amber-d)}
.selbar .sel-inks{order:11;flex-basis:100%;padding:4px 4px 2px;gap:7px}
.selbar .sel-inks .ink-dot{width:28px;height:28px;min-width:0;border-color:transparent;box-shadow:0 0 0 1.5px rgba(127,127,127,.55)}
.selbar .sel-inks .ink-dot.on{box-shadow:0 0 0 2.5px #FF9500}
.selbar .sel-inks .ink-auto{min-width:0;height:28px;background:rgba(127,127,127,.18);color:inherit;border-color:transparent}
.selbar .sel-inks .ink-auto.on{background:#FF9500;color:#1d1d1f}
.selbar .selrow #af-sel-fit,.selbar .selrow #pp-sel-fit{margin-left:auto}
.seg.mode{margin-bottom:14px}
.selrow[hidden],.inks[hidden]{display:none}
