/* Identite Studio Smile : police Public Sans et couleurs du site (ardoise #354b61, or #f0b100). */
@font-face {
  font-family: 'Public Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/public-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/public-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f0f4fa;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --text: #1f2e3d;
  --muted: #5b6b7d;
  --border: #d9e2ee;
  --primary: #354b61;
  --primary-soft: #dde6f3;
  --primary-ink: #ffffff;
  --brand: #354b61;
  --brand-deep: #27384a;
  --brand-ink: #ffffff;
  --brand-muted: #bdd1e9;
  --gold: #f0b100;
  --gold-ink: #1f2e3d;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --ok: #1f7a3d;
  --ok-soft: #e7f5ec;
  --now: #e5484d;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 14px;
  --nav-h: 64px;
  /* Vue Jour du planning : couleurs du classeur Excel du cabinet (salles, hygiène, volante, réception, renfort, pauses, absences). */
  --pl-soins: #9dc3e6; --pl-hygiene: #ffd966; --pl-assiste: #d9e2f3; --pl-volante: #f4b183; --pl-reception: #c9b2d9;
  --pl-renfort: #d9e2f3; --pl-autre: #e4e9ef; --pl-pause: #f2f2f2; --pl-absent: #f4cccc; --pl-alerte: #fff2cc;
  --pl-ink: #1f2933; --pl-pause-ink: #5b6770; --pl-absent-ink: #9c0006; --pl-alerte-ink: #7f6000;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141d27;
    --surface: #1b2733;
    --surface-2: #223140;
    --text: #eef2f7;
    --muted: #a3b3c6;
    --border: #2d3e50;
    --primary: #98b9dd;
    --primary-soft: #26374a;
    --primary-ink: #14202c;
    --brand: #1b2733;
    --brand-deep: #111922;
    --brand-muted: #98b9dd;
    --danger: #ff6b6b;
    --danger-soft: #3a1c1e;
    --warn: #f4c46b;
    --warn-soft: #3a2f16;
    --ok: #5fd08a;
    --ok-soft: #173424;
    --now: #ff6369;
    --shadow: none;
    --pl-soins: #2f5a80; --pl-hygiene: #7a6420; --pl-assiste: #2e4058; --pl-volante: #8a5330; --pl-reception: #5c4a70;
    --pl-renfort: #2e4058; --pl-autre: #2a3441; --pl-pause: #2a3441; --pl-absent: #5a2a2e; --pl-alerte: #5a4a1a;
    --pl-ink: #eef2f7; --pl-pause-ink: #b7c3d0; --pl-absent-ink: #ffb3b3; --pl-alerte-ink: #f4dd9a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 'Public Sans Variable', 'Public Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Ecrans de connexion ---------- */
.auth {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: calc(28px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(165deg, var(--brand) 0%, var(--brand-deep) 100%);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 22px;
  box-shadow: 0 18px 40px rgba(10, 18, 28, .28);
}
.brand { text-align: center; }
.brand h1 { margin: 0; line-height: 0; }
.brand img { width: 220px; max-width: 70vw; height: auto; }
.brand p {
  margin: 10px 0 0; color: var(--brand-muted);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.auth-foot { margin: 0; color: var(--brand-muted); font-size: 13px; text-align: center; }
.auth h2 { font-size: 18px; margin: 0 0 6px; }
.auth p.lead { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.steps { margin: 0 0 18px; padding-left: 20px; font-size: 15px; }
.steps li { margin-bottom: 10px; }
.qr { display: block; width: 200px; max-width: 100%; height: auto; margin: 10px 0 12px; border-radius: 10px; border: 1px solid var(--border); image-rendering: pixelated; }
.secret {
  display: block; margin-top: 6px; padding: 10px 12px;
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px;
  font: 600 15px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; word-break: break-all;
}

/* ---------- Formulaires ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  outline: none;
}
textarea.input { min-height: 140px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.code-input { font-size: 26px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; }
.check input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: 15px;
  text-decoration: none; color: var(--text);
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn.icon { width: 44px; padding: 0; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn svg { width: 20px; height: 20px; flex: 0 0 20px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.alert { padding: 11px 13px; border-radius: 11px; font-size: 14.5px; margin-bottom: 14px; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.info { background: var(--primary-soft); color: var(--text); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- Structure de l'application ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.topbar .emblem { width: 34px; height: 30px; flex: 0 0 34px; }
.topbar h1 { font-size: 19px; font-weight: 650; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--gold); color: var(--gold-ink);
  font-weight: 700; font-size: 14px; cursor: pointer;
}
main.page {
  max-width: 760px; margin: 0 auto;
  padding: 14px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.tabbar a {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--primary); }
.tabbar a.on::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad { padding: 16px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 4px 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  color: var(--text); text-decoration: none;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }

/* ---------- Agenda ---------- */
.daybar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.daybar .day { flex: 1; min-width: 0; text-align: center; }
.daybar .day strong { display: block; font-size: 17px; }
.daybar .day input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.daybar .day label { cursor: pointer; }
.summary { font-size: 14px; color: var(--muted); margin: 0 2px 10px; }
.rdv-list { display: flex; flex-direction: column; gap: 8px; }
.rdv {
  display: flex; gap: 12px; padding: 11px 12px 11px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.rdv .bar { width: 5px; flex: 0 0 5px; border-radius: 0 4px 4px 0; background: var(--primary); margin: -11px 0; }
.rdv .time { width: 52px; flex: 0 0 52px; font-variant-numeric: tabular-nums; }
.rdv .time b { display: block; font-size: 16px; }
.rdv .time span { font-size: 12.5px; color: var(--muted); }
.rdv .body { flex: 1; min-width: 0; }
.rdv .l1 { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdv .l2 { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdv .l3 { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.rdv.past { opacity: .62; }
.now-line { display: flex; align-items: center; gap: 8px; color: var(--now); font-size: 13px; font-weight: 700; margin: 2px 0; }
.now-line::after { content: ""; flex: 1; height: 2px; background: var(--now); border-radius: 2px; }

/* ---------- Chiffre d'affaires ---------- */
.kpi { padding: 18px 16px; }
.kpi .value { font-size: 32px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .label { color: var(--muted); font-size: 14px; }
.kpi .split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.kpi .split span { display: block; color: var(--muted); font-size: 13px; }
.kpi .split strong { font-size: clamp(15px, 4.5vw, 18px); font-weight: 700; font-variant-numeric: tabular-nums; }
.delta { font-size: 14px; font-weight: 650; margin-top: 6px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.months { padding: 6px 0; }
.month { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14.5px; }
.month + .month { border-top: 1px solid var(--border); }
.month .track { position: relative; height: 10px; background: var(--surface-2); border-radius: 6px; }
.month .fill, .goal .fill { height: 100%; background: var(--primary); border-radius: 6px; }
.month .fill.done, .goal .fill.done { background: var(--ok); }
/* Objectif : trait vertical sur la barre, lisible sur le fond comme sur le remplissage. */
.tick {
  position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px;
  background: var(--text); box-shadow: 0 0 0 1.5px var(--surface); pointer-events: none;
}
.prat-pick { margin-bottom: 12px; }
.goal { padding: 14px 16px; margin-top: 12px; }
.goal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.goal-head span { color: var(--muted); font-size: 14px; }
.goal-head strong { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.goal .track { position: relative; height: 12px; background: var(--surface-2); border-radius: 6px; }
.goal .goal-line { font-size: 14px; margin-top: 10px; }
.goal .delta { margin-top: 8px; }
.goal .small { margin-top: 6px; }
.month.current { font-weight: 700; }
.month.future { color: var(--muted); }

/* ---------- Listes (documents, taches, admin) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; }
.list > li + li { border-top: 1px solid var(--border); }
.list .ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.list .ico svg { width: 20px; height: 20px; }
.list button.item { all: unset; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.todo input[type=checkbox] { width: 24px; height: 24px; flex: 0 0 24px; accent-color: var(--primary); }
.todo.done .txt { text-decoration: line-through; color: var(--muted); }
.todo .due { font-size: 13px; color: var(--muted); }
.todo .due.late { color: var(--danger); font-weight: 600; }
.addbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.addbar .input { flex: 1 1 140px; }
.addbar .input:first-child { flex-basis: 100%; }
details.more { margin-top: 14px; }
details.more summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 8px 4px; }

/* ---------- Actualites ---------- */
.news { padding: 16px; }
.news + .news { margin-top: 12px; }
.news h3 { margin: 6px 0 4px; font-size: 17px; }
.news .meta { font-size: 13px; color: var(--muted); }
.news .content p { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Administration ---------- */
.subtabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.grid th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
table.grid input.input { min-height: 36px; padding: 6px 8px; width: 110px; }
table.grid input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.checklist { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 11px; padding: 4px 12px; }
/* Roles d'un compte : case, nom du role et ce qu'il permet. */
.checklist.roles { max-height: none; }
.checklist.roles .check { align-items: flex-start; padding: 8px 0; }
.checklist.roles .check + .check { border-top: 1px solid var(--border); }
.checklist.roles .check input { flex: 0 0 20px; margin-top: 1px; }
.checklist.roles .check > span { display: flex; flex-direction: column; gap: 1px; }
.checklist.roles small { margin-top: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.diag li { margin: 4px 0; }

/* ---------- Feuilles modales et notifications ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 12, 16, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto;
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
}
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 20px; }
}
.sheet h2 { margin: 0 0 14px; font-size: 19px; }
.sheet .menu a, .sheet .menu button {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; padding: 0 6px; cursor: pointer; font-weight: 600; border-radius: 10px;
}
.sheet .menu svg { width: 22px; height: 22px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg);
  padding: 11px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Choix de vue, navigation ---------- */
.seg {
  display: flex; gap: 3px; padding: 3px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.seg button {
  flex: 1; min-height: 36px; padding: 0 6px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .seg button.on { background: var(--primary-soft); } }
.chip svg { width: 16px; height: 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.period-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: end; margin-bottom: 12px; }
.period-bar .btn { grid-column: 1 / -1; }
.period-bar .input, .grid2 .input { min-width: 0; }
.period-bar .field { margin: 0; }
.period-bar .input { padding: 8px; }
h2.group-title { font-size: 17px; margin: 26px 4px 2px; }
.day-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; width: 100%;
  margin: 18px 0 8px; padding: 0 4px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left;
}
.day-head strong { font-size: 15px; }
.day-head > span { white-space: nowrap; }
.day-head.today strong { color: var(--primary); }
.day-head.today strong::after { content: " · aujourd’hui"; font-weight: 600; color: var(--muted); font-size: 13px; }

/* ---------- Chiffre d'affaires : lignes cliquables ---------- */
button.month { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
button.month:disabled { cursor: default; }
button.month + button.month { border-top: 1px solid var(--border); }
.months.wide .month { grid-template-columns: 104px 1fr auto; }

/* ---------- Menu « Plus » et pastilles ---------- */
.list a.item { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.list a.item > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--muted); }
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700;
}
.tabbar a .dot {
  position: absolute; top: 9px; left: calc(50% + 7px); width: 10px; height: 10px;
  border-radius: 50%; background: var(--danger); border: 2px solid var(--surface);
}

/* ---------- Taches DentaGest ---------- */
.memo .ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.memo .ico svg { width: 18px; height: 18px; }
.memo .note {
  font-size: 13.5px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Planning ---------- */
.plan-wrap { padding: 6px 4px; overflow-x: auto; }
table.plan { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
table.plan th { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: center; padding: 2px 0 4px; line-height: 1.2; }
table.plan th.today { color: var(--primary); }
table.plan th.name, table.plan td.name { width: 28%; }
table.plan td.name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 4px; }
table.plan tr.me td.name { color: var(--primary); }
.pc {
  display: grid; place-items: center; align-content: center; width: 100%; height: 44px; padding: 2px;
  border: 0; border-radius: 8px; background: var(--surface-2); color: var(--muted);
  font-weight: 700; font-size: 14px; line-height: 1.05; cursor: pointer; overflow: hidden;
}
.pc small { display: block; max-width: 100%; font-size: 10px; font-weight: 600; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc.J { background: var(--primary); color: var(--primary-ink); }
.pc.M, .pc.A { background: var(--primary-soft); color: var(--primary); }
.pc.C { background: var(--warn-soft); color: var(--warn); }
.pc.F { background: repeating-linear-gradient(45deg, var(--surface-2) 0 5px, var(--border) 5px 10px); color: var(--muted); }
.pc.changed { box-shadow: inset 0 0 0 2px var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 4px; font-size: 12.5px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .pc { width: 22px; height: 22px; font-size: 11px; border-radius: 6px; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal .d { min-height: 56px; display: flex; flex-direction: column; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; }
.cal .d.out { visibility: hidden; }
.cal .d.today { border-color: var(--primary); }
.cal .d .n { font-size: 11.5px; font-weight: 700; color: var(--muted); padding-left: 2px; }
.cal .d .pc { height: 30px; font-size: 12px; border-radius: 6px; }
.tpl + .tpl { margin-top: 8px; }
.tpl summary { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; cursor: pointer; }
.tpl-body { padding: 0 14px 14px; }
/* Horaires habituels : une ligne par jour de la semaine, touchee pour regler le creneau. */
.tpl-row { all: unset; display: grid; grid-template-columns: 78px minmax(0, 1fr) 18px; gap: 8px; align-items: center; width: 100%; box-sizing: border-box; padding: 9px 0; font-size: 14px; cursor: pointer; }
.tpl-row + .tpl-row { border-top: 1px solid var(--border); }
.tpl-row .wd { font-weight: 700; }
.tpl-row .what { color: var(--muted); overflow-wrap: anywhere; }
.tpl-row svg { width: 18px; height: 18px; color: var(--muted); }
table.plan .th-day { all: unset; display: block; width: 100%; cursor: pointer; }
/* Vue Jour : le cabinet salle par salle, comme une case du classeur du cabinet. */
.dv .sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 2px 6px; }
.dv .sec-title:first-child { margin-top: 0; }
.pl { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; text-align: left; border: 0; border-radius: 10px; padding: 9px 11px; margin-bottom: 5px; font: inherit; font-size: 14px; line-height: 1.3; color: var(--pl-ink); background: var(--pl-autre); }
button.pl { cursor: pointer; }
.pl .post { flex: 0 0 auto; min-width: 28px; font-weight: 800; }
.pl .who { font-weight: 700; }
.pl .helper { color: inherit; opacity: .85; overflow-wrap: anywhere; }
.pl .when { margin-left: auto; flex: 0 0 auto; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl.soins { background: var(--pl-soins); } .pl.hygiene { background: var(--pl-hygiene); } .pl.assiste { background: var(--pl-assiste); }
.pl.volante { background: var(--pl-volante); } .pl.reception { background: var(--pl-reception); } .pl.renfort { background: var(--pl-renfort); }
.pl.pause { background: var(--pl-pause); color: var(--pl-pause-ink); flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.pl.pause .pz { white-space: nowrap; }
.pl.absent { background: var(--pl-absent); color: var(--pl-absent-ink); }
.pl.alerte { background: var(--pl-alerte); color: var(--pl-alerte-ink); font-weight: 600; }
/* Acces : numero DentaGest de chacun, une ligne par personne. */
.num-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: center; padding: 5px 0; }
.num-row + .num-row { border-top: 1px solid var(--border); }
.num-row span { font-size: 15px; overflow-wrap: anywhere; }
.num-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.num-row .input { min-width: 0; min-height: 38px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.input:disabled { background: var(--surface-2); color: var(--muted); border-style: dashed; cursor: not-allowed; }
/* Acces : listes de taches, une ligne par personne, un bouton par nom (retour a la ligne, pas de defilement). */
.task-row { padding: 12px 0; }
.task-row + .task-row { border-top: 1px solid var(--border); }
.task-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 2px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 6px 0 0; }
.chips.wrap .chip { white-space: normal; text-align: left; }
.chip:disabled { cursor: default; opacity: .55; }
/* Objectifs (administration) : meme montant pour l'annee, puis les 12 mois. */
.goal-same { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 12px; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0 8px; }
.goal-grid .field { margin-bottom: 10px; }
.goal-grid .input, .goal-same .input { min-width: 0; min-height: 38px; padding: 6px 8px; font-variant-numeric: tabular-nums; }

/* ---------- Conges ---------- */
.leave { padding: 14px 16px; }
.leave + .leave, details .leave { margin-top: 10px; }
.leave .when { font-weight: 650; }
.leave .meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.leave .note { font-size: 14px; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.leave .reply { font-size: 14px; margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); overflow-wrap: anywhere; }

/* ---------- Procedures ---------- */
.search { position: relative; margin-bottom: 6px; }
.search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 38px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px; font-weight: 600; text-decoration: none; }
.back svg { width: 18px; height: 18px; }
.proc h2 { font-size: 21px; margin: 8px 0 4px; }
.proc .body { margin-top: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }

/* Page Acces (30/09/2026, 2e version) : cartes par theme, une ligne ou un bloc par personne, phrases completes. */
.acc-card + .section-title { margin-top: 18px; }
.acc-h { font-size: 16px; margin: 0 0 6px; }
.acc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 0; }
.acc-row + .acc-row { border-top: 1px solid var(--border); }
.acc-row.col { grid-template-columns: 1fr; }
.acc-row.hl { background: color-mix(in srgb, var(--accent, #f0b100) 14%, transparent); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.acc-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.acc-num { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.acc-num .input { width: 96px; min-height: 38px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.acc-check { font-size: 12.5px; color: var(--muted); text-align: right; max-width: 190px; }
.acc-check.ok { color: var(--ok, #1a7f4b); }
.acc-check.warn { color: var(--warn, #b26a00); }
.acc-check.bad { color: var(--danger, #b3261e); }
.acc-sentence { font-size: 15px; margin: 2px 0 6px; }
.acc-row.col .checklist { max-height: none; }
.check.strong span { font-weight: 600; }
.check span small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.check.dim { opacity: .55; }
/* Etape 1 d'Acces : la liste deroulante prend toute la largeur, sous le nom, pour lire « N° 17 · Cécile · 9 en cours ». */
.acc-num.wide { align-items: stretch; }
.acc-num.wide .input { width: 100%; }
.acc-num.wide .acc-check { text-align: left; max-width: none; }
/* Etape 1 d'Acces : nom de chaque utilisateur DentaGest, champ large. */
.num-row.names { grid-template-columns: 118px minmax(0, 1fr); }

/* Navigateur du dossier personnel (30/09/2026). */
.folder .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 14px; margin: 0 4px 8px; }
.folder .crumb { background: none; border: 0; padding: 2px 0; color: var(--primary); font: inherit; cursor: pointer; }
.folder .item .muted svg { width: 18px; height: 18px; }

/* Visionneuse de documents (30/09/2026) : plein ecran dans le portail. */
.viewer { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; }
.viewer-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); padding-top: max(10px, env(safe-area-inset-top)); }
.viewer-head .grow { min-width: 0; }
.viewer-body { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: center; background: #2b3542; }
.viewer-img { max-width: 100%; height: auto; margin: auto; display: block; }
.viewer-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-text { width: 100%; margin: 0; padding: 14px; background: var(--surface); color: var(--text); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.viewer-none { margin: auto; padding: 24px; text-align: center; color: #fff; max-width: 360px; }
.viewer-none svg { width: 48px; height: 48px; margin-bottom: 8px; }
.viewer-none .actions { justify-content: center; }
