:root{font-family:Segoe UI,Arial,sans-serif;color:#142e50;background:#edf3fa;font-size:15px;--scale:1.5}*{box-sizing:border-box}body{margin:0}header{background:#142e50;color:white;padding:18px 28px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:18px}.brand strong{font-size:26px;color:#f09a57}.brand img{width:135px;height:auto}.brand span{color:#c6d6ec}main{padding:22px}h1{font-size:23px;margin:0 0 14px}h2{font-size:22px;margin:0}h3{margin:20px 0 10px}button{background:#e7eef7;color:#142e50;border:1px solid #ccd6e4;padding:10px 15px;border-radius:7px;cursor:pointer;font:inherit}button:hover{background:#d7e2f2}button:disabled{opacity:.55;cursor:wait}.orange{background:#f09a57;border-color:#ed9855}.orange:hover{background:#f6b37c}label{display:flex;flex-direction:column;gap:5px;font-size:14px}input,select,textarea{font:inherit;color:#142e50;border:1px solid #bccbdc;padding:9px;border-radius:6px;background:white;min-width:0}textarea{resize:vertical}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #f09a57;outline-offset:2px}#login{max-width:440px;margin:7vh auto;background:white;border-radius:12px;padding:32px;box-shadow:0 10px 35px #142e5010}#loginForm{display:grid;gap:18px}#sites{display:flex;gap:10px;margin-bottom:20px}#sites .selected{background:#ffd4af;border-color:#f09a57}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px}.toolbar label{max-width:260px}.navigation{display:flex;align-items:center;gap:8px;flex-wrap:wrap}#notice{min-height:20px;font-size:14px}#loginError,#editError{color:#9d3029}#weekHeaders{display:grid;grid-template-columns:65px repeat(6,minmax(0,1fr));margin-right:0;border:1px solid #d6dfeb;background:white;border-radius:10px 10px 0 0;overflow:hidden}#weekHeaders div{padding:12px 4px;text-align:center;font-weight:600;border-left:1px solid #e4ebf4}#scroll{height:65vh;min-height:360px;overflow:auto;border:1px solid #d6dfeb;background:white}#calendar{position:relative;display:grid;grid-template-columns:65px repeat(6,minmax(110px,1fr));user-select:none;min-width:760px}.day{position:relative;border-left:1px solid #dce4ef;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(30px * var(--scale) - 1px),#e4eaf2 calc(30px * var(--scale) - 1px),#e4eaf2 calc(30px * var(--scale)));touch-action:auto}.today{background-color:#f3f6fc}.hour{position:absolute;left:0;width:60px;text-align:center;font-size:12px;color:#66778d}.event{position:absolute;left:3px;right:3px;border:1px solid #142e5025;border-radius:5px;padding:4px 6px;overflow:hidden;cursor:grab;font-size:12px;line-height:1.3;touch-action:auto;box-shadow:0 2px 3px #142e5008}.event b,.event span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.event.cancelled{opacity:.45;text-decoration:line-through}.handle{position:absolute;bottom:0;height:9px;left:0;right:0;cursor:ns-resize;background:#142e5020}.selection{position:absolute;left:1px;right:1px;background:#f09a5740;border:2px solid #f09a57;pointer-events:none}.muted{color:#60738a;font-size:13px}dialog{border:0;border-radius:13px;padding:24px;max-width:900px;width:calc(100% - 36px);max-height:90vh;box-shadow:0 15px 80px #142e5030}dialog::backdrop{background:#142e5060}.dialogHead,.dialogFoot{display:flex;justify-content:space-between;align-items:center;gap:10px}.dialogFoot{margin-top:20px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:15px 0}.wide{grid-column:1/-1}.searchRow{display:flex;gap:8px}.searchRow input{flex:1}.searchRow+select{margin-top:10px;width:100%}#patientMode{font-size:13px;color:#60738a}.grid label:has(input[name=minutes]){max-width:220px}@media(max-width:1000px){.brand span{display:none}.toolbar{align-items:flex-start;flex-direction:column}main{padding:12px}#weekHeaders{min-width:760px}#workspace{overflow-x:hidden}}@media(max-width:600px){.brand strong{font-size:20px}.brand img{width:105px}header{padding:12px}.grid{grid-template-columns:1fr}.searchRow{flex-wrap:wrap}}

/* One scroll surface for touch panning, with synchronized day headings. */
#weekHeaderViewport{overflow:hidden;max-width:100%}#weekHeaders{will-change:transform}
#scroll{touch-action:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
#sites{flex-wrap:wrap}#workspace{min-width:0}
@media(max-width:600px){header{flex-wrap:wrap;gap:10px}.brand{gap:10px}#calendar{min-width:905px;grid-template-columns:65px repeat(6,minmax(140px,1fr))}}
@media(pointer:coarse){.handle{display:none}.event{cursor:pointer}}

#availabilityMode[aria-pressed="true"]{background:#ffd4af;border-color:#f09a57}
.availability{position:absolute;left:1px;right:1px;border:1px dashed #cf873c;background:repeating-conic-gradient(#f6d8b0 0% 25%,#fff9f1 0% 50%) 0 0/18px 18px;z-index:0;overflow:hidden;color:#72471b;font-size:11px;padding:4px;cursor:pointer;touch-action:auto}
.event{z-index:1}#recurringDays{display:flex;gap:14px;flex-wrap:wrap;border:1px solid #ccd6e4;border-radius:6px}#recurringDays label{flex-direction:row;align-items:center}#availabilityError{color:#9d3029}.publicCard{max-width:850px;margin:20px auto;padding:25px;background:white;border-radius:12px}.slots{display:flex;gap:8px;flex-wrap:wrap}.slots button[aria-pressed="true"]{background:#ffd4af;border-color:#ed9855}#bookingMessage{white-space:pre-line}

/* Raccourcis de rendez-vous réservés à la présentation ordinateur. */
#frequentServices{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;border-top:1px solid #c6ccd4;border-bottom:1px solid #c6ccd4;padding:12px 0;margin:16px 0}
#frequentServices button{background:#ffd4af;border-color:#edb486;color:#142e50}
#frequentServices button:hover{background:#ffc18d}
#frequentServices button:active{background:#f6b37c}
#patientFields #previousPatient{background:#d9eedb;border-color:#9abc9d}
#patientFields #previousPatient:hover:not(:disabled){background:#c5e3c7}
#patientFields #previousPatient:active:not(:disabled){background:#b5d7b8}
#patientFields #previousPatient:disabled{cursor:default}
@media(max-width:900px),(pointer:coarse){#frequentServices{display:none}}

.event.attended{border-left:4px solid #27845b}

.dialogCancel{display:flex;gap:10px;flex-wrap:wrap}.lightRed{background:#f7cece;border-color:#d99c9c;color:#692424}.lightRed:hover{background:#f1b7b7}.lightRed:active{background:#eaa6a6}.lightRed[hidden]{display:none}

#lookupPreset{margin-top:14px;padding:8px 12px;border-radius:7px;background:#e3f0e5;overflow-wrap:anywhere}
#lookupPreset strong{margin-right:10px}
#lookupPreset button{padding:5px 10px;background:#f5fbf5}
#editorAgenda{margin:8px 0}
#patientLookup{max-width:750px;max-height:88dvh;overscroll-behavior:contain}
#lookupForm{margin-top:16px;align-items:end}
#lookupForm label{flex:1 1 220px}
#lookupResults{display:flex;flex-wrap:wrap;gap:6px}
#lookupResults button{text-align:left;overflow-wrap:anywhere;max-width:100%}
#lookupResults button[aria-pressed="true"]{background:#d9eedb;border-color:#9abc9d}
#lookupDetails{border-top:1px solid #d6dfeb;margin-top:14px;overflow-wrap:anywhere}
.lookupNext{padding:10px 12px;background:#eaf3ff;border:1px solid #c4d8ef;border-radius:8px}
#lookupDetails h4{margin:14px 0 6px}
.lookupNext h4{margin-top:0!important}
.lookupAppointments{list-style:none;padding:0;margin:0 0 8px}
.lookupAppointment{display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:6px;background:#f3f7fc;padding:8px 10px;margin:4px 0}
.lookupNext .lookupAppointment{background:white}
.lookupAppointment span{display:block}
@media(max-width:600px){#patientLookup{padding:14px}.lookupAppointment button{padding:8px 10px}}

#openPatientLookup{background:#d9eedb;border-color:#9abc9d}
#openPatientLookup:hover{background:#c5e3c7}
#openPatientLookup:active{background:#b5d7b8}

.week-navigation{display:flex;align-items:center;gap:8px}

#editor #putNote,.pink{background:#f9dce7;border-color:#dcb0c5;color:#62304a}
#editor #putNote:hover,.pink:hover{background:#f3c7d9}
#editor #putNote:active,.pink:active{background:#ebacc6}
#editor{max-width:1040px}
#editor .appointment-grid #putNote{align-self:end;width:100%}
@media(min-width:601px){#editor .appointment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 #patientFields .searchRow input{flex:1 0 100%}
}
#noteEditor{max-width:620px;color:#142e50}
#noteGroupLabel[hidden]{display:none}
.noteSearch{margin-top:8px}
#noteError{color:#62304a}
.note-pin{position:absolute;right:5px;width:44%;line-height:1.15;padding:1px 5px;text-align:left;font-size:11px;z-index:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#f9dce7;border-color:#c58ca7;color:#572841}
.note-pin strong,.note-pin span{display:block;overflow:hidden;text-overflow:ellipsis}
.note-pin:hover{background:#f3c7d9}

#notifications{max-width:720px;color:#142e50}
#notificationChoices:not([hidden]){display:grid;gap:10px}
#notificationChoices label:has(input){flex-direction:row;align-items:center}
#notificationChoices input{margin:0 5px 0 0}
#notificationPreview pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:10px;background:#edf3fa;font:inherit}
#notificationJobs li{margin:8px 0}

#bookingMessage:not(:empty){margin-top:16px;padding:14px 16px;border:1px solid #9abc9d;border-radius:8px;background:#e3f0e5;color:#21472f}
#bookingMessage strong{display:block;font-size:1.125rem}
#bookingMessage p{margin:6px 0 0;white-space:pre-line}
