/* The daily calendar stays in view. Primary modules also remain accessible from the bottom bar. */
#workspace .daily{margin-left:0;padding:0 24px 24px}
#workspace .daily .topbar{position:sticky;top:0;z-index:15;height:68px;min-height:68px;padding:6px 0;gap:16px;background:#fff}
#workspace .workspace-menu-toggle{display:flex;align-items:center;gap:8px;flex-shrink:0;min-height:48px;margin:0;padding:2px 10px 2px 4px;border:0;border-radius:6px;background:#202321;color:#e2c579;cursor:pointer}
#workspace .workspace-menu-toggle img{width:68px;height:46px;object-fit:contain}
#workspace .workspace-menu-toggle>span{display:flex;align-items:center;gap:5px;font-size:calc(13px * var(--software-scale,1))}
#workspace .workspace-menu-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
#workspace .workspace-current-view{display:block;flex:1;color:#30352f;font-size:calc(18px * var(--software-scale,1));line-height:1.2}
#workspace .rail{position:fixed;inset:0 auto 0 0;z-index:60;display:flex;flex-direction:column;gap:0;width:min(340px,calc(100vw - 32px));height:100vh;height:100dvh;padding:18px 16px max(22px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;transform:translateX(-100%);visibility:hidden;transition:transform .18s ease,visibility .18s}
#workspace .rail>img{display:block;width:130px;height:88px;object-fit:contain;margin:6px auto 12px}
#workspace .rail-label{display:block;padding:4px 10px;text-align:center}
#workspace .rail>.preview-badge{display:block;margin:6px auto 18px;font-size:calc(10px * var(--software-scale,1))}
#workspace .rail nav{display:block;flex:none;overflow:visible}
#workspace .rail nav button,#workspace .rail nav>a{display:flex;align-items:center;gap:12px;min-height:48px;width:100%;margin:0 0 4px;padding:12px 14px;font-size:calc(1rem * var(--software-scale,1));line-height:1.4;text-align:left;white-space:normal}
#workspace .rail nav button span,#workspace .rail nav>a span{display:inline-block;width:23px;margin:0;font-size:calc(20px * var(--software-scale,1))}
#workspace .rail-bottom{display:block;position:static;margin-top:auto;padding-top:20px}
#workspace .rail-bottom>a{display:block;margin:12px 0;font-size:calc(14px * var(--software-scale,1))}
#workspace .rail-bottom .profile{display:flex;align-items:center;gap:10px}
#workspace .rail-bottom button{min-height:44px;font-size:calc(14px * var(--software-scale,1))}
#workspace .workspace-menu-close{display:block;position:absolute;right:10px;top:10px;width:44px;height:44px;border:1px solid #ffffff30;border-radius:8px;background:transparent;color:#fff;font-size:calc(28px * var(--software-scale,1));cursor:pointer}
#workspace .workspace-menu-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:59;width:100%;height:100%;border:0;border-radius:0;background:#10161285;touch-action:none}
body.workspace-menu-open{overflow:hidden}
body.workspace-menu-open #workspace .rail{transform:translateX(0);visibility:visible}
#workspace .agenda-menu-options{flex:none;margin-top:12px;padding:14px 0;border-top:1px solid #ffffff20;color:#e1e4df;font-size:calc(14px * var(--software-scale,1))}
#workspace .agenda-menu-options summary{cursor:pointer;min-height:30px;line-height:1.5}
#workspace .agenda-menu-options>label{display:block;margin:16px 0 7px}
#workspace .agenda-menu-options select,#workspace .agenda-menu-options button{max-width:100%;min-height:44px;padding:10px 12px;border:1px solid #ffffff40;border-radius:6px;background:#30362f;color:#fff;font:inherit;cursor:pointer}
#workspace .agenda-menu-options select{width:100%}
#workspace .agenda-menu-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
#workspace #team-picker{position:static;margin:16px 0}
#workspace #team-options{position:static;width:auto;margin:10px 0 0;padding:12px;border:1px solid #ffffff30;border-radius:6px;background:transparent;color:inherit;box-shadow:none}
#workspace #team-options label{display:flex;align-items:center;gap:9px;min-height:40px;margin:0;color:inherit}
#workspace #team-options input{accent-color:#c7a357;width:18px;height:18px}
#workspace #team-options legend{color:#ddd}
#workspace .agenda-menu-options .planning-summary,#workspace .agenda-menu-options .daily-foot{margin:14px 0 0;padding:0;color:#bdc5bb;font-size:calc(12px * var(--software-scale,1));line-height:1.6;background:transparent;border:0}
#workspace .agenda-menu-options .legend{display:flex;flex-direction:column;gap:10px;margin:14px 0 0;padding:0;background:transparent;border:0;color:#e0e3dd;font-size:calc(12px * var(--software-scale,1))}
#workspace #team-reminder{display:block;margin:10px 0 0;padding:0;background:transparent;border:0;color:#e0e3dd;font-size:calc(13px * var(--software-scale,1));line-height:1.6}
#workspace #team-reminder a{display:block;margin-top:10px;color:#dfbd6d}
#workspace .daily:has(#agenda-screen:not([hidden])){height:100vh;height:100dvh;display:flex;flex-direction:column;padding:0;background:#fff}
#workspace .daily:has(#agenda-screen:not([hidden]))>.topbar{flex:none;padding:6px 16px}
#agenda-screen:not([hidden]){flex:1;display:flex;flex-direction:column;min-height:0}
#agenda-screen .agenda-panel{flex:1;min-height:0;display:flex;flex-direction:column;border:0;border-radius:0;box-shadow:none;background:#fff}
#agenda-screen .agenda-daybar{flex:none;display:grid;grid-template-columns:64px minmax(0,1fr) 64px;align-items:center;min-height:60px;padding:0 8px;border-bottom:1px solid #dce0db;background:#fff}
#agenda-screen .agenda-daybar>button{display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;background:transparent;color:#876d25;cursor:pointer}
#agenda-screen #next{justify-self:end}
#agenda-screen .agenda-daybar>button:hover{background:#f4f1e8}
#agenda-screen .agenda-daybar svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#agenda-screen .agenda-date-label{position:relative;display:flex;align-items:center;justify-content:center;justify-self:center;min-height:48px;max-width:100%;padding:0 8px;cursor:pointer;border-radius:6px}
#agenda-screen .agenda-date-display{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;font-size:calc(18px * var(--software-scale,1));pointer-events:none}
#agenda-screen #day-weekday::first-letter{text-transform:uppercase}
#agenda-screen #day-number{display:grid;place-items:center;min-width:34px;min-height:34px;font-weight:400}
#agenda-screen #day-number.is-today{border-radius:50%;background:#e66d6f;color:#fff}
#agenda-screen #agenda-date{position:absolute;inset:0;width:100%;height:100%;margin:0;border:0;opacity:0;cursor:pointer}
#agenda-screen #agenda-date::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;padding:0;margin:0;cursor:pointer}
#agenda-screen .agenda-date-label:focus-within,#agenda-screen .agenda-daybar>button:focus-visible,#workspace .workspace-menu-toggle:focus-visible{outline:2px solid #95792e;outline-offset:-2px}
#agenda-screen .agenda-message{flex:none;padding:10px 18px;background:#faf3df;color:#5d4c23;border-bottom:1px solid #e4d9bd;font-size:calc(14px * var(--software-scale,1))}
#agenda-screen .calendar{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#agenda-screen .calendar-grid{grid-template-columns:65px repeat(var(--columns),minmax(170px,1fr));align-items:start}
#agenda-screen .column-head{min-height:64px;padding:10px 12px;gap:10px;border-bottom:1px solid #d7ddd5;background:#fafbf9;align-self:stretch}
#agenda-screen .column-head strong{font-size:calc(16px * var(--software-scale,1));line-height:1.4;overflow-wrap:anywhere}
#agenda-screen .column-head small{font-size:calc(11px * var(--software-scale,1));color:#757d72;line-height:1.4}
#agenda-screen .column-head .avatar{width:32px;height:32px;min-width:32px;font-size:calc(14px * var(--software-scale,1))}
#agenda-screen .time-column-head{left:0;z-index:4;padding:0}
#agenda-screen .hours{position:sticky;left:0;z-index:3;background:#fff;border-right:1px solid #e1e5df}
#agenda-screen .hours span{height:var(--slot-height);padding:8px 9px 0 0;font-size:calc(14px * var(--software-scale,1));line-height:1.4;color:#858b82}
#agenda-screen .hours span:nth-child(odd){color:#394137}
#agenda-screen .agenda-column{background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--slot-height) - 1px),#e9ece7 calc(var(--slot-height) - 1px),#e9ece7 var(--slot-height));border-right:1px solid #e1e5df}
#agenda-screen .available-slot{height:var(--slot-height);border:0;border-radius:0;background:transparent}
#agenda-screen .available-slot>span{opacity:0}
#agenda-screen .available-slot:hover,#agenda-screen .available-slot:focus-visible{background:#f1f4ee;outline:2px solid #9a853c;outline-offset:-2px}
#agenda-screen .available-slot:hover>span,#agenda-screen .available-slot:focus-visible>span{opacity:1}
#agenda-screen .closed-range{background:#e9eae7;border:0;border-bottom:1px solid #dddfda}
#agenda-screen .closed-range>span{display:none}
#agenda-screen .appointment{left:3px;right:3px;border-radius:5px;padding:7px 10px;box-shadow:none;overflow:hidden}
#agenda-screen .appointment strong{font-size:calc(14px * var(--software-scale,1));line-height:1.4}
#agenda-screen .appointment small{font-size:calc(10px * var(--software-scale,1));line-height:1.4}
#agenda-screen .appointment p{font-size:calc(13px * var(--software-scale,1));line-height:1.4}
#agenda-screen .appointment.break{border:0}
#workspace [hidden]{display:none!important}
@media(max-width:760px){
 #workspace .daily{padding:0 14px 20px}
 #workspace .daily .topbar{height:60px;min-height:60px}
 #workspace .daily:has(#agenda-screen:not([hidden]))>.topbar{padding:4px 10px}
 #workspace .workspace-menu-toggle img{width:55px;height:40px}
 #workspace .workspace-menu-toggle>span{font-size:calc(12px * var(--software-scale,1))}
 #workspace .workspace-current-view{font-size:calc(16px * var(--software-scale,1))}
 #agenda-screen .agenda-daybar{grid-template-columns:44px minmax(0,1fr) 44px;min-height:56px;padding:0 4px}
 #agenda-screen .agenda-daybar>button{width:44px;height:44px}
 #agenda-screen .agenda-date-label{padding:0 3px}
 #agenda-screen .agenda-date-display{font-size:calc(15px * var(--software-scale,1));gap:4px}
 #agenda-screen #day-number{min-width:30px;min-height:30px}
 #agenda-screen .column-head{padding:8px;gap:8px}
}
@media(prefers-reduced-motion:reduce){#workspace .rail{transition:none}}

.agenda-setup-note{margin:0;padding:10px 14px;font-size:12px;color:#645b46;background:#faf6e9;border-bottom:1px solid #e6decb}

/* Every half hour is a named, independently selectable row. */
#agenda-screen .hours span{display:block!important;visibility:visible!important;opacity:1!important;color:#394137;font-variant-numeric:tabular-nums}
#agenda-screen .hours .half-hour{color:#575d52;border-bottom:1px dashed #cdd2c8;font-size:calc(13px * var(--software-scale,1))}
#agenda-screen .hours .full-hour{font-weight:700;border-top:1px solid #cdd2c8}
#agenda-screen .agenda-column{background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--slot-height) - 1px),#d6dbd1 calc(var(--slot-height) - 1px),#d6dbd1 var(--slot-height),transparent var(--slot-height),transparent calc(var(--slot-height)*2 - 1px),#b9c2b1 calc(var(--slot-height)*2 - 1px),#b9c2b1 calc(var(--slot-height)*2))}
#agenda-screen .closed-slot{pointer-events:auto;width:100%;cursor:pointer;border-radius:0}
#agenda-screen .closed-slot:focus-visible,#agenda-screen .closed-slot:hover{outline:2px solid #9a853c;outline-offset:-2px;background:#e0e4da}
.agenda-icon{width:24px;height:24px;flex-shrink:0;vertical-align:middle}
.agenda-unavailable strong{display:flex;gap:6px;align-items:center}
.agenda-unavailable .agenda-icon{width:19px;height:19px}
.slot-actions{display:grid;gap:12px;margin:24px 0}
.slot-action{display:flex;align-items:center;gap:12px;width:100%;min-height:78px;padding:14px;border:1px solid #d3d9cc;background:#fff;border-radius:10px;text-align:left;color:#293626}
.slot-action>span:nth-child(2){flex:1}.slot-action strong,.slot-action small{display:block}.slot-action small{font-size:12px;line-height:1.5;color:#65715d;margin-top:4px}.slot-action .agenda-icon{color:#98772c;width:28px;height:28px}.slot-action:hover{background:#f2f3eb;border-color:#b9a061}

/* Persistent three-part navigation on all screen sizes. */
#workspace{--bottom-nav-height:calc(64px * var(--software-scale,1) + env(safe-area-inset-bottom,0px))}
#workspace .daily{padding-bottom:calc(var(--bottom-nav-height) + 24px)}
#workspace .daily:has(#agenda-screen:not([hidden])){padding-bottom:var(--bottom-nav-height)}
#workspace .workspace-bottom-nav{position:fixed;inset:auto 0 0;z-index:30;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:var(--bottom-nav-height);padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);background:#fff;border-top:1px solid #dce0db;box-shadow:0 -2px 8px #20232108}
#workspace .workspace-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:48px;margin:0;padding:5px 8px;border:0;border-top:3px solid transparent;border-radius:0;background:transparent;color:#657064;font:inherit;font-size:calc(13px * var(--software-scale,1));line-height:1.3}
#workspace .workspace-bottom-nav button+button{border-left:1px solid #edf0eb}
#workspace .workspace-bottom-nav svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
#workspace .workspace-bottom-nav [aria-current="page"]{color:#806321;background:#faf6eb;border-top-color:#b18b3e;font-weight:700}
#workspace .workspace-bottom-nav button:hover{background:#f3f4ef}
#workspace .workspace-bottom-nav button:focus-visible{outline:3px solid #947322;outline-offset:-4px}

#workspace .workspace-current-view[hidden]{display:none}

/* Un rendez-vous réglé reste consultable, avec sa couleur atténuée. */
.appointment.is-paid{filter:saturate(.25);isolation:isolate}
.appointment.is-paid::after{content:"";position:absolute;inset:0;border-radius:inherit;background:rgba(100,106,104,.16);pointer-events:none;z-index:-1}
.appointment.is-paid[role=button]:hover{filter:saturate(.25) brightness(.96)}
