/* Layout: barre de commande compacte, grille planning pleine largeur (défilement horizontal interne), récapitulatif en dessous */
:root {
  /* Couleurs de la Clinique Drouot : bleu #334271 */
  --bg: #EEF1F7; --surface: #FFFFFF; --surface-2: #E2E7F1; --fg: #141A2C; --muted: #5A6480;
  --line: #CDD5E4; --accent: #334271; --accent-fg: #FFFFFF; --night: #2F6FD0;
  --off: #E8EBF2; --ferie: #F6E7CF; --warn: #B4540A; --danger: #B83A26; --ok: #2E7D4F;
  --today: #334271; --vacs: #EEE9FA; --cta: #C8322A; --cta-fg: #FFFFFF;
  --t-plan: #2F6FD0; --t-clin: #1E8573; --k-douleur: #7A5CC8; --k-alr: #0E7490;
  --f-display: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E1220; --surface: #151B2C; --surface-2: #1C2438; --fg: #E4E8F3; --muted: #97A2BD;
  --line: #2A3350; --accent: #9DB0EA; --accent-fg: #0B1430; --night: #7FB0FF;
  --off: #121828; --ferie: #2B2216; --warn: #F0A15E; --danger: #F07A64; --ok: #6FCB94;
  --today: #9DB0EA; --vacs: #262138; --cta: #E0473B; --cta-fg: #FFFFFF; --t-plan: #7FB0FF; --t-clin: #5CC9B3; --k-douleur: #B9A2F2; --k-alr: #5FC4DD; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0E1220; --surface: #151B2C; --surface-2: #1C2438; --fg: #E4E8F3; --muted: #97A2BD;
  --line: #2A3350; --accent: #9DB0EA; --accent-fg: #0B1430; --night: #7FB0FF;
  --off: #121828; --ferie: #2B2216; --warn: #F0A15E; --danger: #F07A64; --ok: #6FCB94;
  --today: #9DB0EA; --vacs: #262138; --cta: #E0473B; --cta-fg: #FFFFFF; --t-plan: #7FB0FF; --t-clin: #5CC9B3; --k-douleur: #B9A2F2; --k-alr: #5FC4DD; color-scheme: dark; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 14px; line-height: 1.4; }
.wrap { padding-block: 20px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; max-width: 1800px; margin: 0 auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.brand { display: grid; gap: 2px; min-width: 0; }
.brand .eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.brand h1 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 30px; letter-spacing: .01em; line-height: 1; text-wrap: balance; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status[data-s="ok"] i { background: var(--ok); }
.status[data-s="ro"] i { background: var(--warn); }
.status[data-s="off"] i { background: var(--danger); }

.bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.nav { display: flex; align-items: center; gap: 6px; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 6px; min-height: 34px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
.btn.icon { width: 34px; padding: 0; display: inline-grid; place-items: center; font-size: 16px; }
.btn.danger { color: var(--danger); }
.period { font-family: var(--f-display); font-size: 22px; font-weight: 600; min-width: 0; padding: 0 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 6px 12px; min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.spacer { flex: 1; }

.palette { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.palette .lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-right: 4px; }
.chip { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 4px; border: 1px solid transparent; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c); font-size: 12px; }
.chip b { font-family: var(--f-mono); font-weight: 600; font-size: 12px; }
.chip[aria-pressed="true"] { outline: 2px solid var(--fg); outline-offset: 1px; }
.chip.plain { background: var(--surface-2); border-left-color: var(--line); }
.hint { font-size: 12px; color: var(--muted); }

.banner { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }

/* Grille */
.grid-wrap { overflow: auto; max-height: 86vh; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table.grid { border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.grid th, .grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; text-align: center; vertical-align: middle; white-space: nowrap; background: var(--surface); }
.grid thead { position: sticky; top: 0; z-index: 5; }
.grid thead th { position: static; background: var(--surface-2); font-weight: 600; }
.grid thead tr.r1 th { height: 42px; }
.grid thead tr.r2 th { height: 22px; font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.grid .rowh { position: sticky; left: 0; z-index: 2; text-align: left; padding: 2px 10px; background: var(--surface); min-width: 170px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.grid thead th.rowh { z-index: 4; background: var(--surface-2); }
.mode-month .grid .rowh { min-width: 120px; max-width: 150px; }
.grid .rowh .nm { font-weight: 500; }
.grid .rowh .tri { font-family: var(--f-mono); font-size: 11px; color: var(--muted); margin-right: 6px; }
.dayh { line-height: 1.15; padding: 2px 4px !important; }
.dayh .dw { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.dayh .dn { font-family: var(--f-display); font-size: 18px; font-weight: 700; }
.dayh .hn { display: block; font-size: 9px; color: var(--warn); font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; margin: 0 auto; }
.mode-month .dayh .hn { display: none; }
.dayh.today .dn { color: var(--accent-fg); background: var(--today); border-radius: 4px; padding: 0 5px; }
th.dayh.off, td.off { background: var(--off); }
th.dayh.ferie, td.ferie { background: var(--ferie); }
.grid thead th.dayh.off { background: color-mix(in srgb, var(--off) 70%, var(--surface-2)); }
.grid thead th.dayh.ferie { background: var(--ferie); }

.grid tr.group th { text-align: left; padding: 3px 10px; font-family: var(--f-display); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); position: sticky; left: 0; }
.grid tr.group td { background: var(--surface-2); }
.grid tr.oncall .rowh { color: var(--night); font-weight: 600; }
.grid td.oc { height: 26px; font-family: var(--f-mono); font-weight: 600; color: var(--night); background: color-mix(in srgb, var(--night) 7%, var(--surface)); }
.grid td.oc.empty { color: var(--muted); font-weight: 400; }
.grid td.oc.need { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--warn) 14%, var(--surface)) 0 6px, var(--surface) 6px 12px); color: var(--warn); }
.grid td.na { background: var(--off); }

td.cell { --c: transparent; height: 30px; min-width: 66px; position: relative; }
.mode-month td.cell { min-width: 36px; height: 24px; }
td.cell.has { background: color-mix(in srgb, var(--c) 18%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); }
td.cell b { font-family: var(--f-mono); font-weight: 600; font-size: 12px; display: block; }
td.cell small { display: none; font-size: 10px; color: var(--muted); max-width: 84px; overflow: hidden; text-overflow: ellipsis; margin: 0 auto; }
.mode-month td.cell small { display: none; }
td.half-a { border-right-width: 2px !important; }
td.off { min-width: 34px; font-size: 10px; color: var(--muted); }
.mode-month td.off { min-width: 24px; }
td.off .aj { display: inline-block; font-family: var(--f-mono); font-weight: 600; color: var(--night); }
.edit td.cell, .edit td.oc { cursor: pointer; }
.edit td.cell:hover, .edit td.oc:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.nightmark::after { content: "A"; position: absolute; right: 2px; bottom: 1px; font-size: 9px; font-family: var(--f-mono); font-weight: 600; color: var(--surface); background: var(--night); border-radius: 2px; padding: 0 2px; line-height: 12px; }
td.off.nightmark { position: relative; }
tr.foot td, tr.foot th { background: var(--surface-2); font-family: var(--f-mono); font-size: 11px; height: 24px; color: var(--muted); }
tr.foot td.zero { color: var(--danger); font-weight: 600; }
tr.foot .rowh { font-family: var(--f-body); background: var(--surface-2); }
.empty-row td { padding: 18px 12px !important; text-align: left !important; color: var(--muted); white-space: normal !important; position: sticky; left: 0; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); align-items: center; }
.legend .k { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); display: inline-block; position: relative; }

/* Récap */
section.recap { display: grid; gap: 10px; }
section.recap h2 { margin: 0; font-family: var(--f-display); font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.recap-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table.rc { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 13px; }
table.rc th, table.rc td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.rc th:first-child, table.rc td:first-child { text-align: left; }
table.rc thead th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--surface-2); }
table.rc td.n { color: var(--night); font-weight: 600; }
table.rc .role { font-size: 11px; color: var(--muted); margin-left: 6px; font-family: var(--f-mono); }

/* Popover & dialogues */
#pop { position: fixed; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px; width: 280px; max-height: 70vh; overflow: auto; display: grid; gap: 8px; }
#pop h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
#pop .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#pop .opts.one { grid-template-columns: 1fr; }
#pop .chip { justify-content: flex-start; cursor: pointer; width: 100%; text-align: left; padding: 6px 9px; }
#pop .chip .cnt { margin-left: auto; font-family: var(--f-mono); color: var(--muted); font-size: 11px; }
@media (max-width: 600px) { #pop { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; border-radius: 12px 12px 0 0; padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); } }

.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5,15,14,.45); display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--surface); border-radius: 10px; border: 1px solid var(--line); width: min(680px, 100%); max-height: 88vh; overflow: auto; display: grid; gap: 14px; padding: 18px; }
.dialog h2 { margin: 0; font-family: var(--f-display); font-size: 22px; }
.dialog .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rows { display: grid; gap: 6px; }
.row { display: grid; gap: 6px; align-items: center; }
.team .row { grid-template-columns: minmax(0,1fr) 64px 150px auto; }
.row input[type=number] { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 5px; padding: 6px 6px; min-width: 0; width: 100%; }
.team .row.rx { grid-template-columns: minmax(0, 1fr); margin: -2px 0 6px 10px; padding-left: 10px; border-left: 2px solid var(--line); }
.row.rx label { display: grid; gap: 2px; font-size: 11px; color: var(--muted); min-width: 0; }
.row input[type=date] { border: 1px solid var(--line); background: var(--bg); border-radius: 5px; padding: 5px 6px; min-width: 0; width: 100%; color: var(--fg); }
.grid .rowh .sub { display: block; font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.dialog:has(.tpl) { width: min(1120px, 100%); }
.tpl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table.tpl { border-collapse: collapse; font-size: 12px; }
table.tpl th, table.tpl td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 3px; text-align: center; white-space: nowrap; }
table.tpl thead th { background: var(--surface-2); font-size: 11px; color: var(--muted); font-weight: 600; }
table.tpl tbody th { text-align: left; padding: 3px 10px; font-weight: 500; position: sticky; left: 0; background: var(--surface); }
table.tpl .tri { font-family: var(--f-mono); font-size: 11px; color: var(--muted); margin-right: 6px; }
table.tpl td.has { background: color-mix(in srgb, var(--c) 18%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); }
table.tpl td.half-a { border-right-width: 2px; }
table.tpl select { font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); padding: 3px 2px; width: 62px; }
.tpl-apply { display: grid; gap: 6px; justify-items: start; }
table.tpl select.wide { width: 86px; }
.tabs { flex-wrap: wrap; justify-self: start; }
.surg-l .row { grid-template-columns: minmax(0,1fr) 64px minmax(0,1fr) auto; }
.rooms-l .row { grid-template-columns: 80px minmax(0,1fr) auto; }
.sabs-list .row { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) 130px; min-height: 46px; align-items: center; }
.sabs-list .row > .ops { justify-content: flex-end; }
.sabs-top { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.sabs-list .row.add { grid-template-columns: minmax(0,1fr) auto auto auto; }
.sabs-when { display: inline-flex; gap: 4px; } .sabs-when input { width: 150px; } .sabs-when select { width: auto; }
.ratios { display: flex; flex-wrap: wrap; gap: 16px; }
.ratios label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.ratios input { width: 90px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 5px; padding: 6px 8px; }
.grid td.sv { height: 26px; font-family: var(--f-mono); font-size: 11px; font-weight: 600; }
.grid td.sopen { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.grid td.sabs { color: var(--danger); text-decoration: line-through; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--danger) 12%, var(--surface)) 0 5px, var(--surface) 5px 10px); }
tr.foot td.ok { color: var(--ok); font-weight: 600; }
tr.foot td.over { color: var(--warn); }
td.cell.out:not(.has) { background: repeating-linear-gradient(45deg, var(--off) 0 4px, var(--surface) 4px 8px); }
.acts .row { grid-template-columns: 70px minmax(0,1fr) 130px 44px auto; }
.row input[type=text], .row select { border: 1px solid var(--line); background: var(--bg); border-radius: 5px; padding: 6px 8px; min-width: 0; width: 100%; }
.row input[type=color] { width: 44px; height: 32px; border: 1px solid var(--line); border-radius: 5px; padding: 2px; background: var(--bg); }
.row .ops { display: flex; gap: 4px; }
.row .ops .btn { min-height: 30px; padding: 4px 8px; }
.row.add { padding-top: 10px; border-top: 1px dashed var(--line); }
.cols-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 560px) {
  .team .row { grid-template-columns: 1fr 64px; }
  .acts .row { grid-template-columns: 64px 1fr; }
  .team .row.rx { grid-template-columns: 1fr 1fr; }
  .surg-l .row, .sabs-list .row, .sabs-list .row.add { grid-template-columns: 1fr 1fr; }
  .rooms-l .row { grid-template-columns: 70px 1fr; }
  .row .ops { grid-column: 1 / -1; justify-content: flex-end; }
  .cols-h { display: none !important; }
}
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 70; background: var(--fg); color: var(--bg); padding: 9px 14px; border-radius: 6px; font-size: 13px; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { td.cell, td.oc { transition: background-color .15s; } }

