/* URG360 v2.8 Alpha 1.6 — Urgences / Sortie-Orientation */
#v28EmergencyView{padding:0 0 48px;max-width:1540px;margin:0 auto}.v28flow-shell{padding:26px}.v28flow-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.v28flow-kicker{font-size:11px;font-weight:800;letter-spacing:.11em;color:#507096}.v28flow-head h2{margin:5px 0 4px;font-size:28px}.v28flow-head p{margin:0;color:#63738a}.v28flow-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#f7f9fc;border:1px solid #dfe7f1;border-radius:14px;padding:12px 14px;margin-bottom:16px}.v28flow-toolbar label{display:flex;align-items:center;gap:10px;font-weight:700}.v28flow-toolbar select,.v28orientation select,.v28orientation input,.v28orientation textarea{border:1px solid #ccd7e5;border-radius:9px;background:#fff;padding:9px 10px;font:inherit;color:#17324f}.v28flow-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px}.v28flow-card{background:#fff;border:1px solid #dfe6ef;border-radius:16px;box-shadow:0 6px 22px rgba(28,53,84,.06);overflow:hidden}.v28flow-card-head{display:flex;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid #e8edf4}.v28flow-card-head h3{margin:0 0 3px}.v28flow-card-head p{margin:0;color:#718096;font-size:13px}.v28flow-card-head>b{min-width:32px;height:32px;border-radius:16px;display:grid;place-items:center;background:#eef4fb;color:#164b7a}.v28flow-list{padding:10px}.v28flow-patient,.v28flow-transfer{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid #e3e9f1;border-radius:12px;padding:12px;margin:8px}.v28flow-patient div,.v28flow-transfer-main{min-width:0}.v28flow-patient strong,.v28flow-name strong{display:block;color:#142f4b}.v28flow-patient small,.v28flow-transfer small{color:#6c7c91}.v28flow-transfer{align-items:flex-start}.v28flow-transfer p{margin:6px 0;font-size:13px}.v28flow-transfer-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.v28flow-name{display:flex;align-items:center;gap:8px}.v28flow-btn{border:1px solid #c7d3e1;background:#fff;color:#20476b;border-radius:9px;padding:9px 12px;font-weight:750;cursor:pointer}.v28flow-btn:hover{background:#f2f6fb}.v28flow-btn.small{padding:6px 9px;font-size:12px}.v28flow-btn.primary{background:#123f6c;color:#fff;border-color:#123f6c}.v28flow-btn.success{background:#176b55;color:#fff;border-color:#176b55}.v28flow-btn.danger{background:#fff5f5;color:#a92d36;border-color:#edb9bd}.v28flow-chip{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;background:#eef3f8;color:#405a74}.v28flow-chip.active{background:#eaf6f1;color:#176b55}.v28flow-chip.deceased{background:#343944;color:#fff}.v28flow-empty,.v28flow-loading{padding:30px;text-align:center;color:#77869a}.v28flow-callout{padding:11px 13px;border-radius:10px;background:#eef5fc;color:#34516f;font-size:13px}.v28flow-callout.danger{background:#fff0f1;color:#9d3139}.v28flow-status{padding:10px 12px;border-radius:10px;background:#ebf7f1;color:#176b55}.v28flow-status.error{background:#fff0f1;color:#a52c36}
.v28orientation{display:flex;flex-direction:column;gap:14px}.v28orientation>header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border-bottom:1px solid #e2e9f1;padding-bottom:14px}.v28orientation>header h4{font-size:22px;margin:4px 0}.v28orientation>header p{margin:0;color:#66788d}.v28orientation-form,.v28orientation-current,.v28orientation-history{border:1px solid #dde6f0;background:#fff;border-radius:14px;padding:16px}.v28orientation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.v28orientation-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#344f69}.v28orientation-grid label.wide{grid-column:1/-1}.v28orientation-grid label.check{flex-direction:row;align-items:center;border:1px solid #dfe6ef;border-radius:10px;padding:10px}.v28orientation-sub,.v28orientation-death{margin-top:16px;border-top:1px solid #e5ebf2;padding-top:14px}.v28orientation-sub h5,.v28orientation-death h5,.v28orientation-history h5{margin:0 0 10px;font-size:16px}.v28orientation-death-head{display:flex;justify-content:space-between;align-items:start}.v28orientation-actions{display:flex;justify-content:flex-end;margin-top:14px}.v28orientation-current{display:flex;justify-content:space-between;gap:20px;align-items:center;background:#f7fafc}.v28orientation-current h5{font-size:18px;margin:4px 0}.v28orientation-current p{margin:4px 0}.v28orientation-cancel{display:flex;gap:8px;align-items:center;min-width:min(420px,48%)}.v28orientation-cancel input{flex:1}.v28orientation-history-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid #edf1f5}.v28orientation-history-row:first-of-type{border-top:0}.v28orientation-history-row small{display:block;color:#758398;margin-top:2px}
.v28doc-overlay{position:fixed;inset:0;z-index:4000;background:rgba(8,20,36,.62);display:flex;align-items:center;justify-content:center;padding:24px}.v28doc-card{width:min(1180px,96vw);height:min(850px,92vh);background:#fff;border-radius:16px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.3)}.v28doc-card header{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:13px 16px;border-bottom:1px solid #e0e7ef}.v28doc-card header div{display:flex;flex-direction:column}.v28doc-card header small{color:#718096}.v28doc-card header button{border:0;background:transparent;font-size:28px;cursor:pointer}.v28doc-body{flex:1;min-height:0;background:#eef2f7}.v28doc-body iframe{width:100%;height:100%;border:0;background:#fff}.v28doc-body img{width:100%;height:100%;object-fit:contain}
.v28summary-docs{display:grid;gap:8px}.v28summary-doc{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #e0e7ef;border-radius:10px;padding:10px 12px}.v28summary-doc small{display:block;color:#728196;margin-top:2px}
.v28-deceased-badge{display:inline-flex;align-items:center;border-radius:999px;background:#343944;color:#fff;padding:4px 8px;font-size:11px;font-weight:850;letter-spacing:.04em}
@media(max-width:980px){.v28flow-grid{grid-template-columns:1fr}.v28orientation-grid{grid-template-columns:1fr}.v28orientation-grid label.wide{grid-column:auto}.v28orientation-current{align-items:stretch;flex-direction:column}.v28orientation-cancel{min-width:0;width:100%}}@media(max-width:650px){.v28flow-shell{padding:14px}.v28flow-toolbar{align-items:stretch;flex-direction:column}.v28flow-toolbar label{align-items:stretch;flex-direction:column}.v28flow-transfer,.v28flow-patient{flex-direction:column;align-items:stretch}.v28flow-transfer-actions{justify-content:stretch}.v28flow-transfer-actions button{flex:1}.v28orientation-cancel{flex-direction:column;align-items:stretch}}
.v28-patient-deceased-badge{display:inline-flex;align-items:center;padding:.26rem .55rem;border-radius:999px;background:#1f2937;color:#fff;font-size:.72rem;font-weight:900;letter-spacing:.05em;white-space:nowrap}.v26-context-badge.mortuary{background:#eef0f3;color:#26313f;border-color:#b9c0c9}
.v28flow-safety-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.v28flow-chip.danger{background:#fff0f1;color:#a52c36;border:1px solid #efc4c8}.v28orientation-death .v28orientation-grid label>small{font-weight:500;color:#738196}.v28summary-doc-group{border:1px solid #dfe7f0;border-radius:12px;overflow:hidden;background:#fff}.v28summary-doc-group-head{display:flex;justify-content:space-between;gap:12px;padding:9px 12px;background:#f7f9fc;border-bottom:1px solid #e5ebf2}.v28summary-doc-group-head strong{color:#254a6d}.v28summary-doc-group-head small{color:#738196}.v28summary-doc-group .v28summary-doc{border:0;border-bottom:1px solid #edf1f5;border-radius:0;margin:0}.v28summary-doc-group .v28summary-doc:last-child{border-bottom:0}

/* Alpha 1.7 — refus de soins / sortie effective */
.v28orientation-ama,.v28orientation-effective{border:1px solid #dde6ef;border-radius:14px;background:#fff;padding:16px}.v28orientation-ama{border-color:#e7c68d;background:#fffdf8}.v28orientation-ama-head,.v28orientation-effective-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.v28orientation-ama-head h5,.v28orientation-effective-head strong{display:block;margin:0 0 4px;font-size:16px;color:#2a4358}.v28orientation-ama-head p,.v28orientation-effective-head p{margin:0;color:#6d7e8c;font-size:12px}.v28orientation-effective{border-color:#bcd5e7;background:#fafdff}.v28orientation-effective .v28orientation-actions{border-top:1px solid #e5edf3;padding-top:13px}.v28orientation-ama .v28orientation-actions{border-top:1px solid #eee4d0;padding-top:13px;gap:8px}.v28orientation-ama .v28flow-status{margin-top:12px}

/* Alpha 1.9.9 — services Urgences / UHCD séparés */
.v28flow-head-actions{display:flex;align-items:center;gap:10px}.v28flow-service-badge{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 12px;border-radius:999px;font-size:11px;font-weight:900;letter-spacing:.08em;border:1px solid}.v28flow-service-badge.emergency{background:#eef6fd;border-color:#b9d7ee;color:#0b619b}.v28flow-service-badge.uhcd{background:#f1effd;border-color:#d4cdf6;color:#5743a6}.v28flow-uhcd .v28flow-card-head>b{background:#f1effd;color:#5743a6}.v28flow-uhcd .v28flow-kicker{color:#6757ab}.v28flow-uhcd .v28flow-toolbar{background:#faf9ff;border-color:#e3def8}.v28flow-uhcd .v28flow-btn.primary{background:#5743a6;border-color:#5743a6}@media(max-width:650px){.v28flow-head-actions{align-items:stretch;flex-direction:column}.v28flow-service-badge{align-self:flex-end}}

/* Alpha 1.10.2 — lits visibles et manipulables dans la vue du service */
.v28flow-bedboard{margin:0 0 16px;background:#fff;border:1px solid #dfe6ef;border-radius:16px;box-shadow:0 6px 22px rgba(28,53,84,.06);padding:14px}.v28flow-bedboard-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:12px}.v28flow-bedboard-head h3{margin:0 0 3px}.v28flow-bedboard-head p{margin:0;color:#718096;font-size:13px}.v28flow-bedboard-head>div:last-child{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.v28flow-rooms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.v28flow-room{border:1px solid #e2e8f0;border-radius:13px;padding:11px;background:#fbfcfe}.v28flow-room>header{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:9px}.v28flow-room>header small{display:block;color:#7a8798;text-transform:uppercase;font-size:10px;font-weight:850;letter-spacing:.06em}.v28flow-room h4{margin:1px 0 0;font-size:15px}.v28flow-room>header>span{font-size:12px;color:#6c7c91;font-weight:750}.v28flow-bed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.v28flow-bed{border:1px solid #dce5ed;border-left:4px solid #79aa89;border-radius:10px;padding:9px;background:#fff;min-height:118px;transition:transform .12s,box-shadow .12s,border-color .12s}.v28flow-bed.occupied{border-left-color:#2b6e9b;background:#f8fbfd}.v28flow-bed.reserved{border-left-color:#d29a3b;background:#fffaf1}.v28flow-bed.unavailable{border-left-color:#9a6470;background:#fbf7f8}.v28flow-bed.drop-ready{transform:translateY(-1px);box-shadow:0 0 0 3px rgba(87,67,166,.17);border-color:#8e82c8}.v28flow-bed-head{display:flex;justify-content:space-between;gap:8px}.v28flow-bed-head strong,.v28flow-bed-head small{display:block}.v28flow-bed-head small{color:#7b8899}.v28flow-bed-head>span{font-size:10px;font-weight:850}.v28flow-bed-patient,.v28flow-bed-empty{margin-top:7px;border-radius:8px;padding:7px;min-height:38px}.v28flow-bed-patient{background:#edf4f8;cursor:grab}.v28flow-bed-patient.dragging,.v28flow-patient.dragging{opacity:.55}.v28flow-bed-patient b,.v28flow-bed-patient small{display:block}.v28flow-bed-patient small{margin-top:2px;color:#6c7c91}.v28flow-bed-empty{display:grid;place-items:center;background:#f7f9fb;color:#8390a1;font-size:11px;text-align:center}.v28flow-bed-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin-top:7px}.v28flow-bed-actions button[disabled]{opacity:.45;cursor:not-allowed}.v28flow-unassigned,.v28flow-selected-move{margin:8px 0 11px;padding:8px 10px;border-radius:9px;background:#f5f2ff;color:#55479c;font-size:12px}.v28flow-selected-move{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.v28flow-selected-move button{margin-left:auto}.v28flow-chip.clickable{border:0;cursor:pointer;margin:2px}.v28flow-patient[draggable="true"]{cursor:grab}.v28flow-patient.selected-move{outline:3px solid rgba(87,67,166,.16);border-color:#9a8fcf}.v28flow-patient-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.v28flow-empty.compact{padding:14px}
@media(max-width:1050px){.v28flow-rooms{grid-template-columns:1fr}}@media(max-width:700px){.v28flow-bedboard-head{flex-direction:column}.v28flow-bedboard-head>div:last-child{justify-content:flex-start}.v28flow-bed-grid{grid-template-columns:1fr}.v28flow-selected-move button{margin-left:0}}

/* Alpha 1.10.4 — hospitalisation générique + seuils UHCD 48 h */
.v28flow-service-badge.inpatient{background:#eef7f3;border-color:#bcdccc;color:#28664d}.v28flow-inpatient .v28flow-card-head>b{background:#eef7f3;color:#28664d}.v28flow-inpatient .v28flow-kicker{color:#28664d}.v28flow-inpatient .v28flow-toolbar{background:#f8fcfa;border-color:#dcece4}.v28flow-inpatient .v28flow-btn.primary{background:#28664d;border-color:#28664d}.v28flow-uhcd-time{display:inline-flex;margin-top:6px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.02em}.v28flow-uhcd-time.normal{background:#eef7f3;color:#28664d}.v28flow-uhcd-time.watch{background:#fff7df;color:#89630b}.v28flow-uhcd-time.orientation{background:#fff0d8;color:#9a5400}.v28flow-uhcd-time.critical{background:#fff0f1;color:#a52c36}.v28flow-uhcd-time.overdue{background:#8f1f2a;color:#fff}.v28flow-patient.uhcd-watch{border-left:4px solid #e3ba48}.v28flow-patient.uhcd-orientation{border-left:4px solid #e4973a}.v28flow-patient.uhcd-critical{border-left:4px solid #d45c66}.v28flow-patient.uhcd-overdue{border-left:4px solid #8f1f2a;background:#fff8f8}

/* Alpha 1.11 — Plan opérationnel des Urgences */
#v28EmergencyView:has(.ed-board-shell){max-width:none;padding-bottom:18px}.ed-board-shell{padding:18px 20px}.ed-head{margin-bottom:10px}.ed-head h2{font-size:25px}.ed-auto{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;color:#48657d}.ed-auto i{width:8px;height:8px;border-radius:50%;background:#2e8b67;box-shadow:0 0 0 3px rgba(46,139,103,.12)}
.ed-metrics{display:grid;grid-template-columns:repeat(7,minmax(105px,1fr));gap:8px;margin:0 0 10px}.ed-metrics>div{min-height:60px;padding:9px 12px;border:1px solid #dce5ef;background:#fff;border-radius:12px;display:flex;flex-direction:column;justify-content:center}.ed-metrics b{font-size:20px;line-height:1;color:#173b5d}.ed-metrics span{margin-top:5px;font-size:10px;font-weight:800;color:#65788c;text-transform:uppercase;letter-spacing:.035em}.ed-toolbar{margin-bottom:10px;padding:9px 12px}.ed-toolbar select{min-width:250px}.ed-workspace{display:grid;grid-template-columns:330px minmax(900px,1fr);gap:10px;min-height:calc(100vh - 235px)}
.ed-patient-panel,.ed-plan-card{background:#fff;border:1px solid #dce5ef;border-radius:14px;box-shadow:0 4px 16px rgba(25,55,85,.045);min-height:0}.ed-patient-panel{display:flex;flex-direction:column;overflow:hidden}.ed-panel-title{padding:11px 12px 8px;display:flex;justify-content:space-between;align-items:center}.ed-panel-title strong{font-size:16px;color:#173b5d}.ed-panel-title span{min-width:26px;height:26px;border-radius:999px;background:#edf4fa;display:grid;place-items:center;font-weight:900;color:#255a83}.ed-filter-row{display:flex;gap:5px;padding:0 10px 8px}.ed-filter-row button{border:1px solid #d5e0eb;background:#fff;color:#536c82;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:850;cursor:pointer}.ed-filter-row button.active{background:#176ba0;border-color:#176ba0;color:#fff}.ed-search{margin:0 10px 8px;height:36px;border:1px solid #d4dfeb;border-radius:10px;display:flex;align-items:center;gap:7px;padding:0 9px;background:#fff}.ed-search span{font-size:18px;color:#5b7890}.ed-search input{width:100%;border:0;outline:0;font:inherit;font-size:12px;color:#163a5a;background:transparent;direction:ltr;text-align:left}.ed-patient-list{padding:0 7px 8px;overflow:auto;min-height:120px;flex:1}
.ed-patient{display:grid;grid-template-columns:30px minmax(0,1fr);gap:7px;margin:5px 2px;padding:7px;border:1px solid #dfe7ef;border-left:4px solid #9db0c0;border-radius:10px;background:#fff;cursor:pointer;user-select:none;transition:border-color .12s,box-shadow .12s,transform .12s}.ed-patient:hover{border-color:#9dbed5;box-shadow:0 3px 12px rgba(30,75,110,.07)}.ed-patient.selected{box-shadow:0 0 0 3px rgba(23,107,160,.16);border-color:#4c93bd}.ed-patient.doctor{border-left-color:#e59a43}.ed-patient.care{border-left-color:#7758b3}.ed-patient.managed{border-left-color:#438b68}.ed-patient.ioa{border-left-color:#4f91bb}.ed-patient.inside{margin:3px 0;padding:4px;grid-template-columns:24px minmax(0,1fr);border-radius:7px;box-shadow:none}.ed-patient.inside .ed-patient-main small,.ed-patient.inside .ed-patient-meta span:first-child,.ed-patient.inside .ed-patient-bottom{display:none}.ed-patient.inside .ed-patient-meta{margin-top:1px}.ed-french{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;font-size:12px;font-weight:950;color:#fff;background:#8c9baa}.ed-patient.inside .ed-french{width:23px;height:23px;font-size:10px}.ed-french.f1{background:#bd2e37}.ed-french.f2{background:#dd7a20}.ed-french.f3{background:#c59a17}.ed-french.f4{background:#4a8b62}.ed-french.f5{background:#678e73}.ed-patient-main{min-width:0}.ed-patient-main strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:#143653}.ed-patient-main>small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#65788c;font-size:10px;margin-top:1px}.ed-patient-meta,.ed-patient-bottom{display:flex;justify-content:space-between;gap:5px;align-items:center;margin-top:4px}.ed-patient-meta span{font-size:9px;color:#65788c;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ed-status{display:inline-flex;border-radius:999px;padding:2px 5px;font-size:8px;font-weight:900}.ed-status.doctor{background:#fff0de;color:#a45900}.ed-status.care{background:#f1ecfb;color:#6546a1}.ed-status.ioa{background:#eaf4fb;color:#176b9f}.ed-status.managed{background:#edf7f2;color:#2e7255}.ed-badges{display:flex;gap:3px;align-items:center}.ed-mini{border-radius:4px;padding:2px 4px;font-size:7px;font-weight:950;line-height:1.25;background:#edf2f6;color:#4f6579}.ed-mini.bio.partial{background:#f1eafa;color:#6746a3}.ed-mini.bio.complete{background:#e8f6ee;color:#29704e}.ed-mini.imaging{background:#eaf1fb;color:#315d91}.ed-mini.care{background:#f1eafa;color:#6746a3}.ed-mini.orient{background:#e7f2fa;color:#1e658e}
.ed-incoming{border-top:1px solid #e4ebf2;background:#fbfcfe;padding:8px}.ed-incoming>header{display:flex;justify-content:space-between;font-size:10px;color:#526b80;margin-bottom:5px}.ed-incoming>div{display:flex;gap:6px;justify-content:space-between;align-items:center;padding:5px 0;border-top:1px solid #edf1f5;font-size:9px}.ed-incoming button{border:0;border-radius:6px;background:#2b775a;color:#fff;font-weight:850;font-size:9px;padding:4px 6px;cursor:pointer}
.ed-plan-card{display:flex;flex-direction:column;overflow:hidden}.ed-plan-tools{height:42px;padding:0 11px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e3e9f0;color:#526b80;font-size:11px}.ed-plan-tools b{color:#173b5d}.ed-plan-tools>div{display:flex;gap:4px}.ed-plan-tools button{min-width:34px;height:28px;border:1px solid #d2deea;background:#fff;border-radius:7px;color:#214e72;font-weight:850;cursor:pointer}.ed-plan-tools #v28EdZoomReset{min-width:58px}.ed-plan-viewport{position:relative;flex:1;min-height:730px;overflow:hidden;background-color:#f4f8fb;background-image:linear-gradient(rgba(38,91,129,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(38,91,129,.035) 1px,transparent 1px);background-size:20px 20px;cursor:grab}.ed-plan-viewport.panning{cursor:grabbing}.ed-plan-plane{position:absolute;inset:0;transform-origin:0 0;transition:transform .05s linear}.ed-location{position:absolute;border:1px solid #bfcfde;border-radius:8px;background:#fff;padding:5px;overflow:hidden;box-sizing:border-box;transition:border-color .12s,box-shadow .12s,background .12s}.ed-location>header{display:flex;justify-content:space-between;gap:3px;align-items:center;pointer-events:none}.ed-location>header b{font-size:9px;line-height:1.1;color:#173b5d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ed-location>header small{font-size:7px;color:#7b8b99}.ed-location.single{background:#f9fbfd}.ed-location.multi{background:#eef6fb;border-color:#c3d9e7}.ed-location.waiting{background:#edf6fb}.ed-location.triage{background:#e9f3fb;border-color:#a9cee5}.ed-location.sauv{border:2px solid #d2797e;background:#fff8f8}.ed-location.treatment{background:#f5f2fb;border-color:#d6caed}.ed-location.short_circuit{background:#f4f0fb;border-color:#d8caee}.ed-location.c_box{background:#f5f8fb}.ed-location.support{background:#f1f6fa}.ed-location.unavailable{opacity:.55;background:#f1f2f4}.ed-location.target-ready:not(.unavailable){box-shadow:inset 0 0 0 1px rgba(23,107,160,.13)}.ed-location.drop-ready{border-color:#176ba0!important;box-shadow:0 0 0 4px rgba(23,107,160,.18)!important;background:#f2f9fd!important}.ed-location-count{position:absolute;right:5px;bottom:4px;min-width:21px;height:21px;border-radius:999px;background:#d9eaf5;color:#185c88;display:grid;place-items:center;font-size:9px;font-weight:950}.ed-stack{display:flex;flex-direction:column;gap:2px;margin-top:3px;padding-right:22px}.ed-stack button{border:0;background:rgba(255,255,255,.72);border-radius:4px;padding:2px 4px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:7px;font-weight:800;color:#244b68;cursor:pointer}.ed-stack small{font-size:7px;color:#62798c}.ed-free{display:grid;place-items:center;height:calc(100% - 14px);font-size:8px;color:#8a99a8}.ed-location .ed-patient.inside{height:calc(100% - 16px);overflow:hidden}.ed-location .ed-patient.inside .ed-patient-main strong{font-size:9px}.ed-location .ed-patient.inside .ed-patient-meta span{font-size:7px}.ed-legend{height:34px;border-top:1px solid #e2e9f0;display:flex;align-items:center;gap:13px;padding:0 11px;overflow:auto;white-space:nowrap;font-size:8px;font-weight:750;color:#5d7286}.ed-legend span{display:flex;align-items:center;gap:4px}.ed-legend i{width:8px;height:8px;border-radius:2px;background:#b4c1cc}.ed-legend i.f1{background:#bd2e37}.ed-legend i.f2{background:#dd7a20}.ed-legend i.f3{background:#c59a17}.ed-legend i.f4{background:#4a8b62}.ed-legend i.care{background:#7758b3}.ed-legend i.doctor{background:#e59a43}.ed-legend i.free{background:#fff;border:1px solid #bfcfde}
.ed-plan-card:fullscreen{background:#eef4f8;padding:10px}.ed-plan-card:fullscreen .ed-plan-viewport{min-height:0}.ed-plan-card:fullscreen .ed-plan-tools{background:#fff;border-radius:10px 10px 0 0}.ed-plan-card:fullscreen .ed-legend{background:#fff;border-radius:0 0 10px 10px}
@media(max-width:1500px){.ed-workspace{grid-template-columns:285px minmax(820px,1fr)}.ed-metrics{grid-template-columns:repeat(7,minmax(90px,1fr))}.ed-plan-viewport{min-height:680px}}@media(max-width:1180px){.ed-workspace{display:block}.ed-patient-panel{max-height:340px;margin-bottom:10px}.ed-patient-list{max-height:230px}.ed-plan-card{height:760px}.ed-metrics{grid-template-columns:repeat(4,1fr)}}@media(max-width:720px){.ed-board-shell{padding:10px}.ed-metrics{grid-template-columns:repeat(2,1fr)}.ed-toolbar{align-items:stretch}.ed-toolbar span{font-size:10px}.ed-plan-card{height:680px}.ed-plan-viewport{min-width:900px;overflow:auto}.ed-patient-panel{max-height:400px}}
.ed-location.entry{background:#f7fafc;border-style:dashed;border-color:#b9cbd9;display:flex;align-items:center;justify-content:center}.ed-location.entry>header{width:100%;justify-content:center}.ed-location.entry>header b{font-size:10px;text-transform:uppercase;letter-spacing:.04em}.ed-location.entry .ed-free{display:none}

/* =========================================================
   URG360 v2.8 Alpha 1.11.2 — Plan Urgences agencement
   - suppression barre UF
   - indicateurs compacts
   - carte patient / emplacement individuel uniformisés
   - page sans scroll sur poste 1080p
   ========================================================= */
body.urg-emergency-board-active{overflow:hidden!important}
body.urg-emergency-board-active footer{display:none!important}
body.urg-emergency-board-active .layout{width:100%!important;max-width:none!important;margin:0!important;padding:6px 10px 8px!important;height:calc(100dvh - 112px)!important;min-height:0!important;overflow:hidden!important}
body.urg-emergency-board-active #v28EmergencyView{height:100%!important;min-height:0!important;overflow:hidden!important}
body.urg-emergency-board-active #v28EmergencyView>.ed-board-shell{height:100%!important;min-height:0!important}
.ed-board-shell{padding:0!important;display:flex;flex-direction:column;gap:6px;overflow:hidden}
.ed-commandbar{height:38px;min-height:38px;display:grid;grid-template-columns:auto minmax(180px,1fr) auto;align-items:center;gap:12px;padding:0 10px;background:#fff;border:1px solid #dce5ef;border-radius:10px;box-shadow:0 2px 9px rgba(25,55,85,.035)}
.ed-command-title{display:flex;align-items:baseline;gap:8px;white-space:nowrap}.ed-command-title strong{font-size:16px;color:#173b5d}.ed-command-title span{font-size:9px;font-weight:800;color:#718496;text-transform:uppercase;letter-spacing:.035em}
.ed-command-hint{min-width:0;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;color:#5d7286}.ed-command-hint b{color:#195d8a}
.ed-command-actions{display:flex;align-items:center;gap:5px}.ed-command-actions .v28flow-btn{height:28px;min-width:32px;padding:4px 8px;border-radius:7px}.ed-command-actions .ed-auto{font-size:9px}.ed-command-actions .ed-auto i{width:6px;height:6px}
.ed-metrics{display:grid!important;grid-template-columns:repeat(7,minmax(74px,1fr))!important;gap:5px!important;margin:0!important;min-height:38px}
.ed-metrics>div{min-height:38px!important;height:38px!important;padding:4px 8px!important;border-radius:9px!important;display:grid!important;grid-template-columns:auto 1fr!important;align-items:center!important;justify-content:start!important;column-gap:6px!important}
.ed-metrics b{font-size:15px!important;line-height:1!important}.ed-metrics span{margin:0!important;font-size:8px!important;letter-spacing:.025em!important;white-space:nowrap!important}
.ed-workspace{display:grid!important;grid-template-columns:270px minmax(0,1fr)!important;gap:7px!important;min-height:0!important;height:auto!important;flex:1!important;overflow:hidden!important}
.ed-patient-panel,.ed-plan-card{border-radius:10px!important;min-height:0!important;height:100%!important}
.ed-patient-panel{overflow:hidden!important}.ed-panel-title{padding:7px 9px 4px!important}.ed-panel-title strong{font-size:14px!important}.ed-panel-title span{min-width:22px!important;height:22px!important;font-size:10px!important}
.ed-filter-row{gap:3px!important;padding:0 7px 5px!important}.ed-filter-row button{padding:4px 6px!important;font-size:9px!important}
.ed-search{margin:0 7px 5px!important;height:30px!important;padding:0 7px!important;border-radius:8px!important}.ed-search span{font-size:15px!important}.ed-search input{font-size:10px!important}
.ed-patient-list{padding:0 5px 5px!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
.ed-patient{position:relative;height:62px;min-height:62px;margin:3px 1px!important;padding:5px 6px!important;grid-template-columns:27px minmax(0,1fr)!important;gap:6px!important;border-radius:8px!important;overflow:hidden}
.ed-french{width:25px!important;height:25px!important;border-radius:7px!important;font-size:10px!important}.ed-patient-main strong{font-size:11px!important}.ed-patient-main>small{font-size:9px!important}.ed-patient-meta{margin-top:2px!important}.ed-patient-meta span{font-size:8px!important}.ed-patient-bottom{margin-top:2px!important}.ed-status{font-size:7px!important;padding:1px 4px!important}.ed-mini{font-size:6.5px!important;padding:1px 3px!important}.ed-patient.dragging{opacity:.55;transform:scale(.98)}
.ed-plan-card{overflow:hidden!important}.ed-plan-tools{height:30px!important;min-height:30px!important;padding:0 8px!important;font-size:9px!important}.ed-plan-tools button{height:23px!important;min-width:29px!important;border-radius:6px!important;font-size:10px!important}.ed-plan-tools #v28EdZoomReset{min-width:51px!important}
.ed-plan-viewport{flex:1!important;min-height:0!important;height:auto!important;overflow:hidden!important;background-size:16px 16px!important}
.ed-plan-plane{inset:3px!important}
/* Emplacement individuel = une carte. L'en-tête n'ajoute plus de hauteur. */
.ed-location.single{padding:0!important;border-radius:8px!important;overflow:visible!important;background:transparent!important}
.ed-location.single.occupied{border-color:transparent!important;box-shadow:none!important}
.ed-location.single.empty{background:#fbfcfd!important;border:1px solid #c7d4df!important;overflow:hidden!important}
.ed-location.single.empty:hover,.ed-location.single.target-ready{border-color:#8eb5cf!important}
.ed-empty-slot{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3px 5px;text-align:center;pointer-events:none}.ed-empty-slot b{max-width:100%;font-size:8.5px;line-height:1.05;color:#244a68;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ed-empty-slot small{font-size:6.5px;color:#8393a1}.ed-empty-slot span{margin-top:2px;font-size:6.5px;font-weight:800;color:#9aa7b2}
.ed-location.single .ed-patient.inside{width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:4px 5px!important;grid-template-columns:24px minmax(0,1fr)!important;border-radius:8px!important;overflow:hidden!important;background:#fff!important}
.ed-location.single .ed-patient.inside .ed-french{width:22px!important;height:22px!important;font-size:9px!important}
.ed-location.single .ed-patient.inside .ed-patient-main strong{font-size:9px!important;padding-right:20px}.ed-location.single .ed-patient.inside .ed-patient-main>small{display:none!important}
.ed-location.single .ed-patient.inside .ed-patient-meta{display:flex!important;margin-top:3px!important;gap:3px!important}.ed-location.single .ed-patient.inside .ed-patient-meta span{font-size:6.5px!important}.ed-location.single .ed-patient.inside .ed-patient-meta span:first-child{display:block!important;max-width:48%;overflow:hidden;text-overflow:ellipsis}
.ed-location.single .ed-patient.inside .ed-patient-bottom{display:flex!important;position:absolute;right:3px;bottom:3px;margin:0!important}.ed-location.single .ed-patient.inside .ed-status{display:none!important}.ed-location.single .ed-patient.inside .ed-badges{gap:2px!important}
.ed-quick-ioa{position:absolute;right:3px;top:3px;z-index:5;border:1px solid #9fc6df;background:#eaf5fc;color:#176b9f;border-radius:5px;padding:2px 4px;font-size:6.5px;font-weight:950;line-height:1.1;cursor:pointer}.ed-quick-ioa:hover{background:#d9eefb}
/* Zones d'attente : elles seules restent agrandies et multi-patients. */
.ed-location.multi{padding:4px!important;border-radius:8px!important;overflow:hidden!important}.ed-location.multi>header{height:13px!important}.ed-location.multi>header b{font-size:8px!important}.ed-location.multi>header small{font-size:6px!important}.ed-location-count{right:4px!important;bottom:3px!important;min-width:18px!important;height:18px!important;font-size:8px!important}
.ed-stack{gap:2px!important;margin-top:2px!important;padding-right:19px!important}.ed-stack button{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:4px!important;height:18px!important;padding:2px 4px!important;font-size:7px!important}.ed-stack button span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ed-stack button small{flex:0 0 auto;font-size:6.5px!important;color:#6c7f8f}.ed-stack>small{font-size:6.5px!important}
.ed-location.entry{padding:0!important;overflow:hidden!important}.ed-location.entry .ed-empty-slot b{font-size:9px!important;text-transform:uppercase;letter-spacing:.035em}
.ed-location.sauv.empty{border-width:2px!important;background:#fffafa!important}.ed-location.sauv.occupied{border:0!important}
.ed-location.c_box.empty{background:#f7f9fb!important}.ed-location.treatment.empty,.ed-location.short_circuit.empty{background:#faf8fd!important}
.ed-location.drop-ready{border-color:#176ba0!important;box-shadow:0 0 0 3px rgba(23,107,160,.19)!important;background:#eef8fd!important}
.ed-incoming{padding:5px!important}.ed-incoming>header{font-size:9px!important}.ed-incoming>div{font-size:8px!important;padding:3px 0!important}
@media(max-width:1500px){body.urg-emergency-board-active .ed-workspace{grid-template-columns:245px minmax(0,1fr)!important}.ed-metrics{grid-template-columns:repeat(7,minmax(64px,1fr))!important}}
@media(max-width:1180px){body.urg-emergency-board-active{overflow:auto!important}body.urg-emergency-board-active .layout{height:auto!important;min-height:calc(100dvh - 96px)!important;overflow:visible!important}.ed-workspace{display:block!important}.ed-patient-panel{height:260px!important;margin-bottom:6px}.ed-plan-card{height:690px!important}.ed-metrics{grid-template-columns:repeat(4,1fr)!important}.ed-commandbar{grid-template-columns:1fr auto}.ed-command-hint{display:none}}
@media(max-width:980px){body.urg-emergency-board-active .layout{height:calc(100dvh - 96px)!important}}
.ed-location.entry.multi{display:block!important;align-items:initial!important;justify-content:initial!important}.ed-location.entry.multi>header{width:auto!important;justify-content:space-between!important}.ed-location.entry.multi .ed-free{display:grid!important}
/* Correction coque modulaire : conserver le menu latéral et réserver la hauteur de la topbar. */
body.urg-emergency-board-active .layout{margin-left:var(--urg-sidebar)!important;width:calc(100% - var(--urg-sidebar))!important;height:100dvh!important;padding:calc(var(--urg-topbar) + 5px) 8px 5px!important}
body.urg-emergency-board-active.urg-focus-mode .layout{margin-left:var(--urg-sidebar-focus)!important;width:calc(100% - var(--urg-sidebar-focus))!important}
@media(max-width:1180px){body.urg-emergency-board-active{overflow:auto!important}body.urg-emergency-board-active .layout{height:auto!important;min-height:100dvh!important;overflow:visible!important;padding-top:calc(var(--urg-topbar) + 5px)!important}}

/* Alpha 1.11.8 — Plan Urgences : cartes / emplacements légèrement agrandis.
   Le gabarit individuel gagne en lisibilité sans modifier la géométrie du croquis
   ni introduire de scroll. Les zones d'attente multi-patients gardent leurs dimensions. */
body.urg-emergency-board-active .ed-location.single{
  transform:scale(1.06,1.08);
  transform-origin:center center;
}
body.urg-emergency-board-active .ed-location.single .ed-empty-slot b{
  font-size:9px!important;
}
body.urg-emergency-board-active .ed-location.single .ed-empty-slot small,
body.urg-emergency-board-active .ed-location.single .ed-empty-slot span{
  font-size:7px!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside{
  padding:4px 6px!important;
  grid-template-columns:25px minmax(0,1fr)!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-french{
  width:23px!important;
  height:23px!important;
  font-size:9.5px!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-main strong{
  font-size:9.5px!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-meta span{
  font-size:7px!important;
}

/* Alpha 1.12 — Pilotage des flux : plan réellement agrandi, zones d'attente scrollables,
   activité du jour et file d'hospitalisation. La géométrie est désormais portée par la BD. */
body.urg-emergency-board-active .ed-location.single{
  transform:none!important;
}
body.urg-emergency-board-active .ed-location.single .ed-empty-slot b{font-size:10px!important}
body.urg-emergency-board-active .ed-location.single .ed-empty-slot small,
body.urg-emergency-board-active .ed-location.single .ed-empty-slot span{font-size:7.5px!important}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside{padding:6px 7px!important;grid-template-columns:27px minmax(0,1fr)!important}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-french{width:25px!important;height:25px!important;font-size:10px!important}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-main strong{font-size:10.5px!important}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-meta span{font-size:7.5px!important}

/* 9 indicateurs compacts sur une seule ligne. */
body.urg-emergency-board-active .ed-metrics{grid-template-columns:repeat(9,minmax(70px,1fr))!important}
.ed-metrics>button.ed-metric-button{min-height:38px;height:38px;border:1px solid #dce5ef;border-radius:9px;background:#fff;padding:4px 8px;display:grid;grid-template-columns:auto 1fr;align-items:center;justify-content:start;column-gap:6px;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}
.ed-metrics>button.ed-metric-button:hover{border-color:#9fc6dc;background:#f8fcfe}
.ed-metrics>button.ed-metric-button.active{border-color:#b9a8e6;background:#faf8ff}
.ed-metrics>button.ed-metric-button b{font-size:15px;line-height:1;color:#284e6c}
.ed-metrics>button.ed-metric-button.active b{color:#674eaf}
.ed-metrics>button.ed-metric-button span,.ed-metric-activity span{display:flex!important;flex-direction:column;gap:1px;line-height:1.05}
.ed-metrics>button.ed-metric-button small,.ed-metric-activity small{font-size:6.5px!important;letter-spacing:0!important;text-transform:none;color:#728496;font-weight:700;white-space:nowrap}
.ed-metric-activity b{color:#1f5d7d}

/* Badge d'hospitalisation sur la carte patient. */
.ed-mini.hosp{background:#efe9ff!important;color:#654aa9!important;border:1px solid #d9cef6!important}

/* Les zones multi-patients gardent une taille fixe et deviennent des conteneurs scrollables. */
.ed-location.multi{display:flex!important;flex-direction:column!important;min-height:0!important}
.ed-location.multi>header{flex:0 0 15px!important;min-height:15px!important;padding-right:24px}
.ed-location.multi>header b{font-size:9px!important}
.ed-location.multi>header small{font-size:6.5px!important}
.ed-location.multi .ed-stack{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding-right:23px!important;margin-top:3px!important;scrollbar-width:thin;overscroll-behavior:contain}
.ed-location.multi .ed-stack button{flex:0 0 20px!important;height:20px!important;font-size:7.5px!important;background:rgba(255,255,255,.84)!important}
.ed-location.multi .ed-stack button small{font-size:6.5px!important}
.ed-location-count{appearance:none;border:0!important;cursor:pointer!important;padding:0!important;z-index:6;line-height:1}
.ed-location-count:hover{background:#bddced!important;transform:scale(1.05)}
.ed-location.multi .ed-free{flex:1;min-height:0;height:auto!important}

/* Overlays : détail d'une zone d'attente et file d'hospitalisation. */
.ed-overlay{position:fixed;inset:0;z-index:6500;background:rgba(10,28,45,.42);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;padding:28px}
.ed-overlay-card{width:min(760px,94vw);max-height:84vh;display:flex;flex-direction:column;background:#fff;border:1px solid #d9e3ec;border-radius:16px;box-shadow:0 24px 70px rgba(15,36,56,.24);overflow:hidden}
.ed-overlay-card.hospitalization{width:min(1320px,96vw)}
.ed-overlay-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #e3eaf0;background:#fbfdff}
.ed-overlay-card>header small{display:block;color:#52758d;font-size:9px;font-weight:900;letter-spacing:.08em}
.ed-overlay-card>header h3{margin:3px 0 2px;color:#173b5d;font-size:20px}
.ed-overlay-card>header p{margin:0;color:#718397;font-size:11px}
.ed-overlay-card>header button{border:1px solid #d4dfe8;border-radius:8px;background:#fff;color:#315570;min-width:34px;height:32px;font-weight:850;cursor:pointer}
.ed-overlay-actions{display:flex;gap:7px}.ed-overlay-actions button:first-child{padding:0 12px;color:#176b87}
.ed-overlay-list{padding:10px;overflow:auto;display:grid;gap:6px}
.ed-overlay-patient{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;border:1px solid #dce5ed;border-radius:10px;background:#fff;padding:9px 10px;text-align:left;cursor:pointer}
.ed-overlay-patient:hover{background:#f7fbfd;border-color:#b7cddd}.ed-overlay-patient>span:nth-child(2){min-width:0}.ed-overlay-patient b,.ed-overlay-patient small{display:block}.ed-overlay-patient b{font-size:12px;color:#173b5d}.ed-overlay-patient small{margin-top:2px;font-size:10px;color:#718397;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ed-overlay-patient em{font-style:normal;font-size:11px;font-weight:850;color:#506d82}
.ed-hosp-table-wrap{overflow:auto;padding:10px 12px 14px}.ed-hosp-table{width:100%;border-collapse:separate;border-spacing:0;font-size:10.5px}.ed-hosp-table th{position:sticky;top:0;z-index:1;background:#f2f6f9;color:#4f6a7e;text-align:left;font-size:9px;text-transform:uppercase;letter-spacing:.035em;padding:8px;border-bottom:1px solid #dce5ed}.ed-hosp-table td{padding:9px 8px;border-bottom:1px solid #e7edf2;vertical-align:top;color:#294a63}.ed-hosp-table td strong,.ed-hosp-table td small{display:block}.ed-hosp-table td small{margin-top:2px;color:#7a8998}.ed-hosp-table tr:hover td{background:#fbfdff}.ed-hosp-open{border:1px solid #c9dce8;border-radius:7px;background:#fff;color:#176b87;padding:5px 7px;font-size:9px;font-weight:800;cursor:pointer}.ed-hosp-empty{text-align:center!important;padding:24px!important;color:#7c8b99!important}

/* Impression via l'aperçu documents. */
.ed-hosp-print h1{font-size:20px;margin-bottom:6px}.ed-hosp-print table{width:100%;border-collapse:collapse;font-size:9.5px;margin-top:12px}.ed-hosp-print th,.ed-hosp-print td{border:1px solid #cdd8e2;padding:6px;vertical-align:top}.ed-hosp-print th{background:#f2f5f8;text-align:left}.ed-hosp-print footer{margin-top:14px;font-size:8.5px;color:#6b7d8c}

@media(max-width:1500px){body.urg-emergency-board-active .ed-metrics{grid-template-columns:repeat(9,minmax(58px,1fr))!important}.ed-metrics>button.ed-metric-button small,.ed-metric-activity small{font-size:6px!important}}
@media(max-width:1180px){body.urg-emergency-board-active .ed-metrics{grid-template-columns:repeat(3,1fr)!important}.ed-overlay{padding:12px}.ed-overlay-card.hospitalization{width:98vw}.ed-hosp-table{min-width:900px}}

/* Alpha 1.12.1 — Cartes patient : palette FRENCH identique à l'IOA + pastilles équipe médicale. */
:root{
  --urg-french-1:#e21d2c;
  --urg-french-2:#f4c400;
  --urg-french-3a:#c315b9;
  --urg-french-3b:#8ecf49;
  --urg-french-4:#8fc4eb;
  --urg-french-5:#2878b7;
  --urg-french-0:#91a7b8;
}
.ed-french.f0{background:var(--urg-french-0)!important;color:#fff!important}
.ed-french.f1{background:var(--urg-french-1)!important;color:#fff!important}
.ed-french.f2{background:var(--urg-french-2)!important;color:#183449!important}
.ed-french.f3,.ed-french.f3a{background:var(--urg-french-3a)!important;color:#fff!important}
.ed-french.f3b{background:var(--urg-french-3b)!important;color:#173a21!important}
.ed-french.f4{background:var(--urg-french-4)!important;color:#173b5d!important}
.ed-french.f5{background:var(--urg-french-5)!important;color:#fff!important}

/* Le liseré de la carte est désormais réservé au niveau FRENCH, et non au statut de soins. */
.ed-patient.french-f0{border-left-color:var(--urg-french-0)!important}
.ed-patient.french-f1{border-left-color:var(--urg-french-1)!important}
.ed-patient.french-f2{border-left-color:var(--urg-french-2)!important}
.ed-patient.french-f3,.ed-patient.french-f3a{border-left-color:var(--urg-french-3a)!important}
.ed-patient.french-f3b{border-left-color:var(--urg-french-3b)!important}
.ed-patient.french-f4{border-left-color:var(--urg-french-4)!important}
.ed-patient.french-f5{border-left-color:var(--urg-french-5)!important}

.ed-patient-name-row{display:flex;align-items:center;gap:5px;min-width:0}
.ed-patient-name-row>strong{flex:1 1 auto;min-width:0}
.ed-med-team{display:inline-flex;align-items:center;gap:3px;flex:0 0 auto;white-space:nowrap}
.ed-med-pill{height:18px;min-width:22px;padding:0 5px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:7.5px;line-height:1;font-weight:950;letter-spacing:.03em;border:1px solid transparent;box-sizing:border-box;box-shadow:0 1px 2px rgba(24,50,74,.08)}
.ed-med-pill.senior{background:#173f67;color:#fff;border-color:#173f67}
.ed-med-pill.junior{background:#dff6f5;color:#116c72;border-color:#8fd4d3}
.ed-med-team.compact .ed-med-pill{height:15px;min-width:19px;padding:0 4px;font-size:6.5px;box-shadow:none}

/* Dans les petits box, l'équipe médicale reste visible sans masquer les badges de soins. */
.ed-location.single .ed-patient.inside .ed-patient-name-row{gap:3px;padding-right:1px}
.ed-location.single .ed-patient.inside .ed-med-pill{height:15px;min-width:19px;padding:0 4px;font-size:6.5px}
.ed-location.single .ed-patient.inside .ed-patient-main strong{padding-right:0!important}

/* Les lignes des zones d'attente portent elles aussi le niveau FRENCH et les initiales affectées. */
.ed-stack button{border-left:3px solid var(--urg-french-0)!important;display:grid!important;grid-template-columns:7px minmax(0,1fr) auto auto!important;align-items:center!important;gap:3px!important;padding-left:3px!important}
.ed-stack button.french-f1{border-left-color:var(--urg-french-1)!important}
.ed-stack button.french-f2{border-left-color:var(--urg-french-2)!important}
.ed-stack button.french-f3,.ed-stack button.french-f3a{border-left-color:var(--urg-french-3a)!important}
.ed-stack button.french-f3b{border-left-color:var(--urg-french-3b)!important}
.ed-stack button.french-f4{border-left-color:var(--urg-french-4)!important}
.ed-stack button.french-f5{border-left-color:var(--urg-french-5)!important}
.ed-stack-tri{width:6px;height:6px;border-radius:999px;background:var(--urg-french-0);display:block}
.ed-stack-tri.f1{background:var(--urg-french-1)}.ed-stack-tri.f2{background:var(--urg-french-2)}.ed-stack-tri.f3,.ed-stack-tri.f3a{background:var(--urg-french-3a)}.ed-stack-tri.f3b{background:var(--urg-french-3b)}.ed-stack-tri.f4{background:var(--urg-french-4)}.ed-stack-tri.f5{background:var(--urg-french-5)}
.ed-stack button>span:not(.ed-med-team){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-stack button>.ed-med-team{overflow:visible!important}

/* Légende strictement alignée sur la palette IOA/FRENCH. */
.ed-legend i.f1{background:var(--urg-french-1)!important}.ed-legend i.f2{background:var(--urg-french-2)!important}.ed-legend i.f3,.ed-legend i.f3a{background:var(--urg-french-3a)!important}.ed-legend i.f3b{background:var(--urg-french-3b)!important}.ed-legend i.f4{background:var(--urg-french-4)!important}.ed-legend i.f5{background:var(--urg-french-5)!important}

@media(max-width:1450px){.ed-med-pill{height:16px;min-width:20px;padding:0 4px;font-size:7px}.ed-location.single .ed-patient.inside .ed-med-pill{height:14px;min-width:18px;font-size:6px}}
.ed-overlay-patient b{display:flex!important;align-items:center;gap:6px}.ed-overlay-patient b .ed-med-team{margin-left:auto}

/* Alpha 1.12.2 — Règle visuelle des cartes patient.
   Fond = priorité FRENCH, sans pastille de tri.
   Pastilles : équipe médicale + orientation clinique. */
:root{
  --urg-french-card-0:#f1f5f8;
  --urg-french-card-1:#fdebed;
  --urg-french-card-2:#fff6bf;
  --urg-french-card-3a:#f9e6f8;
  --urg-french-card-3b:#edf8df;
  --urg-french-card-4:#e8f4fc;
  --urg-french-card-5:#e2eef8;
}

/* La carte entière porte désormais le niveau FRENCH : plus de colonne/pastille dédiée. */
.ed-patient{grid-template-columns:minmax(0,1fr)!important;border-left-width:4px!important}
.ed-patient.french-f0{background:var(--urg-french-card-0)!important;border-color:#a9b8c5!important;border-left-color:var(--urg-french-0)!important}
.ed-patient.french-f1{background:var(--urg-french-card-1)!important;border-color:#f1aab0!important;border-left-color:var(--urg-french-1)!important}
.ed-patient.french-f2{background:var(--urg-french-card-2)!important;border-color:#ead14e!important;border-left-color:var(--urg-french-2)!important}
.ed-patient.french-f3,.ed-patient.french-f3a{background:var(--urg-french-card-3a)!important;border-color:#dda2d8!important;border-left-color:var(--urg-french-3a)!important}
.ed-patient.french-f3b{background:var(--urg-french-card-3b)!important;border-color:#b8dd8b!important;border-left-color:var(--urg-french-3b)!important}
.ed-patient.french-f4{background:var(--urg-french-card-4)!important;border-color:#a9d2ef!important;border-left-color:var(--urg-french-4)!important}
.ed-patient.french-f5{background:var(--urg-french-card-5)!important;border-color:#8ab6d8!important;border-left-color:var(--urg-french-5)!important}
.ed-patient.selected{box-shadow:0 0 0 3px rgba(14,66,108,.23),0 4px 14px rgba(26,64,96,.10)!important}

/* Le plan ne réaffiche pas le motif : identité, âge, chrono et états opérationnels uniquement. */
.ed-location.single .ed-patient.inside{grid-template-columns:minmax(0,1fr)!important;background:inherit!important}
.ed-location.single .ed-patient.inside.french-f0{background:var(--urg-french-card-0)!important}
.ed-location.single .ed-patient.inside.french-f1{background:var(--urg-french-card-1)!important}
.ed-location.single .ed-patient.inside.french-f2{background:var(--urg-french-card-2)!important}
.ed-location.single .ed-patient.inside.french-f3,.ed-location.single .ed-patient.inside.french-f3a{background:var(--urg-french-card-3a)!important}
.ed-location.single .ed-patient.inside.french-f3b{background:var(--urg-french-card-3b)!important}
.ed-location.single .ed-patient.inside.french-f4{background:var(--urg-french-card-4)!important}
.ed-location.single .ed-patient.inside.french-f5{background:var(--urg-french-card-5)!important}
.ed-location.single .ed-patient.inside .ed-patient-main>small{display:none!important}
.ed-location.single .ed-patient.inside .ed-patient-meta span:first-child{display:block!important}

/* Équipe médicale : Sénior bleu nuit, Interne turquoise, IPA violet. */
.ed-patient-pills{display:inline-flex;align-items:center;gap:3px;flex:0 0 auto;white-space:nowrap}
.ed-med-pill.senior{background:#173f67!important;color:#fff!important;border-color:#173f67!important}
.ed-med-pill.intern{background:#1f9aa5!important;color:#fff!important;border-color:#1f9aa5!important}
.ed-med-pill.ipa{background:#7252b8!important;color:#fff!important;border-color:#7252b8!important}

/* Orientation : D domicile, H hospitalisation, T transfert, † décès.
   Contour = décision enregistrée/provisoire ; plein = orientation finalisée. */
.ed-orient-pill{height:18px;min-width:18px;padding:0 5px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:8px;line-height:1;font-weight:950;box-sizing:border-box;border:1.5px solid currentColor;background:rgba(255,255,255,.72);box-shadow:0 1px 2px rgba(24,50,74,.06)}
.ed-orient-pill.home{color:#21824f}.ed-orient-pill.hospitalization{color:#6b46b2}.ed-orient-pill.transfer{color:#c56a13}.ed-orient-pill.death{color:#111827}
.ed-orient-pill.final.home{background:#21824f;color:#fff;border-color:#21824f}.ed-orient-pill.final.hospitalization{background:#6b46b2;color:#fff;border-color:#6b46b2}.ed-orient-pill.final.transfer{background:#d87718;color:#fff;border-color:#d87718}.ed-orient-pill.final.death{background:#111827;color:#fff;border-color:#111827}
.ed-orient-pill.compact{height:15px;min-width:15px;padding:0 4px;font-size:6.8px;box-shadow:none}
.ed-location.single .ed-patient.inside .ed-patient-pills{gap:2px}
.ed-location.single .ed-patient.inside .ed-orient-pill{height:15px;min-width:15px;padding:0 4px;font-size:6.5px}

/* Zones d'attente : chaque ligne est elle aussi remplie par sa couleur FRENCH. */
.ed-stack button{grid-template-columns:minmax(0,1fr) auto auto!important;border-left-width:3px!important;padding:3px 4px!important;background:var(--urg-french-card-0)!important}
.ed-stack button.french-f1{background:var(--urg-french-card-1)!important}.ed-stack button.french-f2{background:var(--urg-french-card-2)!important}.ed-stack button.french-f3,.ed-stack button.french-f3a{background:var(--urg-french-card-3a)!important}.ed-stack button.french-f3b{background:var(--urg-french-card-3b)!important}.ed-stack button.french-f4{background:var(--urg-french-card-4)!important}.ed-stack button.french-f5{background:var(--urg-french-card-5)!important}
.ed-stack button>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-stack-pills{display:inline-flex;align-items:center;gap:2px;overflow:visible!important}
.ed-stack-pills .ed-med-team{overflow:visible!important}

/* Vue détaillée d'une zone : même langage visuel, sans pastille FRENCH redondante. */
.ed-overlay-patient{grid-template-columns:minmax(0,1fr) auto!important;background:var(--urg-french-card-0)!important;border-left:5px solid var(--urg-french-0)!important}
.ed-overlay-patient.french-f1{background:var(--urg-french-card-1)!important;border-left-color:var(--urg-french-1)!important}.ed-overlay-patient.french-f2{background:var(--urg-french-card-2)!important;border-left-color:var(--urg-french-2)!important}.ed-overlay-patient.french-f3,.ed-overlay-patient.french-f3a{background:var(--urg-french-card-3a)!important;border-left-color:var(--urg-french-3a)!important}.ed-overlay-patient.french-f3b{background:var(--urg-french-card-3b)!important;border-left-color:var(--urg-french-3b)!important}.ed-overlay-patient.french-f4{background:var(--urg-french-card-4)!important;border-left-color:var(--urg-french-4)!important}.ed-overlay-patient.french-f5{background:var(--urg-french-card-5)!important;border-left-color:var(--urg-french-5)!important}
.ed-overlay-patient>span:first-child{min-width:0}.ed-overlay-patient b{display:flex!important;align-items:center;gap:6px}.ed-overlay-patient b>.ed-patient-pills{margin-left:auto}

@media(max-width:1450px){.ed-orient-pill{height:16px;min-width:16px;padding:0 4px;font-size:7px}.ed-location.single .ed-patient.inside .ed-orient-pill{height:14px;min-width:14px;font-size:6px}}

/* =========================================================
   URG360 v2.8 Alpha 1.12.2.2 — HOTFIX lisibilité cartes plan
   La suppression de la pastille FRENCH avait laissé, via une règle
   plus spécifique Alpha 1.12, une colonne fantôme de 27 px dans
   les emplacements individuels. Le contenu patient se retrouvait
   donc comprimé dans cette colonne. On force ici une seule colonne
   réelle et on réserve explicitement l'espace des pastilles équipe.
   ========================================================= */
body.urg-emergency-board-active .ed-location.single .ed-patient.inside{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-main{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-name-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:5px!important;
  width:100%!important;
  min-width:0!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-name-row>strong{
  min-width:0!important;
  width:auto!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-pills{
  justify-self:end!important;
  max-width:50%!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-meta{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  width:100%!important;
  min-width:0!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-meta span:first-child{
  min-width:0!important;
  max-width:none!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* =========================================================
   URG360 v2.8 Alpha 1.12.3 — carte patient épurée
   - seule la pastille du Sénior responsable est affichée
   - Sénior en bas à gauche
   - orientation en haut à droite
   - chronos inchangés
   ========================================================= */
.ed-bottom-left{display:inline-flex;align-items:center;gap:4px;min-width:0}
.ed-patient-name-row .ed-patient-pills{display:inline-flex;align-items:center;justify-content:flex-end;gap:2px;min-width:0}
.ed-patient-name-row .ed-patient-pills:empty{display:none}
.ed-med-team{display:inline-flex;align-items:center;gap:2px;flex:0 0 auto}
.ed-med-pill.senior{background:#173f67!important;color:#fff!important;border-color:#173f67!important}

/* Dans un box : la pastille sénior est réellement ancrée en bas à gauche,
   les badges BIO/IMG/soins restent en bas à droite. */
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-bottom{
  display:flex!important;
  position:absolute!important;
  left:4px!important;
  right:4px!important;
  bottom:4px!important;
  width:auto!important;
  margin:0!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:4px!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-bottom-left{
  display:inline-flex!important;
  min-width:0!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-status{
  display:none!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-badges{
  margin-left:auto!important;
  flex:0 0 auto!important;
}

/* Orientation souhaitée = contour/translucide ; validée = pleine. */
.v28flow-chip.desired{background:#f2edfb;color:#6b46b2;border:1px solid #cbbbe8}
.v28orientation-current.desired{background:#fbf9ff;border-color:#d8cbed}
.v28orientation-mode-note{display:grid;grid-template-columns:auto minmax(0,1fr) 1px auto minmax(0,1fr);gap:8px;align-items:center;margin-bottom:14px;padding:10px 12px;border-radius:10px;background:#f6f8fb;color:#4f6579;font-size:12px}
.v28orientation-mode-note strong{color:#264765}
.v28orientation-mode-note i{width:1px;height:24px;background:#d7e0e9}
.v28orientation-actions.split{justify-content:space-between;gap:10px;flex-wrap:wrap}
.v28orientation-actions.split .v28flow-btn{min-width:230px}
.v28orientation-sub label>span small{font-weight:500;color:#75869a;margin-left:4px}

@media(max-width:760px){
  .v28orientation-mode-note{grid-template-columns:1fr;gap:3px}
  .v28orientation-mode-note i{display:none}
  .v28orientation-actions.split{flex-direction:column}
  .v28orientation-actions.split .v28flow-btn{width:100%;min-width:0}
}

/* =========================================================
   URG360 v2.8 Alpha 1.12.4 — Pilotage flux / À installer
   - barre opérationnelle compacte avec répartition FRENCH
   - zoom remonté dans la barre de commande
   - liste À installer issue d'une IOA validée + attente + jamais installé
   ========================================================= */
body.urg-emergency-board-active .ed-command-actions{gap:6px!important}
.ed-command-zoom{display:inline-flex;align-items:center;gap:3px;margin-right:2px}
.ed-command-zoom button{height:26px;min-width:29px;padding:0 6px;border:1px solid #d2deea;background:#fff;border-radius:7px;color:#214e72;font-size:10px;font-weight:900;cursor:pointer}
.ed-command-zoom button:hover{background:#f5f9fc;border-color:#a9c5d9}
.ed-command-zoom #v28EdZoomReset{min-width:52px}

/* La ligne « Plan physique » disparaît : le viewport utilise immédiatement la hauteur disponible. */
body.urg-emergency-board-active .ed-plan-card{padding:0!important}
body.urg-emergency-board-active .ed-plan-viewport{border-radius:10px!important}

/* 4 indicateurs opérationnels + répartition FRENCH + attente + passage + activité + hospitalisation. */
body.urg-emergency-board-active .ed-metrics{
  grid-template-columns:
    minmax(70px,.72fr) minmax(70px,.72fr) minmax(70px,.72fr) minmax(70px,.72fr)
    minmax(330px,2.8fr)
    minmax(105px,1fr) minmax(105px,1fr) minmax(128px,1.12fr) minmax(116px,1fr)!important;
  align-items:stretch!important;
}
.ed-triage-strip{
  min-height:38px!important;height:38px!important;padding:3px!important;
  display:grid!important;grid-template-columns:repeat(6,minmax(38px,1fr))!important;
  align-items:stretch!important;gap:3px!important;
  border:1px solid #dce5ef!important;background:#fff!important;border-radius:9px!important;
  box-sizing:border-box!important;
}
.ed-triage-strip .ed-triage-tile{
  margin:0!important;min-width:0!important;border-radius:6px!important;padding:2px 4px!important;
  display:grid!important;grid-template-columns:auto 1fr!important;align-items:center!important;gap:3px!important;
  text-transform:none!important;letter-spacing:0!important;font-weight:900!important;box-sizing:border-box!important;
}
.ed-triage-strip .ed-triage-tile small{font-size:7px!important;line-height:1!important;font-weight:950!important;white-space:nowrap!important}
.ed-triage-strip .ed-triage-tile b{font-size:13px!important;line-height:1!important;text-align:right!important;color:inherit!important}
.ed-triage-tile.f1{background:var(--urg-french-1)!important;color:#fff!important}
.ed-triage-tile.f2{background:var(--urg-french-2)!important;color:#183449!important}
.ed-triage-tile.f3a{background:var(--urg-french-3a)!important;color:#fff!important}
.ed-triage-tile.f3b{background:var(--urg-french-3b)!important;color:#173a21!important}
.ed-triage-tile.f4{background:var(--urg-french-4)!important;color:#173b5d!important}
.ed-triage-tile.f5{background:var(--urg-french-5)!important;color:#fff!important}

/* Filtres de la colonne patient : l'ajout de À installer peut revenir proprement sur deux lignes. */
body.urg-emergency-board-active .ed-filter-row{flex-wrap:wrap!important;row-gap:4px!important}
.ed-filter-row button.install{border-color:#b7cfe0;color:#315f7d;background:#f7fbfd}
.ed-filter-row button.install.active{border-color:#176ba0;background:#176ba0;color:#fff}
.ed-status.install{background:#eaf4fb!important;color:#175d89!important;border:1px solid #c4dceb!important;font-size:6.7px!important;font-weight:900!important;white-space:nowrap!important}
.ed-patient.awaiting-installation:not(.inside){box-shadow:inset 0 0 0 1px rgba(23,107,160,.08)}

@media(max-width:1700px){
  body.urg-emergency-board-active .ed-metrics{
    grid-template-columns:minmax(62px,.68fr) minmax(62px,.68fr) minmax(62px,.68fr) minmax(62px,.68fr) minmax(285px,2.6fr) minmax(94px,.9fr) minmax(94px,.9fr) minmax(114px,1fr) minmax(105px,.95fr)!important;
  }
  .ed-triage-strip{grid-template-columns:repeat(6,minmax(34px,1fr))!important}
  .ed-triage-strip .ed-triage-tile{padding:2px 3px!important}
  .ed-triage-strip .ed-triage-tile small{font-size:6.3px!important}
  .ed-triage-strip .ed-triage-tile b{font-size:12px!important}
}
@media(max-width:1350px){
  body.urg-emergency-board-active .ed-metrics{grid-template-columns:repeat(4,1fr)!important}
  .ed-triage-strip{grid-column:span 2!important}
}
@media(max-width:1180px){
  body.urg-emergency-board-active .ed-metrics{grid-template-columns:repeat(3,1fr)!important}
  .ed-triage-strip{grid-column:span 3!important}
}
@media(max-width:720px){.ed-command-zoom #v28EdZoomReset{display:none}.ed-command-zoom button{min-width:27px;padding:0 5px}}
\n\n/* =========================================================
   URG360 v2.8 Alpha 1.12.4.1 — Hotfix flux
   - les 6 niveaux FRENCH sont 6 carreaux égaux sur une seule ligne
   - « À installer » = zone d'attente + aucune trace médicale
   - « Soins à faire » reste lisible dans la liste et visible sur le plan
   ========================================================= */
body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  grid-template-rows:1fr!important;
  gap:4px!important;
  min-width:0!important;
  min-height:38px!important;
  height:38px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  align-items:stretch!important;
  overflow:visible!important;
}
body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip .ed-triage-tile{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:3px!important;
  min-width:0!important;
  height:38px!important;
  margin:0!important;
  padding:0 7px!important;
  border-radius:9px!important;
  box-sizing:border-box!important;
  box-shadow:inset 0 0 0 1px rgba(20,54,83,.08)!important;
}
body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip .ed-triage-tile small{
  display:block!important;
  margin:0!important;
  font-size:7px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.02em!important;
  white-space:nowrap!important;
  color:inherit!important;
}
body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip .ed-triage-tile b{
  display:block!important;
  margin:0!important;
  font-size:14px!important;
  line-height:1!important;
  font-weight:950!important;
  color:inherit!important;
  text-align:right!important;
}

/* La mention de soins dispose de sa propre ligne dans la liste latérale : elle ne
   peut plus être écrasée par la pastille sénior ou les badges BIO/IMG. */
.ed-patient:not(.inside) .ed-care-line{display:flex;align-items:center;margin-top:3px;min-width:0}
.ed-patient:not(.inside) .ed-care-line>span{display:inline-flex;align-items:center;min-height:14px;padding:1px 5px;border-radius:999px;background:#f1ecfb;color:#6546a1;border:1px solid #d9cdef;font-size:7px;font-weight:950;line-height:1;white-space:nowrap}
.ed-patient:not(.inside) .ed-patient-bottom{min-width:0}
.ed-patient:not(.inside) .ed-bottom-left{flex:1 1 auto;min-width:0}
.ed-patient:not(.inside) .ed-badges{flex:0 0 auto}

/* Dans les box, la place est limitée : un badge SOINS explicite remplace le
   compteur ✓ ambigu, avec le détail complet au survol. */
.ed-mini.care-action{background:#f1ecfb!important;color:#6546a1!important;border:1px solid #d8cbed!important;white-space:nowrap!important}
.ed-mini.care-action.overdue{background:#efe4fa!important;color:#5d3b99!important;border-color:#cdb9e9!important}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-badges{gap:2px!important;max-width:72%!important;overflow:visible!important}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-mini.care-action{font-size:5.8px!important;padding:1px 2px!important;letter-spacing:0!important}

@media(max-width:1700px){
  body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip{gap:3px!important}
  body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip .ed-triage-tile{padding:0 5px!important}
  body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip .ed-triage-tile small{font-size:6.3px!important}
  body.urg-emergency-board-active .ed-metrics>div.ed-triage-strip .ed-triage-tile b{font-size:12px!important}
}

/* =========================================================
   URG360 v2.8 Alpha 1.12.4.2 — carreaux FRENCH robustes
   Chaque niveau est un indicateur autonome dans la grille principale.
   Cela évite qu'un style hérité transforme F2/F3... en barres flexibles.
   ========================================================= */
body.urg-emergency-board-active .ed-metrics{
  grid-template-columns:
    minmax(72px,.72fr) minmax(72px,.72fr) minmax(72px,.72fr) minmax(72px,.72fr)
    repeat(6,minmax(44px,.34fr))
    minmax(110px,.95fr) minmax(110px,.95fr) minmax(132px,1.08fr) minmax(118px,.98fr)!important;
  gap:5px!important;
}
body.urg-emergency-board-active .ed-metrics>div.ed-french-metric{
  min-width:0!important;
  min-height:38px!important;
  height:38px!important;
  padding:0 6px!important;
  border:0!important;
  border-radius:9px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:3px!important;
  box-sizing:border-box!important;
  box-shadow:inset 0 0 0 1px rgba(20,54,83,.09)!important;
  overflow:hidden!important;
}
body.urg-emergency-board-active .ed-metrics>div.ed-french-metric small{
  margin:0!important;
  font-size:7px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
  color:inherit!important;
}
body.urg-emergency-board-active .ed-metrics>div.ed-french-metric b{
  margin:0!important;
  font-size:14px!important;
  line-height:1!important;
  font-weight:950!important;
  color:inherit!important;
  flex:0 0 auto!important;
}
body.urg-emergency-board-active .ed-french-metric.f1{background:var(--urg-french-1)!important;color:#fff!important}
body.urg-emergency-board-active .ed-french-metric.f2{background:var(--urg-french-2)!important;color:#183449!important}
body.urg-emergency-board-active .ed-french-metric.f3a{background:var(--urg-french-3a)!important;color:#fff!important}
body.urg-emergency-board-active .ed-french-metric.f3b{background:var(--urg-french-3b)!important;color:#173a21!important}
body.urg-emergency-board-active .ed-french-metric.f4{background:var(--urg-french-4)!important;color:#173b5d!important}
body.urg-emergency-board-active .ed-french-metric.f5{background:var(--urg-french-5)!important;color:#fff!important}

/* Le badge SOINS du plan est prioritaire et doit rester dans la carte, même avec BIO + IMG. */
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-patient-bottom{
  left:4px!important;right:4px!important;bottom:3px!important;overflow:visible!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-badges{
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:2px!important;max-width:none!important;overflow:visible!important;white-space:nowrap!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-mini{
  flex:0 0 auto!important;font-size:5.8px!important;padding:1px 2px!important;line-height:1.1!important;
}
body.urg-emergency-board-active .ed-location.single .ed-patient.inside .ed-mini.care-action{
  display:inline-flex!important;visibility:visible!important;opacity:1!important;
}

@media(max-width:1700px){
  body.urg-emergency-board-active .ed-metrics{
    grid-template-columns:
      minmax(62px,.68fr) minmax(62px,.68fr) minmax(62px,.68fr) minmax(62px,.68fr)
      repeat(6,minmax(39px,.3fr))
      minmax(96px,.9fr) minmax(96px,.9fr) minmax(116px,1fr) minmax(106px,.94fr)!important;
  }
  body.urg-emergency-board-active .ed-metrics>div.ed-french-metric{padding:0 4px!important}
  body.urg-emergency-board-active .ed-metrics>div.ed-french-metric small{font-size:6.3px!important}
  body.urg-emergency-board-active .ed-metrics>div.ed-french-metric b{font-size:12px!important}
}
@media(max-width:1350px){
  body.urg-emergency-board-active .ed-metrics{grid-template-columns:repeat(7,minmax(80px,1fr))!important}
}
@media(max-width:900px){
  body.urg-emergency-board-active .ed-metrics{grid-template-columns:repeat(4,minmax(70px,1fr))!important}
}

/* =========================================================
   URG360 v2.8 Alpha 1.13 — finitions flux + colonne service
   ========================================================= */
/* FRENCH : six carreaux autonomes, couleur + nombre uniquement. */
body.urg-emergency-board-active .ed-metrics>div.ed-french-metric{justify-content:center!important;padding:0!important}
body.urg-emergency-board-active .ed-metrics>div.ed-french-metric small{display:none!important}
body.urg-emergency-board-active .ed-metrics>div.ed-french-metric b{font-size:15px!important;text-align:center!important}

/* Soins à faire : priorité visuelle sans masquer la couleur FRENCH. */
/* Soins : la priorité est portée par la pastille rouge, sans contour rouge de toute la carte. */
body.urg-emergency-board-active .ed-patient.care-due{box-shadow:none!important}
body.urg-emergency-board-active .ed-patient.inside.care-due{box-shadow:none!important}
.ed-patient:not(.inside){padding-bottom:7px!important;min-height:75px!important;overflow:visible!important}
.ed-patient:not(.inside) .ed-care-line{margin-bottom:3px!important;overflow:visible!important}
.ed-patient:not(.inside) .ed-care-line>span{background:#fff0ed!important;color:#a82c26!important;border-color:#efaaa4!important;font-size:7.5px!important;padding:2px 6px!important}
.ed-mini.care-action{background:#fff0ed!important;color:#a82c26!important;border-color:#e89a93!important;font-weight:950!important}
.ed-mini.care-action.overdue{background:#ffe3df!important;color:#94241f!important;border-color:#dc756d!important}

/* Colonne gauche Service / UHCD. */
.v313-service-layout{display:grid;grid-template-columns:285px minmax(0,1fr);gap:14px;align-items:start}
.v313-service-main{min-width:0}.v313-service-sidebar{position:sticky;top:10px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 135px);overflow:auto;border:1px solid #d8e3eb;border-radius:14px;background:#f8fbfd;padding:11px;box-shadow:0 2px 8px rgba(24,55,78,.05)}
.v313-service-sidebar>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 4px}.v313-service-sidebar>header>div{display:flex;flex-direction:column;gap:2px}.v313-service-sidebar>header small{font-size:8px;font-weight:900;letter-spacing:.08em;color:#718798}.v313-service-sidebar>header strong{font-size:14px;color:#173b55}.v313-service-sidebar>header>b{display:flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:999px;background:#e8f2f7;color:#164f72;font-size:13px}
.v313-service-filters{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}.v313-service-filters button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:43px;border:1px solid #d8e3ea;border-radius:9px;background:#fff;color:#526a7c;font-size:8px;font-weight:850;cursor:pointer}.v313-service-filters button b{font-size:12px;color:#183e59}.v313-service-filters button.active{border-color:#7db6d8;background:#eaf6fc;color:#0f6295}.v313-service-filters button.active b{color:#0f6295}
.v313-service-search{display:flex;align-items:center;gap:7px;border:1px solid #cfdae3;border-radius:9px;background:#fff;padding:0 9px}.v313-service-search span{color:#7490a2}.v313-service-search input{width:100%;border:0;outline:0;background:transparent;padding:9px 0;font:inherit;font-size:11px;color:#25445b}
.v313-service-transfers,.v313-service-list{border:1px solid #dde6ec;border-radius:11px;background:#fff;padding:8px}.v313-service-transfers.has-items{border-color:#b9a7e2;background:#fbf9ff;box-shadow:inset 3px 0 0 #7252b8}.v313-service-section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.v313-service-section-title>span{display:flex;flex-direction:column}.v313-service-section-title b{font-size:10.5px;color:#24435a}.v313-service-section-title small{font-size:8px;color:#8193a0}.v313-service-section-title>strong{min-width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:999px;background:#7050b2;color:#fff;font-size:10px}
.v313-service-transfer-mini{display:flex;flex-direction:column;gap:6px;padding:7px;margin:5px 0;border:1px solid #dfd6f1;border-radius:9px;background:#fff}.v313-service-transfer-mini>div:first-child{display:flex;flex-direction:column;min-width:0}.v313-service-transfer-mini strong{font-size:10.5px;color:#332359}.v313-service-transfer-mini small,.v313-service-transfer-mini em{font-size:8px;color:#728294;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v313-service-transfer-mini>div:last-child{display:grid;grid-template-columns:1fr 1fr;gap:5px}.v313-service-transfer-mini button{border:1px solid #d1c4e8;border-radius:7px;background:#fff;color:#5e409a;padding:5px;font-size:8px;font-weight:900;cursor:pointer}.v313-service-transfer-mini button.accept{background:#6f50ad;border-color:#6f50ad;color:#fff}.v313-service-transfers>p,.v313-service-empty{margin:4px 0;color:#8394a1;font-size:9px}.v313-more{display:block;margin-top:5px;color:#6d5796;text-align:center;font-size:8px}
.v313-service-list{display:flex;flex-direction:column;gap:5px}.v313-service-patient-mini{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;border:1px solid #e0e7ec;border-radius:8px;background:#fff;padding:7px;text-align:left;cursor:grab;user-select:none}.v313-service-patient-mini:hover{border-color:#91b9cf;background:#f6fbfe}.v313-service-patient-mini:active{cursor:grabbing}.v313-service-patient-mini.dragging{opacity:.55}.v313-service-patient-mini.over24{border-color:#e5c77d;background:#fffaf0}.v313-service-patient-mini>span{display:flex;flex-direction:column;min-width:0}.v313-service-patient-mini strong{font-size:10px;color:#244259;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v313-service-patient-mini small{font-size:8px;color:#7d8e9a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v313-service-patient-mini em{font-style:normal;font-size:9px;font-weight:900;color:#4a6578;white-space:nowrap}.v313-service-patient-mini.over24 em{color:#9a6500}
@media(max-width:1050px){.v313-service-layout{grid-template-columns:1fr}.v313-service-sidebar{position:static;max-height:none}.v313-service-list{max-height:270px;overflow:auto}}

/* Fugue / parti avant prise en charge : workflow volontairement simple. */
.v313-unattended-info{display:flex;flex-direction:column;gap:4px;margin:12px 0;padding:12px 13px;border:1px solid #f0b1a9;border-left:4px solid #d94b42;border-radius:10px;background:#fff4f2;color:#8e302a}.v313-unattended-info strong{font-size:12px}.v313-unattended-info span{font-size:10.5px;line-height:1.4}
.v313-unattended-form{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px;padding:13px;border:1px solid #edd0cc;border-radius:12px;background:#fff9f8}.v313-unattended-form label{display:flex;flex-direction:column;gap:5px}.v313-unattended-form label.wide,.v313-unattended-form .v28flow-status,.v313-unattended-form>button{grid-column:1/-1}.v313-unattended-form label>span{font-size:10px;font-weight:850;color:#5d6873}.v313-unattended-form select,.v313-unattended-form input,.v313-unattended-form textarea{border:1px solid #cfdae2;border-radius:8px;background:#fff;padding:9px;font:inherit;font-size:11px}.v313-unattended-form>button{justify-self:end}
@media(max-width:700px){.v313-unattended-form{grid-template-columns:1fr}}


/* Alpha 1.13.1 — traçabilité structurée Fugue / Parti avant prise en charge. */
.v313-unattended-tracking{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:2px;padding:11px;border:1px solid #e7d7d3;border-radius:10px;background:#fff}
.v313-unattended-tracking[hidden]{display:none!important}.v313-unattended-tracking-title{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding-bottom:6px;border-bottom:1px solid #edf0f2}.v313-unattended-tracking-title strong{font-size:11px;color:#334d60}.v313-unattended-tracking-title span{font-size:8.5px;color:#8696a2}
.v313-unattended-tracking label{display:flex;flex-direction:column;gap:5px}.v313-unattended-tracking label.wide{grid-column:1/-1}.v313-unattended-tracking label.check{flex-direction:row;align-items:center;gap:7px;min-height:37px;padding:7px 9px;border:1px solid #e1e7eb;border-radius:8px;background:#f9fbfc;font-size:10px;font-weight:850;color:#485e6d}.v313-unattended-tracking label>span{font-size:9.5px;font-weight:850;color:#5d6873}.v313-unattended-tracking input:not([type=checkbox]),.v313-unattended-tracking select{border:1px solid #cfdae2;border-radius:8px;background:#fff;padding:8px;font:inherit;font-size:10.5px}
.v313-fugue-only[hidden]{display:none!important}
@media(max-width:700px){.v313-unattended-tracking{grid-template-columns:1fr}.v313-unattended-tracking-title,.v313-unattended-tracking label.wide{grid-column:1}}

/* =========================================================
   URG360 v2.8 Alpha 1.13.2 — HOTFIX cartes / pastilles
   Les cartes de la liste latérale avaient conservé une hauteur fixe héritée
   (62 px) : les pastilles Sénior / statut / BIO / IMG pouvaient sortir du cadre.
   La hauteur redevient intrinsèque au contenu et la dernière ligne reste dans
   la carte, sans masquer les couleurs FRENCH.
   ========================================================= */
body.urg-emergency-board-active .ed-patient:not(.inside){
  height:auto!important;
  min-height:72px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
body.urg-emergency-board-active .ed-patient:not(.inside).care-due{
  min-height:88px!important;
}
body.urg-emergency-board-active .ed-patient:not(.inside) .ed-patient-main{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  width:100%!important;
}
body.urg-emergency-board-active .ed-patient:not(.inside) .ed-patient-bottom{
  position:static!important;
  display:flex!important;
  width:100%!important;
  min-width:0!important;
  margin-top:4px!important;
  padding-top:0!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:5px!important;
  flex-wrap:nowrap!important;
  overflow:visible!important;
}
body.urg-emergency-board-active .ed-patient:not(.inside) .ed-bottom-left{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  flex:1 1 auto!important;
  min-width:0!important;
  overflow:visible!important;
}
body.urg-emergency-board-active .ed-patient:not(.inside) .ed-badges{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:3px!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
body.urg-emergency-board-active .ed-patient:not(.inside) .ed-care-line{
  flex:0 0 auto!important;
  margin-top:3px!important;
  margin-bottom:0!important;
}

/* =========================================================
   Alpha 1.13.3 — Plan plus dense + salles d'attente 2 colonnes
   - aucun changement des cartes patients de la liste gauche
   - géométrie BDD inchangée
   ========================================================= */
/* Utilise l'espace vertical réellement disponible : la géométrie officielle
   se termine vers 94 % de hauteur, on étend uniquement le plan de rendu afin
   de conserver une petite marge basse au lieu d'une bande vide importante. */
body.urg-emergency-board-active .ed-plan-plane{
  top:3px!important;
  right:3px!important;
  bottom:-5.5%!important;
  left:3px!important;
}

/* Grandes zones d'attente : une seule zone fonctionnelle, un compteur unique,
   mais affichage interne sur deux colonnes pour augmenter la capacité visible. */
body.urg-emergency-board-active .ed-location.multi[data-ed-code="GSA"] .ed-stack,
body.urg-emergency-board-active .ed-location.multi[data-ed-code="ACCUEIL"] .ed-stack,
body.urg-emergency-board-active .ed-location.multi[data-ed-code="ATT-CC"] .ed-stack{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:20px!important;
  align-content:start!important;
  column-gap:3px!important;
  row-gap:2px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-right:23px!important;
}
body.urg-emergency-board-active .ed-location.multi[data-ed-code="GSA"] .ed-stack button,
body.urg-emergency-board-active .ed-location.multi[data-ed-code="ACCUEIL"] .ed-stack button,
body.urg-emergency-board-active .ed-location.multi[data-ed-code="ATT-CC"] .ed-stack button{
  width:100%!important;
  min-width:0!important;
  height:20px!important;
  margin:0!important;
}
/* Entrée U et attente psy restent volontairement sur une seule colonne. */
@media(max-width:980px){
  body.urg-emergency-board-active .ed-location.multi[data-ed-code="GSA"] .ed-stack,
  body.urg-emergency-board-active .ed-location.multi[data-ed-code="ACCUEIL"] .ed-stack,
  body.urg-emergency-board-active .ed-location.multi[data-ed-code="ATT-CC"] .ed-stack{
    grid-template-columns:minmax(0,1fr)!important;
  }
  body.urg-emergency-board-active .ed-plan-plane{bottom:-3%!important}
}

/* =========================================================
   Alpha 1.13.4 — Salon de sortie
   Zone multi-patients post-médicale, distincte des salles d'attente pré-médicales.
   ========================================================= */
body.urg-emergency-board-active .ed-location.discharge_lounge{
  background:#f2f8f1!important;
  border-color:#accba9!important;
}
body.urg-emergency-board-active .ed-location.discharge_lounge>header{
  min-height:30px!important;
  height:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:3px 1px 2px!important;
  text-align:center!important;
}
body.urg-emergency-board-active .ed-location.discharge_lounge>header b{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:8.5px!important;
  line-height:1.1!important;
  color:#315b3f!important;
}
body.urg-emergency-board-active .ed-location.discharge_lounge>header small{
  display:none!important;
}
body.urg-emergency-board-active .ed-location.discharge_lounge .ed-stack{
  grid-template-columns:minmax(0,1fr)!important;
  padding-right:19px!important;
  margin-top:2px!important;
}
body.urg-emergency-board-active .ed-location.discharge_lounge .ed-stack button{
  min-width:0!important;
  width:100%!important;
  height:20px!important;
  padding:2px 3px!important;
}
body.urg-emergency-board-active .ed-location.discharge_lounge .ed-stack-pills{
  display:none!important;
}
body.urg-emergency-board-active .ed-location.discharge_lounge .ed-location-count{
  background:#dcefdc!important;
  color:#2f6d43!important;
}


/* Alpha 1.13.5 — affectation des lits par sexe administratif + DnD depuis la colonne service */
.v28flow-room-meta{display:flex!important;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.v313-room-sex{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d6e1e8;border-radius:999px;background:#f3f7fa;color:#536b7c;padding:2px 7px;font-size:9px;font-weight:850;white-space:nowrap}
.v313-room-sex.male{background:#eef6fb;border-color:#bfd8e7;color:#245c78}
.v313-room-sex.female{background:#f8f2fb;border-color:#dac9e7;color:#6c4b82}
.v313-room-sex.mixed{background:#fff4e8;border-color:#e6c59a;color:#8a5a16}
.v313-room-sex.neutral{background:#f6f8fa;color:#728392}
.v28flow-bed.sex-incompatible{opacity:.52;filter:saturate(.65)}
.v28flow-bed.sex-incompatible .v28flow-bed-empty{background:#f4f5f6;color:#8b9298}
.v28flow-bed.sex-verify{outline:2px dashed #d0a34b;outline-offset:1px}
.v28flow-bed.drop-ready{opacity:1;filter:none}
.v313-service-transfers{max-height:310px;overflow:auto}
