:root{--ink:#143441;--muted:#5c7480;--line:#dbe7e9;--teal:#126a71;--blue:#357ee4;--pink:#d94191}*{box-sizing:border-box}body{margin:0;background:#f2f7f6;color:var(--ink);font:15px Verdana,Arial,sans-serif}header{max-width:1320px;margin:auto;padding:48px 32px 32px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}header a{color:var(--teal);font-weight:700;text-decoration:none;white-space:nowrap}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;color:var(--teal)}h1{font:800 clamp(29px,4vw,46px)/1.16 Verdana,Arial,sans-serif;margin:15px 0}h2{font:800 18px Verdana,Arial,sans-serif;margin:0 0 10px}p{line-height:1.55;color:var(--muted);margin:8px 0}main{max-width:1320px;margin:auto;padding:0 32px}button,.button{font:700 13px Verdana,Arial,sans-serif;border:1px solid var(--line);border-radius:10px;padding:11px 14px;background:#fff;color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;min-height:44px}button:hover,.button:hover{border-color:var(--teal);background:#eef6f5}button:disabled{opacity:.4;cursor:default}.primary{background:var(--teal);color:#fff;border-color:var(--teal)}.primary:hover{background:#09545c;color:#fff}.card{border:1px solid var(--line);border-radius:18px;background:#fff;padding:24px;box-shadow:0 8px 30px #173a4505}.import{display:flex;align-items:center;justify-content:space-between;gap:20px}.import p{margin-bottom:0}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}#status{margin:16px 4px;min-height:24px;font-size:14px}.error{color:#b92346!important}.layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:20px;align-items:start}aside{position:relative}aside h2{margin-top:24px}aside p{font-size:13px}.tabs{display:flex;gap:5px;margin:-6px -6px 0}.tabs button{flex:1;flex-direction:column;padding:12px 5px;border:0;font-size:12px;background:#f4f7f8;min-width:0}.tabs .active{background:#e8f0fd;color:var(--blue)}.tabs .pink.active{color:var(--pink);background:#fce8f3}.tabs [data-tool=cut].active{background:#e2f5ef;color:#167a59}label{display:block;font-size:13px;font-weight:600;margin:18px 0;color:var(--ink)}output{float:right;font-size:12px;color:var(--muted)}input[type=range]{display:block;width:100%;margin-top:12px;accent-color:var(--teal)}input[type=color]{display:block;margin-top:8px;width:100%;height:36px;border:1px solid var(--line);background:#fff;border-radius:6px}input[type=number],select{display:block;padding:10px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:#fff;margin-top:8px;width:100%;font:inherit}input[type=checkbox]{accent-color:var(--teal);width:16px;height:16px;margin:0 7px 0 0;flex:none}.check{display:flex;align-items:center;font-size:12px;font-weight:500;margin:16px 0}.hint{font-size:12px!important;line-height:1.65}.segmented{display:flex;gap:4px;margin:20px 0 10px}.segmented button{flex:1;font-size:11px;padding:8px}.segmented .active{background:var(--ink);color:#fff;border-color:var(--ink)}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.small{gap:6px}.small button{font-size:11px;flex:1;padding:10px 8px}.spread{justify-content:space-between}hr{border:0;border-top:1px solid var(--line);margin:22px 0}#imageInfo{font-size:11px;letter-spacing:1px;font-weight:700;color:var(--muted)}.workspace{overflow:hidden}.workspace>.row:first-child{margin-top:-6px}#viewport{position:relative;background:#e5eeee;border-radius:12px;overflow:auto;max-height:620px;min-height:360px;padding:24px;overscroll-behavior:contain}#stage{position:relative;margin:auto;width:640px;height:420px;max-width:none;background-color:white;background-image:linear-gradient(45deg,#ddd 25%,transparent 25%),linear-gradient(-45deg,#ddd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd 75%),linear-gradient(-45deg,transparent 75%,#ddd 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}#stage canvas{position:absolute;inset:0;width:100%;height:100%}#overlay{touch-action:none;cursor:crosshair}#empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#eaf1f0;pointer-events:none}#empty svg{width:58px;height:58px;color:#789d9e;stroke-width:1}#empty p{font-size:13px}#filmstrip{display:flex;overflow:auto;gap:8px;margin:16px 0}#filmstrip button{min-width:66px;padding:5px;flex-direction:column;font-size:10px}#filmstrip .active{border:2px solid var(--teal)}#filmstrip img{max-width:70px;height:45px;object-fit:contain}.export{border-top:1px solid var(--line);padding-top:24px;margin-top:24px}.export label{margin-top:5px}#generate{width:100%;margin-top:16px;font-size:15px;padding:15px}#delay{width:140px}#delaySeconds{font-size:12px;color:var(--muted)}#thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;margin:20px 0;max-height:430px;overflow:auto}#thumbs label{margin:0;border:1px solid var(--line);padding:8px;border-radius:8px;display:flex;flex-wrap:wrap;align-items:center;gap:5px}#thumbs label:has(input:checked){background:#e1f1ee;border-color:var(--teal)}#thumbs img{width:100%;height:80px;object-fit:contain}#reduction{margin-bottom:20px}#result{margin:20px 0}.checker{display:inline-block;padding:15px;max-width:100%;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 0/20px 20px}.checker img{max-width:100%;max-height:480px}footer{text-align:center;padding:30px;color:var(--muted);font-size:12px}footer a{color:inherit}[hidden]{display:none!important}body.busy{cursor:progress}body.busy button,body.busy input,body.busy canvas,body.busy .button{pointer-events:none}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #76bcc4;outline-offset:3px}@media(max-width:850px){header{padding:28px 20px 24px}header a{font-size:12px}main{padding:0 16px}.layout{grid-template-columns:270px minmax(0,1fr);gap:12px}.card{padding:18px}#viewport{padding:12px;min-height:260px}}@media(max-width:650px){header{flex-direction:column-reverse;gap:20px}header a{align-self:flex-end}.import{flex-direction:column;align-items:stretch}.layout{display:flex;flex-direction:column}aside,.workspace{width:100%}aside{order:1}.workspace{order:0}#viewport{max-height:400px;min-height:260px}.workspace .row button{font-size:11px;padding:9px}.tabs button{flex-direction:row}.import .button{width:100%}#generate{font-size:14px}.export .row{align-items:center}#thumbs{grid-template-columns:repeat(3,1fr)}}
.tabs .green.active{background:#e4f7e4;color:#278543}.tabs{flex-wrap:wrap}.tabs button{flex-basis:40%}
.frame-editor{border:1px solid var(--line);background:#f6faf9;padding:16px;border-radius:12px;margin:10px 0 18px}.frame-editor .segmented{margin:0 0 8px}.frame-editor .segmented button{font-size:13px}.frame-editor>.row{justify-content:space-between}.frame-editor #currentFrame{font-size:12px}.frame-editor #filmstrip{margin:12px 0}.frame-editor #frameActions button{margin:3px 4px 5px 0;font-size:11px}.frame-editor #prepareColors{font-size:11px;width:100%;margin-top:8px}#sourceGif{display:inline-block;font-size:12px;color:var(--teal);margin-bottom:12px}#filmstrip button.individual{box-shadow:inset 0 -3px #d94191}#scopeHelp{margin:8px 0 12px}#capturePreset{width:100%;margin-top:10px;font-size:11px}@media(max-width:650px){.frame-editor{padding:10px}.frame-editor>.row{gap:5px}.frame-editor>.row button{padding:8px 6px}.frame-editor .segmented button{font-size:12px}}
#filmstrip button{position:relative}#filmstrip button.individual::after{content:'●';position:absolute;top:3px;right:5px;font-size:10px;color:var(--pink)}

.importActions{justify-content:flex-end;flex-shrink:0;max-width:55%}.starCountControls label{margin:0;flex:1}.starCountControls input{min-width:0}.starCountControls button{margin-top:22px}@media(max-width:850px){.importActions{max-width:100%;flex-shrink:1}}@media(max-width:650px){.importActions{width:100%;flex-direction:column;align-items:stretch}.starCountControls{flex-wrap:nowrap}}
/* v1.5 * atelier centré sur l’image */
header{max-width:1060px;padding:28px 24px 20px;align-items:center}h1{font-size:clamp(25px,4vw,36px);margin:8px 0 0}main{max-width:1060px;padding:0 20px}.workspace{max-width:100%;padding:22px}.frame-editor{padding:12px;margin:8px 0 14px}.frame-editor .segmented{margin:0}.frameNav{display:flex;align-items:center;justify-content:center;gap:18px;margin:10px 0}.frameNav button{min-width:44px;padding:7px}.frameNav strong{font-size:12px}.previewActions{display:flex;gap:8px;margin:12px 0}.previewActions button{flex:1;font-size:12px}.canvasTools{display:flex;gap:7px;margin:12px 0}.canvasTools button{flex:1;min-width:0;flex-direction:column;font-size:11px;padding:10px 5px}.canvasTools button.active,.methodRow button.active{color:#0c676b;background:#e0f4ee;border-color:#329b9c}.canvasTools #eraseSelection.active{background:#fbe8ef;color:#b52961;border-color:#d5668b}.canvasTools button>svg{width:25px;height:25px}#undo{font-size:23px;line-height:25px}#undo span{font-size:11px;line-height:normal}.effectTabs{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:16px 0 12px}.effectTabs button{display:flex;flex-direction:column;gap:6px;font-size:12px;background:#f2f6f7;border:1px solid transparent;padding:12px 4px}.effectTabs button.active{color:#317edb;background:#e6effd;border-color:#a6c8f5}.effectTabs .pink.active{color:#cc388b;background:#fce8f4;border-color:#f0b4d8}.effectTabs .green.active{color:#218447;background:#e8f7ea;border-color:#acdcb9}.effectTabs [data-tool=cut].active{background:#e1f5ef;color:#137a62;border-color:#9bd5c5}.effectTabs svg{width:28px;height:28px}.methodRow{display:flex;gap:8px;margin:10px 0}.methodRow button{flex:1;font-size:12px}.fold{margin:10px 0;border:1px solid var(--line);border-radius:11px;background:#fff;overflow:hidden}.fold>summary{list-style:none;display:flex;align-items:center;gap:9px;padding:13px 14px;font-weight:700;font-size:12px;cursor:pointer;min-height:48px;background:#f8fbfa}.fold>summary::-webkit-details-marker{display:none}.fold>summary>svg{width:19px;height:19px;color:#678b8d;flex:none}.fold>summary::after{content:'';width:7px;height:7px;border-right:1.5px solid #678b8d;border-bottom:1.5px solid #678b8d;transform:rotate(45deg);margin-left:auto;margin-right:3px;transition:transform .15s}.fold[open]>summary::after{transform:rotate(225deg)}.fold[open]>summary{border-bottom:1px solid var(--line)}.foldBody{padding:4px 16px 14px}.foldBody p{font-size:12px}.foldBody label{font-size:12px}#effectSettings .foldBody{display:grid;grid-template-columns:minmax(0,1fr)}#effectSettings .segmented{margin:15px 0}.fold .starCountControls{max-width:450px}.fold .row button{font-size:12px}#sourceGif{margin:8px 0 0}#filmstrip{display:flex;align-items:stretch;gap:8px;overflow-x:auto;overflow-y:hidden;padding:4px 1px;margin:0!important;scrollbar-width:thin}.frameTile{position:relative;min-width:82px;max-width:100px;flex:1;border-radius:10px}.frameTile .frameSelect{width:100%;height:100%;min-width:0!important;padding:7px 5px 10px!important;display:flex;flex-direction:column;gap:5px;font-size:10px!important;border-width:1px!important}.frameTile.active .frameSelect{border:2px solid var(--teal)!important;background:#eff8f5}.frameTile.individual .frameSelect{box-shadow:inset 0 -3px #d94191}.frameTile.individual .frameSelect::after{content:'●';position:absolute;left:5px;top:2px;color:#d94191;font-size:9px}.frameTile .framePencil{position:absolute!important;right:2px;top:2px;padding:7px!important;min-height:32px;min-width:32px!important;width:32px;height:32px;background:#fffef9;box-shadow:0 2px 8px #1232;z-index:1;border:1px solid #bdd2d4}.framePencil svg{width:16px;height:16px}#filmstrip .frameSelect img{width:100%;max-width:80px;height:46px;object-fit:contain}#viewport{min-height:220px;max-height:590px;margin-top:0;padding:18px}#generate{margin-top:18px}#generateFloating{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:30;border-radius:50%;width:62px;height:62px;padding:16px;background:var(--teal);color:#fff;border:2px solid #fff;box-shadow:0 5px 22px #1237}#generateFloating svg{width:30px;height:30px}#generateFloating:hover{background:#09545c;transform:translateY(-2px)}#generateFloating:disabled{opacity:.4;transform:none}dialog{border:1px solid var(--line);border-radius:17px;padding:22px;width:min(430px,calc(100vw - 30px));color:var(--ink);box-shadow:0 20px 100px #1235}dialog::backdrop{background:#1239;backdrop-filter:blur(2px)}dialog form{margin:0}.dialogTop{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialogTop h2{font-size:17px;margin:0}.dialogTop button{font-size:23px;border:0;background:transparent;padding:4px;min-width:38px}.dialogFooter{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.danger{background:#b92c56;color:#fff;border-color:#b92c56}.danger:hover{background:#972146;color:#fff}footer{padding-bottom:100px}summary:focus-visible{outline:3px solid #76bcc4;outline-offset:-3px}@media(min-width:800px){#selectionSettings .foldBody{display:grid;grid-template-columns:1fr 1fr;gap:30px}#effectSettings .foldBody>div{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}#effectSettings .foldBody>div>.segmented,#effectSettings .foldBody>div>p,#effectSettings .foldBody>div>div[id$=WandOptions]{grid-column:1/-1}}@media(max-width:650px){header{padding:20px 18px;gap:13px}header a{font-size:11px}main{padding:0 12px}.card{border-radius:14px;padding:16px}.workspace{padding:12px}.previewActions{gap:5px}.previewActions button{font-size:10px;padding:9px 3px}.canvasTools{gap:4px}.canvasTools button{font-size:10px;padding:9px 2px}.canvasTools button>svg{width:23px;height:23px}.effectTabs{gap:5px}.effectTabs button{font-size:11px;padding:10px 2px}.effectTabs svg{width:25px;height:25px}.methodRow button{font-size:11px}.frameTile{min-width:73px}.frame-editor{padding:9px}.framePencil{min-height:36px!important;height:36px!important;width:36px!important;min-width:36px!important}.frameSelect{padding-right:10px!important}.foldBody{padding:2px 12px 12px}#viewport{padding:12px;max-height:420px}#generateFloating{width:58px;height:58px;right:15px;bottom:max(15px,env(safe-area-inset-bottom))}}
.canvasTools [data-method] svg,.methodRow svg,#eraseSelection svg{stroke-width:2}.effectTabs svg,#clear svg,#generate svg,#generateFloating svg{stroke-width:1.5}
/* v1.6 * commandes épurées et thème lié à l’effet */
#status:empty{display:none}.workspace[data-effect=noise]{--effect:#317edb;--effect-bg:#e6effd;--effect-line:#a6c8f5}.workspace[data-effect=spark]{--effect:#cc388b;--effect-bg:#fce8f4;--effect-line:#f0b4d8}.workspace[data-effect=cut]{--effect:#137a62;--effect-bg:#e1f5ef;--effect-line:#9bd5c5}.workspace[data-effect=hue]{--effect:#66727a;--effect-bg:#edf0f2;--effect-line:#bac1c7}.workspace .canvasTools [data-method],.workspace .canvasTools #eraseSelection{color:var(--effect)}.workspace .canvasTools [data-method].active,.workspace .canvasTools #eraseSelection.active{color:var(--effect);background:var(--effect-bg);border-color:var(--effect-line)}.effectTabs [data-tool=hue].active{color:#66727a;background:#edf0f2;border-color:#bac1c7}.workspace input[type=range]{accent-color:var(--effect)}#empty #pickImage{pointer-events:auto;padding:14px 24px;margin-top:12px;font-size:14px}#empty svg{width:42px;height:42px}#removeImage{display:block;margin:12px auto 0;color:#9d3456;font-size:12px}#removeImage:disabled{opacity:.35}.colorChoices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}.colorChoices button{padding:16px 10px}#importError{white-space:pre-line;margin-top:18px}#frameEditScope{margin:10px 0 0}
/* v1.7 * zoom tactile séparé de la retouche */
#viewport{overflow:hidden;touch-action:none;position:relative;padding:0!important}#stage{position:absolute;left:50%;top:50%;margin:0;max-width:none;transform:translate(-50%,-50%)}#empty{z-index:3}#overlay{z-index:2;touch-action:none;pointer-events:auto}#base{z-index:1;pointer-events:none}#navigationToggle{position:fixed;left:max(20px,env(safe-area-inset-left));bottom:max(20px,env(safe-area-inset-bottom));z-index:30;border-radius:50%;width:62px;height:62px;padding:16px;background:#fff;color:var(--teal);border:2px solid var(--teal);box-shadow:0 5px 22px #1234}#navigationToggle svg{width:30px;height:30px;stroke-width:1.5}#navigationToggle:disabled{opacity:.35}body.navigationMode{background:#fff8d9}body.navigationMode .card{background:#fffdf0;border-color:#eadb9c}body.navigationMode .frame-editor,body.navigationMode .fold>summary,body.navigationMode .fold{background:#fff9e0;border-color:#eadb9c}body.navigationMode .previewActions button,body.navigationMode .effectTabs button,body.navigationMode .canvasTools button{background-color:#fff9e2;border-color:#e4d699}body.navigationMode #navigationToggle{background:#ffd84f;color:#111;border-color:#9f7d12;box-shadow:0 4px 22px #9e79194d}body.navigationMode #viewport{outline:3px solid #e9c347}body.navigationMode #overlay{cursor:grab}body.navigationMode #stage{background-color:#fff}#navHint{position:absolute;z-index:4;right:9px;top:9px;pointer-events:none;font-size:10px;background:#ffe16c;color:#292207;border:1px solid #d6b643;padding:5px 8px;border-radius:7px}@media(max-width:650px){#navigationToggle{width:58px;height:58px;left:15px;bottom:max(15px,env(safe-area-inset-bottom))}}
button,summary{touch-action:manipulation}button svg,button svg *,button span{pointer-events:none}
/* v1.8 * pinceau accessible et traitement visible */
.brushRow{display:grid;grid-template-columns:75% 25%;margin:16px 0 18px;align-items:stretch}.brushRow #brushControl{min-width:0}.brushRow label{margin:0;font-size:12px}.brushRow input[type=range]{width:100%;margin:12px 0 2px;min-height:25px}.scrollLane{touch-action:pan-y;min-height:54px}.presetInline{display:block!important;grid-column:1/-1;border-top:1px solid var(--line);margin-top:18px;padding-top:14px}.presetInline h3{font-size:13px;margin:0 0 10px}.presetInline .row{display:flex;gap:8px}.presetInline .row button{flex:1}.presetInline #capturePreset{width:100%;margin-top:0}.presetInline p{margin-bottom:0}.navigationMode .brushRow{opacity:.5;pointer-events:none}#processingOverlay{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;background:#102f4166;backdrop-filter:blur(3px);padding:22px;touch-action:none}.processingCard{background:#fff;border:1px solid #d8e6e7;border-radius:22px;padding:25px 28px 23px;max-width:330px;width:100%;text-align:center;box-shadow:0 16px 80px #102f4140}.processingOrbit{position:relative;width:164px;height:164px;margin:0 auto 14px}.processingOrbit>svg{display:block;width:164px;height:164px;position:absolute;inset:0;transform:rotate(-90deg);overflow:visible}.processingOrbit circle{fill:none;stroke-width:5;stroke-linecap:round}.orbitTrack{stroke:#e6efed}.orbitArc{stroke:#16828a;transition:stroke-dashoffset .18s linear}.processingOrbit img{position:absolute;width:100px;height:100px;left:32px;top:32px;object-fit:contain}.processingCard.indeterminate #processingRing{animation:processingSpin 1.3s linear infinite}.processingCard.indeterminate .orbitArc{transition:none}#processingLabel{font-size:13px;font-weight:700;color:var(--ink);line-height:1.5;margin:0}#processingValue{display:block;min-height:20px;margin-top:7px;font-size:12px;color:var(--muted)}@keyframes processingSpin{from{transform:rotate(-90deg)}to{transform:rotate(270deg)}}@media(prefers-reduced-motion:reduce){.processingCard.indeterminate #processingRing{animation-duration:3s}}

.imageSourceChoices{display:flex;flex-direction:column;gap:12px;margin-top:22px}.imageSourceChoices button{justify-content:flex-start;padding:14px 18px;font-size:14px}.imageSourceChoices svg{width:25px;height:25px}
#reduction{width:min(620px,92vw);max-height:85dvh;overflow:auto;padding:24px}#reduction #thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:8px;max-height:35dvh;overflow:auto}#reduction #thumbs img{max-width:65px;max-height:64px;object-fit:contain}#reduction p{font-size:.9rem}#removeImage{position:fixed;top:14px;left:14px;z-index:30;border:2px solid #c73748;background:white;color:#c73748;border-radius:50%;width:50px;height:50px;padding:11px;box-shadow:0 4px 18px #0002}#removeImage svg{width:24px;height:24px}.frameDelete{position:absolute;bottom:0;left:0;border:1px solid #c73748;color:#b62739;background:white;border-radius:50%;width:25px;height:25px;min-height:25px;padding:0;line-height:20px;font-size:22px;z-index:2}.frameTile{position:relative}header{padding-left:65px}
#filmstrip .frameDelete{position:absolute!important;bottom:2px;left:2px;min-width:24px!important;width:24px;height:24px;min-height:24px;padding:0!important;font-size:20px;line-height:20px;display:flex;align-items:center;justify-content:center}
footer a.adminPi,footer a.adminPi[aria-label=Administration]{font-size:11px!important;text-decoration:none!important;color:#91a0a5!important;font-weight:400;display:inline-block;line-height:1.1}footer a.adminPi:hover{color:#526a74!important}
