/* Télémédecine, salle d'appel et compte rendu (partagé tableau de bord / application agent). Charte : vert #8BC044, vert foncé #3F6B12. */
.tm-room{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;min-height:calc(100vh - 210px)}
.tm-stage{background:#151A12;border-radius:14px;display:flex;flex-direction:column;overflow:hidden;min-height:520px;color:#fff}
.tm-top{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.08)}
.tm-top b{display:block;font-size:15px}.tm-top small{color:#B9C4B0;font-size:12.5px}
.tm-live{background:#B42318;color:#fff;border-radius:999px;padding:3px 10px;font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums}
.tm-grid{flex:1;display:grid;gap:10px;padding:12px;grid-template-columns:1fr;grid-auto-rows:minmax(160px,1fr)}
.tm-grid[data-n="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.tm-grid[data-n="3"],.tm-grid[data-n="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.tm-tile{position:relative;background:#232B1E;border-radius:12px;overflow:hidden;min-height:160px}
.tm-tile video{width:100%;height:100%;object-fit:cover;display:block;background:#232B1E}
.tm-tile.self video{transform:scaleX(-1)}
.tm-ph{position:absolute;inset:0;display:none;place-items:center}.tm-tile.novideo .tm-ph{display:grid}.tm-tile.novideo video{opacity:0}
.tm-av{width:38px;height:38px;border-radius:50%;background:#F1F8E8;color:#3F6B12;display:inline-grid;place-items:center;font-weight:700;font-size:14px;flex:none}
.tm-av.tm-av-lg{width:84px;height:84px;font-size:28px;background:#3F6B12;color:#fff;box-shadow:0 0 0 6px rgba(139,192,68,.25)}
.tm-name{position:absolute;left:10px;bottom:10px;background:rgba(0,0,0,.55);padding:4px 10px;border-radius:8px;font-size:13px;display:flex;gap:6px;align-items:center}
.tm-st{width:8px;height:8px;border-radius:50%;background:#8BC044}.tm-tile.connecting .tm-st{background:#E0A100;animation:tmb 1s infinite}.tm-tile.lost .tm-st{background:#B42318}
.tm-flags{display:inline-flex;gap:4px;color:#FFB4AB}
@keyframes tmb{50%{opacity:.3}}
.tm-warn{margin:0 12px;color:#FFD88A;font-size:13px;min-height:18px}
.tm-ctrl{display:flex;justify-content:center;gap:12px;padding:12px 12px 16px;flex-wrap:wrap}
.tm-cb{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:74px;padding:10px 8px 8px;border-radius:12px;border:0;background:#2E3828;color:#fff;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.tm-cb:hover{background:#3A4632}.tm-cb.off{background:#fff;color:#1A1A1A}.tm-cb.on{background:#8BC044;color:#1A1A1A}.tm-cb.end{background:#B42318}.tm-cb.end:hover{background:#951c13}
.tm-cb:focus-visible,.tm-btn:focus-visible{outline:3px solid #8BC044;outline-offset:2px}
.tm-side{background:#fff;border:1px solid #E4E8E0;border-radius:14px;display:flex;flex-direction:column;min-height:0;max-height:calc(100vh - 190px)}
.tm-tabs{display:flex;border-bottom:1px solid #E4E8E0;padding:0 8px}
.tm-tabs button{flex:1;display:flex;gap:6px;justify-content:center;align-items:center;border:0;background:none;padding:12px 6px;font:inherit;font-size:13.5px;font-weight:600;color:#5B6157;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer}
.tm-tabs button.on{color:#3F6B12;border-bottom-color:#3F6B12}
.tm-pane{flex:1;overflow:auto;padding:14px 16px}
.tm-side-f{border-top:1px solid #E4E8E0;padding:12px 16px;display:flex;flex-direction:column;gap:8px;background:#FAFBF9;border-radius:0 0 14px 14px}
.tm-side-f small{color:#5B6157;min-height:16px}
.tm-btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;height:40px;padding:0 15px;border-radius:9px;border:1px solid #3F6B12;background:#3F6B12;color:#fff;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.tm-btn:hover{background:#2F5A0E}.tm-btn.ghost{background:#fff;color:#1A1A1A;border-color:#E4E8E0}.tm-btn.red{background:#B42318;border-color:#B42318}
.tm-lab{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:600;color:#3E453A;margin-bottom:12px}
.tm-lab textarea,.tm-lab select,.tm-lab input{border:1px solid #C9CFC4;border-radius:9px;padding:9px 11px;font:inherit;font-size:14px;font-weight:400;background:#fff;color:#1A1A1A;width:100%;box-sizing:border-box}
.tm-lab select,.tm-lab input{height:40px;padding:0 11px}
.tm-dos-h{display:flex;gap:10px;align-items:center;margin-bottom:10px}.tm-dos-h b{display:block}.tm-dos-h small{color:#5B6157}
.tm-dl{margin:0 0 10px;display:grid;gap:6px}.tm-dl div{display:flex;justify-content:space-between;gap:10px;font-size:13.5px;border-bottom:1px dashed #E4E8E0;padding-bottom:5px}
.tm-dl dt{color:#5B6157}.tm-dl dd{margin:0;text-align:right}
.tm-risk{display:flex;gap:8px;background:#FDECEA;color:#7A1A12;border-radius:10px;padding:10px;font-size:13px;margin:8px 0}
.tm-dos h4,.tm-cr h4{margin:14px 0 6px;font-size:12.5px;text-transform:none;letter-spacing:.04em;color:#5B6157}
.tm-ul{margin:0;padding:0;list-style:none;display:grid;gap:5px}.tm-ul li{font-size:13px;padding:6px 9px;border-radius:8px;background:#F4F6F2}
.tm-ul li.bad{background:#FDECEA;color:#7A1A12}.tm-ul li.warn{background:#FFF3D6;color:#6B4100}.tm-ul small{color:#5B6157}
.tm-small{font-size:12.5px}.muted{color:#5B6157}
.tm-cr-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:#F1F8E8;border-radius:12px;padding:12px 14px}
.tm-cr-meta small{display:block;color:#5B6157;font-size:11.5px;text-transform:none;letter-spacing:.04em}.tm-cr-meta b{font-size:14px}
.tm-pre{white-space:pre-wrap;margin:0;font-size:14px;line-height:1.5}.tm-rx{background:#FAFBF9;border-left:4px solid #8BC044;padding:8px 12px;border-radius:6px}
.tm-badge{display:inline-block;padding:3px 10px;border-radius:999px;font-weight:700;font-size:13px;background:#F1F8E8;color:#2F5A0E}.tm-badge.bad{background:#FDECEA;color:#B42318}
.tm-empty{padding:16px;background:#F4F6F2;border-radius:10px;color:#5B6157}
dialog.tm-dlg{border:0;border-radius:14px;padding:0;max-width:460px;width:92%;box-shadow:0 20px 60px rgba(0,0,0,.3)}dialog.tm-dlg::backdrop{background:rgba(15,20,12,.5)}
.tm-dlg-b{padding:18px 20px}.tm-dlg-b h3{margin:0 0 6px}.tm-dlg-b p{color:#5B6157;font-size:14px}.tm-dlg-a{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
@media (max-width:1100px){.tm-room{grid-template-columns:1fr}.tm-side{max-height:none}.tm-stage{min-height:420px}}
@media (max-width:600px){.tm-grid[data-n="2"]{grid-template-columns:1fr}.tm-cb{min-width:58px;font-size:11px}.tm-cr-meta{grid-template-columns:1fr}}
/* Patiente dans la salle (lien /tc/…) */
.tm-tile.patient { outline: 2px solid #14B8A6; }
.tm-pt { margin-left: 6px; background: #14B8A6; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
/* Statut des rappels (application agent) */
.tr-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tr-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: #F4F7F5; }
.tr-st { font-weight: 700; border-radius: 999px; padding: 1px 8px; font-size: 12px; white-space: nowrap; }
.tr-st.planifie { background: #E5EDF7; color: #1D4E89; } .tr-st.envoye { background: #E0F2F1; color: #115E59; } .tr-st.delivre { background: #CCFBF1; color: #115E59; }
.tr-st.lu { background: #0F766E; color: #fff; } .tr-st.echec { background: #FDECEA; color: #B71C1C; } .tr-st.bloque { background: #FFF3E0; color: #B45309; }
.tr-st.non_applicable, .tr-st.annule { background: #EEE; color: #666; }
.tr-sum { font-size: 12px; margin-top: 6px; color: #37514C; } .tr-sum.bad { color: #B45309; }
.tr-d { margin: 6px 0; font-size: 13px; } .tr-d summary { cursor: pointer; color: #0F766E; font-weight: 600; }
.tr-copy { display: flex; gap: 6px; } .tr-copy input { flex: 1; min-width: 0; font-size: 12px; }