/* Connexion et comptes */
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.who { font-size: 13px; color: var(--muted); }
.who b { color: var(--fg); font-weight: 600; }
.badge { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--muted); margin-left: 6px; }
.badge.admin { background: var(--accent); color: var(--accent-fg); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.login-card { width: min(380px, 100%); display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
.login-card .eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.login-card h1 { margin: 0 0 12px; font-family: var(--f-display); font-size: 28px; font-weight: 700; }
.login-card label { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.login-card input { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 10px 12px; font-size: 16px; }
.login-card .btn { margin-top: 12px; min-height: 42px; }
.login-err { margin: 4px 0 0; color: var(--danger); font-size: 13px; }
.users .row { grid-template-columns: 110px minmax(0,1fr) 120px minmax(0,1.1fr) 120px minmax(0,1fr) auto; }
.users .row .login-id { font-family: var(--f-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.row input[type=password] { border: 1px solid var(--line); background: var(--bg); border-radius: 5px; padding: 6px 8px; min-width: 0; width: 100%; color: var(--fg); }
.pwform { display: grid; gap: 8px; max-width: 360px; }
.pwform label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pwform input { border: 1px solid var(--line); background: var(--bg); border-radius: 5px; padding: 8px 10px; color: var(--fg); }
table.audit { border-collapse: collapse; width: 100%; font-size: 12px; }
table.audit td, table.audit th { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.audit th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
table.audit td:first-child { font-family: var(--f-mono); white-space: nowrap; color: var(--muted); }
.par-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 560px) { .users .row { grid-template-columns: 1fr 1fr; } .users .row.cols-h { display: none; } }
@media (max-width: 600px) {
  .grid .rowh, .mode-month .grid .rowh { min-width: 104px; max-width: 120px; padding: 4px 6px; }
  .grid .rowh .tri { display: block; margin: 0; }
  .brand h1 { font-size: 24px; }
}

/* Absences */
.absform { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.absform label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 0; }
.absform input, .absform select { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 5px; padding: 7px 8px; font-weight: 400; min-width: 0; width: 100%; }
.abs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.abs-dates { display: grid; grid-template-columns: 1fr 130px 1fr 130px; gap: 10px; }
#abPreview { margin: 0; color: var(--fg); }
#abPreview.bad { color: var(--danger); }
.abs-h { margin: 0; font-size: 14px; }
.abs-list { display: grid; gap: 6px; }
.abs-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.abs-main { min-width: 0; }
@media (max-width: 600px) { .abs-2, .abs-dates { grid-template-columns: 1fr 1fr; } }

/* Équité des astreintes */
table.rc td.gap { font-weight: 600; }
table.rc td.gap.under { color: var(--danger); }
table.rc td.gap.over { color: var(--warn); }
table.rc td.gap.even { color: var(--ok); }

/* Chirurgiens présents */
.grid td.sv { height: auto; min-height: 30px; padding: 3px 2px !important; white-space: normal; vertical-align: top; }
.grid td.sv b { display: block; font-size: 13px; }
.grid td.sv .snames { display: block; font-size: 9px; font-weight: 500; line-height: 1.25; color: var(--muted); max-width: 70px; margin: 0 auto; word-break: break-word; }
.grid td.sv s { color: var(--danger); }
.grid td.sabs { text-decoration: none; }
table.tpl-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
table.tpl-check td { min-width: 38px; }
tr.tpl-total th, tr.tpl-total td { background: var(--surface-2); font-family: var(--f-mono); font-size: 12px; font-weight: 600; }

.vacbtn { width: 100%; min-width: 44px; min-height: 30px; border: 1px dashed var(--line); background: transparent; border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--accent); padding: 0 2px; }
.vacbtn:hover { border-color: var(--accent); }
table.tpl td.two { background: color-mix(in srgb, var(--c) 34%, var(--surface)); }

/* Bulle chirurgiens présents */
.grid td.sv[data-k] { cursor: help; }
#stip { position: fixed; z-index: 55; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 10px 12px; width: max-content; max-width: min(340px, calc(100vw - 16px)); font-size: 13px; }
#stip .st-h { font-weight: 600; }
#stip .st-n { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
#stip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
#stip li { display: grid; grid-template-columns: 52px 1fr auto; gap: 6px; align-items: baseline; }
#stip .tri { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
#stip .st-2 { font-size: 11px; font-weight: 700; color: var(--accent); }
#stip .st-abs { margin-top: 6px; font-size: 12px; color: var(--danger); }

.absform .emb { margin: 0; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--fg); }

table.tpl-rooms select.wide { width: 92px; }
table.tpl-rooms tbody th { white-space: nowrap; }
#stip li.off span:nth-child(2) { text-decoration: line-through; color: var(--muted); }
#stip .st-off { font-size: 11px; font-weight: 700; color: var(--danger); }

table.rc th.grp { text-align: center; border-left: 1px solid var(--line); }
table.rc tr.eq-tot td { font-weight: 600; background: var(--surface-2); }

.mailbox { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.mailbox h3 { margin: 0; font-size: 14px; }
.mailbox p { margin: 0; }
.mailtest { display: flex; flex-wrap: wrap; gap: 8px; }
.mailtest input { flex: 1 1 220px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 5px; padding: 6px 8px; }
.row input[type=email], .row input[type=tel] { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 5px; padding: 6px 8px; min-width: 0; width: 100%; }

.row input.codein { font-family: var(--f-mono); font-weight: 600; text-transform: uppercase; border-left: 3px solid var(--c); }

/* Impression / PDF de la période affichée */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #eef2f1; --fg: #000; --muted: #444; --line: #bbb; color-scheme: light; }
  body { font-size: 10px; }
  .wrap { padding: 0 !important; gap: 6px; max-width: none; }
  .account, .nav, .seg, .bar .btn, #palette, #banner, #app:not(.show-synth) section.recap, #toast, #pop, #stip, .overlay { display: none !important; }
  .bar { display: block; }
  .period { font-size: 16px; }
  .grid-wrap { max-height: none; overflow: visible; border: 0; }
  .grid th, .grid td { position: static !important; }
  .grid thead th { position: static !important; }
  td.cell { min-width: 0; height: 18px; }
  .legend { font-size: 9px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Vacances scolaires : teinte légère */
.grid thead th.dayh.vacs { background: var(--vacs); box-shadow: inset 0 -3px 0 color-mix(in srgb, #7a5cc8 55%, var(--vacs)); }
.grid td.cell.vacs:not(.has) { background: var(--vacs); }
.school { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.school h3 { margin: 0; font-size: 14px; }
.school p { margin: 0; }
.row.sch { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) auto !important; }
form.row.sch { grid-template-columns: minmax(0,1.3fr) 130px 130px auto !important; }
@media (max-width: 560px) { form.row.sch { grid-template-columns: 1fr 1fr !important; } }

.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
table.rc.vac td.z { color: var(--muted); }
table.rc.vac th, table.rc.vac td { padding: 6px 8px; }
@media print { #app:not(.show-synth) #vacSynth { display: none !important; } #app.show-synth section.recap { break-inside: avoid; } }

/* Identité : logo de la clinique */
.brand-row { display: flex; align-items: center; gap: 16px; min-width: 0; }
.logo { height: 56px; width: auto; border-radius: 6px; background: #fff; padding: 2px 4px; display: block; }
.login-card .logo { height: 72px; margin: 0 auto 8px; }
.login-card h1 { text-align: center; font-size: 24px; }
.login-card .eyebrow { text-align: center; }
@media (max-width: 600px) { .logo { height: 40px; } .brand-row { gap: 10px; } }
@media print { .logo { height: 36px; } }
tr.foot.check th, tr.foot.check td { border-top: 2px solid var(--accent); font-weight: 600; }


/* Lignes de contrôle dans l'en-tête fixe */
.grid thead tr.prog th.rowh { background: var(--surface); }
.grid thead tr.group th { font-weight: 700; }
.grid thead tr.foot.check th, .grid thead tr.foot.check td { box-shadow: inset 0 -2px 0 var(--accent); border-top: 0; }

/* Bilan des vacations */
.dialog:has(table.vac) { width: min(1280px, 100%); }
table.rc.vac td.kind { text-align: left; white-space: nowrap; font-weight: 600; }
table.rc.vac tr.drow td { border-bottom: 2px solid var(--line); }
table.rc.vac td.dol { color: #7a5cc8; }
table.rc.vac tr.vrow > td:first-child { vertical-align: top; border-bottom: 2px solid var(--line); }
.vy { font-size: 18px; padding: 0 6px; font-variant-numeric: tabular-nums; }

/* Bouton « Saisir une absence » : rouge, bien visible (seule saisie des lecteurs) */
.btn.abs-cta { background: var(--cta); border-color: var(--cta); color: var(--cta-fg); font-weight: 700; }
.btn.abs-cta:hover { filter: brightness(1.08); border-color: var(--cta); }
.btn.abs-cta::before { content: "＋ "; }
#pop .offhint { font-size: 12px; padding: 6px 8px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }

/* Fermeture de la clinique */
.grid thead th.dayh.closed { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, color-mix(in srgb, var(--muted) 18%, var(--surface-2)) 6px 12px); }
.dayh .hn.cl { color: var(--muted); }
#closeBtn.armed { background: var(--cta); border-color: var(--cta); color: var(--cta-fg); font-weight: 700; }
@media print { #closeBtn { display: none !important; } }

/* Modules : Planning | Honoraires */
.dialog.xl { width: min(1000px, 100%); }
nav.modules { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); align-self: center; }
nav.modules a { padding: 7px 16px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 13px; letter-spacing: .02em; }
nav.modules a + a { border-left: 1px solid var(--line); }
nav.modules a[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }
nav.modules a:hover:not([aria-current]) { background: var(--surface-2); }
@media print { nav.modules { display: none !important; } }

.nav-badge { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: var(--cta); color: var(--cta-fg); font-size: 11px; line-height: 18px; text-align: center; }

/* Pinceau à droite de la grille : toute la hauteur reste au planning */
.plan-area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; }
@media (min-width: 900px) {
  .plan-area.with-palette { grid-template-columns: minmax(0, 1fr) 166px; }
  .plan-area .palette { order: 2; }
  .plan-area .palette { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px; padding: 8px; position: sticky; top: 8px; max-height: 86vh; overflow-y: auto; }
  .plan-area .palette .lbl { margin: 0 0 2px; }
  .plan-area .palette .chip { overflow-wrap: anywhere; justify-content: flex-start; padding: 5px 7px; font-size: 11.5px; line-height: 1.2; text-align: left; }
  .plan-area .palette .chip b { min-width: 2.6em; flex: none; }
  .plan-area .palette .hint { font-size: 11px; margin-top: 4px; }
}
@media print { .plan-area { display: block; } }

/* Vacations chirurgicales supplémentaires (hors roulement) */
td.sv.sextra { box-shadow: inset 0 -3px 0 var(--warn); }
.xplus { color: var(--warn); font-weight: 800; font-size: .85em; margin-left: 1px; }
#stip .st-x { margin: 4px 0 0; padding: 0; list-style: none; }
#stip .st-x .tri { color: var(--warn); }
#stip .st-add { margin-top: 8px; width: 100%; }
form.extra-add { grid-template-columns: 1.4fr 1fr .9fr .8fr 1.4fr auto !important; }
@media (max-width: 700px) { form.extra-add { grid-template-columns: 1fr 1fr !important; } }
th.dayh.satopen { background: color-mix(in srgb, var(--warn) 12%, var(--off)); }
label.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; }
td.cell.sat:not(.has) { background: color-mix(in srgb, var(--off) 75%, var(--surface)); }
td.cell.holc:not(.has) { background: color-mix(in srgb, var(--ferie) 70%, var(--surface)); }

/* Mesure de l'impression (même rendu que @media print, appliqué juste avant d'imprimer) */
body.printing { font-size: 10px; }
body.printing .wrap { padding: 0 !important; gap: 6px; max-width: none; }
body.printing .account, body.printing .nav, body.printing .seg, body.printing .bar .btn, body.printing #palette, body.printing #banner,
body.printing section.recap, body.printing #equity, body.printing #vacSynth, body.printing nav.modules { display: none !important; }
body.printing .plan-area { display: block; }
body.printing .grid-wrap { max-height: none; overflow: visible; border: 0; }
body.printing td.cell { min-width: 0; height: 18px; }
body.printing .legend { font-size: 9px; }
body.printing .logo { height: 36px; }
@media print { .grid tr { break-inside: avoid; } #app { break-inside: avoid; } }
.grid thead th.sub-off { background: color-mix(in srgb, var(--off) 70%, var(--surface-2)); }
.grid thead th.sub-off.ferie { background: var(--ferie); }
@media print { #app .grid { width: 100%; } }

/* Grille inversée : dates à gauche, personnes en haut */
.grid th.tdate { position: sticky; left: 0; z-index: 3; min-width: 64px; }
.grid thead th.tdate { z-index: 6; }
.grid td.thalf { font-size: 10px; color: var(--muted); width: 28px; min-width: 28px; }
.grid th.toc, .grid td.oc[rowspan] { min-width: 110px; }
.mode-month .grid th.toc, .mode-month .grid td.oc[rowspan] { min-width: 44px; }
.grid th.tgrp { font-family: var(--f-display); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.grid th.tname { vertical-align: bottom; padding: 4px 2px !important; min-width: 44px; max-width: 70px; white-space: normal; line-height: 1.1; }
.grid th.tname .tri { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--accent); }
.grid th.tname .nm { display: block; font-size: 10px; font-weight: 500; overflow-wrap: anywhere; }
.grid thead tr.r1:has(th.tgrp) th { height: 26px; }
.grid thead tr.r2:has(th.tname) th { height: auto; font-size: 10px; letter-spacing: 0; color: var(--fg); }
.grid tr.tday.t-a td, .grid tr.tday.t-a th { border-bottom: 2px solid var(--line); }
.grid td.tchk { font-family: var(--f-mono); font-size: 11px; min-width: 52px; }
.grid td.tchk.zero { color: var(--danger); } .grid td.tchk.over { color: var(--warn); } .grid td.tchk.ok { color: var(--ok); }
.grid tr.tday td.cell { min-width: 44px; height: 26px; }
.grid tr.tday td.sv { min-width: 70px; }
/* Impression / PDF : les demi-journées sans activité restent blanches (ni teinte vacances scolaires, ni samedi, ni férié) */
@media print { .grid td.cell:not(.has) { background: #fff !important; } }

/* Onglets Planning / Synthèse */
.main-tabs { justify-self: start; }
.main-tabs button { padding: 7px 18px; font-weight: 600; }
#app.show-synth #planArea, #app.show-synth #legend, #app.show-synth #palette, #app.show-synth #banner, #app.show-synth .seg:has(#vOrient) { display: none !important; }
#app:not(.show-synth) section.recap { display: none; }
#vacSynth .sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#vacSynth .sec-head .nav { display: flex; align-items: center; gap: 6px; }
@media print { #vacSynth .sec-head .btn { display: none !important; } }

/* Accueil et Comptabilité : grandes tuiles */
.hub .hub-hello { margin: 4px 0 0; font-family: var(--f-display); font-size: 22px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tile { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px 22px 24px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; min-height: 150px; transition: border-color .15s, transform .15s; }
.tile:hover, .tile:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.tile .t-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.tile b { font-family: var(--f-display); font-size: 24px; }
.tile > span:last-of-type { color: var(--muted); font-size: 14px; }
.tile.accent .t-ico { background: var(--accent); color: var(--accent-fg); }
.tile .t-badge { position: absolute; top: 16px; right: 16px; font-style: normal; font-size: 12px; font-weight: 700; background: var(--cta); color: var(--cta-fg); border-radius: 999px; padding: 3px 10px; }
button.tile { font: inherit; text-align: left; cursor: pointer; width: 100%; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }
nav.subnav { display: inline-flex; gap: 4px; }
nav.subnav a { padding: 5px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px; border: 1px solid var(--line); background: var(--surface); }
nav.subnav a[aria-current="page"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
/* Notice */
.notice section.card, .notice .toc { display: grid; gap: 8px; }
.notice section h2 { margin: 0; font-family: var(--f-display); font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice section ul, .notice section ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.notice .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.notice .toc a { color: var(--accent); }
.notice section { scroll-margin-top: 12px; }
.notice table.rights { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.notice table.rights th, .notice table.rights td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.notice table.rights thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 600px) { .notice .toc ol { columns: 1; } }
@media print { .notice .modules, .notice .toc { display: none !important; } .notice section.card { break-inside: avoid; border: none; padding: 0 0 10px; } }
.notice .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.notice .tag { font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 2px 9px; font-family: inherit; }
.notice .card { min-width: 0; }
.notice .table-wrap { overflow-x: auto; }
.notice table.rights { min-width: 640px; }
.oncallbox { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px; display: grid; gap: 6px; }
.oncallform { display: grid; gap: 8px; }
.oncallform label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.oncallform textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; resize: vertical; }
.oncallform .ops { display: flex; flex-wrap: wrap; gap: 8px; }
.oncall-list { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 280px; overflow: auto; }
.oncall-list .oc-h { font-size: 12px; margin-top: 4px; }
.oncall-list .oc-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.oncall-list .oc-row .btn { margin-left: auto; }
.oncallform input[type=email] { flex: 1; min-width: 220px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 10px; font: inherit; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; } .btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.tile.soon { cursor: default; opacity: .78; border-style: dashed; }
.tile.soon:hover { border-color: var(--line); transform: none; }
.tile.soon .t-ico { background: var(--surface-2); color: var(--muted); }
.tile .t-soon { position: absolute; top: 16px; right: 16px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; }
/* Accueil : familles de tuiles (planning en bleu, modules cliniques en vert d'eau) */
.tile.g-plan { --tc: var(--t-plan); }
.tile.g-clin { --tc: var(--t-clin); }
.tile.g-plan, .tile.g-clin { border-top: 4px solid var(--tc); background: color-mix(in srgb, var(--tc) 6%, var(--surface)); }
.tile.g-plan .t-ico, .tile.g-clin .t-ico { background: color-mix(in srgb, var(--tc) 16%, var(--surface)); color: var(--tc); }
.tile.g-plan:hover, .tile.g-plan:focus-visible { border-color: var(--tc); border-top-color: var(--tc); }
.tile.g-clin.soon { opacity: 1; border-style: dashed; border-top-style: solid; border-color: color-mix(in srgb, var(--tc) 45%, var(--line)); border-top-color: var(--tc); }
.tile.g-clin.soon:hover { border-color: color-mix(in srgb, var(--tc) 45%, var(--line)); border-top-color: var(--tc); }
.tile.g-clin .t-soon { background: color-mix(in srgb, var(--tc) 14%, var(--surface)); color: var(--tc); }
.tile.g-clin.soon > span:last-of-type { color: var(--muted); }
/* Bibliothèques de PDF */
.lib-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lib-bar input[type=search] { flex: 1; min-width: 220px; max-width: 460px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 9px 12px; font: inherit; }
.fam-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { --fc: var(--muted); display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.fchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--fc); }
.fchip b { font-weight: 600; color: var(--muted); font-size: 12px; }
.fchip[aria-pressed="true"] { border-color: var(--fc); background: color-mix(in srgb, var(--fc) 14%, var(--surface)); }
.docs { display: grid; gap: 6px; }
.doc { --fc: var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--fc); border-radius: 8px; padding: 9px 12px; }
.doc .d-title { font-weight: 600; color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.doc a.d-title:hover { text-decoration: underline; }
.doc .d-meta { display: flex; gap: 8px; align-items: center; }
.doc .d-ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.doc.editing { grid-template-columns: minmax(0, 1fr) 220px auto; }
.doc.editing input, .doc.editing select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; min-width: 0; }
.fam-tag { --fc: var(--muted); font-size: 12px; font-weight: 600; color: var(--fc); background: color-mix(in srgb, var(--fc) 13%, var(--surface)); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.fam-group { --fc: var(--muted); display: grid; gap: 8px; }
.fam-group h2 { margin: 8px 0 0; font-family: var(--f-display); font-size: 20px; display: flex; align-items: center; gap: 8px; }
.fam-group h2 i { width: 14px; height: 14px; border-radius: 4px; background: var(--fc); }
.lib .card.empty { text-align: center; }
.manage .m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.manage .m-box { display: grid; gap: 8px; align-content: start; }
.manage .m-box.wide { grid-column: 1 / -1; }
.manage h3 { margin: 0; font-size: 15px; }
.m-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.m-form label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.m-form input:not([type=color]):not([type=file]), .m-form select, .fam-row input:not([type=color]), .scan input.s-title, .scan input.s-fam { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; min-width: 0; }
.m-form input[type=url], .m-form input#nfName { flex: 1; min-width: 200px; }
input[type=color] { width: 38px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.fams { display: grid; gap: 6px; }
.fam-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.scan { display: grid; gap: 8px; }
.scan-head { display: flex; gap: 12px; align-items: center; }
.scan input.s-title { width: 100%; min-width: 260px; } .scan input.s-fam { width: 180px; }
.scan tr.z td { opacity: .55; }
@media (max-width: 640px) { .doc, .doc.editing { grid-template-columns: minmax(0, 1fr); } .doc .d-ops { justify-content: flex-start; } }
a.btn { text-decoration: none; color: var(--fg); display: inline-flex; align-items: center; }
.doc .d-ops { align-items: center; }
.doc .d-ops .btn { line-height: 1.2; }
/* Stagiaires */
.k-douleur { --kc: var(--k-douleur); } .k-alr { --kc: var(--k-alr); }
.stg-legend { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); align-items: center; }
.stg-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--kc, var(--danger)); }
.stg-legend .k-full::before { background: transparent; border: 2px solid var(--danger); }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cal-h div { padding: 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.cday { min-height: 92px; padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cday:nth-child(5n) { border-right: none; }
.cday[data-day] { cursor: pointer; } .cday[data-day]:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.cday.out { background: var(--bg); } .cday.out .cd-h b { color: var(--muted); font-weight: 500; }
.cday.hol { background: var(--ferie); }
.cday.full { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--danger) 55%, transparent); }
.cday.full .cnt { color: var(--danger); font-weight: 700; }
.cday.today .cd-h b { background: var(--accent); color: var(--accent-fg); border-radius: 999px; padding: 0 7px; }
.cd-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.cd-h .cnt { font-size: 11px; color: var(--muted); font-family: var(--f-mono); }
.tchip { display: block; width: 100%; text-align: left; border: none; border-left: 4px solid var(--kc); background: color-mix(in srgb, var(--kc) 14%, var(--surface)); color: var(--fg); border-radius: 5px; padding: 3px 6px; font: inherit; font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ktag { font-size: 11.5px; font-weight: 700; color: var(--kc); background: color-mix(in srgb, var(--kc) 14%, var(--surface)); border-radius: 999px; padding: 1px 8px; }
.stg-form form { display: grid; gap: 12px; }
.tf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.stg-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.stg-form input { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; }
.tf-periods { display: grid; gap: 8px; }
.tf-p { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.tf-p label { display: flex; align-items: center; gap: 6px; }
.tf-warn { margin: 0; color: var(--danger); font-weight: 600; }
.stg .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 700px) { .cday { min-height: 70px; padding: 4px; } .tchip { font-size: 10.5px; padding: 2px 4px; } .cal-h div { padding: 6px 4px; font-size: 10px; } }
.btn:disabled { opacity: .5; cursor: not-allowed; }
/* Programmation : onglets Semaine type / Programme chirurgical / Activités */
.dialog:has(.prog-tabs) { width: min(1120px, 100%); }
.prog-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.prog-tabs b { font-family: var(--f-display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 10px; }
.prog-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.prog-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
/* Calendrier des stagiaires compact */
.stg .cal { max-width: 920px; }
.stg .cal-h div { padding: 5px 8px; font-size: 10px; }
.stg .cday { min-height: 54px; padding: 3px 5px; gap: 2px; }
.stg .cd-h { font-size: 12px; }
.stg .cd-h .cnt { font-size: 10px; }
.stg .tchip { font-size: 11px; padding: 1px 5px; border-left-width: 3px; border-radius: 4px; }
.stg .cday.today .cd-h b { padding: 0 5px; }
@media (max-width: 700px) { .stg .cday { min-height: 46px; padding: 2px 3px; } .stg .tchip { font-size: 10px; padding: 1px 3px; } }
/* Accueil : bandeau avec photo */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--t-clin))); border-radius: 16px; overflow: hidden; min-height: 240px; }
.hero-txt { padding: 28px 30px; display: grid; align-content: center; gap: 8px; color: #fff; }
.hero .hub-hello { margin: 0; font-size: 30px; color: #fff; }
.hero-sub { margin: 0; font-size: 15px; opacity: .85; }
.hero-img { width: 100%; height: 100%; max-height: 320px; min-height: 260px; object-fit: cover; object-position: 50% 6%; display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: linear-gradient(120deg, #1c2a52, #12403a); } }
:root[data-theme="dark"] .hero { background: linear-gradient(120deg, #1c2a52, #12403a); }
@media (max-width: 700px) { .hero { grid-template-columns: 1fr; } .hero-txt { padding: 18px 20px; } .hero .hub-hello { font-size: 24px; } .hero-img { max-height: 240px; min-height: 0; object-position: 50% 18%; } }
.team .row.rx input, .team .row.rx select { box-sizing: border-box; max-width: 100%; }
.exports { display: inline-flex; gap: 6px; } .exports .btn { font-weight: 600; letter-spacing: .03em; }
.hero-pic { position: relative; min-height: 260px; background: color-mix(in srgb, var(--accent) 60%, #000); }
.hero-pic .hero-img { position: absolute; inset: 0; max-height: none; min-height: 0; }
.hero-pic .hero-img:not([src]) { visibility: hidden; }
.hero-ops { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.hero-btn { border: none; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: rgba(10, 18, 40, .55); backdrop-filter: blur(4px); cursor: pointer; }
.hero-btn:hover { background: rgba(10, 18, 40, .75); }
#heroNext { font-size: 16px; padding: 4px 11px; }
.photos-dlg { width: min(900px, 100%); }
.ph-add { justify-self: start; cursor: pointer; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ph-item { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.ph-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.ph-item figcaption { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; }
@media (max-width: 700px) { .hero-pic { min-height: 220px; } }
.stg td.t-ops { white-space: nowrap; } .stg td.t-ops .btn + .btn { margin-left: 6px; } .stg-mail { display: grid; gap: 10px; } .stg-mail .m-form input[type=email] { flex: 1; min-width: 220px; }
/* E-mail au stagiaire */
.stg-compose { display: grid; gap: 10px; }
.cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.cmp-edit, .cmp-prev { display: grid; gap: 8px; align-content: start; }
.cmp-edit label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.cmp-edit input, .cmp-edit select, .cmp-edit textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; }
.cmp-edit textarea { resize: vertical; line-height: 1.45; }
.cmp-edit code { font-size: 11.5px; background: var(--surface-2); border-radius: 4px; padding: 1px 4px; }
.cmp-tpl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px dashed var(--line); padding-top: 8px; }
.cmp-tpl input { flex: 1; min-width: 160px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; }
.cmp-mail { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); display: grid; gap: 6px; font-size: 13.5px; }
.cmp-mail pre { margin: 6px 0 0; white-space: pre-wrap; font: inherit; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 800px) { .cmp-grid { grid-template-columns: 1fr; } }
/* Examens pré-opératoires */
.preop .gate { display: grid; gap: 10px; max-width: 820px; }
.preop .gate ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.preop .pf form { display: grid; gap: 12px; }
.preop .pf label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.preop .pf label.chk { display: flex; font-size: 13px; color: var(--fg); }
.preop .pf input, .preop .pf select, .preop .pf textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; min-width: 0; }
.preop .pf code { font-size: 11.5px; background: var(--surface-2); border-radius: 4px; padding: 1px 4px; }
.pf-exams { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pf-ex { display: grid; gap: 6px; align-content: start; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
table.preop-t td, table.hon.preop-t tbody td { vertical-align: top !important; }
table.preop-t select.st, table.preop-t input.dt, table.preop-t input.lbl { display: block; width: 100%; min-width: 120px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12.5px; margin-bottom: 4px; }
table.preop-t select.st-wait { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--warn); font-weight: 600; }
table.preop-t select.st-ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); font-weight: 600; }
table.preop-t tr.urgent td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
table.preop-t tr.done td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
table.preop-t td.ops { white-space: nowrap; } table.preop-t td.ops .btn + .btn { margin-left: 4px; }
table.preop-t td.nowrap { white-space: nowrap; }
table.preop-t td.rem { min-width: 120px; } table.preop-t td.rem .btn { margin-top: 4px; }
label.chk.sm { font-size: 12.5px; }
table.preop-t td.rem label.chk { display: flex; gap: 4px; align-items: center; }
.card.demo-banner { display: flex; gap: 12px; align-items: center; border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); font-size: 13.5px; } .card.demo-banner > div { flex: 1; }
.tf-auto { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; } .tf-auto > b { width: 100%; font-size: 13px; } .tf-auto select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; }
/* Patients infectés */
.infect .pf textarea { resize: vertical; }
.infect .dur { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.infect .dur input { width: 64px; }
.inf-t .plus { color: var(--muted); }
.inf-t .cmt { font-size: 12.5px; color: var(--fg); margin-top: 4px; max-width: 320px; white-space: pre-wrap; }
.tag.oc-favorable { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, var(--surface)); }
.tag.oc-echec { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, var(--surface)); }
.tag.oc-cours { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.infect .imp textarea, .prosth .imp textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: 12px var(--f-mono); }
.pf-ch { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; } .sms-cfg { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.hero-live { margin: 6px 0 0; display: inline-block; justify-self: start; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 4px 12px; color: #fff; }
.tile.g-fb { border-style: dashed; }
/* Retours */
.retours .fb-new form { display: grid; gap: 10px; }
.retours .fb-new label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.retours .fb-new input, .retours .fb-new select, .retours .fb-new textarea, .fb-manage select, .fb-manage textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; }
.fb-kinds { justify-self: start; }
.fb-list { display: grid; gap: 8px; }
.fb { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--warn); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }
.fb.st-cours { border-left-color: var(--accent); } .fb.st-fait { border-left-color: var(--ok); } .fb.st-refuse { border-left-color: var(--muted); opacity: .8; }
.fb header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fb h3 { margin: 0; font-size: 16px; }
.fb .fb-kind { font-size: 12px; font-weight: 700; color: var(--muted); }
.fb .fb-body { margin: 0; white-space: pre-wrap; font-size: 14px; }
.fb .fb-reply { margin: 0; padding: 8px 10px; background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-radius: 6px; font-size: 13.5px; white-space: pre-wrap; }
.fb-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-manage { display: grid; gap: 6px; width: 100%; }
.tag.fb-st-nouveau { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, var(--surface)); }
.tag.fb-st-fait { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, var(--surface)); }
/* Aide à la saisie des dates : calendrier 📅 + « Aujourd'hui » */
.date-help { display: inline-flex; align-items: center; gap: 2px; justify-self: start; align-self: center; white-space: nowrap; }
.cal-btn { border: none; background: none; font-size: 14px; line-height: 1; padding: 2px 3px; cursor: pointer; border-radius: 4px; }
.cal-btn:hover { background: var(--surface-2); }
.today-btn { border: none; background: none; color: var(--accent); font: inherit; font-size: 11.5px; font-weight: 600; padding: 1px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.today-btn:hover { color: var(--fg); }
table .date-help { display: flex; margin: -2px 0 4px; }
.mini-cal { position: fixed; z-index: 200; width: 238px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.22); padding: 8px; font-size: 13px; }
.mini-cal .mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mini-cal .mc-head b { text-transform: capitalize; }
.mini-cal button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; border-radius: 6px; }
.mini-cal .mc-head button { font-size: 18px; width: 30px; height: 28px; }
.mini-cal .mc-head button:hover, .mini-cal .mc-grid button:hover:not(:disabled) { background: var(--surface-2); }
.mini-cal .mc-dow, .mini-cal .mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-cal .mc-dow span { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 0; }
.mini-cal .mc-grid button { height: 28px; font-variant-numeric: tabular-nums; }
.mini-cal .mc-grid button.is-we { color: var(--muted); }
.mini-cal .mc-grid button.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 700; }
.mini-cal .mc-grid button.is-sel { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.mini-cal .mc-grid button:disabled { opacity: .3; cursor: default; }
.mini-cal .mc-foot { display: flex; justify-content: space-between; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.mini-cal .mc-foot button { color: var(--accent); font-weight: 600; padding: 3px 6px; }
@media print { .date-help, .mini-cal { display: none !important; } }
.tag.avis-ap { color: #7A5CC8; background: color-mix(in srgb, #7A5CC8 13%, var(--surface)); }
.tag.avis-macnab { color: #0E7490; background: color-mix(in srgb, #0E7490 13%, var(--surface)); }
.tag.avis-aucun { color: var(--muted); background: var(--surface-2); }
.inf-t td:first-child { min-width: 210px; } .inf-t .tag { white-space: nowrap; }
.poso-in { display: grid; grid-template-columns: minmax(56px, 1fr) 58px 76px 74px; gap: 4px; margin: -2px 0 4px; }
.poso-in input, .poso-in select { padding: 5px 6px !important; font-size: 12.5px !important; min-width: 0; }
.inf-t .poso { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.team .row.rx label.sms-opt { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--fg); grid-column: 1 / -1; }
.pwform h3 { margin: 4px 0 0; font-size: 15px; } #ctForm { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 4px; } .pwform label.chk { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--fg); }
.mailbox .sms-state { margin-left: 10px; font-size: 12px; color: var(--muted, #777); }
.mailbox .sms-state.on { color: #1d7a3a; }
.mailbox .sms-paid { font-size: 11px; font-weight: 600; color: #8a5a00; background: #fff4d6; border-radius: 10px; padding: 1px 8px; margin-left: 6px; }
th.repl .nm, th.repl .tri { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.rowh .sub.tgt { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted, #667); background: none; border: 0; padding: 0; text-align: left; font-family: inherit; }
.rowh button.sub.tgt { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.rowh .sub.tgt.under { color: #b45309; } .rowh .sub.tgt.ok { color: #1d7a3a; } .rowh .sub.tgt.over { color: #1d4ed8; }
/* IADE au bloc dans une configuration non conforme (règle : 1 médecin = 1 salle, ou 2 salles avec 1 ou 2 IADE) */
td.cell.iade-bad { background: color-mix(in srgb, var(--danger, #c0392b) 30%, var(--surface)) !important; box-shadow: inset 0 0 0 2px var(--danger, #c0392b); }
td.cell.iade-bad b { color: var(--danger, #c0392b); }
/* Formulaires examens pré-op et patients infectés : cases alignées, rien ne déborde des cadres */
.pf-exams { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.pf-ex { min-width: 0; }
.pf-ex > *, .pf-ex label > * { min-width: 0; max-width: 100%; }
.pf-ex input, .pf-ex select, .pf-ex textarea { width: 100%; box-sizing: border-box; }
.pf-ex > b { font-size: 14px; margin-bottom: 2px; }
.poso-in { display: grid; grid-template-columns: 1.1fr .8fr 1fr 1fr; gap: 4px; margin-bottom: 4px; }
.poso-in input, .poso-in select { width: 100%; min-width: 0; padding-left: 6px; padding-right: 4px; }
.pf-ex .dur { display: grid; grid-template-columns: auto 64px 1fr; gap: 6px; align-items: center; }
.pf-ex .dur input, .pf-ex .dur select { width: 100%; }
.pf-ex .dur .btn { grid-column: 1 / -1; justify-self: start; }
.pf-ex .date-help { margin-top: 2px; }
.tf-grid { align-items: start; }
.tf-grid > label { align-content: start; }
/* Moteur de recherche de l'accueil */
.hub-search { position: relative; margin: 14px 0 4px; }
.hub-search input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 12px; padding: 12px 16px; font: inherit; font-size: 15px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.hub-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.gs-panel { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / .14); padding: 8px; max-height: 70vh; overflow: auto; display: grid; gap: 8px; }
.gs-grp { display: grid; gap: 2px; }
.gs-grp > b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 8px; }
.gs-item { display: grid; gap: 1px; text-align: left; background: none; border: 0; border-radius: 8px; padding: 6px 8px; cursor: pointer; color: var(--fg); font: inherit; }
.gs-item:hover, .gs-item:focus { background: color-mix(in srgb, var(--accent) 9%, transparent); outline: none; }
.gs-t { font-weight: 600; font-size: 14px; } .gs-s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.gs-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 8px 4px; font-size: 12.5px; }
.gs-none { margin: 4px 8px; }
.hub-cta { margin: 14px 0 0; display: flex; gap: 8px; flex-wrap: wrap; } .hub-cta .abs-cta { text-decoration: none; }
.hub-cta .btn { text-decoration: none; }
/* Absence chirurgicale : fond rouge pâle, à côté du bouton rouge « Saisir une absence » */
.btn.sabs-cta { background: color-mix(in srgb, var(--cta, #c62828) 13%, var(--surface)); border-color: color-mix(in srgb, var(--cta, #c62828) 35%, var(--line)); color: color-mix(in srgb, var(--cta, #c62828) 80%, var(--fg)); font-weight: 700; text-decoration: none; }
.btn.sabs-cta:hover { background: color-mix(in srgb, var(--cta, #c62828) 20%, var(--surface)); }
.btn.sabs-cta::before { content: "＋ "; }
.nav-pair { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; align-self: center; }
@media print { .nav-pair .main-tabs { display: none !important; } }
.cl-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: start; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 6px; }
.cl-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.cl-form input { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; min-width: 0; }
.cl-row { display: grid !important; grid-template-columns: minmax(200px, auto) 1fr auto; gap: 12px; align-items: center; }

/* Annuaire des contacts */
.annuaire .ct-new form { display: grid; gap: 10px; }
.annuaire .ct-new label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.annuaire .ct-new input, .annuaire .ct-new select, .annuaire .lib-bar input { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; width: 100%; box-sizing: border-box; }
.annuaire .lib-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.annuaire .lib-bar input { flex: 1; min-width: 200px; width: auto; }
.annuaire .ct-cats { flex-wrap: wrap; margin-bottom: 12px; }
.annuaire .ct-cats small { color: var(--muted); font-weight: 400; }
.ct-grp { display: grid; gap: 0; }
.ct-grp header { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 6px; }
.ct-grp h2 { margin: 0; font-size: 16px; }
.ct-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(200px, 1.4fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ct-who { display: grid; gap: 2px; min-width: 0; }
.ct-co { display: grid; gap: 4px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.ct-co a { color: var(--accent); text-decoration: none; }
.ct-ops { display: flex; gap: 4px; justify-content: flex-end; }
@media (max-width: 720px) { .ct-row { grid-template-columns: 1fr; } .ct-ops { justify-content: flex-start; } }

/* Liste imprimable des patients en attente d'examens */
#printZone { display: none; }
@media print {
  body.print-list > *:not(#printZone) { display: none !important; }
  body.print-list #printZone { display: block; font: 12px/1.4 system-ui, sans-serif; color: #000; }
  #printZone h1 { font-size: 16px; margin: 0 0 10px; }
  #printZone table { width: 100%; border-collapse: collapse; }
  #printZone th, #printZone td { border: 1px solid #999; padding: 4px 6px; text-align: left; vertical-align: top; }
  #printZone tr { break-inside: avoid; }
  #printZone small { color: #555; }
}

/* Prothèses */
.prosth-t td.pr-c { text-align: center; }
.prosth-t td.pr-c input { width: 20px; height: 20px; cursor: pointer; }
.prosth .pr-checks { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0; }
.prosth #pForm { display: grid; gap: 10px; }
.prosth #pForm h2 { margin: 0; font-size: 16px; }
.prosth #pForm label:not(.chk) { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.prosth #pForm input:not([type=checkbox]), .prosth #pForm select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; width: 100%; box-sizing: border-box; }
.tag.pr-hanche { color: #1d5fa8; background: color-mix(in srgb, #1d5fa8 12%, var(--surface)); }
.tag.pr-genou { color: #2f7d4b; background: color-mix(in srgb, #2f7d4b 12%, var(--surface)); }
.tag.pr-epaule { color: #8a4bb0; background: color-mix(in srgb, #8a4bb0 12%, var(--surface)); }
header.top nav.subnav { flex-wrap: wrap; }

/* Bibliothèque : glisser-déposer des PDF */
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 18px 12px; border: 2px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); font-weight: 600; }
.dropzone input { max-width: 100%; font-weight: 400; }
body.drag-on .dropzone { border-color: var(--accent); color: var(--accent); }
body.drag-on::after { content: "Déposez les PDF pour les ajouter à la bibliothèque"; position: fixed; inset: 12px; z-index: 1000; display: grid; place-items: center; border: 3px dashed var(--accent); border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font: 700 20px/1.3 system-ui, sans-serif; pointer-events: none; backdrop-filter: blur(1px); }
.prosth .imp { display: grid; gap: 8px; } .prosth .imp h2 { margin: 0; font-size: 16px; }

/* Double authentification (données médicales) */
.mfa-overlay { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(4px); }
.mfa-dlg { width: min(560px, 100%); }
.mfa-dlg p { margin: 0; }
.mfa-form { display: grid; gap: 10px; }
.mfa-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.mfa-form input { font: 600 24px/1.2 var(--f-mono, monospace); letter-spacing: .25em; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); max-width: 220px; }
.mfa-err { color: var(--danger); font-size: 13px; min-height: 1em; }
.mfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.mfa-qr { margin: 8px 0; } .mfa-qr svg { background: #fff; border-radius: 8px; display: block; max-width: 220px; height: auto; }
.mfa-key { font-size: 13px; user-select: all; overflow-wrap: anywhere; }

/* Utilisateurs : colonnes alignées d'une ligne à l'autre (grille partagée), boutons à gauche de la dernière colonne */
@supports (grid-template-columns: subgrid) {
  @media (min-width: 561px) {
    .rows.users { grid-template-columns: 110px minmax(0,1fr) 130px 150px minmax(0,1.3fr) 100px minmax(0,1fr) max-content max-content max-content; column-gap: 8px; }
    .users .row { grid-column: 1 / -1; grid-template-columns: subgrid; }
  }
}
.users .row > * { box-sizing: border-box; min-width: 0; }
.users .row > input, .users .row > select { width: 100%; height: 34px; }
.users .row > .btn { min-height: 34px; padding: 4px 12px; white-space: nowrap; width: 100%; }
.users .row .uc { display: flex; } .users .row .uc .btn { width: 100%; } .users .row .uc .btn { min-height: 34px; padding: 4px 12px; white-space: nowrap; }
.mfa-help { margin-top: 16px; } .mfa-help h2 { margin: 0 0 8px; font-size: 16px; } .mfa-help ol { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }

/* Changement de code */
.pw-card { gap: 6px; }
.pw-card .logo { height: 48px; width: auto; justify-self: start; }
.pw-rules { list-style: none; margin: 2px 0 4px; padding: 0; display: grid; gap: 2px; font-size: 12.5px; color: var(--muted); }
.pw-rules li::before { content: '○ '; }
.pw-rules li.ok { color: var(--ok); } .pw-rules li.ok::before { content: '✓ '; }
.pw-help { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, var(--bg)); font-size: 13px; }
.pw-help .pw-rules { margin: 0; }
.pw-gen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.pw-sugg { font: 600 14px var(--f-mono, monospace); padding: 3px 8px; border-radius: 5px; background: var(--surface); border: 1px dashed var(--accent); user-select: all; }

.ct-ocr { display: grid; gap: 10px; } .ct-ocr h2 { margin: 0; font-size: 16px; } .ct-ocr p { margin: 0; }
.ct-ocr label.btn { justify-self: start; cursor: pointer; }
.ct-ocr progress { width: 200px; vertical-align: middle; }
.ocr-t input:not([type=checkbox]), .ocr-t select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 5px; padding: 5px 7px; font: inherit; font-size: 13px; width: 100%; min-width: 110px; box-sizing: border-box; }
.ocr-raw { white-space: pre-wrap; font-size: 12px; max-height: 200px; overflow: auto; background: var(--bg); padding: 8px; border-radius: 6px; }
.dialog:has(.rows.users) { width: min(1320px, 100%); }
.users .row .login-id { line-height: 34px; white-space: nowrap; }

/* Équipe : groupes, noms seuls, fiche ouverte au clic */
.tm-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tm-groups { display: grid; gap: 14px; }
.tm-group { display: grid; gap: 4px; }
.tm-group h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tm-group h3 small { font-weight: 400; margin-left: 4px; }
.tm-item { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tm-item.open { border-color: var(--accent); }
.tm-name { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; font-weight: 600; font-size: 14px; }
.tm-name:hover { background: var(--surface-2, var(--bg)); border-radius: 8px; }
.tm-name:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.tm-name .tri { font: 600 12px var(--f-mono, monospace); color: var(--muted); }
.tm-chev { color: var(--muted); transition: transform .15s; } .tm-item.open .tm-chev { transform: rotate(90deg); }
.tm-card { padding: 4px 12px 12px; display: grid; gap: 6px; border-top: 1px solid var(--line); }
.tm-card > .row { grid-template-columns: minmax(0,1fr) 70px 160px auto; margin-top: 8px; }
.tm-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin: 8px 0 0; }
.tm-info dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tm-info dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; } .tm-info a { color: var(--accent); text-decoration: none; }
.tm-card .row.rx { margin: 0; padding-left: 0; border-left: 0; }
.tm-empty { color: var(--muted); opacity: .7; } input::placeholder { color: var(--muted); opacity: .7; }

/* Accueil : liens utiles (sites externes) */
.hub-ext { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.hub-ext .hint { margin-right: 4px; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }

/* Accueil : tuile « Accès données médicales » — fond légèrement hachuré et cadenas */
.tile.med-tile { background-color: var(--surface); background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent) 0 2px, transparent 2px 11px); }
.tile.med-tile .t-lock { position: absolute; top: 18px; right: 18px; color: var(--accent); opacity: .85; }
@keyframes flashToday { 0%, 100% { box-shadow: none; } 30% { box-shadow: inset 0 0 0 3px var(--cta, var(--accent)); } } .dayh.flash-today { animation: flashToday 1.6s ease; }

.hub-links { display: contents; }
.hub-link { position: relative; display: inline-flex; }
.hub-link .lk-del { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--danger); font-size: 12px; line-height: 18px; cursor: pointer; }
.link-form { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.link-form input { flex: 1; min-width: 200px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 6px 10px; font: inherit; }

/* ===== Accueil : graphismes au choix (body[data-look]) ===== */
/* B — Épuré : bandeau clair, photo arrondie, tuiles blanches avec liseré coloré à gauche */
body[data-look="b"] .hero { background: var(--surface); border: 1px solid var(--line); grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); min-height: 0; }
body[data-look="b"] .hero-txt { color: var(--fg); border-left: 6px solid var(--accent); }
body[data-look="b"] .hero .hub-hello { color: var(--fg); }
body[data-look="b"] .hero-sub { color: var(--muted); opacity: 1; }
body[data-look="b"] .hero-live { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
body[data-look="b"] .hero-pic { margin: 14px; border-radius: 14px; overflow: hidden; min-height: 200px; }
body[data-look="b"] .tiles { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
body[data-look="b"] .tile, body[data-look="b"] .tile.g-plan, body[data-look="b"] .tile.g-clin { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--tc, var(--accent)); border-top: 1px solid var(--line); border-radius: 12px; min-height: 0;
  grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 4px; padding: 16px 18px; }
body[data-look="b"] .tile .t-ico { grid-row: span 2; }
body[data-look="b"] .tile b { font-size: 18px; align-self: end; }
body[data-look="b"] .tile > span:last-of-type { font-size: 13px; grid-column: 2; }
body[data-look="b"] .tile.med-tile { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, transparent) 0 2px, transparent 2px 11px); }

/* C — Immersif : grande photo d'équipe en fond du bandeau, texte en surimpression, tuiles à pastille ronde */
body[data-look="c"] .hero { position: relative; grid-template-columns: 1fr; min-height: 340px; }
body[data-look="c"] .hero-pic { position: absolute; inset: 0; min-height: 0; }
body[data-look="c"] .hero-txt { position: relative; z-index: 1; align-content: end; padding: 34px 36px; background: linear-gradient(90deg, rgba(14, 24, 58, .82) 0%, rgba(14, 24, 58, .45) 55%, rgba(14, 24, 58, 0) 100%); }
body[data-look="c"] .hero .hub-hello { font-size: 36px; }
body[data-look="c"] .hero-ops { z-index: 2; }
body[data-look="c"] .hub-search { margin-top: 16px; }
body[data-look="c"] .hub-search input { box-shadow: 0 8px 24px rgb(0 0 0 / .18); border-radius: 999px; padding: 14px 22px; }
body[data-look="c"] .tile .t-ico { border-radius: 50%; width: 52px; height: 52px; font-size: 24px; }
body[data-look="c"] .tile { border-radius: 18px; box-shadow: 0 2px 10px rgb(0 0 0 / .05); }
body[data-look="c"] .tile b { font-size: 21px; }

/* D — Compact (tableau de bord) : bandeau fin sans photo, tuiles courtes sur 4 colonnes, description au survol */
body[data-look="d"] .hero { grid-template-columns: 1fr; min-height: 0; border-radius: 12px; }
body[data-look="d"] .hero-pic { display: none; }
body[data-look="d"] .hero-txt { padding: 16px 22px; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 18px; }
body[data-look="d"] .hero .hub-hello { font-size: 22px; }
body[data-look="d"] .hero-sub { font-size: 13px; }
body[data-look="d"] .hero-live { margin: 0; }
body[data-look="d"] .tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
body[data-look="d"] .tile { min-height: 0; padding: 14px 16px; grid-template-columns: 36px 1fr; align-items: center; column-gap: 12px; }
body[data-look="d"] .tile .t-ico { width: 36px; height: 36px; font-size: 17px; border-radius: 9px; }
body[data-look="d"] .tile b { font-size: 16px; }
body[data-look="d"] .tile > span:last-of-type { display: none; }
body[data-look="d"] .tile .t-lock { top: 10px; right: 10px; width: 16px; height: 16px; }
@media (max-width: 700px) { body[data-look="d"] .hero-txt { grid-template-columns: 1fr; } }

.cal-box .cal-out { display: grid; gap: 8px; } .cal-box #calUrl { font: 12px var(--f-mono, monospace); border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px; width: 100%; box-sizing: border-box; }
.cal-box .actions { display: flex; flex-wrap: wrap; gap: 6px; } .cal-box details p { margin: 6px 0; }
/* Fermeture : champs alignés en haut (l'aide « Aujourd'hui » sous les dates ne décale plus le reste) */
.cl-form input { height: 36px; box-sizing: border-box; }
.cl-form > .btn { margin-top: calc(12px * 1.35 + 5px); height: 36px; min-height: 36px; padding-top: 0; padding-bottom: 0; }

/* ===== Accueil : variantes sobres « portail de clinique » (E) et « éditorial » (F) ===== */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/vendor/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/vendor/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(/vendor/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-display: swap; src: url(/vendor/fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url(/vendor/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url(/vendor/fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); }

/* E — Portail de clinique : blanc et bleu Drouot, angles droits, police IBM Plex, liste de services en colonnes */
body[data-look="e"] { --bg: #F4F5F7; font-family: "IBM Plex Sans", var(--f-body); }
body[data-look="e"] .brand h1, body[data-look="e"] .tile b, body[data-look="e"] .hero .hub-hello { font-family: "IBM Plex Sans", var(--f-body); letter-spacing: -.01em; }
body[data-look="e"] .hero { border-radius: 0; background: var(--accent); grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); min-height: 0; }
body[data-look="e"] .hero-txt { padding: 26px 30px; }
body[data-look="e"] .hero .hub-hello { font-size: 28px; font-weight: 600; }
body[data-look="e"] .hero-live { border-radius: 2px; background: transparent; border-color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
body[data-look="e"] .hero-pic { min-height: 200px; }
body[data-look="e"] .hub-cta .btn, body[data-look="e"] .btn { border-radius: 3px; }
body[data-look="e"] .hub-search input { border-radius: 3px; border-color: #C9CED8; box-shadow: none; }
body[data-look="e"] .tiles { gap: 0; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); background: var(--surface); border: 1px solid #D5D9E1; }
body[data-look="e"] .tile, body[data-look="e"] .tile.g-plan, body[data-look="e"] .tile.g-clin { border-radius: 0; border: 0; border-bottom: 1px solid #E3E6EC; border-right: 1px solid #E3E6EC; background: var(--surface); min-height: 0;
  grid-template-columns: 30px 1fr; column-gap: 14px; row-gap: 2px; padding: 16px 20px; transform: none !important; }
body[data-look="e"] .tile:hover { background: #F2F5FB; }
body[data-look="e"] .tile .t-ico { grid-row: span 2; width: 30px; height: 30px; border-radius: 0; background: none !important; color: var(--accent) !important; font-size: 20px; border: 1.5px solid currentColor; }
body[data-look="e"] .tile b { font-size: 16px; font-weight: 600; color: var(--accent); }
body[data-look="e"] .tile > span:last-of-type { grid-column: 2; font-size: 13px; }
body[data-look="e"] .tile.med-tile { background-image: repeating-linear-gradient(135deg, rgba(51, 66, 113, .05) 0 2px, transparent 2px 10px); }
body[data-look="e"] .hub-ext .btn { border-radius: 3px; }

/* F — Éditorial : titres à empattement (Source Serif), fond ivoire, filets fins, pas de pastilles ni d'ombres */
body[data-look="f"] { --bg: #FAF8F4; --line: #DDD6CA; }
body[data-look="f"] .brand h1, body[data-look="f"] .tile b, body[data-look="f"] .hero .hub-hello { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; letter-spacing: 0; }
body[data-look="f"] .hero { background: none; border-radius: 0; border-top: 3px solid var(--fg); border-bottom: 1px solid var(--line); grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); min-height: 0; }
body[data-look="f"] .hero-txt { color: var(--fg); padding: 22px 28px 22px 0; }
body[data-look="f"] .hero .hub-hello { color: var(--fg); font-size: 38px; line-height: 1.1; }
body[data-look="f"] .hero-sub { color: var(--muted); opacity: 1; font-size: 16px; }
body[data-look="f"] .hero-live { color: var(--accent); background: none; border: 0; padding: 0; font-variant: small-caps; letter-spacing: .06em; }
body[data-look="f"] .hero-pic { margin: 14px 0; min-height: 230px; filter: saturate(.85); }
body[data-look="f"] .hub-search input { border-radius: 0; border: 0; border-bottom: 1px solid var(--fg); background: transparent; box-shadow: none; padding-left: 0; }
body[data-look="f"] .tiles { gap: 0 28px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
body[data-look="f"] .tile, body[data-look="f"] .tile.g-plan, body[data-look="f"] .tile.g-clin { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0 20px; min-height: 0; transform: none !important; }
body[data-look="f"] .tile:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
body[data-look="f"] .tile .t-ico { display: none; }
body[data-look="f"] .tile b { font-size: 22px; }
body[data-look="f"] .tile.med-tile { background-image: none; } body[data-look="f"] .tile.med-tile b::after { content: " 🔒"; font-size: 15px; }
body[data-look="f"] .tile .t-lock { display: none; }
body[data-look="f"] .btn { border-radius: 0; }

/* G — « Prestige » : fond bleu nuit dégradé, photo en grand, titres à empattement, tuiles translucides aux icônes en dégradé */
body[data-look="g"] { --bg: #0D1430; background: radial-gradient(1200px 600px at 85% -10%, #2B3E86 0%, transparent 60%), radial-gradient(900px 500px at -10% 30%, #12594F 0%, transparent 55%), linear-gradient(180deg, #0D1430 0%, #111B3D 100%); background-color: #111B3D; min-height: 100vh; color: #E9ECF7; }
html:has(body[data-look="g"]) { background: #111B3D; }
body[data-look="g"] .top .brand h1 { color: #fff; font-family: "Source Serif 4", Georgia, serif; font-weight: 600; }
body[data-look="g"] .top .eyebrow { color: #9FB0E6; }
body[data-look="g"] .who, body[data-look="g"] .who b { color: #DCE2F5; }
body[data-look="g"] .top .btn, body[data-look="g"] .hub-ext .btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
body[data-look="g"] .top .btn:hover, body[data-look="g"] .hub-ext .btn:hover { background: rgba(255,255,255,.16); }
body[data-look="g"] .hero { position: relative; grid-template-columns: 1fr; min-height: 380px; border-radius: 26px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
body[data-look="g"] .hero-pic { position: absolute; inset: 0; min-height: 0; }
body[data-look="g"] .hero-txt { position: relative; z-index: 1; align-content: end; padding: 40px 44px; background: linear-gradient(0deg, rgba(10,16,40,.92) 0%, rgba(10,16,40,.55) 45%, rgba(10,16,40,0) 80%); }
body[data-look="g"] .hero .hub-hello { font-family: "Source Serif 4", Georgia, serif; font-size: 46px; font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
body[data-look="g"] .hero-sub { font-size: 16px; opacity: .9; max-width: 640px; }
body[data-look="g"] .hero-live { background: linear-gradient(90deg, #E0473B, #F08A4B); border: 0; padding: 5px 14px; box-shadow: 0 6px 18px -6px rgba(224,71,59,.8); }
body[data-look="g"] .hero-ops { z-index: 2; }
body[data-look="g"] .hub-cta .btn { border-radius: 999px; padding-inline: 18px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
body[data-look="g"] .hub-cta .sabs-cta { background: rgba(255,255,255,.1); color: #FFD5D0; border-color: rgba(255,170,160,.45); }
body[data-look="g"] .hub-search input { border-radius: 999px; padding: 15px 24px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(10px); box-shadow: none; }
body[data-look="g"] .hub-search input::placeholder { color: #AAB4D6; opacity: 1; }
body[data-look="g"] .tiles { gap: 18px; }
body[data-look="g"] .tile, body[data-look="g"] .tile.g-plan, body[data-look="g"] .tile.g-clin { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; color: #fff; backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 20px 40px -24px rgba(0,0,0,.7); transition: transform .2s, background .2s, border-color .2s; }
body[data-look="g"] .tile:hover, body[data-look="g"] .tile:focus-visible { transform: translateY(-4px); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); }
body[data-look="g"] .tile b { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; font-size: 22px; color: #fff; }
body[data-look="g"] .tile > span:last-of-type { color: #B9C2E2; }
body[data-look="g"] .tile .t-ico { width: 50px; height: 50px; border-radius: 16px; color: #fff !important; font-size: 22px; background: linear-gradient(135deg, #5B7BFF, #2F48B8) !important; box-shadow: 0 10px 20px -10px rgba(91,123,255,.9); }
body[data-look="g"] .tile.g-clin .t-ico { background: linear-gradient(135deg, #2FD3B1, #11806C) !important; box-shadow: 0 10px 20px -10px rgba(47,211,177,.8); }
body[data-look="g"] .tile.accent .t-ico { background: linear-gradient(135deg, #F7B955, #D9772B) !important; box-shadow: 0 10px 20px -10px rgba(247,185,85,.8); }
body[data-look="g"] .tile.g-fb { border-style: dashed; }
body[data-look="g"] .tile.med-tile { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 11px); }
body[data-look="g"] .tile .t-lock { color: #FFD27A; }
body[data-look="g"] .tile .t-badge { box-shadow: 0 6px 14px -6px rgba(224,71,59,.9); }
body[data-look="g"] .hub-ext { border-top-color: rgba(255,255,255,.14); }
body[data-look="g"] .hub-ext .hint { color: #9FB0E6; }
body[data-look="g"] .link-form input { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }

/* H — « Prestige » sur fond blanc : même esprit que G (grande photo, titres à empattement, icônes en dégradé), page claire */
body[data-look="h"] { --bg: #FFFFFF; background: #FFFFFF; }
html:has(body[data-look="h"]) { background: #FFFFFF; }
body[data-look="h"] .top .brand h1 { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; color: #121A33; }
body[data-look="h"] .top .btn, body[data-look="h"] .hub-ext .btn { border-radius: 999px; }
body[data-look="h"] .hero { position: relative; grid-template-columns: 1fr; min-height: 380px; border-radius: 26px; box-shadow: 0 30px 60px -28px rgba(20, 30, 70, .45); }
body[data-look="h"] .hero-pic { position: absolute; inset: 0; min-height: 0; }
body[data-look="h"] .hero-txt { position: relative; z-index: 1; align-content: end; padding: 40px 44px; background: linear-gradient(0deg, rgba(14,22,52,.88) 0%, rgba(14,22,52,.5) 45%, rgba(14,22,52,0) 80%); }
body[data-look="h"] .hero .hub-hello { font-family: "Source Serif 4", Georgia, serif; font-size: 46px; font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
body[data-look="h"] .hero-sub { font-size: 16px; opacity: .92; max-width: 640px; }
body[data-look="h"] .hero-live { background: linear-gradient(90deg, #E0473B, #F08A4B); border: 0; padding: 5px 14px; box-shadow: 0 6px 18px -6px rgba(224,71,59,.8); }
body[data-look="h"] .hero-ops { z-index: 2; }
body[data-look="h"] .hub-cta .btn { border-radius: 999px; padding-inline: 18px; box-shadow: 0 10px 22px -14px rgba(20,30,70,.5); }
body[data-look="h"] .hub-search input { border-radius: 999px; padding: 15px 24px; background: #F5F7FB; border: 1px solid #E3E7F0; box-shadow: none; }
body[data-look="h"] .hub-search input:focus { background: #fff; }
body[data-look="h"] .tiles { gap: 18px; }
body[data-look="h"] .tile, body[data-look="h"] .tile.g-plan, body[data-look="h"] .tile.g-clin { background: #FFFFFF; border: 1px solid #EBEEF5; border-radius: 20px;
  box-shadow: 0 1px 2px rgba(20,30,70,.04), 0 18px 36px -24px rgba(20,30,70,.35); transition: transform .2s, box-shadow .2s, border-color .2s; }
body[data-look="h"] .tile:hover, body[data-look="h"] .tile:focus-visible { transform: translateY(-4px); border-color: #D7DDEB; box-shadow: 0 2px 4px rgba(20,30,70,.05), 0 26px 44px -24px rgba(20,30,70,.45); }
body[data-look="h"] .tile b { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; font-size: 22px; color: #121A33; }
body[data-look="h"] .tile .t-ico { width: 50px; height: 50px; border-radius: 16px; color: #fff !important; font-size: 22px; background: linear-gradient(135deg, #5B7BFF, #2F48B8) !important; box-shadow: 0 10px 20px -10px rgba(91,123,255,.9); }
body[data-look="h"] .tile.g-clin .t-ico { background: linear-gradient(135deg, #2FD3B1, #11806C) !important; box-shadow: 0 10px 20px -10px rgba(47,211,177,.8); }
body[data-look="h"] .tile.accent .t-ico { background: linear-gradient(135deg, #F7B955, #D9772B) !important; box-shadow: 0 10px 20px -10px rgba(247,185,85,.8); }
body[data-look="h"] .tile:not(.g-plan):not(.g-clin):not(.accent) .t-ico { background: linear-gradient(135deg, #8A94B8, #4B567D) !important; box-shadow: 0 10px 20px -10px rgba(75,86,125,.7); }
body[data-look="h"] .tile.g-fb { border-style: dashed; }
body[data-look="h"] .tile.med-tile { background-image: repeating-linear-gradient(135deg, rgba(30,133,115,.05) 0 2px, transparent 2px 11px); }

/* Utilisateurs : profil (titulaire, remplaçant, IADE…) et filtre */
.users-flt { flex-wrap: wrap; margin-bottom: 8px; } .users-flt small { color: var(--muted); font-weight: 400; }
.uprof { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.up-tit { color: #2F48B8; background: color-mix(in srgb, #2F48B8 12%, var(--surface)); }
.up-remp { color: #7A3FB0; background: color-mix(in srgb, #7A3FB0 12%, var(--surface)); }
.up-iade { color: #11806C; background: color-mix(in srgb, #11806C 13%, var(--surface)); }
.up-sec { color: #B4540A; background: color-mix(in srgb, #B4540A 12%, var(--surface)); }
.up-hosp { color: #7a5cc8; background: color-mix(in srgb, #7a5cc8 12%, var(--surface)); }
.up-pharma { color: #2E7D4F; background: color-mix(in srgb, #2E7D4F 12%, var(--surface)); }
.up-none { color: var(--muted); background: var(--surface-2); }

/* Desiderata dans la grille : case vide teintée (vert : disponible, rouge : indisponible) ; ligne des disponibles non affectés */
td.cell.ds-ok:not(.has) { background: color-mix(in srgb, var(--ok) 30%, var(--surface)) !important; box-shadow: inset 0 -3px 0 var(--ok); }
td.cell.ds-ok:not(.has)::after { content: '✓'; color: var(--ok); font-weight: 700; font-size: 11px; }
td.cell.ds-no:not(.has) { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--danger) 28%, var(--surface)) 0 4px, var(--surface) 4px 8px) !important; }
td.cell.ds-form:not(.has) { background: color-mix(in srgb, #7c3aed 22%, var(--surface)) !important; box-shadow: inset 0 -3px 0 #7c3aed; }
td.cell.ds-form:not(.has)::after { content: 'Formation'; color: #6d28d9; font-weight: 700; font-size: 10px; }
tr.ds-row td.ds-av { font-size: 10px; font-weight: 700; color: var(--ok); text-align: center; white-space: normal; line-height: 1.2; }
tr.ds-row td.ds-av.has { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }

/* Bilan IADE (Synthèse) : congés à déclarer (vacations planifiées un jour de fermeture ou férié) */
table.rc.vac td.cong { color: #B4540A; }
table.rc.vac td.kind.cong { font-weight: 600; }
#app.iade-adm section.recap:not(#iadeSynth):not(#vacSynth), #app.iade-adm #vacTable, #app.iade-adm #vacSynth > .hint, #app.iade-adm #vacExport { display: none !important; }
#app.iade-adm #vacTitle { font-size: 0; }
#app.iade-adm #vacTitle::before { content: 'Année'; font-size: 1rem; }

/* Mon profil : signature pour les factures */
.sig-box #sigPadMe { width: 100%; max-width: 460px; height: 150px; border: 1px dashed var(--muted); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.sig-cur { display: flex; align-items: center; gap: 10px; }
.sig-cur img { height: 54px; max-width: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }

/* Accueil : « Mon planning » en premier, sur toute la largeur, au-dessus des autres tuiles */
.tiles > #tMine { grid-column: 1 / -1; }
.sabs-list .sabs-h { font-size: 13px; margin: 10px 0 2px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
canvas.pen-on { border-style: solid !important; border-color: var(--accent) !important; }

/* Sous-effectif ARMPO */
.btn.under-btn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); font-weight: 600; }
.under-list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; margin: 8px 0; }
.under-day { display: grid; grid-template-columns: 190px 1fr; gap: 8px; align-items: start; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; color: var(--fg); }
.under-day:hover { border-color: var(--accent); }
.under-day .tag { margin: 0 4px 4px 0; display: inline-block; }
.tag.u-ast { background: color-mix(in srgb, var(--warn) 15%, var(--surface)); color: var(--warn); }
.tag.u-mar, .tag.u-iade { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
@media (max-width: 700px) { .under-day { grid-template-columns: 1fr; } }
table.rc.auto-t { width: 100%; table-layout: fixed; }
table.rc.auto-t th, table.rc.auto-t td { white-space: normal; text-align: left; }
table.rc.auto-t th:nth-child(1) { width: 34%; } table.rc.auto-t th:nth-child(2) { width: 28%; }
table.rc.auto-t tr.imposed td { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
table.rc.auto-t select { max-width: 100%; }
/* Espace paramédical : tout en bas de l'accueil, sous les liens utiles */
.hub-para { margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.hub-para-t { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
body[data-look="g"] .hub-para-t { color: rgba(255,255,255,.75); }
.hub .hub-para .tiles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 900px) { .hub .hub-para .tiles { grid-template-columns: repeat(4, 1fr); } }
/* Astreinte d'un MAR absent ce jour-là : impossible, à réattribuer */
.grid td.oc.conflict { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--danger) 22%, var(--surface)) 0 5px, var(--surface) 5px 10px); color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }
.ast-pref { margin: 10px 0; }
.ast-pref summary { cursor: pointer; }
.ast-pref td, .ast-pref th { text-align: center; } .ast-pref td:first-child { text-align: left; }
.ds-astd { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--night) 5%, var(--surface)); }
.ds-astd-l { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }

/* Accueil — photo d'en-tête : proportions de photo (3:2) au lieu d'un bandeau très allongé */
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); }
.hero-pic { aspect-ratio: 3 / 2; min-height: 0; }
.hero-pic .hero-img { object-position: 50% 30%; }
body[data-look="b"] .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
body[data-look="b"] .hero-pic { min-height: 0; }
body[data-look="c"] .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); min-height: 0; }
body[data-look="c"] .hero-pic { position: relative; inset: auto; }
body[data-look="c"] .hero-txt { align-content: center; background: none; }
@media (max-width: 700px) {
  .hero, body[data-look="b"] .hero, body[data-look="c"] .hero { grid-template-columns: 1fr; }
  .hero-pic { order: -1; min-height: 0; }
  body[data-look="b"] .hero-pic { margin: 0; border-radius: 0; }
}

/* Accueil — « Mon planning & échanges » mis en avant */
.hub .tiles > #tMine { background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 62%, var(--t-clin))); color: #fff; border: none; border-top: none;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 32%, transparent); position: relative; }
.hub .tiles > #tMine b, .hub .tiles > #tMine span { color: #fff; }
.hub .tiles > #tMine > span:not(.t-ico) { opacity: .9; max-width: 60ch; }
.hub .tiles > #tMine .t-ico { background: rgba(255, 255, 255, .18); color: #fff; }
.hub .tiles > #tMine::after { content: "Ouvrir →"; position: absolute; right: 22px; bottom: 20px; font-weight: 700; font-size: 14px; color: var(--accent); background: #fff; border-radius: 999px; padding: 7px 16px; box-shadow: 0 2px 8px rgb(0 0 0 / .15); }
.hub .tiles > #tMine:hover { transform: translateY(-2px); box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 40%, transparent); }
.hub .tiles > #tMine::before { display: none; }
@media (max-width: 700px) { .hub .tiles > #tMine::after { position: static; justify-self: start; margin-top: 6px; } }
@media (max-width: 700px) { body[data-look="c"] .hero .hub-hello { font-size: 26px; } body[data-look="c"] .hero-txt { padding: 20px 22px; } }
/* En-tête : boutons et liens-boutons du compte de même hauteur, alignés */
.account .btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 34px; min-height: 34px; padding: 0 12px; line-height: 1.2; white-space: nowrap; text-decoration: none; color: var(--fg); vertical-align: middle; }
/* Accueil : lignes de tuiles fixées (1re : Planning … Comptabilité ; 2e : Équipe … Annuaire ; 3e : Aides, Protocoles, Difficultés) :
   la première tuile visible de chaque ligne commence en colonne 1 (classe row-start posée par hub.js) */
.tiles > .row-start { grid-column-start: 1; }
.hub .tiles > #tMine b { font-weight: 800; font-size: 26px; letter-spacing: -.01em; }
@media (max-width: 700px) { .hub .tiles > #tMine b { font-size: 22px; } }
.cday.forced .cnt { background: var(--warn); color: #fff; border-radius: 999px; padding: 0 6px; }
.tf-force { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; padding: 8px 10px; border: 1px solid var(--warn); border-radius: 8px; background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
#tForm .tf-force { display: flex; flex-direction: row; align-items: center; gap: 10px; color: var(--fg); font-size: 14px; }
#tForm .tf-force input { width: auto; margin: 0; }
/* Pastille rouge des messages non lus (liens « Messagerie ») */
.msg-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #d93025; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle; box-shadow: 0 0 0 2px var(--surface); }
.msg-badge[hidden] { display: none; }
.tile .t-badge.msg-badge { position: absolute; margin: 0; min-width: 26px; height: 26px; border-radius: 13px; font-size: 13px; }
.tm-sig { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tm-sig img { max-height: 60px; max-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
/* Réponses des chirurgiens aux demandes d'absences */
.sr-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 6px; }
.sr-bar .nav { display: inline-flex; gap: 8px; align-items: center; }
.sr-t th small, .sr-t td small { display: block; font-weight: 400; }
.sr-t th .btn { margin-top: 4px; }
.sr-t td.sr-c { min-width: 150px; vertical-align: top; }
.sr-t td.sr-c select { margin-top: 4px; font-size: 12px; max-width: 100%; }
.sr-t td.sr-c.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.sr-t td.sr-c.abs { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); }
.sr-t td.sr-c.wait { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.sr-t input[type=email], .sr-t input[data-srassist] { min-width: 200px; }
.sr-t tr.sr-nomail td:first-child, .sr-rcp tr.sr-nomail td:first-child { color: var(--danger); box-shadow: inset 3px 0 0 var(--danger); }
.sr-t tr.sr-nomail input[data-srmail] { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.sr-miss { color: var(--danger); font-weight: 600; }
.sr-rcp { margin-top: 12px; } .sr-rcp table { margin-top: 6px; width: auto; } .sr-rcp th, .sr-rcp td { text-align: left !important; } .sr-rcp td { font-size: 13px; word-break: break-all; }
.sr-tpl { margin-top: 10px; display: grid; gap: 8px; } .sr-tpl label { display: grid; gap: 4px; } .sr-tpl textarea { width: 100%; font: inherit; }
.sr-t th .sr-all { display: flex; justify-content: flex-end; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--fg); }

/* « Astreintes auto » : bouton façon buzzer, pour signaler un automatisme */
.btn.buzz { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px; border-radius: 999px; font-weight: 700; color: #fff; border: 1px solid #8e1b1b;
  background: linear-gradient(#e53935, #b71c1c); box-shadow: 0 3px 0 #7f1414, 0 4px 8px rgba(0,0,0,.25); transform: translateY(-2px); transition: transform .08s, box-shadow .08s; }
.btn.buzz:hover { filter: brightness(1.08); border-color: #8e1b1b; }
.btn.buzz:disabled { filter: grayscale(.7) opacity(.6); transform: none; box-shadow: none; }
.btn.buzz:disabled .buzz-knob { animation: none; }
.btn.buzz:active { transform: translateY(1px); box-shadow: 0 0 0 #7f1414, 0 1px 3px rgba(0,0,0,.3); }
.buzz-knob { width: 20px; height: 20px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff8 0 18%, #ff6f60 30%, #c62828 70%, #7f1414);
  box-shadow: 0 0 0 2px #fff9, inset 0 -2px 3px rgba(0,0,0,.35); animation: buzzPulse 2.4s ease-in-out infinite; }
@keyframes buzzPulse { 50% { box-shadow: 0 0 0 2px #fff9, 0 0 8px 2px #ffcdd2, inset 0 -2px 3px rgba(0,0,0,.35); } }
@media (prefers-reduced-motion: reduce) { .buzz-knob { animation: none; } }
@media print { .btn.buzz { display: none !important; } }

/* Comptabilité : import du relevé Sécurité sociale */
.ss-prev { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.ss-prev h3 { margin: 12px 0 6px; font-size: 15px; }
.hon td.neg { color: var(--danger); font-weight: 600; }
.hon .ss-amt.auto { box-shadow: inset 3px 0 0 var(--ok); }
.hon select[data-ssp], .hon select[data-ssorph] { max-width: 340px; font-size: 12px; }
.hon select[data-ssorph] { width: 100%; }   /* même largeur pour toutes les lignes, même sans patient proposé */
.nowrap { white-space: nowrap; }
/* Dépenses : plusieurs justificatifs à la fois */
.bt-t td { vertical-align: top; } .bt-t input, .bt-t select { width: 100%; min-width: 90px; font-size: 13px; }
.bt-t td.bt-f { max-width: 200px; word-break: break-all; font-size: 13px; } .bt-t td.bt-f small { display: block; }
.bt-t tr.busy td { opacity: .7; } .bt-t tr.err .bt-f small { color: var(--danger); }
#batchBox.over { outline: 2px dashed var(--accent, #2b4c9b); outline-offset: -6px; }
.bt-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-weight: 600; } .bt-all select { min-width: 260px; }
.bt-t td.bt-f small { word-break: normal; } .bt-t td.bt-f .btn { margin-left: 4px; }
.bt-t tr.err input[data-b$="|amount"]:placeholder-shown { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.users .row .login-id input { width: 100%; height: 34px; box-sizing: border-box; font: inherit; padding: 4px 6px; }
/* Vacations types datées / répétition des vacations supplémentaires */
.vers-bar { display: grid; gap: 6px; margin: 8px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, #f5f6fa); }
.vers-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .vers-new label { display: flex; gap: 6px; align-items: center; }
.ex-rep { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .ex-rep .ex-until { display: flex; gap: 4px; align-items: center; font-size: 13px; }
/* Comptabilité : partage d'honoraires, archives */
.sh-mem { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sh-mem legend { font-weight: 600; padding: 0 4px; }
.sh-item + .sh-item { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
tr.z td { opacity: .55; }
.arch-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; } .arch-row label { display: flex; gap: 6px; align-items: center; }
#shForm .tf-grid label, #synForm .tf-grid label, #teleForm .tf-grid label { display: grid; gap: 4px; align-content: start; }
.dr-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 6px 0; } .dr-row label { display: flex; gap: 6px; align-items: center; }
/* Équipe : coordonnées manquantes en rouge */
.tm-item.tm-missing .tm-name { color: var(--danger); }
.tm-item.tm-missing .tm-name .tri { color: var(--danger); }
.tm-miss { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--danger); }
.tm-warn { margin: 0 0 8px; padding: 6px 10px; border-radius: 6px; background: color-mix(in srgb, var(--danger) 9%, var(--surface)); color: var(--danger); font-size: 13px; font-weight: 600; }
input.miss { border-color: var(--danger) !important; background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
/* Dépenses : doublons */
.dup-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
.dup-t tr.dup-h td { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 10px; }
.dup-t tbody.dup-maybe tr.dup-h td { color: var(--warn); }
.dup-t tr.dup-keep td { background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
/* Bandeau d'information de l'administrateur */
.adm-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.adm-banner.lvl-info { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--fg); }
.adm-banner.lvl-warn { background: color-mix(in srgb, var(--warn) 22%, var(--surface)); color: var(--fg); }
.adm-banner.lvl-alert { background: var(--danger); color: #fff; }
.adm-banner .ab-txt { flex: 1; } .adm-banner small { font-weight: 400; opacity: .8; }
.adm-banner .ab-x { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.banner-edit { display: grid; gap: 10px; margin: 12px 0; } .banner-edit label { display: grid; gap: 4px; } .banner-edit textarea { width: 100%; font: inherit; }
.banner-edit .bn-row { display: flex; flex-wrap: wrap; gap: 14px; }
@media print { .adm-banner { display: none; } }
/* Accueil : « Saisir mes absences » et « Saisir une absence chirurgicale » de même largeur */
.hub-cta > .btn { flex: 0 0 330px; justify-content: center; text-align: center; }
@media (max-width: 720px) { .hub-cta > .btn { flex: 1 1 100%; } }
/* Archives et synthèse / partage / téléconsultation : champs alignés, même hauteur */
#synForm select, #synForm input, .arch-row select, #shForm select, #shForm input:not([type=checkbox]), #teleForm select, #teleForm input {
  height: 38px; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; width: 100%; }
#synForm .tf-grid, #shForm .tf-grid, #teleForm .tf-grid { align-items: end; }
.arch-row { display: grid; grid-template-columns: minmax(280px, 520px) 220px max-content; justify-content: start; gap: 12px; align-items: end; }
.arch-row label:not(.chk) { display: grid; gap: 4px; }
.arch-row .chk { white-space: nowrap; padding-bottom: 9px; }
.arch-row .btn { height: 38px; }
@media (max-width: 720px) { .arch-row { grid-template-columns: 1fr; } }
/* Texte justifié sur toutes les pages (paragraphes, listes, descriptions des tuiles), avec césure française */
p, li, dd, .hint, .hero-sub, .notice li { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
td, th, td .hint, th .hint, .btn, button, label, .tag, nav, .kpi, .mchip, .seg { text-align: inherit; hyphens: manual; -webkit-hyphens: manual; }
/* Colonnes étroites (tuiles de l'accueil) : la justification y crée des trous entre les mots, on garde un alignement à gauche */
.tile p, .tile .hint, .tile > span, .tiles p, .hero-big p { text-align: left; }
/* FOPAPA (onglets comptes / documents) et classeurs de documents FOPAPA / SCI */
.fo-tabs { margin: 4px 0 14px; display: inline-flex; width: auto; }
.fo-tabs button { font-size: 15px; font-weight: 600; padding: 10px 20px; }
.dbx-up { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.dbx-up label:not(.btn) { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.dbx-up select, .dbx-up input, .dbx-edit input, .dbx-edit select, #docbox textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; min-width: 0; }
#docbox textarea { width: 100%; box-sizing: border-box; }
.dbx-up input[type=number], .dbx-edit input[type=number] { width: 90px; }
.dbx-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dbx-edit #xTitle { flex: 1; min-width: 200px; }
#dbxUp.over, #bankBox.over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.dbx-t td:first-child { width: 50%; }
.dbx-t td:first-child a { text-decoration: none; color: var(--accent); font-weight: 600; }
#docbox h3 { font-size: 14px; margin: 14px 0 4px; }
#docbox > .card { margin-bottom: 14px; }
/* Dépôt de documents : bouton « Choisir les fichiers » aligné sur les champs Dossier et Année (même hauteur, même ligne) */
.dbx-up { align-items: flex-end; }
.dbx-up select, .dbx-up input { height: 40px; box-sizing: border-box; }
.dbx-up label.btn { height: 40px; box-sizing: border-box; display: inline-flex; align-items: center; padding: 0 18px; margin: 0; }
/* Comptabilité : 3 lignes de 4 tuiles (encaissements ; paiements et comptes ; structures et documents) */
.hub .tiles.cpt-row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 1000px) { .hub .tiles.cpt-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hub .tiles.cpt-row { grid-template-columns: 1fr; } }
@media (min-width: 1001px) { .hub #tiles.cpt-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .hub #tiles.cpt-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hub #tiles.cpt-row { grid-template-columns: 1fr; } }
.hub .cpt-row > .tile b { font-size: 19px; hyphens: auto; overflow-wrap: break-word; }
/* Documents : suppression réservée à l'administrateur, en deux clics (le 2e confirme) */
.dbx-t .btn.danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.dbx-t .btn.danger.armed { background: var(--danger); color: #fff; border-color: var(--danger); }
/* Documents : visionneuse plein écran avec classement (dossier, année, intitulé) */
.dbx-view { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--bg); }
.dbx-view[hidden] { display: none; }
body.dbx-noscroll { overflow: hidden; }
.dbx-vbar, .dbx-vclass { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface, var(--bg)); }
.dbx-vbar { padding-top: max(8px, env(safe-area-inset-top)); }
.dbx-vtitle { flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.dbx-vclass label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dbx-vclass label.grow { flex: 1; min-width: 200px; }
.dbx-vclass label.grow input { flex: 1; }
.dbx-vclass select, .dbx-vclass input { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; min-width: 0; }
.dbx-vclass input[type=number] { width: 84px; }
.dbx-vbody { flex: 1; min-height: 0; display: flex; background: #525659; }
.dbx-vframe { flex: 1; width: 100%; border: 0; }
.dbx-vimg { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 12px; }
.dbx-vimg img { max-width: 100%; height: auto; background: #fff; }
.dbx-vnone { margin: auto; background: var(--surface, #fff); padding: 24px; border-radius: 10px; text-align: center; }
.dbx-todo td { background: color-mix(in srgb, var(--warn, #c77700) 8%, transparent); }
.dbx-todo-h { color: var(--warn, #b26a00); }
/* Cellules de tableau en petit texte : jamais justifiées */
td.hint, th.hint { text-align: inherit; hyphens: manual; -webkit-hyphens: manual; }
.dbx-t td.hint { white-space: nowrap; }
.dbx-vbar .btn.danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.dbx-vbar .btn.danger.armed { background: var(--danger); color: #fff; border-color: var(--danger); }
/* Règles (Envois automatiques) et fenêtre « Reprogrammer la téléconsultation » */
.rulesbox .rule { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.rulesbox .rule input { margin-top: 3px; }
.rule-mails { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px 26px; }
.rulesbox #rcForm { margin-left: 26px; }
.tc-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(15, 20, 35, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tc-modal[hidden] { display: none; }
.tc-card { background: var(--surface, #fff); color: var(--fg); border-radius: 12px; padding: 20px; width: min(640px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.tc-card h2 { margin: 0 0 8px; font-size: 18px; }
.tc-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tc-row > div { flex: 1; min-width: 160px; }
.tc-row label { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.tc-row select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; }
.rule-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.rulesbox #rcForm { display: flex; gap: 8px; flex-wrap: wrap; }
.rulesbox #rcNew { flex: 1; min-width: 240px; max-width: 420px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; }
/* Bouton « ↶ Annuler » (toutes les pages) */
.undo-btn { position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 900; max-width: min(460px, calc(100vw - 32px)); display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface, #fff); color: var(--fg); font: inherit; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18); cursor: pointer; white-space: nowrap; }
.undo-btn[hidden] { display: none; }
.undo-btn:hover { border-color: var(--accent); }
.undo-btn .undo-lbl { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.undo-done { position: fixed; left: 16px; bottom: 70px; z-index: 900; padding: 10px 14px; border-radius: 10px; background: #1f2a44; color: #fff; font-size: 14px; box-shadow: 0 4px 18px rgba(0, 0, 0, .25); }
@media print { .undo-btn, .undo-done { display: none !important; } }
.dbx-trash { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0 14px; background: color-mix(in srgb, var(--danger) 4%, transparent); }
/* « Effectifs » : feu tricolore (sous-effectif ARMPO sur 8 semaines) */
.btn.under-btn { color: var(--fg); border-color: var(--line); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.under-btn .light { display: inline-flex; gap: 3px; background: #1d2433; padding: 4px 5px; border-radius: 7px; }
.under-btn .light i { width: 9px; height: 9px; border-radius: 50%; background: #3b4256; display: block; }
.under-btn[data-light="r"] .light i:nth-child(1) { background: #ff4d3a; box-shadow: 0 0 6px #ff4d3a; }
.under-btn[data-light="o"] .light i:nth-child(2) { background: #ffb020; box-shadow: 0 0 6px #ffb020; }
.under-btn[data-light="g"] .light i:nth-child(3) { background: #35c46b; box-shadow: 0 0 6px #35c46b; }
.btn.under-btn[data-light="r"] { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
/* Page « Astreintes » (administrateur) */
#app.show-ast #planArea, #app.show-ast #legend, #app.show-ast #palette, #app.show-ast .seg:has(#vOrient) { display: none !important; }
.ast-view { margin: 12px 0 24px; }
.ast-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ast-head h2 { margin: 0; font-size: 20px; }
.ast-t { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ast-t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ast-t td { padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.ast-t tr.we td { background: var(--off); }
.ast-t tr.today td { box-shadow: inset 3px 0 0 var(--accent); }
.ast-d { white-space: nowrap; width: 130px; } .ast-d small { color: var(--muted); }
.ast-who { cursor: pointer; font-weight: 600; width: 230px; } .ast-who:hover { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.ast-st { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.ast-st.bloc { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.ast-st.here { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 500; }
.ast-st.away { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--warn); }
.ast-st.abs, .ast-st.none { background: color-mix(in srgb, var(--danger) 13%, var(--surface)); color: var(--danger); }
.ast-st.we { color: var(--muted); font-weight: 500; }
.ast-bloc { display: flex; flex-wrap: wrap; gap: 4px; }
.ast-chip { font: inherit; font-size: 12px; font-family: var(--f-mono, monospace); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.ast-chip:hover { border-color: var(--accent); } .ast-chip.on { background: var(--night, #1f2a44); color: #fff; border-color: transparent; }
.bad-t { color: var(--danger); }
.ast-cnt { margin-top: 10px; }
@media (max-width: 700px) { .ast-t th:nth-child(4), .ast-t td:nth-child(4) { display: none; } .ast-who { width: auto; } }
.tcexp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .tcexp #tcxTo { flex: 1; min-width: 240px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; } .tcexp select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; }
/* Honoraires : sections repliables (triangle), PDF des relevés, indus */
details.ss-fold > summary { list-style: none; cursor: pointer; }
details.ss-fold > summary::-webkit-details-marker { display: none; }
details.ss-fold > summary .sec-head h2::before { content: '▶'; display: inline-block; font-size: .7em; margin-right: 8px; transition: transform .15s; vertical-align: middle; }
details.ss-fold[open] > summary .sec-head h2::before { transform: rotate(90deg); }
.ss-pdfs { margin-top: 12px; } .ss-pdfs h4 { margin: 8px 0 4px; font-size: 13px; color: var(--muted); }
.ss-pdf-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ss-indus-bar { margin: 6px 0 10px; align-items: center; }
.dup-grp { border-top: 1px solid var(--line); padding: 6px 0; display: grid; gap: 4px; } .dup-ct { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .dup-ct.dup-keep { background: color-mix(in srgb, var(--ok) 7%, transparent); border-radius: 6px; padding: 2px 6px; }
/* Icône 📞 → annuaire (toutes les pages) */
.annu-link { padding: 6px 10px; font-size: 16px; line-height: 1; text-decoration: none; }
.annu-float { position: fixed; top: 10px; right: 12px; z-index: 50; }
@media print { .annu-link { display: none !important; } }
/* Protocoles : notes de l'équipe */
.lib-note .note-text { white-space: pre-wrap; line-height: 1.5; text-align: left; }
.lib-note textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 10px; font: inherit; line-height: 1.5; }
/* Bandeau « Tâches » (accueil) */
.tasks-band { margin: 12px 0 16px; }
.tasks-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tasks-head h2 { margin: 0; font-size: 17px; } .tasks-tools { display: flex; gap: 10px; align-items: center; }
.task-list { display: grid; gap: 6px; margin-top: 10px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.task.mine { border-left: 3px solid var(--accent); }
.task-badge { margin-left: 6px; padding: 1px 9px; border-radius: 999px; border: 0; background: #c62828; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.task-main { flex: 1; min-width: 0; } .task-text { white-space: pre-wrap; text-align: left; font-weight: 500; }
.task-st { flex: none; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.task-st.todo { background: color-mix(in srgb, var(--warn) 15%, var(--surface)); color: var(--warn); }
.task-st.doing { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.task-st.done { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.task.st-done .task-text { text-decoration: line-through; color: var(--muted); }
.task-who { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; }
.task-ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.task-form { display: grid; gap: 8px; margin-top: 10px; }
.task-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 8px 10px; font: inherit; }
.task-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-pick { display: inline-flex; gap: 4px; align-items: center; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.task-pick.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: var(--accent); }
@media (max-width: 600px) { .task { flex-wrap: wrap; } .task-ops { width: 100%; justify-content: flex-start; } }

/* Planning : en-tête compact (logo réduit, sans grand titre ; barre d'outils resserrée) pour laisser la place à la grille */
header.top.compact { align-items: center; gap: 8px 16px; }
header.top.compact .brand { display: none; }
header.top.compact .logo { height: 38px; width: auto; }
header.top.compact .nav-pair { align-self: center; }
.plan-bar { gap: 6px 8px; margin-top: 8px; }
.plan-bar .btn, .plan-bar .seg button { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.plan-bar .btn.icon { padding: 4px 8px; }
.plan-bar .period { font-size: 18px; padding: 0 4px; }
.plan-bar .exports { gap: 4px; }
@media print { header.top.compact .brand { display: block; } }
header.top.compact nav.modules a, header.top.compact .main-tabs button, header.top.compact .account .btn { display: inline-flex; align-items: center; min-height: 30px; height: 30px; padding: 0 10px; font-size: 13px; }
header.top.compact .status span { display: none; }   /* état de synchronisation : le point coloré suffit (détail au survol) */
header.top.compact .account { gap: 6px; }
#app.wrap:has(> header.top.compact) { padding-top: 10px; gap: 10px; }
.plan-bar { margin-top: 0; }

/* Planning : menu « ⋯ Plus » (actions moins fréquentes) pour tenir sur 2 lignes */
.plan-bar .more { position: relative; }
.plan-bar .more > summary { list-style: none; cursor: pointer; user-select: none; }
.plan-bar .more > summary::-webkit-details-marker { display: none; }
.plan-bar .more[open] > summary { background: var(--accent); color: var(--accent-fg); }
.plan-bar .more-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); min-width: 240px; }
.plan-bar .more-pop .seg, .plan-bar .more-pop .exports { display: flex; }
.plan-bar .more-pop .seg button, .plan-bar .more-pop .btn { width: 100%; justify-content: flex-start; text-align: left; }
.plan-bar .more-pop .exports .btn { width: auto; flex: 1; justify-content: center; text-align: center; }
.plan-bar .spacer { min-width: 0; }
@media (min-width: 900px) {
  .plan-bar { flex-wrap: nowrap; }
  .plan-bar > * { flex-shrink: 0; }
  .plan-bar .period { flex: 1 1 auto; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
  .plan-bar .spacer { display: none; }
}
.plan-bar .more > summary.btn { display: inline-flex; align-items: center; min-height: 30px; height: 30px; padding: 0 10px; font-size: 13px; box-sizing: border-box; }
@media (min-width: 900px) { header.top.compact { flex-wrap: nowrap; } header.top.compact > * { min-width: 0; } }
@media (max-width: 1250px) { header.top.compact .who { display: none; } }   /* écran étroit : le nom du compte est retiré pour garder 2 lignes */
@media (min-width: 900px) and (max-width: 1199px) {
  header.top.compact .brand-row { display: none; }
  .plan-bar .under-btn { font-size: 0; gap: 0; }   /* « Effectifs » : le voyant seul (libellé au survol) */
  .plan-bar .under-btn .light { font-size: 13px; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  header.top.compact { gap: 6px 10px; }
  header.top.compact nav.modules a, header.top.compact .main-tabs button, header.top.compact .account .btn { padding: 0 8px; font-size: 12.5px; }
  .plan-bar { gap: 4px 6px; }
  .plan-bar .btn, .plan-bar .seg button, .plan-bar .more > summary.btn { padding: 0 8px; font-size: 12.5px; }
}
header.top.compact, .plan-bar { min-width: 0; }   /* éléments de la grille .wrap : rétrécissent avec la fenêtre */
@media (min-width: 900px) and (max-width: 1199px) { .plan-bar .btn.under-btn { font-size: 0; gap: 0; padding: 0 8px; } }
/* Comptabilité des consultations : onglets Présentielle / Téléconsultation / Douleur */
nav.subnav.cons-tabs { justify-self: start; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
nav.subnav.cons-tabs a { border-color: transparent; background: transparent; }
nav.subnav.cons-tabs a[aria-current="page"] { background: var(--accent); }

/* Tâches : une tâche sur une seule ligne (texte complet au survol) */
.task { align-items: center; padding: 6px 10px; }
.task-main { display: flex; align-items: center; gap: 10px; }
.task-main .task-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-main .task-meta { flex: none; white-space: nowrap; }
.task-ops { flex-wrap: nowrap; }
@media (max-width: 700px) { .task-main { flex-wrap: wrap; gap: 2px 8px; } .task-main .task-text { white-space: normal; } .task-main .task-meta { white-space: normal; } }
/* Accueil : bandeau de bienvenue compact (moins de place en haut de page) */
.hero { min-height: 0; height: 160px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); border-radius: 14px; }
.hero-txt { padding: 14px 24px; gap: 4px; }
.hero .hub-hello { font-size: 24px; }
.hero-sub { font-size: 13.5px; }
.hero-live { margin-top: 4px; font-size: 12px; padding: 2px 10px; }
.hero-pic { min-height: 0; height: 160px; }
.hero-pic .hero-img { object-position: 50% 28%; }
.hero-ops { right: 8px; bottom: 8px; }
.hero-btn { padding: 4px 10px; font-size: 12px; }
@media (max-width: 700px) { .hero { height: auto; grid-template-columns: 1fr; } .hero-pic { height: 140px; } .hero .hub-hello { font-size: 21px; } }
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
.hero-pic { aspect-ratio: auto; }
.hero-pic .hero-img { object-position: 50% 30%; }
/* Message court de l'administrateur dans le cadre de bienvenue */
.hero-msg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.hero-msg .hm-text { margin: 0; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 4px 10px; color: #fff; }
.hero-msg .hm-form { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.hero-msg .hm-form input { flex: 1; min-width: 200px; border: 0; border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 13px; }
body[data-look="b"] .hero-msg .hm-text { color: var(--fg); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
/* Message d'accueil : encadré blanc, texte bleu ; le cadre s'agrandit si besoin (marge en dessous) */
.hero { height: auto; min-height: 160px; }
.hero-pic { height: auto; min-height: 160px; }
.hero-txt { padding: 16px 24px 20px; }
.hero-sub { text-align: left; }
.hero-msg { margin: 6px 0 2px; }
.hero-msg .hm-text { background: #fff; color: var(--accent); border: 0; border-radius: 10px; padding: 6px 12px; box-shadow: 0 2px 8px rgba(10, 20, 50, .18); }
:root[data-theme="dark"] .hero-msg .hm-text { color: #1c2a52; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-msg .hm-text { color: #1c2a52; } }
section.hero.hero { grid-template-columns: minmax(0, 1fr) clamp(220px, 34%, 440px); }
.hero .hub-hello, .hero-msg .hm-text { text-align: left; }
/* Photos de l'accueil centrées (légèrement au-dessus du milieu, là où sont les visages) */
.hero-pic .hero-img, .hero-img { object-position: 50% 42%; }
/* Bandeau d'information : clignote les 3 derniers jours avant son retrait */
@keyframes abBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.adm-banner.ab-blink { animation: abBlink 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .adm-banner.ab-blink { animation: none; outline: 3px solid var(--danger); outline-offset: -3px; } }

/* Tuile « Dépenses » de l'accueil : teinte rouge / rose, quel que soit le style choisi */
#tDep.tile { --tc: #C62848; background: #FDF0F3 !important; border-color: #F4C7D2 !important; border-top: 4px solid var(--tc) !important; }
#tDep.tile .t-ico { background: linear-gradient(135deg, #E8577A, #B71C3C) !important; color: #fff !important; box-shadow: 0 10px 20px -12px rgba(183, 28, 60, .8); }
#tDep.tile b { color: #9E1B36; }
#tDep.tile:hover, #tDep.tile:focus-visible { border-color: var(--tc) !important; }

/* Synthèse des absences chirurgicales (Programme chirurgical → Absences) */
.sabs-syn { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.sabs-bar { display: flex; align-items: center; gap: 8px; } .sabs-bar .spacer { flex: 1; } .sabs-m { min-width: 130px; text-align: center; }
.sabs-weeks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sabs-wk { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; background: color-mix(in srgb, var(--danger) var(--h, 0%), var(--surface)); }
.sabs-wk.top { border-color: var(--danger); font-weight: 600; }
.sabs-t { border-collapse: collapse; font-size: 12px; width: 100%; }
.sabs-t th, .sabs-t td { border: 1px solid var(--line); padding: 3px 2px; text-align: center; min-width: 22px; }
.sabs-t thead th { font-weight: 600; font-variant-numeric: tabular-nums; } .sabs-t thead small { display: block; color: var(--muted); font-size: 10px; }
.sabs-t tbody th { text-align: left; white-space: nowrap; padding: 3px 8px; position: sticky; left: 0; background: var(--surface); font-weight: 600; z-index: 1; }
.sabs-t .we { background: color-mix(in srgb, var(--muted) 10%, var(--surface)); }
.sabs-t .mon { border-left: 2px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sabs-t td.ab-j { background: color-mix(in srgb, var(--danger) 70%, var(--surface)); }
.sabs-t td.ab-M, .sabs-t td.ab-A { background: color-mix(in srgb, var(--danger) 30%, var(--surface)); color: color-mix(in srgb, var(--danger) 80%, #000); font-size: 9.5px; font-weight: 700; }
.sabs-t .sabs-sum td { font-weight: 700; background: color-mix(in srgb, var(--danger) var(--h, 0%), var(--surface)); }
.sabs-t .sabs-sum td.dk { color: #fff; }
.sabs-more { margin-top: 6px; } .sabs-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }

/* Bulle d'une case de remplaçant : titulaire remplacé (administrateur) */
.repl-set { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; }
.repl-set select { margin-left: 6px; max-width: 220px; }
/* Avertissement avant la déconnexion automatique */
.idle-warn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1000; max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px; background: #9E1B36; color: #fff; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }

/* Utilisateurs → envois automatiques : jours et heures */
.sched-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sched-box h3 { margin: 0 0 4px; }
.sched-list { display: grid; gap: 6px; margin-top: 8px; }
.sched-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.sched-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.sched-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.sched-when select { width: auto; }
@media (max-width: 700px) { .sched-row { grid-template-columns: 1fr; } .sched-when { justify-content: flex-start; } }
.rib-ops { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.rib-ops label.btn { display: inline-flex; align-items: center; cursor: pointer; margin: 0; font-weight: 600; }
/* Mon profil : onglets */
/* Onglets façon navigateur : bande teintée, onglet actif blanc relié au contenu (coins inversés) */
.prof-tabs { --pt-bg: color-mix(in srgb, var(--accent) 11%, var(--surface)); display: flex; align-items: flex-end; gap: 2px; margin: 0 -18px 4px; padding: 8px 14px 0; background: var(--pt-bg); border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.prof-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500;
  padding: 10px 16px 11px; border-radius: 12px 12px 0 0; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.prof-tabs button:not([aria-pressed="true"]):hover { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink, inherit); }
.prof-tabs button:not([aria-pressed="true"]) + button:not([aria-pressed="true"])::before { content: ''; position: absolute; left: -1px; top: 25%; height: 50%; width: 1px; background: color-mix(in srgb, var(--muted) 35%, transparent); }
.prof-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink, inherit); font-weight: 650; box-shadow: 0 -1px 0 var(--line), 1px 0 0 var(--line), -1px 0 0 var(--line); }
.prof-tabs button[aria-pressed="true"]::before, .prof-tabs button[aria-pressed="true"]::after { content: ''; position: absolute; bottom: 0; width: 12px; height: 12px; pointer-events: none; }
.prof-tabs button[aria-pressed="true"]::before { left: -12px; background: radial-gradient(circle at 0 0, transparent 11.5px, var(--surface) 12px); }
.prof-tabs button[aria-pressed="true"]::after { right: -12px; background: radial-gradient(circle at 100% 0, transparent 11.5px, var(--surface) 12px); }
.prof-tabs .pt-ico { font-size: 15px; line-height: 1; }
@media (max-width: 560px) { .prof-tabs button { padding: 9px 11px 10px; font-size: 13px; gap: 6px; } }
.prof-dlg[data-tab="coord"] [data-ptab]:not([data-ptab="coord"]),
.prof-dlg[data-tab="code"] [data-ptab]:not([data-ptab="code"]),
.prof-dlg[data-tab="rib"] [data-ptab]:not([data-ptab="rib"]),
.prof-dlg[data-tab="vac"] [data-ptab]:not([data-ptab="vac"]) { display: none !important; }

/* Comptabilité : menus du haut en onglets façon navigateur (comme Mon profil). L'onglet actif prend le fond de la page. */
nav.subnav[aria-label="Comptabilité"] { --pt-bg: color-mix(in srgb, var(--accent) 12%, var(--bg)); display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 2px;
  padding: 6px 12px 0; background: var(--pt-bg); border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
nav.subnav[aria-label="Comptabilité"]::-webkit-scrollbar { display: none; }
nav.subnav[aria-label="Comptabilité"] a { position: relative; border: 0; background: transparent; border-radius: 11px 11px 0 0; padding: 9px 15px 10px; margin-bottom: -1px;
  color: var(--muted); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; }
nav.subnav[aria-label="Comptabilité"] a:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink, inherit); }
nav.subnav[aria-label="Comptabilité"] a:not([aria-current="page"]) + a:not([aria-current="page"])::before { content: ''; position: absolute; left: -1px; top: 26%; height: 48%; width: 1px; background: color-mix(in srgb, var(--muted) 35%, transparent); }
nav.subnav[aria-label="Comptabilité"] a[aria-current="page"] { background: var(--bg); color: var(--ink, inherit); font-weight: 650; border: 1px solid var(--line); border-bottom-color: var(--bg); }
nav.subnav[aria-label="Comptabilité"] a[aria-current="page"]::before, nav.subnav[aria-label="Comptabilité"] a[aria-current="page"]::after { content: ''; position: absolute; bottom: -1px; width: 11px; height: 11px; pointer-events: none; }
nav.subnav[aria-label="Comptabilité"] a[aria-current="page"]::before { left: -12px; background: radial-gradient(circle at 0 0, transparent 10.5px, var(--line) 10.5px, var(--line) 11.5px, var(--bg) 11.5px); }
nav.subnav[aria-label="Comptabilité"] a[aria-current="page"]::after { right: -12px; background: radial-gradient(circle at 100% 0, transparent 10.5px, var(--line) 10.5px, var(--line) 11.5px, var(--bg) 11.5px); }
@media (max-width: 560px) { nav.subnav[aria-label="Comptabilité"] a { padding: 8px 11px 9px; font-size: 13px; } }
header.top nav.subnav[aria-label="Comptabilité"] { flex-wrap: nowrap; }
/* Onglets de comptabilité placés au-dessus du contenu, sur toute la largeur */
nav.subnav.tabs-row[aria-label="Comptabilité"] { width: 100%; margin: 10px 0 12px; box-sizing: border-box; }
nav.cons-tabs { margin: -4px 0 12px; }
header.top.tabs-moved .account { margin-left: auto; }

/* Semaine type : anesthésiste préférentiel sous le chirurgien */
.tpl-rooms td.has select { display: block; width: 100%; min-width: 0; }
.tpl-rooms select.tpl-pref { margin-top: 3px; font-size: 11px; color: var(--muted); border-style: dashed; }
.tpl-rooms select.tpl-pref.set { color: var(--accent); font-weight: 600; border-style: solid; }
.st-pref { display: block; font-size: 11.5px; color: var(--accent); }
/* Bibliothèque, classement par famille : rubriques repliables avec un petit triangle */
details.fam-group > summary { list-style: none; cursor: pointer; }
details.fam-group > summary::-webkit-details-marker { display: none; }
.fam-group .fam-tri { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent var(--muted); transition: transform .15s; flex: none; }
details.fam-group[open] .fam-tri { transform: rotate(90deg); }
details.fam-group > summary:hover .fam-tri { border-left-color: var(--accent); }
details.fam-group:not([open]) { gap: 0; }
/* Planning : feu tricolore de confirmation des dates d'un remplaçant (à côté du nom) */
.rlight { display: inline-flex; gap: 2px; align-items: center; margin-left: 6px; padding: 2px 4px; border: 1px solid #2b2f38; border-radius: 6px; background: #2b2f38; cursor: pointer; vertical-align: middle; line-height: 0; }
.rlight:disabled { cursor: default; }
.rlight i { width: 7px; height: 7px; border-radius: 50%; background: #4a4f5a; display: inline-block; }
.rlight.st-no i.r { background: #ef4444; box-shadow: 0 0 5px #ef4444; }
.rlight.st-pending i.o { background: #f59e0b; box-shadow: 0 0 5px #f59e0b; }
.rlight.st-ok i.g { background: #22c55e; box-shadow: 0 0 5px #22c55e; }
.rlight.st-none { opacity: .55; }
.rlight:not(:disabled):hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.rlight.st-part i.g { background: #22c55e; box-shadow: 0 0 5px #22c55e; }
.rlight.st-part i.r { background: #ef4444; box-shadow: 0 0 5px #ef4444; }
td.cell.rc-refused { outline: 2px solid #dc2626; outline-offset: -2px; }
/* Menu Utilisateurs : rubriques repliables */
details.u-sec > summary { list-style: none; cursor: pointer; }
details.u-sec > summary::-webkit-details-marker { display: none; }
details.u-sec > summary h3 { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
details.u-sec .fam-tri, details.fam-group .fam-tri { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent var(--muted); transition: transform .15s; flex: none; }
details.u-sec[open] .fam-tri { transform: rotate(90deg); }
details.u-sec > summary:hover .fam-tri { border-left-color: var(--accent); }
/* Page de connexion : « Code oublié ? » */
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; justify-self: center; }
.fg-card h2 { margin: 0; font-family: var(--f-display); font-size: 22px; }
.fg-msg { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--fg); }
/* Paramètres administrateur */
.sec-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin: 6px 0; }
.sec-row > span:first-child { display: grid; gap: 2px; }
.sec-in { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sec-in input { width: 80px; text-align: right; }
.sec-in small { margin-left: 6px; }
.sec-chks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 2px; }
.sec-fadd { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sec-fadd input { flex: 1; min-width: 180px; }
.users-top { display: flex; justify-content: flex-end; margin: -6px 0 4px; }
select.uprof-sel { font-size: 12px; padding: 3px 6px; } select.uprof-sel.set { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) { .sec-row { grid-template-columns: 1fr; } }
.sec-funcs { display: grid; gap: 8px; margin: 8px 0; }
.sec-func.card, .sec-fadd.card { padding: 10px 12px; display: grid; gap: 8px; }
.sf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; } .sf-head b { flex: 1; min-width: 140px; }
.sf-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; }
.sf-areas > .hint { grid-column: 1 / -1; }
.sf-areas label.chk { display: flex !important; align-items: flex-start; justify-content: flex-start; gap: 6px; text-align: left; font-size: 13px; margin: 0; grid-template-columns: none; }
.sf-areas label.chk input { flex: none; margin-top: 2px; width: auto; }
.sec-fadd .ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sf-areas label.chk input[type=checkbox] { width: 16px !important; min-width: 16px; height: 16px; flex: 0 0 16px !important; padding: 0; }
.sec-col { display: grid; gap: 6px; }
.sec-col label.chk { display: block; padding-left: 24px; text-indent: -24px; line-height: 1.4; }
.sec-col label.chk input { margin-right: 8px; vertical-align: -2px; }
.sec-dis { display: grid; gap: 4px; margin-top: 10px; } .sec-dis .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
/* Vacations types (salles) : 10 demi-journées de même largeur, menus pleine largeur (plus de colonne tassée) */
table.tpl.tpl-rooms { table-layout: fixed; width: 100%; min-width: 1180px; }
table.tpl.tpl-rooms thead tr:first-child th:first-child, table.tpl.tpl-rooms tbody th { width: 84px; }
table.tpl.tpl-rooms td select, table.tpl.tpl-rooms td select.wide { width: 100%; min-width: 0; box-sizing: border-box; }
table.tpl.tpl-rooms td { vertical-align: middle; }
/* Préférences de jour pour l'astreinte : colonnes des jours de même largeur, cases centrées et alignées */
table.ast-pref-t { table-layout: fixed; width: 100%; }
table.ast-pref-t th:first-child, table.ast-pref-t td:first-child { width: 34%; text-align: left; }
table.rc.auto-t.ast-pref-t th:not(:first-child), table.rc.auto-t.ast-pref-t td:not(:first-child) { text-align: center; padding-left: 4px; padding-right: 4px; }
table.ast-pref-t th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
table.ast-pref-t td input[type=checkbox] { display: block; margin: 0 auto; width: 18px; height: 18px; }
table.rc.auto-t.ast-pref-t th:nth-child(2) { width: auto; }   /* la règle des propositions (2e colonne large) ne s’applique pas ici */
/* Planning IADE auto */
.ia-auto { margin-left: 10px; vertical-align: middle; font-size: 12px; padding: 3px 10px; }
table.ia-t th:nth-child(1) { width: 22%; } table.ia-t th:nth-child(2) { width: 24%; }
input.ia-need { width: 60px; text-align: right; }
.ia-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); font-size: 12px; font-weight: 600; }
.ast-t .ia-nos { text-align: center; width: 1%; white-space: nowrap; font-size: 12px; }
.ast-t .ia-nos input { width: 18px; height: 18px; cursor: pointer; }
.ast-t tr.ia-stop td { color: var(--muted); }
.ast-t tr.bad td { background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
/* Bouton WhatsApp (partage vers un groupe) */
.wa-btn { border-color: #25d366 !important; color: #128c4b !important; background: color-mix(in srgb, #25d366 8%, var(--surface)) !important; text-decoration: none; white-space: nowrap; }
.wa-btn:hover { background: color-mix(in srgb, #25d366 18%, var(--surface)) !important; }
.ast-head-ops { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.clr-menu { position: relative; }
.clr-menu > summary { list-style: none; cursor: pointer; }
.clr-menu > summary::-webkit-details-marker { display: none; }
.clr-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); white-space: nowrap; }
/* Accueil : saisie du message d'accueil lisible (texte bleu foncé sur fond blanc, comme le message publié) */
.hero-msg .hm-form input { background: #fff !important; color: #1f2d5c !important; -webkit-text-fill-color: #1f2d5c; caret-color: #1f2d5c; font-weight: 600; }
.hero-msg .hm-form input::placeholder { color: #7a8299; -webkit-text-fill-color: #7a8299; font-weight: 400; }
.ia-form { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, #7c3aed 14%, var(--surface)); color: #6d28d9; font-size: 12px; font-weight: 600; }
/* En-tête des pages Astreintes / IADE : boutons alignés, même hauteur */
.ast-head-ops { align-items: center; }
.ast-head-ops > .btn, .ast-head-ops > .clr-menu > summary.btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; box-sizing: border-box; padding: 0 14px; font-size: 14px; line-height: 1; margin: 0; vertical-align: middle; }
.ast-head-ops > .clr-menu { display: inline-flex; }
.ast-head-ops > .btn.buzz { padding-left: 6px; transform: none; box-shadow: 0 2px 0 #7f1414, 0 3px 6px rgba(0,0,0,.2); }
/* Classeurs : sélection multiple pour supprimer */
.dbx-ck { width: 17px; height: 17px; margin: 0 8px 0 0; vertical-align: middle; cursor: pointer; }
.dbx-t tr.dbx-sel td { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.dbx-selbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); }
.dbx-cell { display: flex; align-items: center; gap: 4px; }
.dbx-cell .dbx-ck { flex: 0 0 auto; }
table.hon input.dbx-ck, .dbx-ck { width: 17px !important; min-width: 17px; height: 17px; padding: 0; flex: 0 0 17px; margin: 0 8px 0 0; accent-color: var(--accent); }
/* Bouton « Accueil » bien visible sur toutes les pages : vert d'eau avec une petite maison */
nav.modules a[href="/accueil"] { background: linear-gradient(135deg, #14b8a6, #0d9488); color: #fff; }
nav.modules a[href="/accueil"] { display: inline-flex; align-items: center; gap: 6px; }
nav.modules a[href="/accueil"]::before { content: ''; width: 15px; height: 15px; flex: 0 0 15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5.5 9v10.5a1 1 0 0 0 1 1h4v-6h3v6h4a1 1 0 0 0 1-1V9'/%3E%3C/svg%3E") center / contain no-repeat; }
nav.modules a[href="/accueil"]:hover:not([aria-current]) { background: linear-gradient(135deg, #0d9488, #0f766e); color: #fff; }
nav.modules a[href="/accueil"][aria-current="page"] { background: linear-gradient(135deg, #0d9488, #115e59); }

/* Corbeille : icône « boîte à aiguilles » (jaune, couvercle rouge, symbole de danger) */
.ico-sharps { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.28em; margin-right: 5px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cline x1='13.5' y1='5' x2='18.5' y2='0.6' stroke='%2364748b' stroke-width='1.3' stroke-linecap='round'/%3E%3Cline x1='17.2' y1='0.4' x2='19.6' y2='2.4' stroke='%2364748b' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M4 8.2h16l-1.6 13a1.2 1.2 0 0 1-1.2 1H6.8a1.2 1.2 0 0 1-1.2-1z' fill='%23facc15' stroke='%23a16207' stroke-width='.8'/%3E%3Crect x='2.6' y='4.4' width='18.8' height='4.4' rx='1.2' fill='%23dc2626' stroke='%23991b1b' stroke-width='.8'/%3E%3Crect x='8' y='5.9' width='8' height='1.4' rx='.7' fill='%237f1d1d'/%3E%3Cg fill='none' stroke='%231f2937' stroke-width='1.1'%3E%3Ccircle cx='12' cy='13.2' r='1.9'/%3E%3Ccircle cx='9.9' cy='16.8' r='1.9'/%3E%3Ccircle cx='14.1' cy='16.8' r='1.9'/%3E%3C/g%3E%3Ccircle cx='12' cy='15.6' r='.8' fill='%231f2937'/%3E%3C/svg%3E") center / contain no-repeat; }
.ico-sharps.big { width: 1.5em; height: 1.5em; vertical-align: -0.35em; }
/* Bibliothèques : boutons de la barre (Gérer la bibliothèque, Corbeille) alignés, même hauteur */
.lib-bar > .btn, .lib-bar > a.btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; box-sizing: border-box; padding: 0 14px; margin: 0; line-height: 1; vertical-align: middle; font-size: 14px; }
.lib-bar > a.btn .ico-sharps { margin-right: 0; vertical-align: 0; }
/* Corbeille : léger fond jaune (boutons, onglet, tuile de l'accueil) */
a.btn[href^="/corbeille"] { background: #fef9c3; border-color: #fde68a; color: #713f12; }
a.btn[href^="/corbeille"]:hover { background: #fef08a; }
nav.modules a[href="/corbeille"]:not([aria-current]) { background: #fef9c3; color: #713f12; }
#tTrash .t-ico { background: #fef9c3; }
/* Champs numériques : sans les petites flèches haut / bas (inutilisées) */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
/* … sauf pour les années, les jours et les mois */
input[type=number].spin, input[type=number][min="1990"] { -moz-appearance: auto; appearance: auto; }
input[type=number].spin::-webkit-inner-spin-button, input[type=number][min="1990"]::-webkit-inner-spin-button { -webkit-appearance: inner-spin-button; appearance: auto; }
/* Impayés : note de chaque ligne */
.imp-note { display: block; margin-top: 4px; padding: 2px 8px; border: 1px dashed var(--line); border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; max-width: 340px; }
.imp-note.has { border-style: solid; border-color: #fde68a; background: #fefce8; color: #713f12; }
.imp-note:hover { border-color: var(--accent); }
.imp-note-ed { display: flex; gap: 4px; margin-top: 4px; }
.imp-note-ed input { flex: 1; min-width: 160px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 13px; }
/* Tâches : notes de suivi datées */
.task-notes { list-style: none; margin: 6px 0 0; padding: 6px 0 0 10px; border-left: 3px solid #fde68a; font-size: 13px; display: grid; gap: 3px; }
.task-notes .tn-d, .task-noteform .tn-d { display: inline-block; min-width: 62px; font-variant-numeric: tabular-nums; color: #92400e; font-weight: 600; font-size: 12px; }
.task-notes .tn-del { color: var(--muted); font-size: 11px; }
.task-noteform { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.task-noteform input { flex: 1; min-width: 200px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; }
.task-main:has(.task-notes), .task-main:has(.task-noteform) { flex-wrap: wrap; }
.task-main .task-notes, .task-main .task-noteform { flex: 0 0 100%; width: 100%; box-sizing: border-box; text-align: left; }
.task-notes li { line-height: 1.45; }
.task-notes .tn-del { border: 0; background: none; padding: 0 4px; cursor: pointer; }
/* Annuaire : listes modifiables (catégories, spécialités) */
.ct-lists-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.ct-lists-grid label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.ct-lists-grid textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 14px; resize: vertical; }
@media (max-width: 700px) { .ct-lists-grid { grid-template-columns: 1fr; } }
.ct-conf { font-size: 13px; color: #713f12; align-self: end; }
.tag.ct-lock { background: #fef3c7; color: #92400e; border-color: #fde68a; font-size: 11px; }

/* Accueil : fond discret façon moniteur d'anesthésie (tracés ECG et capnographie), derrière le contenu, fixe */
body[data-page="accueil"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='140' viewBox='0 0 420 140' fill='none' stroke='%23334271' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 50h70l10-16 10 40 12-62 11 52 8-14h70l10-16 10 40 12-62 11 52 8-14h80' stroke-opacity='.06'/%3E%3Cpath d='M0 115h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18' stroke-opacity='.045'/%3E%3C/svg%3E"); background-repeat: repeat; background-attachment: fixed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-page="accueil"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='140' viewBox='0 0 420 140' fill='none' stroke='%23b9c3e6' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 50h70l10-16 10 40 12-62 11 52 8-14h70l10-16 10 40 12-62 11 52 8-14h80' stroke-opacity='.06'/%3E%3Cpath d='M0 115h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18' stroke-opacity='.045'/%3E%3C/svg%3E"); } }
:root[data-theme="dark"] body[data-page="accueil"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='140' viewBox='0 0 420 140' fill='none' stroke='%23b9c3e6' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 50h70l10-16 10 40 12-62 11 52 8-14h70l10-16 10 40 12-62 11 52 8-14h80' stroke-opacity='.06'/%3E%3Cpath d='M0 115h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18h30c5 0 5-18 12-18h40c7 0 7 18 12 18' stroke-opacity='.045'/%3E%3C/svg%3E"); }
/* Annuaire : sélection de plusieurs contacts pour changer de catégorie */
.ct-who .ct-ck { margin-right: 8px; vertical-align: middle; }
.ct-row.ct-sel { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ct-grp header h2 .dbx-ck { margin-right: 8px; vertical-align: middle; }
.ct-movebar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ct-movebar select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 13px; }

/* Bandeau « Sondages » (accueil) */
.poll-list { display: grid; gap: 8px; margin-top: 10px; }
.poll { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.poll.todo { border-left: 3px solid var(--accent); } .poll.closed { opacity: .85; }
.poll-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.poll-q { font-weight: 700; font-size: 15px; text-align: left; } .poll-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.poll-form { display: grid; gap: 4px; margin-top: 8px; }
.poll-opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; cursor: pointer; text-align: left; }
.poll-opt:hover { background: var(--bg); } .poll-opt input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--accent); }
.poll-act { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.poll-res { display: grid; gap: 7px; margin-top: 8px; }
.pb-lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; text-align: left; }
.poll-bar.me .pb-lbl span { font-weight: 700; color: var(--accent); }
.pb-track { height: 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin-top: 3px; }
.pb-track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pb-who { font-size: 12px; color: var(--muted); margin-top: 2px; text-align: left; }
.poll-miss { margin-top: 8px; font-size: 12.5px; color: var(--muted); text-align: left; } .poll-miss summary { cursor: pointer; }
.poll-closed { margin-top: 10px; } .poll-closed summary { cursor: pointer; font-weight: 600; text-align: left; }
.poll-new { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; text-align: left; }
.poll-new label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.poll-new input:not([type=checkbox]), .poll-new select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 14px; }
.poll-opts-in { display: grid; gap: 6px; } .poll-opts-in .btn { justify-self: start; }
.poll-cfg { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; }
.poll-new label.ck { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--fg); } .poll-new label.ck input { width: 17px; height: 17px; }
.pq-aud { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; flex-basis: 100%; }
.pq-aud legend { font-size: 12.5px; color: var(--muted); padding: 0 4px; } .pq-aud .linkish { font-size: 12px; margin-left: 6px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }

/* Accueil : Tâches et Sondages côte à côte (une seule colonne sur écran étroit ou si l'un est masqué) */
.hub-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; margin: 12px 0 16px; }
.hub-duo > .card { margin: 0; display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; border-radius: 14px; }
.hub-duo:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) { .hub-duo { grid-template-columns: minmax(0, 1fr); } }
.hub-duo .tasks-head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.hub-duo .tasks-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16.5px; letter-spacing: .01em; }
.hub-duo .tasks-head h2 .hint { font-weight: 500; font-size: 12.5px; }
.hub-duo .task-list, .hub-duo .poll-list { max-height: 480px; overflow-y: auto; padding-right: 2px; }
.hub-duo .tasks-band > p.hint { margin: 12px 0 2px; text-align: left; }
/* tâches en carte : statut, texte sur plusieurs lignes, détails dessous, boutons alignés à droite */
.hub-duo .task { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: start; padding: 9px 11px; border-radius: 10px; transition: box-shadow .15s; }
.hub-duo .task:hover, .hub-duo .poll:hover { box-shadow: 0 2px 10px rgb(0 0 0 / .06); }
.hub-duo .task-st { margin-top: 1px; }
.hub-duo .task-main { display: block; }
.hub-duo .task-main .task-text { white-space: normal; overflow: visible; line-height: 1.4; }
.hub-duo .task-main .task-meta { white-space: normal; margin-top: 3px; font-size: 12px; }
.hub-duo .task-ops { grid-column: 2; justify-content: flex-end; flex-wrap: wrap; }
.hub-duo .task-ops:empty { display: none; }
/* sondages : carte claire, barres fines, compteur de votes en pastille */
.hub-duo .poll { border-radius: 10px; padding: 11px 13px; transition: box-shadow .15s; }
.hub-duo .poll-q { font-size: 15px; line-height: 1.35; }
.hub-duo .poll-head .hint { font-size: 12px; margin-top: 2px; line-height: 1.5; }
.poll-count { display: inline-block; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 700; font-size: 11.5px; }
.hub-duo .pb-track { height: 6px; border: 0; background: color-mix(in srgb, var(--line) 70%, var(--surface)); }
.hub-duo .poll-bar { padding: 4px 0; }
.hub-duo .poll-bar.me .pb-track i { background: var(--accent); }
.hub-duo .poll-bar:not(.me) .pb-track i { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.hub-duo .pb-lbl b { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.hub-duo .poll-bar.me .pb-lbl b { color: var(--accent); }
.hub-duo .poll-opt { border: 1px solid var(--line); background: var(--bg); margin-bottom: 4px; }
.hub-duo .poll-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }

/* Sondages : en-tête, pastilles d'options, résultats en lignes remplies */
.hub-duo .poll-head { align-items: flex-start; flex-wrap: nowrap; }
.poll-ops { display: flex; gap: 2px; flex: none; }
.icon-btn { border: 0; background: none; cursor: pointer; font-size: 14px; padding: 3px 6px; border-radius: 6px; opacity: .55; color: var(--fg); font-family: inherit; }
.icon-btn:hover { opacity: 1; background: var(--bg); }
.poll-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 10px; }
.poll-chips span { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.poll-chips .due { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.poll-chips .shut { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.pr-list { display: grid; gap: 6px; }
.pr-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; text-align: left; }
.pr-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 9%, transparent); transition: width .5s ease; border-radius: 0 8px 8px 0; }
.pr-row.lead { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pr-row.lead .pr-fill { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.pr-row > :not(.pr-fill) { position: relative; }
.pr-lbl { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pr-row.lead .pr-lbl { font-weight: 700; }
.pr-crown { color: #d4a017; font-size: 13px; }
.pr-me { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-fg, #fff); letter-spacing: .02em; }
.pr-pc { flex: none; display: grid; justify-items: end; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1.1; min-width: 52px; }
.pr-row:not(.lead) .pr-pc { color: var(--muted); font-weight: 700; }
.pr-pc small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.pr-av { display: flex; flex: none; }
.pr-av i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9.5px; font-weight: 700; color: #fff; background: hsl(var(--h) 45% 48%); border: 2px solid var(--surface); margin-left: -6px; }
.pr-av i:first-child { margin-left: 0; } .pr-av i.more { background: var(--muted); }
.pr-wait { margin: 4px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 13px; text-align: left; }
.poll-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pf-part { width: 64px; height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--line) 70%, var(--surface)); overflow: hidden; flex: none; }
.pf-part i { display: block; height: 100%; background: var(--ok); }
.poll-foot .linkish { margin-left: auto; font-size: 12px; }
.poll.todo { border-left: 3px solid var(--accent); }
/* Sondages : remplissage bleu clair (gris avec la couleur d'accent foncée) */
.pr-list { --pl: #3b82f6; }
.pr-fill { background: color-mix(in srgb, var(--pl) 11%, transparent); }
.pr-row.lead { border-color: color-mix(in srgb, var(--pl) 55%, var(--line)); box-shadow: 0 1px 6px color-mix(in srgb, var(--pl) 18%, transparent); }
.pr-row.lead .pr-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--pl) 26%, transparent), color-mix(in srgb, var(--pl) 16%, transparent)); }
.pr-row.lead .pr-pc { color: color-mix(in srgb, var(--pl) 75%, var(--fg)); }
.pr-me { background: color-mix(in srgb, var(--pl) 85%, #000); color: #fff; }

/* ===== Accueil : tuiles regroupées par ensembles (titre, couleur propre à chaque ensemble, icônes au trait) ===== */
.hub-groups { display: grid; gap: 28px; margin: 22px 0 8px; }
.hub-groups .hub-mine { display: block; }
.hub-group { --gc: #2563EB; --gcx: color-mix(in srgb, var(--gc) 82%, var(--fg)); }
.hub-group[data-g="secure"] { --gc: #0F766E; }
.hub-group[data-g="clin"] { --gc: #6D4BD8; }
.hub-group[data-g="gest"] { --gc: #B7791F; }
.hub-group[data-g="form"] { --gc: #0E8AA8; }
.hub-group[data-g="team"] { --gc: #52627A; }
.hub-group:not(:has(.tile:not([hidden]))) { display: none; }   /* ensemble sans tuile autorisée : masqué */
.hg-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; }
.hg-head h2 { margin: 0; font-family: var(--f-body); font-size: 12.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--gcx); display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.hg-head h2::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--gc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gc) 16%, transparent); }
.hg-head span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); align-self: center; min-width: 20px; }
.hub-group .tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1150px) { .hub-group .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .hub-group .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hub-group .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; } .hg-head span { display: none; } }
.hub-group .tile, .hub-group #tDep.tile { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 5px; align-content: start;
  min-height: 0; padding: 18px 20px 18px 18px; border-radius: 14px; border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--fg); text-decoration: none; overflow: hidden;
  box-shadow: 0 1px 2px rgb(15 23 42 / .05), 0 2px 6px -2px rgb(15 23 42 / .06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.hub-group .tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--gc), color-mix(in srgb, var(--gc) 35%, transparent)); opacity: .0; transition: opacity .18s ease; }
.hub-group .tile::after { content: "→"; position: absolute; right: 16px; bottom: 12px; font-weight: 700; color: var(--gcx); opacity: 0; transform: translateX(-4px); transition: opacity .18s ease, transform .18s ease; }
.hub-group .tile:hover, .hub-group .tile:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gc) 45%, var(--line)) !important; box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--gc) 55%, transparent), 0 2px 6px -2px rgb(15 23 42 / .08); }
.hub-group .tile:hover::before, .hub-group .tile:focus-visible::before { opacity: 1; }
.hub-group .tile:hover::after, .hub-group .tile:focus-visible::after { opacity: 1; transform: none; }
.hub-group .tile .t-ico, .hub-group #tDep.tile .t-ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 0;
  background: color-mix(in srgb, var(--gc) 11%, var(--surface)) !important; color: var(--gcx) !important; border: 1px solid color-mix(in srgb, var(--gc) 22%, transparent); box-shadow: none !important; }
.hub-group .tile .t-ico svg { width: 22px; height: 22px; }
.hub-group .tile b, .hub-group #tDep.tile b { font-family: var(--f-body); font-size: 15.5px; font-weight: 700; letter-spacing: -.005em; line-height: 1.25; color: var(--fg) !important; align-self: center; padding-right: 18px; }
.hub-group .tile > span:last-of-type { grid-column: 2; font-size: 12.8px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hub-group .tile .t-lock { position: absolute; top: 14px; right: 14px; width: 15px; height: 15px; color: var(--gcx); opacity: .75; }
.hub-group .tile .t-badge { top: 12px; right: 12px; }
@media (prefers-reduced-motion: reduce) { .hub-group .tile, .hub-group .tile::after { transition: none; } .hub-group .tile:hover { transform: none; } }
/* « Mon planning » : bandeau principal, même rayon et même ombre que les tuiles */
.hub .hub-mine > #tMine { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; row-gap: 4px; align-items: center; padding: 22px 26px; border-radius: 16px; }
.hub .hub-mine > #tMine .t-ico { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.hub .hub-mine > #tMine .t-ico svg { width: 26px; height: 26px; }
.hub .hub-mine > #tMine > span:last-of-type { grid-column: 2; }
@media (max-width: 560px) { .hub .hub-mine > #tMine { grid-template-columns: 44px minmax(0, 1fr); padding: 18px; } .hub .hub-mine > #tMine .t-ico { width: 44px; height: 44px; } }
.hub .hub-groups { grid-template-columns: minmax(0, 1fr); }
.hub .hub-group .tile b { font-family: var(--f-body) !important; font-size: 15.5px !important; font-weight: 700 !important; hyphens: manual; }
.hub .hub-group .tile > span:last-of-type { display: block; -webkit-line-clamp: unset; overflow: visible; }
/* Pastille « 2FA » : rubriques protégées par double authentification */
.hub-group .tile .t-2fa { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  padding: 3px 8px 3px 7px; border-radius: 999px; color: var(--gcx); background: color-mix(in srgb, var(--gc) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gc) 30%, transparent); }
.hub-group .tile:has(.t-2fa) b { padding-right: 58px; }
/* Dépenses : marque rouge conservée (accès rapide) */
.hub .hub-group #tDep.tile-red { --gc: #C62848; border-color: color-mix(in srgb, #C62848 35%, var(--line)) !important; background: color-mix(in srgb, #C62848 4%, var(--surface)) !important; }
.hub .hub-group #tDep.tile-red::before { opacity: 1; background: linear-gradient(90deg, #E8577A, #B71C3C); }
.hub .hub-group #tDep.tile-red .t-ico { background: linear-gradient(135deg, #E8577A, #B71C3C) !important; color: #fff !important; border: 0; box-shadow: 0 8px 16px -10px rgba(183, 28, 60, .8) !important; }
.hub .hub-group #tDep.tile-red b { color: color-mix(in srgb, #B71C3C 80%, var(--fg)) !important; }
/* « Mon planning » en mode sombre : dégradé profond (la couleur d'accent y est claire) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub .hub-mine > #tMine { background: linear-gradient(120deg, #22356b, #17485a); } :root:not([data-theme="light"]) .hub .hub-mine > #tMine::after { color: #22356b; } }
:root[data-theme="dark"] .hub .hub-mine > #tMine { background: linear-gradient(120deg, #22356b, #17485a); }
:root[data-theme="dark"] .hub .hub-mine > #tMine::after { color: #22356b; }
.hub .hub-mine > #tMine::after { white-space: nowrap; }
@media (max-width: 700px) { .hub .hub-mine > #tMine::after { grid-column: 2; justify-self: start; } }
/* Accueil : le contenu occupe toute la largeur de l'écran (plus de colonnes sur les très grands écrans) */
body[data-page="accueil"] .wrap.hub { max-width: none; padding-left: max(24px, 2vw, env(safe-area-inset-left, 0px)); padding-right: max(24px, 2vw, env(safe-area-inset-right, 0px)); }
@media (min-width: 1900px) { .hub-group .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 2400px) { .hub-group .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* « Mon planning » : bandeau compact, bouton « Ouvrir » centré verticalement à droite */
.hub .hub-mine > #tMine { min-height: 0 !important; padding: 18px 150px 18px 24px; }
.hub .hub-mine > #tMine::after { top: 50%; bottom: auto; transform: translateY(-50%); }
.hub .hub-mine > #tMine .t-badge { top: 10px; right: 14px; }
@media (max-width: 700px) { .hub .hub-mine > #tMine { padding: 18px; } .hub .hub-mine > #tMine::after { transform: none; } }
.hub-groups { margin-top: 4px; }
@media (min-width: 701px) { .hub .hub-mine > #tMine .t-badge { top: 50%; right: 140px; transform: translateY(-50%); } }

/* IADE vacataires : pastilles et encadré de la page IADE */
.ia-chip.vac { background: color-mix(in srgb, #0E8AA8 14%, var(--surface)); border-color: color-mix(in srgb, #0E8AA8 40%, var(--line)); }
.ia-chip.vac small { font-size: 10px; color: #0E8AA8; font-weight: 700; }
.ia-vac { color: #0E8AA8; font-weight: 700; } .ia-vac::after { content: " (vac.)"; font-weight: 400; font-size: 11px; }
.vac-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
.vac-box summary { cursor: pointer; text-align: left; }
.vac-t code { font-size: 12.5px; letter-spacing: .03em; } .vac-ok { color: var(--ok); font-weight: 700; }
.vac-cfg { display: grid; gap: 8px; margin-top: 10px; text-align: left; max-width: 760px; }
.vac-cfg label { display: grid; gap: 4px; font-size: 13px; } .vac-cfg label.chk { display: flex; align-items: center; gap: 8px; }
.vac-cfg input[type=email] { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; max-width: 360px; }
.vac-nir { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; } .vac-nir label { flex: 1; min-width: 220px; }
/* Accueil : tuile-raccourci (ex. « Ajouter un stagiaire ») */
.hub .hub-group .tile.tile-action { border-style: dashed !important; border-color: color-mix(in srgb, var(--gc) 45%, var(--line)) !important; background: color-mix(in srgb, var(--gc) 5%, var(--surface)) !important; }
.hub .hub-group .tile.tile-action .t-ico { background: var(--gc) !important; color: #fff !important; border: 0; }
.hub .hub-group .tile.tile-action b { color: var(--gcx) !important; }
/* Dépenses : société de rattachement */
.soc-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid; }
.soc-tag.soc-SCM { color: #2563EB; border-color: color-mix(in srgb, #2563EB 35%, transparent); background: color-mix(in srgb, #2563EB 9%, var(--surface)); }
.soc-tag.soc-SCI { color: #B7791F; border-color: color-mix(in srgb, #B7791F 35%, transparent); background: color-mix(in srgb, #B7791F 9%, var(--surface)); }
.sel-soc { display: inline-flex; align-items: center; gap: 6px; } .sel-soc select { padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.soc-tag.soc-FOP { color: #C2410C; border-color: color-mix(in srgb, #C2410C 35%, transparent); background: color-mix(in srgb, #C2410C 9%, var(--surface)); }
/* Accueil : nombre de patients en cours (tuiles de données patients) */
.hub-group .tile .t-count { position: absolute; top: 12px; right: 74px; min-width: 24px; height: 22px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; display: grid; place-items: center;
  font-style: normal; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; background: var(--gc); box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--gc) 70%, transparent); }
.hub-group .tile .t-count.zero { background: var(--surface); color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
.hub-group .tile:has(.t-count) b { padding-right: 96px; }
.pq-end { display: flex; gap: 6px; } .pq-end input[type=time] { width: 110px; }

/* Assemblées générales */
.ag-socs { margin-bottom: 14px; flex-wrap: wrap; }
.ag-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ag-grid { grid-template-columns: minmax(0, 1fr); } }
.ag-grid .card { margin-bottom: 14px; text-align: left; }
.ag-list { display: grid; gap: 6px; margin-top: 8px; }
.ag-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.ag-item.on, .ag-item:hover { border-color: var(--accent); }
.ag-d { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; } .ag-t { min-width: 0; } .ag-t small { display: block; color: var(--muted); font-size: 11.5px; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ag-chip { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; } .ag-chip b { color: var(--accent); margin-left: 3px; } .ag-chip.me { border-color: var(--accent); }
.ag-mem table input { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 4px 6px; font: inherit; }
.ag-add { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; } .ag-add select { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.ag-info, .ag-resform { display: grid; gap: 8px; margin: 8px 0; }
.ag-info label, .ag-resform label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.ag-info input, .ag-info select, .ag-info textarea, .ag-resform input, .ag-resform select, .ag-resform textarea { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 14px; }
.ag-resform { padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.ag-meta { line-height: 1.6; margin: 6px 0 10px; }
.ag-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.ag-proxy { padding: 8px 10px; border-radius: 8px; background: var(--bg); margin-bottom: 8px; font-size: 13.5px; } .ag-proxy select { padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; }
.ag-res { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
.ag-res-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .ag-res-h b { flex: 1; min-width: 200px; } .ag-ops { font-size: 12.5px; }
.ag-body { white-space: pre-wrap; margin: 6px 0; font-size: 13.5px; }
.ag-myvote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; font-size: 13.5px; }
.ag-vote { display: inline-flex; gap: 6px; } .ag-vote .btn.on.v-pour { background: var(--ok); border-color: var(--ok); color: #fff; } .ag-vote .btn.on.v-contre { background: var(--danger); border-color: var(--danger); color: #fff; } .ag-vote .btn.on.v-abst { background: var(--muted); border-color: var(--muted); color: #fff; }
.ag-mgr { margin: 6px 0; font-size: 13px; } .ag-mgr summary { cursor: pointer; color: var(--muted); }
.ag-bars { margin-top: 8px; display: grid; gap: 4px; }
.ag-bar { display: grid; grid-template-columns: 90px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: 12.5px; } .ag-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.ag-bar .pb-track { height: 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; } .ag-bar .pb-track i { display: block; height: 100%; }
.ag-bar.b-pour i { background: var(--ok); } .ag-bar.b-contre i { background: var(--danger); } .ag-bar.b-abst i { background: var(--muted); }
.ag-log { margin-top: 10px; font-size: 12.5px; } .ag-log summary { cursor: pointer; font-weight: 600; } .ag-log ul { margin: 6px 0 0; padding-left: 18px; }
.ag-odj { padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 8px 8px 0; margin: 4px 0 12px; font-size: 13.5px; } .ag-odj ol { margin: 4px 0 0; padding-left: 20px; }
.ag-pr { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; font-size: 13px; flex-wrap: wrap; }
.ag-pct { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; } .ag-pct input { width: 80px; } .ag-pct input, .ag-pct select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 5px 7px; font: inherit; }

/* Salon vidéo */
.vz-intro { text-align: left; } .vz-rooms { display: grid; gap: 10px; margin-top: 14px; }
.vz-room { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; }
.vz-room b { display: block; font-size: 16px; } .vz-room .hint { font-size: 12.5px; }
.vz-room.live { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok) 5%, var(--surface)); }
.vz-live { color: var(--ok); font-weight: 700; } .vz-people { font-size: 13.5px; }
.vz-new input { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 8px 10px; font: inherit; }
@media (max-width: 700px) { .vz-room { grid-template-columns: minmax(0, 1fr); } }
.vz-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 10px; } .vz-head h2 { margin: 0; }
.vz-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.vz-grid[data-n="1"] { grid-template-columns: minmax(0, 900px); justify-content: center; }
.vz-grid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .vz-grid, .vz-grid[data-n="2"] { grid-template-columns: minmax(0, 1fr); } }
.vz-tile { position: relative; aspect-ratio: 16 / 9; background: #0f172a; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px -10px rgb(0 0 0 / .5); }
.vz-tile video { width: 100%; height: 100%; object-fit: cover; background: #0f172a; } .vz-tile.self video { transform: scaleX(-1); }
.vz-tile.bad { outline: 2px solid var(--warn); }
.vz-name { position: absolute; left: 10px; bottom: 8px; color: #fff; font-size: 13px; font-weight: 600; background: rgb(0 0 0 / .45); padding: 3px 9px; border-radius: 999px; }
.vz-av { position: absolute; inset: 0; display: none; place-items: center; font-size: 42px; font-weight: 800; color: #fff; background: radial-gradient(circle, #334271, #0f172a); }
.vz-tile.cam-off .vz-av { display: grid; } .vz-tile.cam-off video { visibility: hidden; }
.vz-bar { position: sticky; bottom: 12px; display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.vz-btn { display: grid; justify-items: center; gap: 2px; min-width: 86px; padding: 9px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 20px; cursor: pointer; box-shadow: 0 4px 14px -8px rgb(0 0 0 / .4); }
.vz-btn span { font-size: 11.5px; font-weight: 600; } .vz-btn.off { background: #fde8e6; border-color: #f2b8b1; color: #9b2c1f; } .vz-btn.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.vz-btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); } .vz-btn:disabled { opacity: .45; cursor: default; }
.tile .t-badge.vz-badge { background: var(--ok); }
/* Planning : ligne « Réunions » (salon vidéo) */
tr.meet-row th.rowh { color: #1e6b3a; } tr.meet-row td.meet-cell { background: color-mix(in srgb, #2e7d4f 7%, var(--surface)); text-align: center; padding: 2px; }
.meet-chip { display: inline-block; margin: 1px 2px; padding: 1px 7px; border-radius: 999px; background: #2e7d4f; color: #fff; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media print { .meet-chip { background: none; color: #1e6b3a; border: 1px solid #1e6b3a; } }
.vz-meets { margin-top: 16px; text-align: left; } .vz-mlist { display: grid; gap: 8px; margin-top: 8px; }
.vz-m { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.vz-m.today { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.vz-mwhen b { display: block; text-transform: capitalize; font-size: 13.5px; } .vz-mwhen span { font-weight: 700; color: var(--accent); }
.vz-mwhat { display: grid; gap: 2px; } .vz-mops { display: flex; gap: 6px; }
@media (max-width: 700px) { .vz-m { grid-template-columns: minmax(0, 1fr); } }
.vz-plan { margin: 8px 0; display: grid; gap: 8px; box-shadow: none; border-style: dashed; }
.vz-plan label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.vz-plan input, .vz-plan select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 14px; }
@media print { details.more, .more-pop, .plan-bar .more-pop { display: none !important; } }   /* menu « ⋯ Plus » jamais imprimé */
.soc-form { display: grid; gap: 8px; text-align: left; } .soc-form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); } .soc-form label.chk { display: flex; color: var(--fg); font-size: 14px; }
.soc-form textarea, .soc-form input:not([type=checkbox]), .soc-form select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 13.5px; }
.soc-pv { margin-top: 8px; text-align: left; } .soc-pv pre { white-space: pre-wrap; font-size: 12.5px; background: var(--bg); padding: 10px; border-radius: 8px; }
/* Examens pré-op : cellules alignées en haut, même largeur et même ordre (statut, date, puis nom de l'autre examen) */
table.preop-t td, table.hon.preop-t tbody td { vertical-align: top !important; }
table.preop-t td.ex { min-width: 170px; }
table.preop-t .ex-cell { display: grid; gap: 6px; align-content: start; }
table.preop-t .ex-cell select.st, table.preop-t .ex-cell input.dt, table.preop-t .ex-cell input.lbl { width: 100%; box-sizing: border-box; margin: 0; height: 34px; }
table.preop-t .ex-cell .date-help { margin: -3px 0 0; justify-self: start; }
table.preop-t td:not(.ex):not(.ops):not(.rem) { padding-top: 12px; }
/* Stagiaires : rubriques des réglages repliables (triangle ▸ / ▾) */
details.stg-sec { border-top: 1px solid var(--line); padding: 4px 0; text-align: left; }
details.stg-sec:first-child { border-top: 0; }
details.stg-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 0; }
details.stg-sec > summary::-webkit-details-marker { display: none; }
details.stg-sec > summary::before { content: "▸"; font-size: 15px; color: var(--accent); width: 14px; transition: transform .15s; }
details.stg-sec[open] > summary::before { content: "▾"; }
details.stg-sec > summary h2 { margin: 0; }
details.stg-sec > .stg-body { padding: 0 0 10px 24px; }
.post-btn { margin-left: 6px; padding: 1px 8px !important; font-size: 11.5px !important; } .post-btn.on { background: var(--accent); color: var(--accent-fg); }
tr.post-row td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.post-box { display: grid; gap: 8px; text-align: left; padding: 6px 4px; }
.post-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; } .post-items label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; }
.post-extra { display: flex; gap: 8px; align-items: center; font-size: 13px; } .post-extra input { flex: 1; max-width: 480px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 6px 8px; font: inherit; }
.post-box pre { white-space: pre-wrap; font-size: 12px; background: var(--bg); padding: 8px; border-radius: 8px; }
.post-items label.chk { display: flex !important; justify-content: flex-start; align-items: center; gap: 8px; text-align: left; width: auto; }
.post-items label.chk input { width: 17px !important; height: 17px; flex: 0 0 17px; margin: 0; }
.soc-form .tf-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } .soc-form textarea, .soc-form input:not([type=checkbox]) { width: 100%; box-sizing: border-box; min-width: 0; }
/* Stagiaires : demandes d'inscription en ligne */
.stg-req { border-left: 4px solid var(--accent); text-align: left; }
.req-list { display: grid; gap: 10px; margin-top: 8px; }
.req { display: grid; grid-template-columns: minmax(220px, 1.3fr) minmax(260px, 1.4fr) minmax(160px, 1fr) auto; gap: 10px 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (max-width: 1000px) { .req { grid-template-columns: minmax(0, 1fr); } }
.req-when { font-size: 13px; } .req-when input, .req-when select, .req-msg { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 5px 7px; font: inherit; font-size: 13px; }
.req-ops { display: flex; gap: 6px; } .ok-t { color: var(--ok); }
.sign-link { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; } .sign-link input { flex: 1; min-width: 260px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; }
.sign-val { margin: 8px 0; } .sign-mars { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; } .sign-mars label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; }
.req-per { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 3px 0; } .req-per label.chk input { width: 16px; height: 16px; }
.req-th { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; } .th-chip { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 600; }
.th-edit { margin-top: 10px; text-align: left; } .th-edit summary { cursor: pointer; font-weight: 600; } .th-edit textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; }
.req { grid-template-columns: minmax(220px, 1.2fr) minmax(320px, 1.6fr) minmax(160px, 1fr) auto; align-items: start; }
.th-t td, .th-t th { text-align: center; } .th-t td:first-child { text-align: left; } .th-t .th-name { width: 100%; min-width: 220px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 5px 7px; font: inherit; }
.th-t input[type=checkbox] { width: 17px; height: 17px; }
.th-chip small { font-weight: 500; opacity: .8; } .th-chip.no { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.arch-to { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 6px 0 10px; } .arch-to label { flex: 1; min-width: 280px; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.arch-to input { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 14px; }
.topreop { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid var(--accent); border-radius: 10px; } .topreop .hint { font-size: 12.5px; margin-right: 2px; } .topreop .btn small { opacity: .65; font-weight: 400; }

/* Accueil : recherche à gauche, boutons d'absences à droite sur la même ligne */
.hub-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 14px 0 4px; }
.hub-top .hub-search { flex: 1 1 380px; margin: 0; min-width: 0; }
.hub-top .hub-cta { margin: 0; flex-wrap: nowrap; }
.hub-top .hub-cta > .btn { flex: 0 0 auto; min-width: 240px; }
@media (max-width: 900px) { .hub-top .hub-cta { flex-wrap: wrap; width: 100%; } .hub-top .hub-cta > .btn { flex: 1 1 100%; min-width: 0; } }
.topreop-btn { background: #fce7f3; border-color: #f9a8d4; color: #9d174d; font-weight: 600; } .topreop-btn:hover { background: #fbcfe8; border-color: #f472b6; } .topreop { border-color: #f9a8d4; background: color-mix(in srgb, #fce7f3 60%, var(--surface)); }
.fold-h { cursor: pointer; user-select: none; } .fold-h .tri { display: inline-block; width: 1em; font-size: .8em; color: var(--muted); }
.rcs-btn { margin-left: 8px; vertical-align: middle; padding: 3px 9px; font-size: 12.5px; background: #fff7ed; border-color: #fdba74; color: #9a3412; } .rcs-btn:hover { background: #ffedd5; }
.rcs-row td { background: color-mix(in srgb, #fdba74 12%, var(--surface)); } .rcs-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 4px 0; } .rcs-form input { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 13.5px; background: var(--surface); color: var(--fg); min-width: 180px; }
.rcs-form input { width: auto !important; flex: 0 1 220px; }
.rex-btn { margin-left: 8px; vertical-align: middle; padding: 3px 9px; font-size: 12.5px; background: #fdf2f8; border-color: #f9a8d4; color: #9d174d; } .rex-btn:hover { background: #fce7f3; } .rex-row td { background: color-mix(in srgb, #f9a8d4 14%, var(--surface)); } .rex-br { flex-basis: 100%; height: 0; } .rcs-form .chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; }
.rcs-form .chk { white-space: nowrap; } .rcs-form .chk input { width: auto !important; flex: none; min-width: 0; margin: 0; } .rcs-form #rexOther { flex: 0 1 180px; }
.rex-stack { display: inline-flex; flex-direction: column; gap: 2px; } .rex-date { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; } .rcs-form .rex-date input { min-width: 0 !important; flex: none; padding: 2px 6px; font-size: 12.5px; }

/* Données médicales : mêmes onglets façon navigateur que la Comptabilité, un peu plus marqués */
nav.subnav[aria-label="Données médicales"] { --pt-bg: color-mix(in srgb, var(--accent) 12%, var(--bg)); display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 2px;
  padding: 6px 12px 0; background: var(--pt-bg); border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
nav.subnav[aria-label="Données médicales"]::-webkit-scrollbar { display: none; }
nav.subnav[aria-label="Données médicales"] a { position: relative; border: 0; background: transparent; border-radius: 11px 11px 0 0; padding: 9px 15px 10px; margin-bottom: -1px;
  color: var(--muted); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; }
nav.subnav[aria-label="Données médicales"] a:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink, inherit); }
nav.subnav[aria-label="Données médicales"] a:not([aria-current="page"]) + a:not([aria-current="page"])::before { content: ''; position: absolute; left: -1px; top: 26%; height: 48%; width: 1px; background: color-mix(in srgb, var(--muted) 35%, transparent); }
nav.subnav[aria-label="Données médicales"] a[aria-current="page"] { background: var(--bg); color: var(--ink, inherit); font-weight: 650; border: 1px solid var(--line); border-bottom-color: var(--bg); }
nav.subnav[aria-label="Données médicales"] a[aria-current="page"]::before, nav.subnav[aria-label="Données médicales"] a[aria-current="page"]::after { content: ''; position: absolute; bottom: -1px; width: 11px; height: 11px; pointer-events: none; }
nav.subnav[aria-label="Données médicales"] a[aria-current="page"]::before { left: -12px; background: radial-gradient(circle at 0 0, transparent 10.5px, var(--line) 10.5px, var(--line) 11.5px, var(--bg) 11.5px); }
nav.subnav[aria-label="Données médicales"] a[aria-current="page"]::after { right: -12px; background: radial-gradient(circle at 100% 0, transparent 10.5px, var(--line) 10.5px, var(--line) 11.5px, var(--bg) 11.5px); }
@media (max-width: 560px) { nav.subnav[aria-label="Données médicales"] a { padding: 8px 11px 9px; font-size: 13px; } }
header.top nav.subnav[aria-label="Données médicales"] { flex-wrap: nowrap; }
nav.subnav.tabs-row[aria-label="Données médicales"] { width: 100%; margin: 10px 0 12px; box-sizing: border-box; }
nav.subnav[aria-label="Données médicales"] a { font-size: 14.5px; font-weight: 600; padding: 10px 18px 11px; }
nav.subnav[aria-label="Données médicales"] a[aria-current="page"] { font-weight: 700; color: var(--accent); }
.rex-btn.done, .rcs-btn.done { background: var(--surface); border-color: var(--line); color: var(--muted); font-weight: 400; } .rex-btn.done:hover, .rcs-btn.done:hover { background: var(--surface); }

/* Données médicales : l'en-tête des colonnes reste visible en faisant défiler la page */
@media (min-width: 900px) {
  .table-wrap:has(> table.sticky-h) { overflow: visible; }
  table.sticky-h thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line), 0 4px 8px -6px rgb(0 0 0 / .25); }
}
/* Accueil : recherche et boutons d'absences alignés (même hauteur, même ligne) */
.hub-top { align-items: center; }
.hub-top .hub-search input, body[data-look] .hub-top .hub-search input { height: 48px; padding-block: 0; box-sizing: border-box; }
.hub-top .hub-cta { align-items: center; gap: 10px; }
.hub-top .hub-cta > .btn { height: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding-block: 0; margin: 0; }
.hub-top .hub-search, body[data-look] .hub-top .hub-search { margin: 0; }
.hub-top .hub-search { order: 2; } .hub-top .hub-cta { order: 1; }
.sr-days { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-left: 12px; flex-wrap: wrap; } .sr-days input { width: 64px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); font: inherit; } .sr-days #srRel { width: 96px; }
.prosth-t td.pr-note { min-width: 160px; } .prosth-t td.pr-note input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; background: var(--surface); color: var(--fg); } .prosth-t td.pr-note input:focus { border-color: var(--accent); outline: none; }
.gd .pickall { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 13.5px; cursor: pointer; }
.inf-cfg h3 { font-size: 14px; margin: 6px 0; } .inf-cfg .cfg-avis { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inf-cfg .cfg-av { display: inline-flex; gap: 2px; align-items: center; } .inf-cfg .cfg-av input { width: 170px; }
.inf-cfg .cfg-protos { display: grid; gap: 8px; } .inf-cfg .cfg-proto { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; background: var(--surface); }
.inf-cfg .cfg-proto .pname { font-weight: 600; } .inf-cfg .pl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .inf-cfg .pl > input { flex: 1 1 220px; min-width: 0; }
.inf-cfg input, .inf-cfg select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13.5px; background: var(--bg); color: var(--fg); }
.proto-sel { width: 100%; margin: 4px 0 6px; border: 1px dashed var(--accent); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); color: var(--accent); }
