/* DocSpace 3.6.0 — Control Center */
.control-center-dialog{width:min(1180px,96vw);max-width:none;height:min(820px,92vh);padding:0;border:1px solid rgba(255,255,255,.11);border-radius:22px;background:#0d1119;color:#e9edf7;box-shadow:0 34px 110px #000b;overflow:hidden}.control-center-dialog::backdrop{background:#05070bc9;backdrop-filter:blur(8px)}.cc-shell{height:100%;display:flex;flex-direction:column}.cc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:22px 24px 18px;border-bottom:1px solid rgba(255,255,255,.08);background:linear-gradient(120deg,rgba(124,108,255,.14),rgba(70,160,255,.04) 45%,transparent)}.cc-head h2{margin:4px 0 5px;font-size:24px}.cc-head p{margin:0;color:#929caf}.cc-eyebrow{font-size:10px;letter-spacing:.16em;font-weight:900;color:#9b8cff}.cc-close{width:40px;height:40px;border-radius:12px;font-size:24px}.cc-tabs{display:flex;gap:5px;padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.07);overflow:auto;background:#0a0e15}.cc-tabs button{white-space:nowrap;border:0;background:transparent;color:#8993a5;padding:9px 12px;border-radius:9px;font-weight:700}.cc-tabs button.active{background:rgba(124,108,255,.15);color:#dcd7ff}.cc-content{flex:1;min-height:0;overflow:auto;padding:18px}.cc-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px}.cc-toolbar h3{margin:0 0 4px}.cc-toolbar p{margin:0;color:#818c9f}.cc-stats{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin-bottom:14px}.cc-stat,.cc-card,.cc-event{border:1px solid rgba(255,255,255,.075);background:rgba(255,255,255,.025);border-radius:14px}.cc-stat{padding:14px}.cc-stat small,.cc-stat span{display:block;color:#778398}.cc-stat strong{display:block;font-size:22px;margin:6px 0 3px}.cc-stat span{font-size:11px}.cc-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cc-card{padding:16px;margin-bottom:12px}.cc-card h4{margin:0 0 12px}.cc-card dl{display:grid;grid-template-columns:130px 1fr;gap:8px;margin:0}.cc-card dt{color:#788396}.cc-card dd{margin:0;overflow-wrap:anywhere}.cc-integrations{display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:8px}.cc-integrations-large{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.cc-integration{display:flex;align-items:center;gap:9px;padding:10px;border-radius:10px;background:#090d13}.cc-integration small{display:block;color:#7f8999}.cc-state{display:inline-block;width:9px;height:9px;border-radius:50%;background:#5d6675;margin-right:7px;box-shadow:0 0 0 3px rgba(255,255,255,.03)}.cc-state.on{background:#49db8b;box-shadow:0 0 14px #49db8b80}.cc-state.off{background:#697180}.cc-table-wrap{overflow:auto;border:1px solid rgba(255,255,255,.07);border-radius:14px}.cc-table{width:100%;border-collapse:collapse;min-width:820px}.cc-table th,.cc-table td{text-align:left;padding:11px 12px;border-bottom:1px solid rgba(255,255,255,.055);font-size:12px}.cc-table th{position:sticky;top:0;background:#0c1017;color:#7f8999;z-index:1}.cc-actions{display:flex;flex-wrap:wrap;gap:6px}.cc-actions button{padding:7px 9px}.cc-form{display:grid;gap:10px}.cc-form label,.cc-card label{display:grid;gap:5px;color:#939daf}.cc-form input,.cc-card input,.cc-card textarea{width:100%}.cc-event-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.cc-event{display:flex;flex-direction:column;gap:8px;padding:14px}.cc-event>span{font-size:26px}.cc-event small{color:#7f8999;min-height:32px}.cc-event b{color:#9f94ff}.cc-active-event{padding:10px;border-radius:10px;background:rgba(124,108,255,.1);margin-bottom:10px}.cc-active-event p{margin:4px 0 0;color:#9da6b5}.cc-danger{border-color:rgba(255,88,111,.24)}.cc-danger button{border-color:rgba(255,88,111,.35);color:#ff9aaa}.cc-login{height:100%;display:grid;place-items:center;padding:40px}.cc-login-card{width:min(420px,100%);padding:24px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.025);border-radius:18px}.cc-login-card form{display:grid;gap:12px}.cc-login-card label{display:grid;gap:6px}.cc-live-dot{display:block;width:10px;height:10px;border-radius:50%;background:#49db8b;box-shadow:0 0 16px #49db8b;margin-bottom:14px}.cc-error{color:#ff8f9c;min-height:16px}.cc-loading{padding:60px;text-align:center;color:#8994a7}.cc-content code,.cc-login code{color:#c2bbff;background:#151927;padding:2px 5px;border-radius:5px}@media(max-width:850px){.control-center-dialog{width:100vw;height:100dvh;border-radius:0}.cc-stats{grid-template-columns:repeat(2,minmax(130px,1fr))}.cc-two{grid-template-columns:1fr}.cc-head{padding:17px}.cc-content{padding:12px}}@media(max-width:500px){.cc-stats{grid-template-columns:1fr 1fr}.cc-stat strong{font-size:17px}.cc-tabs{padding-inline:8px}.cc-head p{display:none}}

.cc-refreshing{opacity:.985}.cc-refreshing [data-cc-refresh]{opacity:.72;pointer-events:none}.cc-content{transition:opacity .15s ease}

/* 3.6.0 — scroll fiable et gestion des salons */
.control-center-dialog{height:min(900px,96dvh);max-height:96dvh}
.cc-shell{min-height:0;overflow:hidden}
#cc-body{display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden}
.cc-tabs{flex:0 0 auto;scrollbar-width:thin}
.cc-content{overscroll-behavior:contain;scrollbar-gutter:stable;padding-bottom:max(72px,env(safe-area-inset-bottom));}
.cc-channel-list{display:grid;gap:9px;margin-bottom:14px}
.cc-channel-row,.cc-create-channel{display:grid;grid-template-columns:minmax(150px,1.3fr) minmax(90px,.55fr) minmax(150px,1fr) auto;gap:9px;align-items:end;padding:10px;border-radius:12px;background:#090d13;border:1px solid rgba(255,255,255,.055)}
.cc-channel-row label{display:grid;gap:5px;color:#939daf;font-size:12px}.cc-channel-row input,.cc-create-channel input{min-width:0;width:100%}
.cc-channel-actions{display:flex;gap:6px;align-items:end;flex-wrap:wrap}.cc-check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:8px!important}.cc-check input{width:auto!important}
@media(max-width:760px){.control-center-dialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.cc-head{padding:16px}.cc-content{padding:12px;padding-bottom:80px}.cc-channel-row,.cc-create-channel{grid-template-columns:1fr 90px}.cc-channel-row label:nth-of-type(3),.cc-create-channel input:nth-child(3){grid-column:1/-1}.cc-channel-actions,.cc-create-channel button{grid-column:1/-1}.cc-two{grid-template-columns:1fr}.cc-stats{grid-template-columns:repeat(2,minmax(120px,1fr))}}

/* 3.6.0 — DocSpace Server Agent / contrôle du Galaxy */
.cc-remote-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:12px;align-items:start}.cc-remote-view{min-width:0}.cc-phone-frame{position:relative;width:min(430px,100%);aspect-ratio:9/19.5;margin:0 auto 12px;background:#03060a;border:1px solid rgba(150,135,255,.22);border-radius:24px;overflow:hidden;box-shadow:0 18px 55px #0008,inset 0 0 0 1px rgba(255,255,255,.02)}.cc-phone-frame img,.cc-phone-frame canvas{position:relative;z-index:2;width:100%;height:100%;object-fit:contain;display:block;touch-action:none;user-select:none;-webkit-user-drag:none;cursor:crosshair}.cc-phone-frame canvas{background:#03060a}.cc-phone-empty{position:absolute;inset:0;display:grid;place-items:center;padding:28px;text-align:center;color:#788398;font-size:13px;z-index:1}.cc-remote-controls{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.cc-remote-text{display:flex;gap:8px;margin-top:10px}.cc-remote-text input{flex:1;min-width:120px}.cc-remote-side{position:sticky;top:0}.cc-pair-code{font-size:34px;font-weight:900;letter-spacing:.22em;text-align:center;padding:18px;margin-top:12px;border-radius:12px;background:#090d15;border:1px dashed rgba(135,120,255,.45);color:#c9c1ff}.cc-danger-button{border-color:rgba(255,88,111,.35)!important;color:#ff9aaa!important}.cc-note{font-size:12px;line-height:1.55;color:#7d8798}.cc-remote-side hr{border:0;border-top:1px solid rgba(255,255,255,.07);margin:15px 0}@media(max-width:760px){.cc-remote-layout{grid-template-columns:1fr}.cc-remote-side{position:static}.cc-phone-frame{width:min(360px,100%)}}

/* Remote Phone Control v2 — low latency + clavier */
.cc-phone-frame:focus{outline:2px solid rgba(139,124,255,.95);outline-offset:3px;box-shadow:0 18px 55px #0008,0 0 0 5px rgba(124,108,255,.14)}
.cc-keyboard-hint{text-align:center;color:#8d97aa;font-size:12px;margin:-3px 0 10px}.cc-keyboard-hint::before{content:"⌨ ";color:#b8afff}.cc-remote-side select{width:100%;min-height:38px;background:#0b0f17;color:#e9edf7;border:1px solid rgba(255,255,255,.11);border-radius:9px;padding:7px}.cc-remote-controls button{min-height:36px}.cc-phone-frame img,.cc-phone-frame canvas{will-change:contents;image-rendering:auto}

/* Remote Phone Control v3 — responsive, sans saut de page, flux persistant */
.cc-content-remote{overflow:hidden;display:flex;flex-direction:column;padding-bottom:12px}
.cc-content-remote .cc-remote-toolbar{flex:0 0 auto;margin-bottom:8px}
.cc-content-remote .cc-remote-toolbar p{font-size:12px}
.cc-remote-stats{flex:0 0 auto;grid-template-columns:repeat(7,minmax(92px,1fr));gap:6px;margin-bottom:9px}
.cc-remote-stats .cc-stat{padding:8px 10px;border-radius:11px;min-width:0}
.cc-remote-stats .cc-stat small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-remote-stats .cc-stat strong{font-size:16px;margin:3px 0 1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-remote-stats .cc-stat span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-content-remote .cc-remote-layout{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,300px);gap:10px;align-items:stretch;overflow:hidden}
.cc-content-remote .cc-remote-view{display:flex;flex-direction:column;min-width:0;min-height:0;margin:0;padding:10px;overflow:hidden}
.cc-content-remote .cc-phone-frame{flex:1 1 0;min-height:0;max-height:100%;width:auto;max-width:100%;aspect-ratio:var(--phone-ratio,9/19.5);margin:0 auto 5px;border-radius:18px}
.cc-content-remote .cc-phone-frame img,.cc-content-remote .cc-phone-frame canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.cc-content-remote .cc-keyboard-hint{flex:0 0 auto;margin:3px 0 0;font-size:11px}
.cc-content-remote .cc-remote-side{position:static;min-height:0;overflow:auto;scrollbar-width:thin;padding-right:2px}
.cc-content-remote .cc-remote-side .cc-card{padding:11px;margin-bottom:8px}
.cc-remote-side-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.cc-remote-side-title h4{margin:0}
#cc-remote-live-state{font-size:13px;color:#ff667d;text-shadow:0 0 10px rgba(255,102,125,.45)}#cc-remote-live-state[data-online="1"]{color:#49db8b;text-shadow:0 0 12px rgba(73,219,139,.55)}
.cc-content-remote .cc-remote-controls{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}
.cc-content-remote .cc-remote-controls button{min-height:32px;padding:6px 7px;font-size:11px}
.cc-content-remote .cc-remote-controls button[data-remote-command="stop_capture"]{grid-column:1/-1}
.cc-content-remote .cc-remote-text{margin-top:7px;gap:6px}.cc-content-remote .cc-remote-text input{min-height:34px}.cc-content-remote .cc-remote-text button{padding-inline:9px}
.cc-speed-presets{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:8px}.cc-speed-presets button{padding:6px 4px;font-size:10px;min-width:0}
.cc-content-remote .cc-remote-config-card .cc-form{gap:7px}.cc-content-remote .cc-remote-config-card .cc-form label{font-size:11px;gap:3px}.cc-content-remote .cc-remote-config-card select,.cc-content-remote .cc-remote-config-card input{min-height:32px;padding:5px 7px}
.cc-phone-empty{transition:opacity .12s ease}.cc-phone-empty.has-frame{opacity:0;pointer-events:none}

@media(max-width:1050px){
  .cc-remote-stats{grid-template-columns:repeat(5,minmax(90px,1fr))}
  .cc-remote-stats [data-remote-stat="version"],.cc-remote-stats [data-remote-stat="seen"]{display:none}
  .cc-content-remote .cc-remote-layout{grid-template-columns:minmax(0,1fr) 245px}
}
@media(max-height:760px) and (min-width:761px){
  .cc-head{padding-top:12px;padding-bottom:10px}.cc-head p{display:none}.cc-head h2{font-size:20px;margin-block:2px}
  .cc-tabs{padding-top:6px;padding-bottom:6px}.cc-tabs button{padding-top:7px;padding-bottom:7px}
  .cc-content-remote{padding-top:10px}.cc-content-remote .cc-remote-toolbar{margin-bottom:6px}.cc-content-remote .cc-remote-toolbar p{display:none}
  .cc-remote-stats{margin-bottom:6px}.cc-remote-stats .cc-stat{padding:6px 8px}.cc-remote-stats .cc-stat strong{font-size:14px}
}
@media(max-width:760px){
  .cc-content-remote{overflow:auto;display:block;padding-bottom:80px}
  .cc-content-remote .cc-remote-toolbar{position:sticky;top:0;z-index:3;background:#0d1119;padding:4px 0 7px}
  .cc-remote-stats{display:flex;overflow-x:auto;gap:6px;scrollbar-width:thin;padding-bottom:3px}
  .cc-remote-stats .cc-stat{flex:0 0 128px}
  .cc-remote-stats [data-remote-stat="version"],.cc-remote-stats [data-remote-stat="seen"]{display:block}
  .cc-content-remote .cc-remote-layout{display:flex;flex-direction:column;overflow:visible;min-height:auto}
  .cc-content-remote .cc-remote-view{min-height:0;overflow:visible;padding:8px}
  .cc-content-remote .cc-phone-frame{flex:none;height:min(62dvh,680px);min-height:320px;width:auto;max-width:100%;margin-inline:auto}
  .cc-content-remote .cc-remote-side{overflow:visible}
  .cc-content-remote .cc-remote-controls{grid-template-columns:repeat(3,1fr)}
  .cc-content-remote .cc-remote-controls button[data-remote-command="stop_capture"]{grid-column:auto}
}
@media(max-width:430px){
  .cc-content-remote .cc-phone-frame{height:min(60dvh,600px);min-height:280px}
  .cc-content-remote .cc-remote-controls{grid-template-columns:1fr 1fr}
  .cc-content-remote .cc-remote-text{display:grid;grid-template-columns:1fr auto}
}

/* 3.7.0 — Control Center V2 */
.cc-live-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}.cc-live-chart-card{margin:0;min-height:150px;display:flex;flex-direction:column;justify-content:space-between}.cc-live-chart-card small{color:#778398}.cc-spark{height:78px;display:flex;align-items:flex-end;gap:3px;padding-top:10px;overflow:hidden}.cc-spark i{display:block;flex:1;min-width:3px;border-radius:3px 3px 1px 1px;background:linear-gradient(180deg,rgba(151,137,255,.95),rgba(86,119,255,.22));transition:height .25s ease}.cc-live-pill{font-size:10px;font-weight:900;letter-spacing:.15em;padding:5px 8px;border-radius:999px;background:rgba(73,219,139,.12);color:#68eda2}.cc-live-logs{display:grid;gap:6px;max-height:250px;overflow:auto}.cc-log-line{display:grid;grid-template-columns:70px 95px 1fr;gap:8px;align-items:start;padding:7px 8px;border-radius:8px;background:#090d13;font-size:11px}.cc-log-line time{color:#778398}.cc-log-line b{color:#b8afff}.cc-log-line span{overflow-wrap:anywhere}.cc-remote-view-tools{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin-top:6px}.cc-remote-view-tools label{display:flex!important;grid-template-columns:auto minmax(110px,180px)!important;align-items:center;gap:7px!important}.cc-remote-view-tools input{width:min(180px,38vw)!important}.cc-phone-frame{transform:scale(var(--remote-zoom,1));transform-origin:center top;transition:transform .12s ease}.cc-remote-view:fullscreen{background:#080b12;display:grid;place-items:center;padding:12px}.cc-remote-view:fullscreen .cc-phone-frame{height:calc(100dvh - 100px);max-width:95vw;width:auto}.cc-remote-view:fullscreen .cc-keyboard-hint,.cc-remote-view:fullscreen .cc-remote-view-tools{position:fixed;bottom:12px;z-index:8;background:#101620dd;padding:8px 12px;border-radius:12px}.cc-remote-view:fullscreen .cc-keyboard-hint{left:12px}.cc-remote-view:fullscreen .cc-remote-view-tools{right:12px}.cc-remote-telemetry{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}.cc-remote-telemetry span{padding:7px;border-radius:8px;background:#090d13;color:#7d8798;font-size:10px}.cc-remote-telemetry strong{display:block;color:#e7eaf2;font-size:12px;margin-top:2px}.cc-clipboard-row{display:grid;gap:5px;margin-top:7px}.cc-clipboard-row small{color:#747e90;font-size:10px;line-height:1.35}
@media(max-width:760px){.cc-live-grid{grid-template-columns:1fr}.cc-live-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.cc-log-line{grid-template-columns:58px 78px 1fr}.cc-remote-view-tools{gap:7px}.cc-remote-view-tools button{font-size:11px}}
