/* Planning audits & formations — feuille de style commune (polices système : aucun appel à un service tiers) */
:root{
  --ink:#18212E;--ink2:#3D4756;--muted:#556070;--line:#E3E7EC;--line2:#C5CCD5;--bg:#EDF0F3;--soft:#F4F6F8;--white:#fff;
  --teal:#0B5F5F;--teal-d:#073F3F;--teal-l:#E1F0EF;
  --orange:#B4531A;--orange-l:#FCE9DC;--orange-d:#8A3F12;
  --violet:#4B3F9E;--violet-l:#EEEBFA;--red:#9B2C2C;--red-l:#FBE4E4;--green:#1D8A5B;
  --radius:14px;--font:Inter,"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:var(--font);color:var(--ink);background:var(--bg);font-size:15px;line-height:1.45}
a{color:var(--teal)}a:hover{color:var(--teal-d)}
h1,h2,h3{margin:0;font-weight:650;line-height:1.2}
h1{font-size:24px}h2{font-size:19px}h3{font-size:16px}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid #6FB6B6;outline-offset:2px}
.hidden{display:none!important}
.muted{color:var(--muted)}
.small{font-size:13px}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:14px}
label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:550}
label.check{flex-direction:row;align-items:flex-start;gap:10px;font-weight:400;font-size:13.5px;color:var(--ink2)}
label.check input{width:18px;height:18px;margin-top:2px;flex:none}
input[type=text],input[type=email],input[type=tel],input[type=password],input[type=number],input[type=date],input:not([type]),select,textarea{
  min-height:44px;padding:9px 12px;border:1px solid var(--line2);border-radius:8px;background:#fff;font-weight:400;width:100%}
textarea{resize:vertical;line-height:1.5}
fieldset{border:1px solid var(--line);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:12px}
legend{font-weight:650;padding:0 6px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border:none;border-radius:10px;background:var(--teal);color:#fff;font-weight:650;text-decoration:none;font-size:14.5px}
.btn:hover{background:var(--teal-d);color:#fff}
.btn.ghost{background:#fff;color:var(--teal);border:1px solid var(--teal)}
.btn.ghost:hover{background:var(--teal-l);color:var(--teal-d)}
.btn.plain{background:#fff;color:var(--ink);border:1px solid var(--line2)}
.btn.plain:hover{background:var(--soft);color:var(--ink)}
.btn.danger{background:#fff;color:var(--red);border:1px solid var(--line2)}
.btn.danger:hover{background:var(--red-l)}
.btn.violet{background:var(--violet)}
.btn.sm{min-height:36px;padding:0 12px;font-size:13.5px;border-radius:8px}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.alert{background:var(--red-l);color:var(--red);padding:10px 14px;border-radius:8px;margin:0}
.ok{background:var(--teal-l);color:var(--teal-d);padding:10px 14px;border-radius:8px;margin:0}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px}
.page-center{min-height:100vh;display:flex;align-items:flex-start;justify-content:center;padding:48px 16px}
.narrow{width:100%;max-width:520px;display:flex;flex-direction:column;gap:16px}
.badge{display:inline-flex;align-items:center;font-size:12px;font-weight:700;padding:3px 8px;border-radius:6px;white-space:nowrap}
.b-pending{background:var(--orange-l);color:var(--orange-d)}
.b-confirmed{background:var(--teal-l);color:var(--teal)}
.b-refused,.b-cancelled{background:var(--red-l);color:var(--red)}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 18px;border-radius:10px;font-size:14px;z-index:50;max-width:90vw;box-shadow:0 8px 24px rgba(0,0,0,.2)}
.toast.err{background:var(--red)}
dialog{border:none;border-radius:16px;padding:0;width:min(620px,94vw);max-height:90vh;box-shadow:0 20px 60px rgba(16,24,40,.25)}
dialog::backdrop{background:rgba(16,24,40,.45)}
.dlg-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line)}
.dlg-body{padding:20px 22px;display:flex;flex-direction:column;gap:14px;overflow:auto}
.icon-btn{width:44px;height:44px;border-radius:50%;border:none;background:transparent;display:inline-flex;align-items:center;justify-content:center}
.icon-btn:hover{background:var(--soft)}
table.list{width:100%;border-collapse:collapse;font-size:14px;min-width:640px}
table.list th{text-align:left;font-size:12px;color:var(--muted);font-weight:650;padding:10px 14px;letter-spacing:.03em}
table.list td{padding:12px 14px;border-top:1px solid var(--line);vertical-align:top}
.scroll-x{overflow-x:auto}
.kv{display:grid;grid-template-columns:120px 1fr;gap:6px 12px;font-size:14px}
.kv dt{color:var(--muted)}.kv dd{margin:0}

/* ----- Page client ----- */
.booking{width:100%;max-width:1080px;background:#fff;border-radius:16px;box-shadow:0 1px 2px rgba(16,24,40,.06),0 12px 32px rgba(16,24,40,.08);display:flex;flex-wrap:wrap;overflow:hidden}
.b-side{flex:1 1 280px;min-width:0;padding:32px 28px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:18px}
.b-main{flex:2 1 400px;min-width:0;padding:32px 28px;display:flex;flex-direction:column;gap:18px}
.b-slots{flex:1 1 240px;min-width:0;padding:32px 24px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:12px}
.b-wide{flex:3 1 560px;min-width:0;padding:32px;display:flex;flex-direction:column;gap:18px}
.avatar{width:52px;height:52px;border-radius:50%;background:var(--teal);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;flex:none}
.facts{display:flex;flex-direction:column;gap:10px;font-size:14px;color:var(--ink2)}
.facts div{display:flex;gap:10px;align-items:center}
.note{font-size:13px;line-height:1.55;color:var(--muted);padding:12px 14px;background:var(--soft);border-radius:10px}
.month-nav{display:flex;align-items:center;justify-content:space-between}
.month-nav .icon-btn{background:var(--teal-l)}
.month-nav .icon-btn[disabled]{background:var(--soft);cursor:not-allowed;opacity:.5}
.wk{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;font-size:12px;font-weight:650;color:var(--muted);text-align:center}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.cal>div{display:flex;justify-content:center}
.day{width:48px;height:48px;max-width:100%;border-radius:50%;border:none;font-size:15px;display:flex;align-items:center;justify-content:center;position:relative}
.day.off{color:#8A93A0;background:transparent}
.day.free{background:var(--teal-l);color:var(--teal);font-weight:700}
.day.half{background:#fff;color:var(--teal);font-weight:700;border:2px dashed var(--teal)}
.day.free:hover,.day.half:hover{background:#cfe6e4}
.day.sel{background:var(--teal)!important;color:#fff!important;border-color:var(--teal)}
.day.today::after{content:"";position:absolute;bottom:6px;width:5px;height:5px;border-radius:50%;background:currentColor}
.legend{display:flex;flex-wrap:wrap;gap:16px;font-size:13px;color:var(--muted)}
.legend span{display:flex;align-items:center;gap:8px}
.dot{width:14px;height:14px;border-radius:50%;display:inline-block}
.slot{min-height:48px;border-radius:10px;border:1px solid var(--teal);background:#fff;color:var(--teal);font-weight:650;font-size:15px;padding:0 12px}
.slot:hover{background:var(--teal-l)}
.slot.sel{background:var(--teal);color:#fff;border-width:2px}
.mine{display:flex;flex-direction:column;gap:10px;padding-top:16px;border-top:1px solid var(--line)}
.mine-item{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid var(--line);border-radius:10px;font-size:14px}
.done{align-items:center;text-align:center;padding:56px 40px}
.check-circle{width:64px;height:64px;border-radius:50%;background:var(--teal-l);display:flex;align-items:center;justify-content:center}

/* ----- Administration ----- */
.topbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:12px 24px;background:#fff;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:12px;font-weight:650;font-size:17px}
.logo{width:40px;height:40px;border-radius:10px;background:var(--teal);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}
.shell{display:flex;flex-wrap:wrap;min-height:calc(100vh - 65px)}
.side{flex:1 1 220px;max-width:250px;padding:18px 12px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:4px}
.side button{min-height:44px;padding:0 12px;border:none;border-radius:8px;background:transparent;color:var(--ink2);font-weight:600;font-size:14.5px;text-align:left;display:flex;align-items:center;justify-content:space-between}
.side button:hover{background:var(--soft)}
.side button[aria-current=page]{background:var(--teal-l);color:var(--teal)}
.count{min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--orange);color:#fff;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.content{flex:999 1 560px;min-width:0;padding:24px 28px;display:flex;flex-direction:column;gap:20px}
.planning{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-start}
.planning>.card{flex:3 1 560px;min-width:0;display:flex;flex-direction:column;gap:14px}
.planning>aside{flex:1 1 290px;min-width:0;display:flex;flex-direction:column;gap:12px}
.mgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.mgrid .h{background:var(--soft);padding:8px;font-size:12px;font-weight:650;color:var(--muted)}
.cell{background:#fff;min-height:92px;padding:6px;display:flex;flex-direction:column;gap:4px;min-width:0}
.cell.we,.cell.pad{background:#FAFBFC}
.cell.is-today{box-shadow:inset 0 0 0 2px var(--teal)}
.cell .num{align-self:flex-start;min-width:32px;height:28px;border:none;background:transparent;border-radius:6px;font-size:13px;font-weight:650;color:var(--ink2);padding:0 6px}
.cell .num:hover{background:var(--teal-l);color:var(--teal)}
.chip{display:block;width:100%;text-align:left;font-size:12px;font-weight:600;padding:4px 6px;border-radius:5px;border:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
button.chip:hover{filter:brightness(.95)}
.c-absence{background:#DDE1E6;color:var(--ink2)}
.c-greta{background:var(--violet);color:#fff}
.c-indispo{background:#5B6576;color:#fff}
.c-dispo{background:#fff;color:var(--green);border:1px dashed var(--green)}
.c-holiday{background:var(--soft);color:var(--muted)}
.c-confirmed{background:var(--teal);color:#fff}
.c-pending{background:var(--orange-l);color:var(--orange-d);border:1px solid var(--orange)}
.sw{width:12px;height:12px;border-radius:3px;display:inline-block}
.req{display:flex;flex-direction:column;gap:8px}
.req .top{display:flex;justify-content:space-between;gap:8px}
.toggle{width:52px;height:30px;border-radius:15px;border:none;padding:3px;display:flex;background:#A7AFBA;justify-content:flex-start;flex:none}
.toggle[aria-pressed=true]{background:var(--teal);justify-content:flex-end}
.toggle span{width:24px;height:24px;border-radius:50%;background:#fff;display:block}
.list-item{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;font-size:14px}
.li-greta{background:var(--violet-l)}.li-indispo{background:var(--soft)}.li-dispo{background:#E8F5EE}
.copy{display:flex;gap:8px}.copy input{font-size:13px}
@media (max-width:640px){
  .b-side,.b-slots{border:none}
  .b-side{border-bottom:1px solid var(--line)}
  .b-main,.b-side,.b-slots,.b-wide{padding:22px 18px}
  .content{padding:18px 14px}
  .side{max-width:none;flex-direction:row;flex-wrap:wrap;border-right:none;border-bottom:1px solid var(--line)}
  .side button{flex:1 1 auto}
  .cell{min-height:64px;padding:3px}
  .chip{font-size:10.5px;padding:2px 3px}
  .day{width:40px;height:40px}
}
