/* URG360 v2.7 RC1 — finalisation espace Patient / Pancarte V3 */

/* Pancarte V3 : priorité aux graphes */
.v27-chart-grid-v3{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
.v27-chart-grid-v3 .v27-chart-card.metabolic{grid-column:1/-1}
.v27-chart-grid-v3 .v27-chart-card{border-color:#b7cbd9;box-shadow:0 5px 16px rgba(18,53,82,.08)}
.v27-chart-grid-v3 .v27-chart-head{padding:10px 12px 8px}
.v27-chart-grid-v3 .v27-chart-head strong{font-size:13px}
.v27-chart-grid-v3 .v27-chart-head small{font-size:9px}
.v27-chart-head-right{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.v27-index-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid #c9d7e2;background:#f6f9fc;color:#466378;border-radius:999px;padding:4px 8px;font-size:9px;font-weight:800;white-space:nowrap}
.v27-index-chip b{font-size:11px;color:#173e5d}
.v27-chart-grid-v3 .v27-lanes{padding-bottom:3px}
.v27-chart-grid-v3 .v27-lane{padding:5px 7px 3px}
.v27-chart-grid-v3 .v27-lane-title{padding:0 5px 3px;display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.v27-chart-grid-v3 .v27-lane-title strong{font-size:10px;color:#31546d}
.v27-chart-grid-v3 .v27-lane-title span{font-size:8px;color:#7d8f9d;text-align:right}
.v27-chart-grid-v3 .v27-chart-svg{height:158px}
.v27-chart-grid-v3 .v27-chart-svg.compact{height:116px}
.v27-chart-grid-v3 .v27-pa-range-svg{height:190px}
.v27-metabolic-lanes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:4px 6px 6px}
.v27-metabolic-empty{min-height:72px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;background:#fbfcfd;color:#81919e;border-top:1px solid #e4ebf0;padding:10px;text-align:center}
.v27-metabolic-empty strong{font-size:11px;color:#506a7d}.v27-metabolic-empty span{font-size:9px}

/* PA : barre verticale PAD→PAS, losange = PAM */
.v27-pa-range{stroke:#c4383d;stroke-width:5.2;stroke-linecap:round;opacity:.82}
.v27-pa-range.latest{stroke-width:6.4;opacity:1}
.v27-pa-cap{stroke:#c4383d;stroke-width:2.2;stroke-linecap:round}
.v27-pa-pam{fill:#d78617;stroke:#fff;stroke-width:1.6;filter:drop-shadow(0 1px 1px rgba(44,58,69,.18))}
.v27-pa-last{fill:#8f2d31;font-size:8px;font-weight:900;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.v27-sync-crosshair{stroke:#425f76;stroke-width:1;stroke-dasharray:2 2;opacity:.56;pointer-events:none}

/* Provenance des relevés */
.v27-reading-source{display:inline-flex;margin-top:4px;padding:2px 5px;border-radius:999px;font-style:normal;font-size:7px;font-weight:850;letter-spacing:.02em;background:#eef3f7;color:#657a89}
.v27-reading-source.spontaneous{background:#e8f4ef;color:#2f7657}
.v27-reading-source.imported{background:#eeeaf8;color:#67509a}
.v27-reading-source.prescribed{background:#eaf1f8;color:#315f87}

/* Actions Pancarte */
.v27-pancarte-actions [data-v27-spontaneous-reading]{box-shadow:0 2px 5px rgba(11,99,167,.18)}
.v27-event-chip.clinical_marker{background:#fff4df;border-color:#ecd39c;color:#6e5526}

/* Plein écran Pancarte */
#v26PrescriptionLabView.v27-pancarte-focus-mode{position:fixed!important;inset:0!important;z-index:2500!important;background:#eef3f7!important;overflow:auto!important;padding:8px!important;margin:0!important;max-width:none!important}
#v26PrescriptionLabView.v27-pancarte-focus-mode>.back,
#v26PrescriptionLabView.v27-pancarte-focus-mode>.v26-lab-warning,
#v26PrescriptionLabView.v27-pancarte-focus-mode>.v26-lab-head,
#v26PrescriptionLabView.v27-pancarte-focus-mode>#v26LabMessage{display:none!important}
#v26PrescriptionLabView.v27-pancarte-focus-mode #v26LabMainLayout{min-height:calc(100vh - 16px)!important;height:auto!important;margin:0!important}
#v26PrescriptionLabView.v27-pancarte-focus-mode .v26-workspace-card{min-height:calc(100vh - 16px)!important;margin:0!important}
#v26PrescriptionLabView.v27-pancarte-focus-mode .v26-patient-banner{position:sticky;top:0;z-index:30}
#v26PrescriptionLabView.v27-pancarte-focus-mode .v27-pancarte{min-height:0}

/* Plan de soins : exploiter la largeur sans laisser de zone morte */
#v26PrescriptionLabView.v26-patient-focus .v26-plan-scroll{max-width:100%;width:100%}
#v26PrescriptionLabView.v26-patient-focus .v26-plan-table.time-window{width:100%;max-width:100%;min-width:0}
#v26PrescriptionLabView.v26-patient-focus .v26-plan-period-track,
#v26PrescriptionLabView.v26-patient-focus .v26-plan-hour-track,
#v26PrescriptionLabView.v26-patient-focus .v26-plan-track{min-width:0;width:100%}

@media(max-width:1280px){
  .v27-chart-grid-v3{grid-template-columns:1fr}
  .v27-chart-grid-v3 .v27-chart-card.metabolic{grid-column:auto}
  .v27-metabolic-lanes{grid-template-columns:1fr 1fr}
}
@media(max-width:820px){
  .v27-metabolic-lanes{grid-template-columns:1fr}
  .v27-chart-grid-v3 .v27-chart-svg{height:145px}
  .v27-chart-grid-v3 .v27-chart-svg.compact{height:108px}
  .v27-chart-grid-v3 .v27-pa-range-svg{height:170px}
}

/* Pancarte V3 — couleurs via classes uniquement (CSP style-src 'self') */
.v27-chart-point.v27-point-pas{fill:#c4383d}.v27-chart-point.v27-point-pam{fill:#d78617}.v27-chart-point.v27-point-pad{fill:#557ba8}
.v27-chart-point.v27-point-fc{fill:#7d3aa8}.v27-chart-point.v27-point-spo2{fill:#147f9d}.v27-chart-point.v27-point-fr{fill:#4f6d86}
.v27-chart-point.v27-point-gly{fill:#b56c18}.v27-chart-point.v27-point-ket{fill:#b03b78}.v27-chart-point.v27-point-default{fill:#355f7b}
.v27-legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%}
.v27-legend-pa{background:#c4383d}.v27-legend-pam{background:#d78617}.v27-legend-fc{background:#7d3aa8}
.v27-legend-spo2{background:#147f9d}.v27-legend-fr{background:#4f6d86}.v27-legend-gly{background:#b56c18}.v27-legend-ket{background:#b03b78}
