/* 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;
  /* Statuts du jour (02/10/2026) : repos, vacances, formation, école ; absence et OFF reprennent --pl-absent. */
  --st-repos: #e4e9ef; --st-repos-ink: #3d4b5c; --st-vacances: #d6f0df; --st-vacances-ink: #1f6b3a;
  --st-formation: #e6dcf7; --st-formation-ink: #5a3796; --st-ecole: #fde3c4; --st-ecole-ink: #8a4b00;
  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;
    --st-repos: #2a3441; --st-repos-ink: #c5d0dc; --st-vacances: #1d3a2a; --st-vacances-ink: #8fdcae;
    --st-formation: #33284d; --st-formation-ink: #cbb6f5; --st-ecole: #42311b; --st-ecole-ink: #f5c27a;
    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); }
/* Fichiers du planning : le nom sur toute la largeur, les boutons dessous. */
.list > li.file-row { flex-wrap: wrap; gap: 8px; }
.list > li.file-row > .grow { flex-basis: 100%; }
.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); }
/* Choix du site du Pilotage : noms de site parfois longs, sur deux lignes plutot que hors de l'ecran. */
.seg.sites button { white-space: normal; line-height: 1.15; padding: 4px 6px; }
@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, .list button.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; }
/* Statuts du jour (02/10/2026) : cases (R, V, Fo, É, Ab, OFF), lignes de la vue Jour, totaux de la vue Mois. */
.pc.st { font-size: 13px; }
/* Case avec heures : la lettre, puis le debut et la fin sur deux petites lignes. */
.pc.hrs { font-size: 12px; line-height: 1; gap: 1px; }
.pc.hrs small { font-size: 9.5px; line-height: 1.05; }
.cal .d .pc.hrs { height: 40px; font-size: 11px; }
.pc.st.repos, .pl.st-repos { background: var(--st-repos); color: var(--st-repos-ink); }
.pc.st.vacances, .pl.st-vacances { background: var(--st-vacances); color: var(--st-vacances-ink); }
.pc.st.formation, .pl.st-formation { background: var(--st-formation); color: var(--st-formation-ink); }
.pc.st.ecole, .pl.st-ecole { background: var(--st-ecole); color: var(--st-ecole-ink); }
.pc.st.absent, .pc.st.off { background: var(--pl-absent); color: var(--pl-absent-ink); }
.pc.st.off { font-size: 11px; }
.legend .pc.st.off, .dayrow .pc.st.off { font-size: 8.5px; letter-spacing: -.02em; }
/* Demi-journee dont l'autre moitie est en repos, école… : un trait sous la case. */
.pc.half-st { background-image: linear-gradient(to top, var(--gold) 4px, transparent 4px); }
.pl.absent .when, .pl[class*="st-"] .when { white-space: normal; text-align: right; }
table.plan td.name .nm { overflow: hidden; text-overflow: ellipsis; }
table.plan td.name small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 4px 6px; font-size: 13px; }
.st-count { display: inline-flex; align-items: center; gap: 6px; }
.st-count .pc { width: 14px; height: 14px; border-radius: 4px; cursor: default; }
/* Vue Mois, jour par jour : case, jour, horaires et pause, heures de travail. */
.days-list > li { padding: 0; min-height: 0; }
.dayrow { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 30px 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.dayrow .pc { width: 30px; height: 30px; font-size: 12px; border-radius: 7px; }
.dayrow .dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.dayrow .grow > div:first-child { font-variant-numeric: tabular-nums; }
.dayrow .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dayrow.today .dd { color: var(--primary); }
/* 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; }
/* Pilotage du cabinet (administrateur) : saisie mensuelle et compte de resultat. */
.pilot-grid .field { margin-bottom: 10px; }
.pilot-grid .field > span { font-size: 13px; }
.pilot-grid .input { font-variant-numeric: tabular-nums; }
.pilot-form .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kpi .value.muted { color: var(--muted); }
table.pnl td.num, table.pnl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.pnl tr.total td { font-weight: 700; border-top: 1px solid var(--text); }
table.pnl td.muted { color: var(--muted); }
table.pnl th, table.pnl td { padding-left: 10px; padding-right: 10px; }
@media (max-width: 420px) { .pilot-grid { grid-template-columns: minmax(0, 1fr); } }
/* Heures reservees par agenda : nom d'agenda plus long qu'un mois. */
.months .agenda-row { grid-template-columns: minmax(0, 1.1fr) minmax(50px, 1fr) 68px; }
.agenda-row .num { text-align: right; }
/* Provenance des nouveaux patients : nombre et pourcentage, lignes « Autres » et « Non renseigné » en retrait. */
.months .source-row { grid-template-columns: minmax(0, 1.8fr) minmax(36px, 1fr) 80px; }
.source-row.muted > span:first-child { color: var(--muted); font-style: italic; }
.month .fill.muted { background: var(--muted); opacity: .45; }
.agenda-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Factures ouvertes par praticien (Pilotage, 03/10/2026) : nom et montant sur la première ligne, détail dessous. */
.inv-list .inv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.inv-list .inv-head strong { min-width: 0; overflow-wrap: anywhere; }
.inv-list .inv-head .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-list .small { margin-top: 3px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; margin-bottom: 8px; }
.checklist .check-list { margin-bottom: 0; }
/* Pilotage en rubriques (03/10/2026) : barre des rubriques collee sous l'en-tete pendant le defilement (fond de page
   autour, pour masquer ce qui passe dessous), puis les cases du Resume. */
.pilot-nav { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 10; margin: -6px 0 6px; padding: 6px 0 8px; background: var(--bg); }
.pilot-tabs { display: grid; gap: 3px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.pilot-tabs button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 52px; padding: 5px 2px;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 650; font-size: 12.5px; cursor: pointer;
}
.pilot-tabs button svg { width: 20px; height: 20px; flex: 0 0 20px; }
.pilot-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-tabs button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .pilot-tabs button.on { background: var(--primary-soft); } }
@media (min-width: 560px) { .pilot-tabs button { flex-direction: row; gap: 7px; min-height: 42px; font-size: 14px; } .pilot-tabs button svg { width: 18px; height: 18px; flex-basis: 18px; } }
.ptiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) { .ptiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ptile {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; min-height: 112px; padding: 12px 12px 12px 14px;
  font: inherit; color: var(--text); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.ptile:active { transform: scale(.98); }
.ptile .t { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--muted); }
.ptile .t svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.ptile .v { margin: 4px 0 2px; font-size: clamp(19px, 5.4vw, 24px); font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .v.muted { color: var(--muted); }
.ptile .s { font-size: 12.5px; font-weight: 650; line-height: 1.3; color: var(--muted); }
.ptile .s.up { color: var(--ok); }
.ptile .s.down { color: var(--danger); }
.alert .actions { margin-top: 8px; }

/* ---------- 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; }
.pdf { width: 100%; min-width: max-content; display: flex; flex-direction: column; }
.pdf-bar { position: sticky; top: 0; left: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px; color: #fff; background: #2b3542; width: 100%; box-sizing: border-box; }
.pdf-bar .btn { min-width: 44px; color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; font-size: 20px; line-height: 1; }
.pdf-pages { display: grid; justify-items: center; gap: 10px; padding: 8px; min-width: max-content; }
.pdf-page { display: block; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.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; }

/* Requêtes DentaGest (04/10/2026) : réglages de la requête, tableau générique triable, recherche. */
h2.req-title { font-size: 19px; margin: 0 4px 12px; }
.req-tools { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.req-tools .field { flex: 1 1 220px; margin: 0; }
.req-search { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.req-search .input { flex: 1; min-width: 0; }
.req-count { white-space: nowrap; }
table.grid.req th, table.grid.req td { padding: 8px 10px; }
table.grid.req .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grid.req th button { all: unset; cursor: pointer; }
table.grid.req th button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
table.grid.req tfoot td { font-weight: 700; border-top: 1px solid var(--text); border-bottom: 0; }
.req-notes { margin: 12px 4px 0; }
.req-notes p { margin: 0 0 6px; overflow-wrap: anywhere; }

/* Rubrique Appels du Pilotage (Peoplefone, 04/10/2026) : heures de pointe (jours en colonnes, demi-heures en lignes,
   couleur selon le nombre), barres jour par jour, reglage des files. Une case seule en fin de Resume prend la ligne. */
.heat { display: grid; gap: 3px; align-items: center; padding: 10px 10px 12px; margin-top: 10px; }
.heat .hd { font-size: 12px; font-weight: 650; color: var(--muted); text-align: center; }
.heat .sl { font-size: 11.5px; color: var(--muted); text-align: right; padding-right: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.heat .c {
  min-width: 0; height: 26px; padding: 0; border: 0; border-radius: 5px; background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer;
}
.heat .c:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.month .fill.low { background: var(--danger); }
.tel-q + .tel-q { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
.tel-q .grid2 { margin-left: 30px; }
.tel-add { display: flex; gap: 8px; }
.tel-add .input { flex: 1; min-width: 0; }
/* Journal des appels (07/10/2026) : jour choisi, compteurs, liste des appels (perdus en tete), appels a rappeler. */
.tel-journal-bar { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; }
.tel-journal-bar .day { flex: 1; min-width: 0; text-align: center; font-weight: 700; font-size: 15px; }
.tel-journal-bar .day small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.tel-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 4px 10px; font-size: 13.5px; color: var(--muted); }
.tel-counts b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.tel-counts .missed b { color: var(--danger); }
.list > li.tel-call { align-items: flex-start; padding: 11px 14px; }
.tel-call .ico { margin-top: 2px; }
.tel-call.missed .ico { background: var(--danger-soft); color: var(--danger); }
.tel-call.answered .ico { background: var(--ok-soft); color: var(--ok); }
.tel-call.outgoing .ico { background: var(--surface-2); color: var(--muted); }
.tel-call.ringing .ico { background: var(--warn-soft); color: var(--warn); }
.tel-call.internal .ico { background: var(--surface-2); color: var(--muted); }
.tel-call .grow { flex: 1; min-width: 0; }
.tel-call .num { font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tel-call .num a { color: inherit; text-decoration: none; }
.tel-call .num a:active { color: var(--primary); }
.tel-call.missed:not(.done) .num { color: var(--danger); }
.tel-call .num .lbl { font-weight: 500; color: var(--muted); font-size: 14px; }
.tel-call .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tel-call .sub .time { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.tel-call .act { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tel-call .done-txt { font-size: 12.5px; color: var(--ok); text-align: right; max-width: 120px; }
.tel-call .undo { all: unset; cursor: pointer; font-size: 12px; color: var(--muted); text-decoration: underline; }
.tel-pending { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.tel-pending .section-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 4px; font-weight: 700; }
.tel-pending .section-head svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--danger); }
.tel-pending .section-head .badge { margin-left: auto; }
.tel-call .act .btn.sm { gap: 4px; padding-inline: 10px; }
.tel-call .act .btn.sm svg { width: 16px; height: 16px; flex-basis: 16px; }
/* Sur un telephone : le bouton « Rappelé » sous le texte, a droite, pour laisser la place au numero et au detail. */
@media (max-width: 559px) {
  .list > li.tel-call { flex-wrap: wrap; }
  .tel-call .act { flex: 1 0 100%; flex-direction: row; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 2px; }
  .tel-call .done-txt { max-width: none; }
}
.tel-hook { display: grid; gap: 6px; }
.tel-hook .st { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tel-hook .st .badge { flex: 0 0 auto; }
.tel-hook .st .who { flex: 1; min-width: 0; }
.tel-hook .st .who small { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.ptiles > .ptile:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 620px) {
  .ptiles > .ptile:last-child:nth-child(odd) { grid-column: auto; }
  .ptiles > .ptile:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}
/* Six rubriques sur un telephone : libelles un peu plus petits pour qu'ils tiennent en entier. */
@media (max-width: 559px) { .pilot-tabs.many button { font-size: 11.5px; padding-inline: 1px; letter-spacing: -.015em; } }

/* Factures fournisseurs (06/10/2026) : en-tete du dossier, badges d'etat, champs corriges, texte lu. */
.fourn-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fourn-head .grow { min-width: 200px; }
.fourn-dir { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.fourn-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fourn-list .inv-head strong { font-size: 15px; }
.fourn-form .field.fourn-manual > span { color: var(--primary); }
.fourn-form .field.fourn-manual .input { border-color: var(--primary); }
.fourn-range { margin-top: 12px; }
.fourn-dups { margin: 6px 0 0 18px; padding: 0; font-size: 14px; }
.fourn-dups a { color: inherit; overflow-wrap: anywhere; }
.fourn-company { margin: 10px 0 2px; }
.fourn-co + .fourn-co { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.fourn-co .btn { margin-bottom: 10px; }
.fourn-text { padding: 12px 14px; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
table.grid.fourn-rules input.input { width: 100%; min-width: 110px; }
table.grid.fourn-rules select.input { min-height: 36px; padding: 6px 8px; min-width: 120px; }
table.grid.fourn-rules th:last-child, table.grid.fourn-rules td:last-child { width: 44px; padding-left: 0; }
/* Rapprochement bancaire (06/10/2026) : paires facture / paiement, choix d'une facture pour un paiement. */
.fourn-bank { margin-top: 12px; margin-bottom: 0; }
.fourn-bank + .fourn-range { margin-top: 12px; }
.fourn-pairs li.fourn-pair { display: block; padding: 12px 14px; }
.fourn-pairs.plain { padding: 0; margin: 8px 0 0; list-style: none; }
.fourn-pairs.plain li.fourn-pair { padding: 8px 0; border-top: 1px solid var(--border); }
.fourn-pay-inv { display: block; color: inherit; text-decoration: none; }
.fourn-pay-inv:hover strong { text-decoration: underline; }
.fourn-pair-sep { margin: 6px 0 2px; }
.fourn-pay-detail { overflow-wrap: anywhere; margin-top: 2px; }
.fourn-pick { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.fourn-pick select { flex: 1; min-width: 0; }
.fourn-pair .actions { margin-top: 10px; }
