/* Chambrée connectée v6 — interface claire, responsive, sans dépendance CSS externe. */
:root{color-scheme:dark;--ch-bg:#0b1020;--ch-card:#161f33;--ch-edge:#33415c;--ch-text:#f2f6ff;--ch-dim:#b4c2d6;--ch-blue:#65b8ff;--ch-danger:#ff9c69;--ch-radius:18px}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(ellipse at 25% -10%,#243854 0%,#0b1020 65%);color:var(--ch-text);font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;line-height:1.48;min-height:100vh}
button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}a{color:#b3daff;overflow-wrap:anywhere}
[hidden]{display:none!important}
.shell{max-width:1120px;margin:0 auto;padding:clamp(12px,2vw,24px);min-height:100vh;display:flex;flex-direction:column}
.sessionbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid #384359;padding:8px 0 18px;margin-bottom:20px}
.brand{font-size:1.36rem;font-weight:900;text-decoration:none;color:#fff!important}.brand span{color:#f48c65}
.sessionbar .actions{display:flex;gap:7px;align-items:center}.sessionbar button,.ghost,.ch-btn{border:1px solid var(--ch-edge);background:#25324b;color:var(--ch-text);border-radius:12px;padding:11px 15px;font-weight:700;min-height:42px}
.sessionbar button:hover:not(:disabled),.ch-btn:hover:not(:disabled){filter:brightness(1.12)}.pill{border:1px solid #51627a;color:#d6e5fb;font-size:.76rem;padding:7px 10px;border-radius:999px;white-space:nowrap}.pill.good{border-color:#72bfa1;color:#a6f1d7}.pill.bad{border-color:#d17f75;color:#ffc8bf}
#error,#offline{border:1px solid #a86e5d;border-radius:12px;padding:12px 16px;margin-bottom:12px;background:#3b2930;color:#fff}
#app{flex:1}.ch-root{padding:6px 0 22px}.ch-heading{text-align:center;margin:15px auto 22px;max-width:780px}.ch-heading h1{font-size:clamp(1.7rem,4.5vw,3.1rem);line-height:1.13;margin:8px 0 10px}.ch-heading p{margin:8px 0;color:#d2deef}.ch-kicker{text-transform:uppercase;letter-spacing:.12em;color:#b3daff!important;font-size:.77rem;font-weight:800}.ch-lead{font-size:clamp(1.15rem,3vw,1.65rem);font-weight:700;color:#fff!important}.ch-dim{color:var(--ch-dim);font-size:.91rem}.ch-center{text-align:center}.ch-icon{font-size:4rem}
.ch-panel{padding:clamp(18px,3vw,30px);border:1px solid var(--ch-edge);background:linear-gradient(140deg,rgba(29,41,67,.95),rgba(18,27,46,.97));border-radius:var(--ch-radius);box-shadow:0 8px 22px #0002;margin:0 0 16px}.ch-panel h2{margin:0 0 12px;font-size:1.3rem}.ch-panel h3{margin:0 0 9px}.ch-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.ch-grid .ch-panel{margin:0}.ch-game-grid{grid-template-columns:minmax(270px,1fr) minmax(270px,1.1fr)}
.ch-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:4px;max-width:100%;text-align:center}.ch-primary{background:#1978bb;border-color:#55aeeb;color:white;font-size:1.06rem;min-height:52px;padding:12px 22px}.ch-secondary{background:#233f69;border-color:#6086b0}.ch-warning{background:#663d31;border-color:#e29b7d}.ch-subtle{background:transparent;color:#cfdef1}.ch-small{padding:5px 8px;min-height:30px;font-size:.78rem;margin:1px 2px}.ch-vertical{display:flex;flex-direction:column;align-items:center;gap:7px;margin-top:18px}.ch-vertical .ch-btn{width:min(100%,340px)}.ch-foot{margin-top:21px;text-align:center}.ch-host-only{display:block}.ch-mobile-hint{display:none}
.ch-form{max-width:470px;margin:0 auto;text-align:center}.ch-form label{display:block;font-size:1.05rem;font-weight:800;margin-bottom:12px}.ch-form input{display:block;width:100%;background:#fff;color:#15203b;border:2px solid #8ebadf;border-radius:12px;min-height:56px;padding:12px 15px;font-size:1.12rem;margin-bottom:20px}
.ch-qr{display:flex;align-items:center;justify-content:center;min-height:248px;margin:5px auto 10px;background:#fff;border-radius:15px;width:fit-content;min-width:248px;padding:8px;color:#223045}.ch-qr img,.ch-qr canvas,#bigQR img,#bigQR canvas{max-width:100%;height:auto}.ch-code{font-weight:900;font-size:2.3rem;letter-spacing:.16em;margin:8px 0}.ch-link{font-size:.78rem}
.ch-players{display:flex;flex-direction:column;gap:7px;max-height:540px;overflow-y:auto}.ch-player{display:flex;flex-wrap:wrap;align-items:center;gap:7px;background:#26334c;border-radius:10px;padding:7px 10px;text-align:left}.ch-player-name{font-weight:700;flex:1;min-width:80px}.ch-player small{font-size:.77rem;color:#c5d6ec}.ch-out{opacity:.72}.ch-dot{height:9px;width:9px;border-radius:50%;background:#b27568;flex:0 0 9px}.ch-dot.ch-on{background:#61d6a1}
.ch-steps{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin:14px 0 22px}.ch-steps span{padding:6px 12px;background:#243248;color:#bac9de;border-radius:9px;border:1px solid #41516a;font-size:.9rem}.ch-steps span.ch-current{background:#26689c;border-color:#7ac5ff;color:white;font-weight:800}
.ch-score{max-width:680px;margin:12px auto 24px}.ch-score-label{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 7px}.ch-score-label small{font-size:.75rem;color:#c9d8ea}.ch-bar{height:19px;border:1px solid #6482a2;border-radius:999px;background:#26384c;overflow:hidden}.ch-bar span{display:block;height:100%;background:linear-gradient(90deg,#e7b560,#e57659);transition:width .2s}
.ch-timer{font-size:clamp(3.5rem,8vw,6rem);font-weight:900;letter-spacing:.02em;line-height:1.05;font-variant-numeric:tabular-nums;margin:8px 0}.ch-player-timer{margin-top:10px;color:#e3f3ff;font-weight:700}.ch-counter{margin:22px 0 14px}.ch-counter-row{display:flex;align-items:center;justify-content:center;gap:14px;margin:10px 0}.ch-counter-row strong{font-size:3rem;min-width:60px;font-variant-numeric:tabular-nums}.ch-counter-row button{font-size:1.6rem;min-width:52px}.ch-number{font-weight:900;font-size:4.3rem}.ch-votecount{font-size:5rem;font-weight:900;line-height:1.1;font-variant-numeric:tabular-nums}.ch-votecount span{font-size:1.8rem;color:#b8c5db}
.ch-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0}.ch-choice{min-height:63px;display:flex;align-items:center;justify-content:space-between;gap:9px;border:2px solid #5e789a;background:#293b57;color:white;border-radius:12px;padding:10px 15px;font-weight:800;font-size:1.03rem;overflow-wrap:anywhere}.ch-choice.selected{background:#1a6797;border:3px solid #b9f3ff}
.ch-secret{border:2px solid #dcb97b;border-radius:15px;background:#3a3341;padding:19px;margin-bottom:10px}.ch-secret h2{font-size:1.9rem}.ch-card-panel{margin-top:18px}.ch-result{border-color:#4e87b6;text-align:center}.ch-result p{font-size:1.1rem}.ch-log{margin:20px 0 0}.ch-log summary{cursor:pointer;font-weight:700}.ch-log ul{padding-left:20px}.ch-log li{margin:5px 0}
footer{text-align:center;font-size:.77rem;color:#aab9ce;padding:20px 8px 4px;margin-top:16px;border-top:1px solid #33435c}footer a{color:#badcff}
dialog{background:#19253a;color:white;border:1px solid #7a9abe;max-width:min(92vw,650px);max-height:90vh;border-radius:18px;padding:24px;overflow:auto}dialog::backdrop{background:rgba(0,0,0,.76)}dialog .actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}dialog .close{float:right}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:12px}.box{border:1px solid #4c6886;border-radius:12px;padding:13px}.ruleslist li{margin:9px 0}#qrDialog{text-align:center}#bigQR{min-width:260px;min-height:260px;display:flex;justify-content:center;align-items:center;background:white;border-radius:10px;padding:10px;color:#12233f;margin:16px auto;max-width:300px}.roomcode{font-size:2.1rem;font-weight:900;letter-spacing:.1em}.joinlink{overflow-wrap:anywhere;font-size:.79rem}
@media(max-width:700px){.shell{padding:10px}.sessionbar{gap:7px;padding-bottom:9px}.sessionbar .actions{gap:3px}.sessionbar button{padding:7px 9px;font-size:.83rem}.brand{font-size:1.1rem}.pill{font-size:.7rem;padding:5px 7px}.ch-grid,.ch-game-grid,.twocol{grid-template-columns:1fr}.ch-panel{padding:17px}.ch-heading{margin-top:8px}.ch-choices{grid-template-columns:1fr 1fr}.ch-host-only{display:none}.ch-mobile-hint{display:block;font-weight:800;color:#e2d0a7}.ch-steps span{font-size:.76rem;padding:6px 8px}.ch-score-label small{display:none}.ch-player{font-size:.94rem}}
@media(max-width:360px){.ch-choices{grid-template-columns:1fr}.sessionbar{justify-content:center}.ch-votecount{font-size:3.6rem}}
