/* ============================================================
   YellenHub v0.22 — Studio IA
   ============================================================ */
.yh-fx{display:block;width:100%;aspect-ratio:1;border-radius:14px;background:#222 center/cover no-repeat}
.cam-effects-grid .yh-fx{width:100%;height:auto}
.cam-effects-quick .yh-fx{width:44px;height:44px;border-radius:50%;margin:0 auto}
#yh-bg-preview{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1;pointer-events:none;display:none}
#cam-mask-canvas{z-index:2}
#yh-ai-loading{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%);z-index:400;display:none;align-items:center;gap:10px;padding:14px 18px;border-radius:16px;background:rgba(10,10,12,.85);color:#fff;font-size:14px;backdrop-filter:blur(10px)}
#yh-ai-loading.on{display:flex}
#yh-ai-loading span{width:22px;height:22px;border-radius:50%;border:3px solid rgba(255,255,255,.2);border-top-color:#FF2E63;animation:yeSpin .8s linear infinite}
@keyframes yeSpin{to{transform:rotate(360deg)}}
.yh-studio-btn b svg{width:24px;height:24px}
.yh-studio-btn b{background:linear-gradient(135deg,#FFC531,#FF2E63)!important;color:#fff}

/* éditeur photo */
#yh-editor{position:fixed;inset:0;z-index:250;background:#0A0A0B;color:#fff;display:none;flex-direction:column}
#yh-editor.open{display:flex}
#yh-editor svg{width:22px;height:22px}
.ye-top{display:grid;grid-template-columns:48px 1fr auto;align-items:center;padding:calc(env(safe-area-inset-top,0px) + 6px) 10px 6px}
.ye-top b{text-align:center;font-size:16px}
.ye-ib{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#fff}
.ye-done{height:38px;padding:0 16px;border-radius:12px;background:linear-gradient(103deg,#FFC531,#FF6A3D,#FF2E63);color:#111;font-weight:800}
.ye-stage{position:relative;flex:1;min-height:0;display:grid;place-items:center;padding:8px}
.ye-canvas{max-width:100%;max-height:100%;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.5)}
.ye-compare{position:absolute;right:16px;bottom:16px;display:flex;align-items:center;gap:6px;height:36px;padding:0 12px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font-size:13px;font-weight:700;user-select:none;-webkit-user-select:none;touch-action:none}
.ye-compare svg{width:18px!important;height:18px!important}
.ye-busy{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.45)}
.ye-busy i{width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.2);border-top-color:#FF2E63;animation:yeSpin .8s linear infinite;margin:0 auto 10px}
.ye-busy b{font-size:14px}
.ye-busy.hidden{display:none}
.ye-strip{display:flex;gap:6px;overflow-x:auto;padding:4px 12px;scrollbar-width:none}
.ye-strip.hidden{display:none}
.ye-strip button{flex:0 0 48px;height:64px;border-radius:9px;background:#222 center/cover;border:2px solid transparent}
.ye-strip button.on{border-color:#FF2E63}
.ye-panel{min-height:132px;max-height:38vh;overflow-y:auto;padding:10px 12px 4px}
.ye-tabs{display:flex;border-top:1px solid rgba(255,255,255,.08);padding:4px 4px calc(env(safe-area-inset-bottom,0px) + 6px)}
.ye-tabs button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0;color:rgba(255,255,255,.5);font-size:11.5px;font-weight:700}
.ye-tabs button.on{color:#fff}
.ye-tabs button.on svg{color:#FF2E63}
.ye-ai{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ye-ai button{text-align:left;padding:12px;border-radius:14px;background:#17171b;border:2px solid transparent;color:#fff;display:flex;flex-direction:column;gap:3px}
.ye-ai button b{font-size:14px}.ye-ai button small{font-size:11.5px;color:rgba(255,255,255,.55);line-height:1.3}
.ye-ai button.on{border-color:#FF2E63;background:#24151b}
.ye-filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
.ye-filters button{flex:0 0 66px;display:flex;flex-direction:column;align-items:center;gap:5px;color:rgba(255,255,255,.75);font-size:11.5px}
.ye-filters .yh-fx{width:62px;height:62px;border:2px solid transparent}
.ye-filters button.on .yh-fx{border-color:#FF2E63}
.ye-filters button.on{color:#fff}
.ye-sl{display:grid;grid-template-columns:96px 1fr 34px;align-items:center;gap:10px;padding:8px 2px;font-size:13px}
.ye-sl input{width:100%;accent-color:#FF2E63}
.ye-sl em{font-style:normal;text-align:right;color:rgba(255,255,255,.6);font-size:12px}
.ye-crop{display:flex;flex-wrap:wrap;gap:8px}
.ye-crop button{flex:1 1 70px;height:44px;border-radius:12px;background:#17171b;border:2px solid transparent;color:#fff;font-weight:700}
.ye-crop button.on{border-color:#FF2E63}

/* feuille vidéo */
.yh-vt{position:fixed;inset:0;z-index:260;display:flex;align-items:flex-end;justify-content:center}
.yh-vt-bg{position:absolute;inset:0;background:rgba(0,0,0,.55);opacity:0;transition:.2s}
.yh-vt-p{position:relative;width:100%;max-width:560px;background:#141417;color:#fff;border-radius:22px 22px 0 0;padding:6px 16px calc(16px + env(safe-area-inset-bottom,0px));transform:translateY(100%);transition:transform .22s}
.yh-vt.on .yh-vt-bg{opacity:1}.yh-vt.on .yh-vt-p{transform:none}
.yh-vt-grip{width:40px;height:4px;border-radius:2px;background:rgba(255,255,255,.22);margin:4px auto 12px}
.yh-vt-p>b{display:block;font-size:17px;margin-bottom:10px}
.yh-vt-opt{width:100%;display:flex;align-items:center;gap:12px;padding:14px 4px;color:#fff;text-align:left;border-bottom:1px solid rgba(255,255,255,.06)}
.yh-vt-opt span{flex:1;display:flex;flex-direction:column;gap:2px}
.yh-vt-opt small{color:rgba(255,255,255,.55);font-size:12px}
.yh-vt-opt i{width:46px;height:26px;border-radius:999px;background:#44444b;position:relative;transition:.2s;flex:none}
.yh-vt-opt i::after{content:"";position:absolute;width:22px;height:22px;top:2px;left:2px;border-radius:50%;background:#fff;transition:.2s}
.yh-vt-opt.on i{background:#FF2E63}.yh-vt-opt.on i::after{left:22px}
.yh-vt-p p{font-size:12.5px;color:rgba(255,255,255,.55);margin:12px 2px}
.yh-vt-ok{width:100%;height:48px;border-radius:14px;background:linear-gradient(103deg,#FFC531,#FF6A3D,#FF2E63);color:#111;font-weight:800;font-size:15px}

/* icônes SVG remplaçant les anciens emojis */
.yh-i{display:inline-flex;vertical-align:-3px}
.yh-i svg{width:1.15em;height:1.15em}
.cam-tool-icon .yh-i svg,.creator-tool b .yh-i svg{width:24px;height:24px}
.publish-option>span .yh-i svg{width:22px;height:22px}

/* ===== v0.23 : rails sans chevauchement (mobile) ===== */
html body .sv-post-editor-rail,html body.sunvibe-real-post-editor:not(.yh-never) .sv-post-editor-rail{display:none!important}
#pub-stage #tpl-row,#pub-stage #autocut-hint{display:none!important}
i.yh-i{font-style:normal}
#pub-stage .creator-rail{top:calc(env(safe-area-inset-top,0px) + 78px)!important;gap:12px!important;max-height:calc(100% - 250px);overflow-y:auto;scrollbar-width:none;padding-bottom:4px}
#pub-stage .creator-rail::-webkit-scrollbar{display:none}
#pub-stage .creator-tool b{width:44px!important;height:44px!important;font-size:19px}
#pub-stage .creator-tool b svg{width:22px;height:22px}
#pub-stage .creator-tool span{font-size:10.5px}
#pub-stage .creator-sound{max-width:calc(100% - 150px)!important}
.yh-aa{font-style:normal;font-weight:900;font-size:17px}
@media(max-height:700px){#pub-stage .creator-rail{gap:8px!important}#pub-stage .creator-tool span{display:none}}
/* rail caméra repliable */
#cam-stage .cam-rail.yh-collapsed .cam-tool:not(.yh-rail-more):nth-child(n+5){display:none!important}
#cam-stage .cam-rail .yh-rail-more{min-height:40px!important}
#cam-stage .cam-rail:not(.yh-collapsed) .yh-rail-more svg{transform:rotate(180deg)}
#cam-stage .cam-rail{max-height:calc(100dvh - 420px)!important}
#cam-stage .cam-rail .yh-rail-more .cam-tool-icon svg{width:22px;height:22px}
/* scan IA local */
.yh-scan-row{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid rgba(255,255,255,.08);font-size:13.5px}
.yh-scan-row b.ok,.yh-scan-row.ok b{color:#2EE59D}.yh-scan-row.mid b{color:#FFC531}.yh-scan-row.bad b{color:#FF4D6D}

/* ===== Modèles AutoCut ===== */
#yh-autocut{position:fixed;inset:0;z-index:270;display:none;align-items:flex-end;justify-content:center}
#yh-autocut.on{display:flex}
.ac-bg{position:absolute;inset:0;background:rgba(0,0,0,.7)}
.ac-p{position:relative;width:100%;max-width:560px;max-height:96vh;display:flex;flex-direction:column;background:#111114;color:#fff;border-radius:22px 22px 0 0;padding:8px 14px calc(14px + env(safe-area-inset-bottom,0px))}
.ac-head{display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:6px;padding:2px 0 8px}
.ac-head b{font-size:16px}.ac-dur{font-size:12px;color:rgba(255,255,255,.55)}
.ac-x{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#222227;color:#fff}.ac-x svg{width:18px;height:18px}
.ac-stage{display:grid;place-items:center;min-height:0;flex:1}
.ac-prev{height:min(46vh,440px);width:auto;aspect-ratio:9/16;border-radius:16px;background:#000;box-shadow:0 10px 30px rgba(0,0,0,.5)}
.ac-list{display:flex;gap:10px;overflow-x:auto;padding:12px 2px 6px;scrollbar-width:none}
.ac-list::-webkit-scrollbar{display:none}
.ac-list button{flex:0 0 72px;display:flex;flex-direction:column;align-items:center;gap:5px;color:rgba(255,255,255,.7);font-size:11.5px;font-weight:700}
.ac-list span{width:68px;height:120px;border-radius:12px;background:#222 center/cover;border:2px solid transparent}
.ac-list button.on span{border-color:#FF2E63}.ac-list button.on{color:#fff}
.ac-prog{height:34px;border-radius:12px;background:#1d1d22;position:relative;overflow:hidden;margin:6px 0;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700}
.ac-prog.hidden{display:none}
.ac-prog i{position:absolute;left:0;top:0;bottom:0;width:0;background:linear-gradient(90deg,#FFC531,#FF2E63);opacity:.45;transition:width .2s}
.ac-prog span{position:relative}
.ac-go{height:50px;border-radius:14px;background:linear-gradient(103deg,#FFC531,#FF6A3D,#FF2E63);color:#111;font-weight:800;font-size:15.5px;margin-top:6px}
.ac-go:disabled{opacity:.5}
