/* SunVibe v0.31 — Messagerie */
#yhc{position:fixed;inset:0;z-index:5000;background:#0b0b0d;color:#f3f3f1;display:none;overflow:hidden;font-family:inherit;-webkit-tap-highlight-color:transparent}
#yhc.on{display:block}
body.yc-open{overflow:hidden}
#yhc *{box-sizing:border-box}
#yhc button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}
#yhc .hidden{display:none!important}
#yhc svg{width:22px;height:22px;display:block}
.yc-pane{position:absolute;inset:0;display:flex;flex-direction:column;background:#0b0b0d;transition:transform .26s cubic-bezier(.2,.8,.2,1)}
.yc-thread{transform:translateX(100%);box-shadow:-10px 0 30px rgba(0,0,0,.4)}
#yhc.in-thread .yc-thread{transform:none}
#yhc.in-thread .yc-list{transform:translateX(-28%)}
.yc-head{display:flex;align-items:center;gap:8px;padding:calc(env(safe-area-inset-top,0px) + 8px) 10px 8px;border-bottom:1px solid #1b1b20;flex:0 0 auto;background:#0b0b0d;min-height:58px}
.yc-head h1{flex:1;margin:0;font-size:19px;font-weight:900}
.yc-ib{width:40px;height:40px;border-radius:50%;display:grid!important;place-items:center;flex:0 0 auto;background:#18181c!important}
.yc-who{flex:1;min-width:0;display:flex;align-items:center;gap:10px;text-align:left;padding:2px 4px;border-radius:12px}
.yc-who span{min-width:0;display:flex;flex-direction:column}
.yc-who b{font-size:15.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yc-who small{font-size:12px;color:#8d8d94}
.yc-av{width:52px;height:52px;border-radius:50%;flex:0 0 auto;background:#2b1d27 center/cover no-repeat;display:grid;place-items:center;font-weight:900;font-size:19px;color:#fff}
.yc-av.sm{width:38px;height:38px;font-size:15px}
.yc-av.lg{width:84px;height:84px;font-size:30px}
.yc-search{display:flex;align-items:center;gap:8px;margin:10px 12px 4px;padding:0 12px;height:42px;border-radius:14px;background:#17171b;color:#8d8d94}
.yc-search svg{width:18px;height:18px}
.yc-search input{flex:1;min-width:0;border:0;background:none;color:#fff;font:inherit;font-size:15px;outline:none}
.yc-search.inl{margin:0 0 10px}
.yc-convs{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 4px calc(16px + env(safe-area-inset-bottom,0px))}
.yc-conv{display:flex!important;align-items:center;gap:12px;width:100%;padding:9px 10px;border-radius:16px;text-align:left}
.yc-conv:active{background:#151519}
.yc-ci{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.yc-ci b{font-size:15.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yc-ci>span{font-size:13.5px;color:#8d8d94;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:4px}
.yc-conv.unread .yc-ci b{color:#fff}.yc-conv.unread .yc-ci>span{color:#e8e8ea;font-weight:700}
.yc-ki svg,.yc-tk svg{width:15px;height:15px}
.yc-ki,.yc-tk{display:inline-flex;flex:0 0 auto;font-style:normal}
.yc-tk{color:#9a9aa1}.yc-tk.rd{color:#4cc2ff}
.yc-cm{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex:0 0 auto}
.yc-cm small{font-size:11.5px;color:#7d7d84}
.yc-cm em{font-style:normal;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#ff2e63;color:#fff;font-size:11.5px;font-weight:900;display:grid;place-items:center}
.yc-conv.unread .yc-cm small{color:#ff2e63;font-weight:800}
.yc-empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:60px 20px;color:#8d8d94}
.yc-empty svg{width:46px;height:46px;color:#3b3b42}
.yc-empty b{color:#e9e9ec;font-size:16px}
.yc-btn{height:42px;padding:0 18px;border-radius:14px;background:linear-gradient(90deg,#ffc531,#ff7a2f 45%,#ff2e63)!important;color:#fff!important;font-weight:900!important;display:inline-flex!important;align-items:center;justify-content:center;gap:8px}
.yc-btn.sm{height:34px;padding:0 14px;font-size:13px;border-radius:11px;flex:0 0 auto}
.yc-btn.sm.done{background:#1d3a2a!important;color:#5fe39a!important}
.yc-btn.wide{width:100%;margin-bottom:12px;height:48px}
.yc-btn svg{width:18px;height:18px}
.yc-wait{display:flex;justify-content:center;padding:40px}
.yc-wait i{width:24px;height:24px;border-radius:50%;border:3px solid #2c2c33;border-top-color:#ffc531;animation:ycSpin .8s linear infinite}
@keyframes ycSpin{to{transform:rotate(360deg)}}
/* fil */
.yc-msgs{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 10px 8px;display:flex;flex-direction:column;gap:3px;overscroll-behavior:contain}
.yc-day{align-self:center;margin:12px 0 6px;font-size:11.5px;font-weight:800;color:#9a9aa1;text-transform:capitalize}
.yc-day span{background:#17171b;padding:4px 10px;border-radius:10px}
.yc-hello{margin:auto;display:flex;flex-direction:column;align-items:center;gap:8px;color:#8d8d94;text-align:center}
.yc-hello b{color:#fff;font-size:17px}
.yc-b{max-width:min(78%,460px);border-radius:20px;padding:8px 12px 6px;font-size:15.5px;line-height:1.36;word-wrap:break-word;overflow-wrap:anywhere;position:relative;animation:ycIn .18s ease-out}
@keyframes ycIn{from{transform:translateY(6px);opacity:.3}to{transform:none;opacity:1}}
.yc-b.theirs{align-self:flex-start;background:#1c1c21;border-bottom-left-radius:6px}
.yc-b.mine{align-self:flex-end;background:linear-gradient(135deg,#ff8a2a,#ff2e63);color:#fff;border-bottom-right-radius:6px}
.yc-b.k-image,.yc-b.k-video{padding:4px;background:#1c1c21}
.yc-b.mine.k-image,.yc-b.mine.k-video{background:#3a1626}
.yc-tx{white-space:pre-wrap}
.yc-b.k-image .yc-tx,.yc-b.k-video .yc-tx{padding:6px 8px 0}
.yc-tx a{color:inherit;text-decoration:underline;word-break:break-all}
.yc-t{display:flex;align-items:center;justify-content:flex-end;gap:3px;font-size:10.5px;opacity:.75;margin-top:2px}
.yc-b.k-image .yc-t,.yc-b.k-video .yc-t{padding:0 6px 2px}
.yc-b.mine .yc-tk{color:rgba(255,255,255,.75)}.yc-b.mine .yc-tk.rd{color:#bfe9ff}
.yc-b.mine .yc-tk svg{width:14px;height:14px}
.yc-img{display:block;max-width:100%;max-height:340px;border-radius:16px;min-width:120px;min-height:80px;background:#26262c;object-fit:cover;cursor:zoom-in}
.yc-vid{display:block;width:100%;max-width:300px;max-height:400px;border-radius:16px;background:#000}
.yc-voice{display:flex;align-items:center;gap:10px;min-width:200px;padding:3px 0}
.yc-vp{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.18)!important;display:grid!important;place-items:center;flex:0 0 auto}
.yc-b.theirs .yc-vp{background:#ff2e63!important;color:#fff!important}
.yc-vp svg{width:16px;height:16px}
.yc-vbar{flex:1;height:5px;border-radius:5px;background:rgba(255,255,255,.25);overflow:hidden}
.yc-vbar i{display:block;height:100%;width:0;background:currentColor;border-radius:5px;transition:width .2s linear}
.yc-voice small{font-size:12px;min-width:32px;text-align:right}
.yc-file{display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none;min-width:200px;padding:4px 0}
.yc-file>i{width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.16);display:grid;place-items:center;flex:0 0 auto}
.yc-file span{flex:1;min-width:0;display:flex;flex-direction:column}
.yc-file b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yc-file small{font-size:12px;opacity:.75}
.yc-file em svg{width:20px;height:20px}
.yc-del{opacity:.6;font-size:14px}
.yc-pend{opacity:.75}
.yc-clock{width:10px;height:10px;border-radius:50%;border:1.5px solid currentColor;border-top-color:transparent;animation:ycSpin .9s linear infinite}
.yc-up{height:3px;border-radius:3px;background:rgba(255,255,255,.25);margin-top:5px;overflow:hidden}
.yc-up i{display:block;height:100%;width:2%;background:#fff;transition:width .2s}
.yc-blocked{padding:14px;text-align:center;color:#8d8d94;border-top:1px solid #1b1b20}
/* zone d'écriture */
.yc-comp{display:flex;align-items:flex-end;gap:8px;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));border-top:1px solid #1b1b20;background:#0b0b0d;flex:0 0 auto}
.yc-comp textarea{flex:1;min-width:0;resize:none;border:1px solid #26262c;background:#141418;color:#fff;border-radius:22px;padding:10px 14px;font:inherit;font-size:16px;line-height:1.3;max-height:120px;outline:none}
.yc-comp textarea:focus{border-color:#3a3a42}
.yc-att{background:#18181c!important}
.yc-go{background:linear-gradient(135deg,#ff8a2a,#ff2e63)!important;color:#fff!important}
.yc-rec{display:flex;align-items:center;gap:10px;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));border-top:1px solid #1b1b20;background:#0b0b0d}
.yc-rec b{font-variant-numeric:tabular-nums;min-width:40px}
.yc-dot{width:10px;height:10px;border-radius:50%;background:#ff2e63;animation:ycBlink 1s infinite}
@keyframes ycBlink{50%{opacity:.25}}
.yc-lvl{flex:1;height:8px;border-radius:8px;background:#1d1d22;overflow:hidden}
.yc-lvl i{display:block;height:100%;width:6%;background:linear-gradient(90deg,#ffc531,#ff2e63);transition:width .1s}
/* feuilles */
.yc-sheet{position:absolute;inset:0;z-index:20;background:rgba(0,0,0,.55);display:flex;align-items:flex-end}
.yc-sheet .in{width:100%;max-height:85%;overflow-y:auto;background:#141418;border-radius:22px 22px 0 0;padding:16px 14px calc(18px + env(safe-area-inset-bottom,0px));animation:ycUp .22s ease-out}
.yc-sheet.tall .in{height:80%}
@keyframes ycUp{from{transform:translateY(40px);opacity:.5}to{transform:none;opacity:1}}
.yc-sheet h3{margin:2px 4px 12px;font-size:17px}
.yc-pick .yc-conv{padding:8px 4px}
.yc-att-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.yc-att-grid button{display:flex!important;flex-direction:column;align-items:center;gap:8px;font-size:12px;font-weight:700;padding:6px 0;color:#ddd!important}
.yc-att-grid i{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;color:#fff}
.yc-att-grid i svg{width:26px;height:26px}
.c1{background:linear-gradient(135deg,#7c4dff,#b84dff)}.c2{background:linear-gradient(135deg,#ff2e63,#ff7a2f)}.c3{background:linear-gradient(135deg,#1e88e5,#26c6da)}.c4{background:linear-gradient(135deg,#00b894,#55efc4)}
.yc-acts button{display:flex!important;align-items:center;gap:12px;width:100%;padding:14px 10px;border-radius:14px;font-size:15.5px;font-weight:700}
.yc-acts button:active{background:#1d1d22}
.yc-acts .red{color:#ff6b8b!important}
.yc-viewer{position:absolute;inset:0;z-index:30;background:#000;display:flex;align-items:center;justify-content:center}
.yc-viewer img{max-width:100%;max-height:100%;object-fit:contain}
.yc-viewer .yc-ib{position:absolute;top:calc(env(safe-area-inset-top,0px) + 10px);left:10px;background:rgba(40,40,46,.8)!important;color:#fff}
.yc-viewer a.yc-ib{left:auto;right:10px}
.yc-toast{position:absolute;left:50%;bottom:90px;transform:translateX(-50%);z-index:40;background:#222228;color:#fff;padding:9px 16px;border-radius:12px;font-size:14px;font-weight:700;opacity:0;transition:.2s;white-space:nowrap}
.yc-toast.on{opacity:1}
@media (min-width:900px){ #yhc{left:0;right:0;margin:0 auto;max-width:760px;border-left:1px solid #1b1b20;border-right:1px solid #1b1b20} }
