/* Palette V5 : surcharges séparées pour conserver les composants historiques. */
:root{--background:#f4f7fa;--ink:#243e3d;--border:#dce5e7;--blue:#365f9b;--lavender:#68529a;--amber:#fff1cc;--radius:22px}
body{background:radial-gradient(ellipse at 95% 5%,#e5edf9 0,transparent 40%),var(--background)}
.header{background:#ffffffda;flex-wrap:wrap;gap:16px}.brand-mark{box-shadow:0 5px 14px #23655225}
.demo-context{display:block;max-width:1196px;background:#edf2f6;border:1px solid #d7e1e8;border-radius:12px;padding:0;margin:18px auto 0;font-size:.8rem}
.demo-context summary{padding:12px 18px;cursor:pointer;color:#4b6171;font-weight:600;min-height:44px}
.demo-selectors{display:flex;align-items:center;flex-wrap:wrap;gap:18px;padding:8px 18px 18px}.demo-selectors label{flex:1;min-width:180px}.demo-selectors small{flex-basis:100%}
main{padding-top:28px}.welcome{margin-bottom:24px}.welcome h1{letter-spacing:-1px}
.home-actions{gap:20px}.action-card{box-shadow:0 5px 18px #344a5a06;border-color:#dce5eb}.home-actions .action-card{min-height:180px}
.home-actions .priority-0{background:linear-gradient(125deg,#236552,#32806b);border-color:#236552}
.home-actions .priority-1{background:linear-gradient(125deg,#355c96,#5279b3);border-color:#365f9b}
.home-actions .featured{min-height:230px;padding:30px}.home-actions .featured h2{font-size:1.6rem;max-width:330px;line-height:1.2}.home-actions .featured p{max-width:360px;font-size:.95rem}
.home-actions .action-card:nth-child(3){background:#fff7ea}.home-actions .action-card:nth-child(4){background:#f2eefb}
.at-a-glance{background:#eef3fc;border-color:#cddbf0;padding:20px}.at-a-glance h2{color:var(--blue)}
.panel{box-shadow:0 3px 18px #243e3604}.notice{background:#edf2f7;color:#455c70}.upload-box{background:#f0f6f4;border-color:#8daf9f}.upload-actions .file-label{max-width:100%}
.status-0{background:#e9edf4;color:#475a75}.status-1{background:#dfedff;color:#254e87}.status-2{background:#efe4fb;color:#634187}.status-3{background:#dff2e5;color:#245b3b}.status-4{background:#fff0d9;color:#7b5118}
.unseen-request,.staff-unread{background:#fff5d9!important;border-color:#edcf80!important}.new-badge{background:#ffe39b!important;color:#644700!important}.urgent-queue{background:#fff8e7;border-color:#ecd799}
.staff-notification{margin:16px 0}.staff-notification h2{margin:12px 0}.staff-notification time{color:#65776f;font-size:.85rem}.staff-notification .button-row{margin-top:16px;justify-content:flex-start}
.stats-grid .stat-filter:nth-child(1){background:#edf5ef}.stats-grid .stat-filter:nth-child(2){background:#fff4e4}.stats-grid .stat-filter:nth-child(3){background:#f0eafa}.stats-grid .stat-filter:nth-child(4){background:#e9f0fb}
.header-notifications .nav-unread{background:#f9d56a;color:#523c10}.pharmacy-response{border-left:4px solid #639b85;background:#f0f7f4}.appointment-slot{background:#e8eefb;padding:14px;border-radius:12px;color:#2f5087}
main>.panel+section.panel,main>.panel+.page-heading{margin-top:24px}.team-details, #reply-groups-form details{padding:12px 0;border-bottom:1px solid var(--border)}summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:650}.team-editor{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:12px 0}.team-editor .check-label{margin:0!important}.team-editor label{min-width:0}.schedule-editor{margin:16px 0!important}.schedule-editor small{font-weight:400;color:var(--muted);display:block;margin-top:8px}.service-setting{min-width:0}.service-setting textarea{font-size:.85rem}#reply-groups-form>.button{margin-top:18px}
.button,.text-button,summary,select{touch-action:manipulation}input,select,textarea{max-width:100%;min-width:0}fieldset{min-width:0}.form-columns>*{min-width:0}
@media(max-width:1240px){.demo-context{margin-inline:28px}.header{gap:14px}.desktop-nav{gap:16px}.patient-tools{margin-left:auto}}
@media(max-width:760px){.header{padding:16px 20px}.demo-context{margin:12px 16px 0}.demo-context summary{font-size:.75rem}.demo-selectors{display:block}.demo-selectors label{margin-bottom:12px!important}.home-actions .featured{padding:24px;min-height:210px}.home-actions .featured h2{font-size:1.35rem}.stats-grid{gap:10px}.panel{padding:22px}.team-editor{grid-template-columns:1fr}.service-grid{grid-template-columns:1fr}.form-layout{grid-template-columns:1fr}.table-header{display:none}.request-row{grid-template-columns:1fr}.filter-label{display:block!important}.filter-label select{width:100%}.section-top{flex-wrap:wrap}.patient-tools a{min-height:44px}.document-dialog{max-width:calc(100% - 16px)}}
@media(max-width:480px){main{padding:24px 16px 100px}.home-actions{grid-template-columns:1fr;gap:14px}.home-actions .featured{min-height:184px;padding:24px}.home-actions .featured h2{font-size:1.4rem}.home-actions .action-card:not(.featured){min-height:138px;padding:22px}.home-actions .action-card:not(.featured) .icon-tile{float:left;margin:0 14px 20px 0}.home-actions .action-card:not(.featured) h2{padding-right:12px}.home-actions .action-card:not(.featured) .card-arrow{display:none}.home-actions .action-card p{max-width:none}.form-columns{grid-template-columns:1fr}.panel{padding:18px}.upload-box{padding:22px 12px}.upload-actions{flex-direction:column}.upload-actions .button{width:100%;font-size:.875rem}.button-row>.button{flex:1 1 180px}.stats-grid{grid-template-columns:1fr 1fr}.pro-tools{flex-direction:column;align-items:stretch}.pro-tools label{width:100%}.pro-heading{align-items:flex-start;flex-wrap:wrap}.header{gap:10px}.pro-link{font-size:.72rem}.brand strong{font-size:1.2rem}.brand small{font-size:.65rem}.patient-tools{width:100%;justify-content:flex-end}.demo-banner span{display:block;margin:3px 0 0;font-size:.66rem}.timeline li>p{overflow-wrap:anywhere}.viewer-toolbar{gap:6px}.viewer-toolbar .button{padding:10px;font-size:.8rem}.notification-list{min-width:0}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.rx-print-sheet{display:none}
.read-badge{display:inline-block;border-radius:7px;padding:4px 9px;background:#edf0f2;color:#52626d;font-size:.8rem}
@media print{
 @page{size:auto;margin:12mm}
 body{background:white!important}
 body>*:not(.rx-print-sheet),dialog.rx-viewer{display:none!important}
 .rx-print-sheet{display:block!important;color:#000}
 .rx-print-sheet>p{font:10pt sans-serif;margin:0 0 6mm}
 .rx-print-sheet>img{display:block;width:100%;height:auto;object-fit:contain;max-height:250mm;break-after:page}
 .rx-print-sheet>img:last-child{break-after:auto}
}
/* V5.1 — présentation uniquement, palette et hiérarchie communes. */
:root{--green:#18744f;--green-dark:#115239;--background:#f7f8f2;--ink:#263f3b;--muted:#566b65;--blue:#285d9f;--lavender:#70529b;--border:#dce6df}
body{background:radial-gradient(ellipse at 0 0,#e2f1e7 0,transparent 40%),radial-gradient(ellipse at 100% 20%,#e7edfb 0,transparent 45%),#f7f8f2}
.header{border-bottom:1px solid #cddfd4}.brand strong{color:#176543}.brand-mark{border-radius:16px 16px 16px 5px;background:#18744f}.demo-banner{background:#154f3c}.demo-context{background:#edf3ed;border-color:#d1e0d4}
#shared-connection{max-width:1196px;margin:14px auto 0;align-items:center;flex-wrap:wrap;background:#eef3f6;font-size:.78rem}#shared-connection>span{flex:1 1 400px}#shared-connection>a{flex:0 1 230px;font-size:.78rem}
.welcome{padding:14px 0 8px}.welcome .eyebrow{color:#176543}.home-actions .action-card{border-radius:26px;box-shadow:0 8px 24px #274e3d09}.home-actions .featured{min-height:238px;padding:30px 32px}.home-actions .priority-0{background:linear-gradient(125deg,#126443,#268257);border-color:#176b48}.home-actions .priority-1{background:linear-gradient(125deg,#254f8e,#3976b1);border-color:#2a5c9b}.home-actions .featured .icon-tile{width:56px;height:56px;border:1px solid #ffffff45;border-radius:18px;background:#ffffff1c}.home-actions .featured p{color:#fff}.home-actions .action-card:not(.featured){min-height:138px;padding:24px 28px}.home-actions .action-card:not(.featured) .icon-tile{float:left;margin:0 18px 28px 0}.home-actions .action-card:nth-child(3){background:#fff4d9;border-color:#eddcae}.home-actions .action-card:nth-child(4){background:#f0eafa;border-color:#ded1ed}.home-actions .action-card:not(.featured) p{max-width:none}.home-actions .action-card:not(.featured) .card-arrow{display:none}
.panel{border-radius:22px;border-color:#d9e5dc}.at-a-glance{background:#f0eafa;border-color:#dccfec;margin-top:26px}.at-a-glance h2{color:#604183}.at-a-glance a{background:#ffffffa8;border-radius:12px;padding:13px!important;margin:8px 0}.button{border-radius:13px;min-height:48px}.secondary{border-color:#b9cfc1}.view-tabs{gap:8px;flex-wrap:wrap}.view-tabs button{border-radius:12px;min-height:44px}.view-tabs button[aria-pressed=true]{background:#e0efe5;color:#155838;border-color:#9fc6ae}
.nav-unread,.header-notifications .nav-unread{background:#ffd66b;color:#4d3505;font-weight:800;border:1px solid #bc891b;min-width:24px;min-height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:99px;font-size:.75rem;box-shadow:0 0 0 2px #fff}.header-notifications:has(.nav-unread){background:#fff1c9;border:1px solid #e2bd5f;border-radius:12px;padding:9px}.mobile-nav a:has(.nav-unread){color:#175d40;font-weight:750}.unread-badge,.new-badge{background:#ffdf88!important;color:#583b00!important;border:1px solid #d8ac3e;border-radius:8px;padding:6px 10px;font-weight:750}.unread-card{background:#fffdf4;border:1px solid #e4c66f;border-left:5px solid #dfac30}.pharmacy-response{background:#edf6ef;border-color:#38805d;border-radius:12px;padding:18px}.unread-card .pharmacy-response{background:#fff4d6;border-left-color:#cb9320}
.request-row{margin:12px 0;padding:22px;border:1px solid #dce6df!important;border-radius:16px;background:#fff;gap:20px}.unseen-request,.staff-unread{background:#fff3d1!important;border:1px solid #e4bc53!important;border-left:6px solid #dca124!important;box-shadow:0 4px 14px #aa76100a}.urgent-queue:has(.queue-item){background:#fff4d7;border:1px solid #e4c168}.urgent-queue:not(:has(.queue-item)){background:#f2f6f3;border-color:#dce6df}.queue-item{border-radius:12px;background:#fffaf0;padding:16px!important;margin-top:10px}.staff-notification .new-badge{display:inline-block}.staff-notification h2{font-size:1.15rem}.stats-grid button{border-radius:18px;border:1px solid #d6e3d9;padding:20px;text-align:left}.stats-grid button strong{font-size:2rem}.notification-list,.record-head>div,.request-row>div{min-width:0}.reference,.message-text,.staff-notification h2{overflow-wrap:anywhere}
.status{border:1px solid transparent;padding:7px 12px;border-radius:9px}.status-0{background:#edf1f4;color:#435664;border-color:#c9d4db}.status-1{background:#e5effc;color:#28558b;border-color:#b7cdec}.status-2{background:#eee3fa;color:#66418c;border-color:#cebae3}.status-3{background:#dff2e4;color:#155c36;border-color:#a8d4b8}
.timeline li:nth-child(1){--step:#5c7180;--step-light:#edf1f4}.timeline li:nth-child(2){--step:#3267a3;--step-light:#e5effc}.timeline li:nth-child(3){--step:#78539e;--step-light:#eee3fa}.timeline li:nth-child(4){--step:#207045;--step-light:#dff2e4}.timeline li.complete>span{background:var(--step);border-color:var(--step)}.timeline li.complete:not(.current):before{background:var(--step)}.timeline li.current>span{box-shadow:0 0 0 5px var(--step-light)}.timeline li.current>p{color:var(--step);font-weight:750}.timeline li.current>p:after{content:'Étape actuelle';display:block;font-size:.72rem;font-weight:600;margin-top:5px}.appointment-slot{background:#e8f0fb;border:1px solid #c2d5ed}
@media(max-width:1240px){#shared-connection{margin-inline:28px}}
@media(max-width:760px){#shared-connection{margin-inline:16px;padding:12px 16px;gap:0}.header{gap:12px}.home-actions .featured{padding:24px;min-height:200px}.home-actions .featured h2{font-size:1.4rem}.request-row{padding:18px}.patient-tools{flex-wrap:wrap}.form-layout,.action-grid{min-width:0}.record-head{flex-wrap:wrap}.record-head>div{flex:1 1 180px}.header-notifications{white-space:normal}.view-tabs button{flex:1 1 130px}.timeline li>p{overflow-wrap:anywhere}}
@media(max-width:480px){.welcome h1{font-size:1.9rem}.home-actions{gap:14px}.home-actions .featured{min-height:190px;padding:24px;border-radius:22px}.home-actions .featured .icon-tile{width:46px;height:46px;margin-bottom:12px}.home-actions .featured h2{font-size:1.4rem;margin-bottom:9px}.home-actions .action-card:not(.featured){min-height:116px;padding:20px}.home-actions .action-card:not(.featured) h2{font-size:1rem}.home-actions .action-card:not(.featured) .icon-tile{margin:0 13px 24px 0;width:40px;height:40px}.stats-grid button{padding:14px}.stats-grid button span{font-size:.8rem}.mobile-nav{padding-bottom:env(safe-area-inset-bottom)}.patient-tools a{font-size:.75rem}.notification-card{flex-wrap:wrap}#shared-connection>a{flex-basis:100%;text-align:left;min-height:32px}.demo-selectors label{min-width:0}input,select,textarea{font-size:16px}}
.pickup-card{margin-top:20px;text-align:center}.pickup-qr{width:220px;max-width:100%;margin:18px auto;background:#fff}.pickup-qr svg{display:block;width:100%;height:auto}.pickup-code{display:block;font-size:1.5rem;letter-spacing:2px;margin:16px 0}.pickup-card p{max-width:540px;margin:14px auto}#pickup-form{display:grid;gap:12px;margin-bottom:20px}#pickup-video{width:100%;max-width:480px}.status-5{background:#e1eee6;color:#24563b}#pickup-result{margin-top:24px;overflow-wrap:anywhere}#pickup-result .button{margin:6px}
