/* Version ordinateur du portail (27/10/2026, pc.js) : barre d'icones a gauche, titre en haut, page au centre ; listes de
   travail en trois colonnes (listes, tableau, fiche). Seulement quand body.pc-mode (poste ordinateur autorise) : le
   telephone garde app.css tel quel.
   Apparence « plus comme Denteo » (28/10/2026, demande : « la forme des boutons, les menus, et si tu peux fais encore
   mieux ») d'apres les captures de clinic.denteo.ch : fond gris clair, barre claire avec la loupe dans un carre blanc,
   pastilles grises des listes (compteur gris a droite), cartes blanches sans bordure, boutons plats gris en majuscules,
   choix de vue en bloc gris (choix en blanc), menus deroulants. Couleurs Studio Smile : l'or remplace le vert de Denteo
   pour la rubrique ouverte, l'ardoise pour le bouton principal. */

/* ---------- Couleurs du poste (clair, puis sombre) ---------- */
body.pc-mode {
  --bg: #f2f3f5; --surface: #ffffff; --surface-2: #f6f7f8;
  --fill: #eceef1; --fill-hover: #e3e6ea; --fill-on: #d6dae0;
  --border: #e2e5e9; --line: #eceef1; --text: #1d2731; --muted: #6b7682;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 3px 12px rgba(16, 24, 40, .06);
  --pop-shadow: 0 14px 40px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .08);
  --gold-glow: 0 3px 10px rgba(240, 177, 0, .45);
  --line-soft: #f4f5f7;
  /* Couleurs des agendas (en-tete des colonnes, pastilles du filtre ; rendez-vous sans couleur dans DentaGest). */
  /* Palette categorielle de reference (skill dataviz), ordre fixe, verifiee le 28/10/2026 (validate_palette.js, sur
     #ffffff et #1a222b : daltonisme et vision normale OK ; contraste faible en clair pour 3 couleurs : le nom est toujours
     ecrit a cote). */
  --ag1: #2a78d6; --ag2: #eb6834; --ag3: #1baf7a; --ag4: #eda100; --ag5: #e87ba4; --ag6: #008300;
  --rdv-mix: 30%;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7682' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  font-size: 14.5px;
}
@media (prefers-color-scheme: dark) {
  body.pc-mode {
    --bg: #11171e; --surface: #1a222b; --surface-2: #1f2832;
    --fill: #232d38; --fill-hover: #2b3643; --fill-on: #36424f;
    --border: #2a3540; --line: #26303b; --text: #eef2f7; --muted: #a3b1c0;
    --card-shadow: none; --pop-shadow: 0 14px 40px rgba(0, 0, 0, .55);
    --gold-glow: 0 3px 12px rgba(240, 177, 0, .22);
    --line-soft: #1d2630;
    --ag1: #3987e5; --ag2: #d95926; --ag3: #199e70; --ag4: #c98500; --ag5: #d55181; --ag6: #008300;
    --rdv-mix: 34%;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3b1c0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

/* ---------- Composants du portail, sur un poste ---------- */
/* Boutons plats gris, libelle en majuscules (comme « JOUR », « TÉLÉCHARGER LE PDF » chez Denteo). */
body.pc-mode .btn {
  min-height: 36px; padding: 0 14px; gap: 7px; border: 0; border-radius: 6px; background: var(--fill); color: var(--text);
  font-size: 12.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; transition: background-color .12s;
}
body.pc-mode .btn:hover { background: var(--fill-hover); }
body.pc-mode .btn:active { transform: none; background: var(--fill-on); }
body.pc-mode .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body.pc-mode .btn.primary { background: var(--primary); color: var(--primary-ink); }
body.pc-mode .btn.primary:hover { background: color-mix(in srgb, var(--primary) 86%, #000); }
body.pc-mode .btn.danger { color: var(--danger); }
body.pc-mode .btn.ghost { background: transparent; }
body.pc-mode .btn.ghost:hover { background: var(--fill); }
body.pc-mode .btn.sm { min-height: 32px; padding: 0 11px; font-size: 12px; border-radius: 6px; }
body.pc-mode .btn.icon { width: 36px; padding: 0; }
body.pc-mode .btn svg { width: 17px; height: 17px; flex: 0 0 17px; }
body.pc-mode .actions { gap: 8px; }

/* Champs remplis de gris, sans bordure ; etiquette petite et grise au-dessus (comme « Vue / RDV »). */
body.pc-mode .input, body.pc-mode select.input, body.pc-mode textarea.input {
  min-height: 38px; padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; background-color: var(--fill); font-size: 14px;
}
body.pc-mode .input:hover { background-color: var(--fill-hover); }
body.pc-mode .input:focus { background-color: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
body.pc-mode select.input { appearance: none; padding-right: 32px; background-image: var(--chevron); background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; cursor: pointer; }
body.pc-mode textarea.input { min-height: 110px; }
body.pc-mode .search .input { padding-left: 36px; }
body.pc-mode .search > svg { left: 11px; width: 17px; height: 17px; }
body.pc-mode .field { margin-bottom: 12px; }
body.pc-mode .field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
body.pc-mode input[type="checkbox"], body.pc-mode input[type="radio"] { accent-color: var(--primary); }

/* Cartes blanches posees sur le gris, sans bordure. */
body.pc-mode .card { border: 0; border-radius: 10px; box-shadow: var(--card-shadow); }
body.pc-mode ul.card { overflow: hidden; }
body.pc-mode .list > li { min-height: 48px; padding: 10px 16px; }
body.pc-mode .list > li + li { border-top-color: var(--line); }
body.pc-mode .list > li:has(> a.item, > button.item):hover { background: var(--surface-2); }
body.pc-mode .section-title { font-size: 11.5px; letter-spacing: .07em; }
body.pc-mode .alert { border-radius: 8px; }
body.pc-mode .badge { border-radius: 5px; font-weight: 650; }
body.pc-mode table.grid th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; }
body.pc-mode table.grid th, body.pc-mode table.grid td { border-bottom-color: var(--line); }

/* Choix de vue : bloc gris, le choix en blanc, libelles en majuscules (« JOUR | LU–VE | SEM. »). */
body.pc-mode .seg { width: fit-content; max-width: 100%; gap: 2px; padding: 3px; border: 0; border-radius: 7px; background: var(--fill); }
body.pc-mode .seg button {
  flex: 0 1 auto; min-height: 30px; padding: 0 16px; border-radius: 5px; color: var(--muted);
  font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
}
body.pc-mode .seg button:hover { color: var(--text); }
body.pc-mode .seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
body.pc-mode .pilot-tabs { border: 0; border-radius: 8px; background: var(--fill); }
body.pc-mode .pilot-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
@media (prefers-color-scheme: dark) {
  body.pc-mode .seg button.on, body.pc-mode .pilot-tabs button.on { background: var(--fill-on); }
}

/* Onglets et filtres en pastilles grises (comme la colonne des listes de Denteo) ; le choix en gris fonce. */
body.pc-mode .chip { min-height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--fill); color: var(--text); font-size: 13px; font-weight: 600; }
body.pc-mode .chip:hover { background: var(--fill-hover); }
body.pc-mode .chip.on { background: var(--fill-on); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }

/* Fenetres : centrees, coins moins ronds, ombre. */
body.pc-mode .sheet-backdrop { align-items: center; background: rgba(17, 24, 39, .32); }
body.pc-mode .sheet { border-radius: 12px; padding: 22px 22px 20px; box-shadow: var(--pop-shadow); }
body.pc-mode .sheet h2 { font-size: 19px; font-weight: 550; }
body.pc-mode .sheet .menu a, body.pc-mode .sheet .menu button { min-height: 40px; padding: 0 10px; border-radius: 6px; font-weight: 500; }
body.pc-mode .sheet .menu a:hover, body.pc-mode .sheet .menu button:hover { background: var(--fill); }
body.pc-mode .toast { bottom: 24px; border-radius: 8px; }
body.pc-mode .auth-card { border-radius: 14px; }

/* Touches du clavier affichees (Ctrl K, Alt 1…). */
.pc-find kbd, .pc-cmd kbd {
  font: 600 11px/1 'Public Sans Variable', system-ui, sans-serif; padding: 4px 6px; border-radius: 4px;
  background: var(--surface); color: var(--muted); box-shadow: inset 0 -1px 0 var(--border), 0 0 0 1px var(--border);
}

/* ---------- Cadre ---------- */
.pc-app { display: flex; min-height: 100dvh; }
.pc-rail {
  position: sticky; top: 0; height: 100dvh; flex: 0 0 72px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 0; background: var(--bg); overflow-y: auto; scrollbar-width: none;
}
.pc-rail::-webkit-scrollbar { display: none; }
.pc-grow { flex: 1; }
.pc-sep { width: 28px; height: 1px; flex: 0 0 1px; margin: 6px 0; background: var(--border); }
/* Loupe dans un carre blanc, en haut (comme Denteo). */
.pc-search {
  all: unset; box-sizing: border-box; width: 46px; height: 46px; flex: 0 0 46px; margin-bottom: 8px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; background: var(--surface); color: var(--text); box-shadow: var(--card-shadow);
}
.pc-search:hover { box-shadow: 0 2px 12px rgba(16, 24, 40, .14); }
.pc-search svg { width: 21px; height: 21px; }
/* Personnes du poste : carres aux coins arrondis avec les initiales ; la personne au travail en ardoise. */
.pc-who {
  all: unset; box-sizing: border-box; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  display: grid; place-items: center; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
.pc-who:hover { border-color: var(--muted); }
.pc-who.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.pc-who.off { background: transparent; color: var(--muted); box-shadow: none; }
.pc-who.add { background: transparent; border: 1.5px dashed var(--border); color: var(--muted); box-shadow: none; }
.pc-who.add:hover { border-color: var(--primary); color: var(--primary); }
.pc-who.add svg { width: 17px; height: 17px; }
.pc-search:focus-visible, .pc-who:focus-visible, .pc-sec:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Rubriques : icones foncees, la rubrique ouverte dans un carre or (le vert de Denteo). */
.pc-sec {
  all: unset; box-sizing: border-box; position: relative; width: 44px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  display: grid; place-items: center; cursor: pointer; color: var(--text);
}
.pc-sec svg { width: 22px; height: 22px; }
.pc-sec:hover { background: var(--fill); }
.pc-sec.on { background: var(--gold); color: var(--gold-ink); box-shadow: var(--gold-glow); }
.pc-sec .dot { position: absolute; top: 5px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg); }

/* Info-bulle de la barre (pc.js : dans le corps de la page, la barre defile). */
.pc-tip.up { transform: translateY(calc(-100% - 8px)); }
.pc-tip {
  position: fixed; z-index: 90; transform: translateY(-50%); pointer-events: none; white-space: nowrap;
  padding: 6px 9px; border-radius: 6px; background: var(--text); color: var(--surface); font-size: 12.5px; font-weight: 600; box-shadow: var(--pop-shadow);
}

.pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 28px 0 10px; background: var(--bg);
}
.pc-top .pc-emblem { width: 26px; height: 23px; flex: 0 0 26px; }
.pc-top h1 { flex: 1; min-width: 0; margin: 0; font-size: 21px; font-weight: 550; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-find {
  all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; width: 290px; height: 34px; padding: 0 7px 0 11px;
  border-radius: 7px; background: var(--fill); color: var(--muted); font-size: 13px; cursor: pointer;
}
.pc-find:hover { background: var(--fill-hover); }
.pc-find:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pc-find svg { width: 16px; height: 16px; }
.pc-find span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-poste {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
  background: var(--fill); color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.pc-poste svg { width: 14px; height: 14px; }
@media (max-width: 1100px) { .pc-find { width: auto; } .pc-find span { display: none; } }

/* Pages habituelles : plus larges que sur le telephone, alignees sur le titre, sans la place de la barre du bas. */
body.pc-mode main.page { max-width: 1100px; width: 100%; margin: 0; padding: 4px 28px 40px 10px; }
body.pc-mode main.page.wide { max-width: none; padding: 0; display: flex; flex-direction: column; height: calc(100dvh - 60px); }
body.pc-mode main.page.wide > .fm-nudge { flex: none; margin: 0 16px 10px 10px; }
body.pc-mode main.page.wide > .loading { flex: 1; }

/* ---------- Menus deroulants (pc.js, pcPop) ---------- */
.pc-pop {
  position: fixed; z-index: 70; min-width: 240px; max-width: 320px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--pop-shadow);
}
.pc-pop-h { padding: 8px 10px; }
.pc-pop-h strong { display: block; font-size: 14px; }
.pc-pop-h small { color: var(--muted); font-size: 12px; }
.pc-pop-sep { height: 1px; margin: 5px 4px; background: var(--line); }
.pc-pop button {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px;
  border-radius: 6px; cursor: pointer; font-size: 13.5px; color: var(--text);
}
.pc-pop button:hover, .pc-pop button:focus-visible { background: var(--fill); }
.pc-pop button svg { width: 18px; height: 18px; color: var(--muted); }
.pc-pop button.danger, .pc-pop button.danger svg { color: var(--danger); }
.pc-pop-card { width: 300px; padding: 0; }

/* ---------- Recherche (pc.js, pcSearch ; loupe ou Ctrl K) ---------- */
.pc-cmd-bd {
  position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start;
  padding-top: 12vh; background: rgba(17, 24, 39, .32);
}
.pc-cmd {
  width: min(600px, calc(100% - 32px)); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: 12px; box-shadow: var(--pop-shadow);
}
.pc-cmd-top { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.pc-cmd-top > svg { width: 20px; height: 20px; color: var(--muted); }
.pc-cmd-in { all: unset; flex: 1; height: 54px; font-size: 16px; color: var(--text); }
.pc-cmd-in::placeholder { color: var(--muted); }
.pc-cmd-list { overflow-y: auto; padding: 6px; }
.pc-cmd-g { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pc-cmd-i {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 0 10px;
  border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--text);
}
.pc-cmd-i > svg { width: 18px; height: 18px; color: var(--muted); }
.pc-cmd-i small { margin-left: 8px; color: var(--muted); font-size: 12px; }
.pc-cmd-i .n { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pc-cmd-i.on { background: var(--fill); }
.pc-cmd-empty { padding: 22px; text-align: center; color: var(--muted); }
.pc-cmd-foot { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- Ecran verrouille « Qui travaille ? » ---------- */
.pc-lock {
  min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px;
  background: linear-gradient(165deg, var(--brand) 0%, var(--brand-deep) 100%);
}
.pc-lock .in {
  width: 100%; max-width: 640px; text-align: center; background: var(--surface);
  border-radius: 16px; padding: 28px 26px 22px; box-shadow: 0 18px 40px rgba(10, 18, 28, .28);
}
.pc-lock h1 { margin: 10px 0 4px; font-size: 22px; font-weight: 550; }
.pc-lock .alert { text-align: left; }
.pc-lock .pc-poste-code code { font-size: 13px; background: var(--fill); padding: 1px 6px; border-radius: 5px; letter-spacing: .04em; }
.pc-people { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0; }
.pc-person {
  all: unset; box-sizing: border-box; width: 136px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 10px 12px; border-radius: 10px; cursor: pointer; background: var(--fill); transition: background-color .12s;
}
.pc-person:hover, .pc-person:focus-visible { background: var(--fill-hover); box-shadow: 0 0 0 2px var(--primary); }
.pc-person strong { font-size: 14px; font-weight: 600; line-height: 1.25; }
.pc-person small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.pc-person.off .pc-big { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.pc-person.add .pc-big { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }
.pc-big {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 4px;
  background: var(--primary); color: var(--primary-ink); font-size: 17px; font-weight: 650; letter-spacing: .02em;
}
.pc-big svg { width: 22px; height: 22px; }
.pc-who-one { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pc-who-one .pc-big { margin: 0; }
.pc-who-one strong { display: block; font-size: 17px; }
.pc-who-one small { color: var(--muted); }
.pc-pin { font-size: 22px; letter-spacing: .4em; text-align: center; max-width: 220px; }

/* ---------- Listes de travail ---------- */
.pc-lists { flex: 1; min-height: 0; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.pc-lists.open { grid-template-columns: 264px minmax(0, 1fr) 380px; }
/* Colonne des listes : pastilles grises, compteur gris a droite, la liste ouverte en gris fonce (comme Denteo). */
.pc-nav2 { overflow-y: auto; padding: 2px 6px 24px 10px; scrollbar-width: thin; scrollbar-color: var(--fill-on) transparent; }
.pc-nav2-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 2px 4px; }
.pc-nav2-h strong { font-size: 13px; font-weight: 600; color: var(--muted); }
.pc-nav2-h .btn svg { width: 16px; height: 16px; }
.pc-nav2 h3 { margin: 14px 4px 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pc-qi {
  display: flex; align-items: center; gap: 10px; min-height: 38px; margin-bottom: 6px; padding: 0 12px; border-radius: 6px;
  background: var(--fill); color: var(--text); text-decoration: none; font-size: 13.5px; transition: background-color .12s;
}
.pc-qi:hover { background: var(--fill-hover); }
.pc-qi.on { background: var(--fill-on); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.pc-qi:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pc-qi span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-qi .n { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pc-qi.zero { color: var(--muted); }

/* Liste au centre : carte blanche, titre puis total en gris (« CHF 3072.00 »), filtre, tableau aere. */
.pc-list { display: flex; flex-direction: column; min-width: 0; margin: 2px 16px 16px 6px; overflow: hidden; }
.pc-list-h { display: flex; align-items: flex-start; gap: 8px; padding: 20px 22px 4px; }
.pc-list-h h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.pc-total { margin-top: 1px; font-size: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-list-h .small { margin-top: 2px; }
.pc-tools { padding: 10px 22px 12px; }
.pc-tools .search { max-width: 340px; margin: 0; }
/* Filtre propre a une liste (Contrôles RDV manquants, 08/11/2026 : periode et agendas comme l'agenda). */
.pc-tools.with { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.pc-tools.with .search { flex: 1 1 160px; max-width: 340px; }
.pc-ctl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pc-ctl-tools .seg { margin: 0; }
.pc-ctl-tools .pc-ag-chips { padding: 0; }
.pc-ctl-period { display: flex; align-items: center; gap: 6px; }
.pc-ctl-period .input { width: 136px; padding-top: 5px; padding-bottom: 5px; }
.pc-lists.open.wide { grid-template-columns: 264px minmax(0, 1fr) 460px; }
.pc-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 22px 12px; padding: 8px 10px 8px 14px; border-radius: 8px; background: var(--fill); }
.pc-tw { flex: 1; overflow: auto; }
.pc-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.pc-grid th {
  position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap; cursor: pointer; user-select: none;
  padding: 10px 14px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 500; border-bottom: 1px solid var(--line);
}
.pc-grid th:hover, .pc-grid th.sorted { color: var(--text); }
.pc-grid td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.pc-grid th:first-child, .pc-grid td:first-child { padding-left: 22px; }
.pc-grid td, .pc-grid th { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pc-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.pc-grid .code { font-variant-numeric: tabular-nums; color: var(--muted); }
.pc-grid .cb { width: 44px; padding-right: 0; }
.pc-grid input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.pc-grid tbody tr { cursor: pointer; }
.pc-grid tbody tr:hover { background: var(--surface-2); }
.pc-grid tbody tr.sel { background: var(--primary-soft); }
.pc-grid tbody tr.focus { box-shadow: inset 3px 0 0 var(--gold); }
.pc-grid tbody tr.open { background: var(--fill); box-shadow: inset 3px 0 0 var(--primary); }
.pc-grid tr.empty td { text-align: center; color: var(--muted); padding: 48px 16px; cursor: default; }
.pc-late { color: var(--danger); font-weight: 650; }
.pc-foot { padding: 9px 22px; border-top: 1px solid var(--line); color: var(--muted); }

/* Fiche a droite. */
.pc-fiche { min-width: 0; overflow-y: auto; padding: 2px 16px 16px 0; }
.pc-fiche:empty { display: none; }
.pc-fiche-in { display: flex; flex-direction: column; }
.pc-fiche-h { display: flex; align-items: flex-start; gap: 8px; padding: 18px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.pc-fiche-h h2 { margin: 3px 0 0; font-size: 20px; font-weight: 500; line-height: 1.25; }
.pc-fiche-h .btn svg { width: 18px; height: 18px; }
.pc-over { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pc-fiche-b { padding: 14px 20px; }
.pc-kv { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.pc-kv dt { color: var(--muted); }
.pc-kv dd { margin: 0; overflow-wrap: anywhere; }
.pc-sec-b { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pc-sec-b h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
/* Note d'une tache DentaGest (listes des rapports) : retours a la ligne gardes. */
body.pc-mode .pc-note { margin: 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.pc-files { list-style: none; margin: 0; padding: 0; }
.pc-files li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.pc-files li > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--muted); }
.pc-files li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-files li > small { color: var(--muted); white-space: nowrap; }
.pc-fiche-a { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }

/* Ecran de portable : colonnes plus etroites ; plus petit encore, la fiche passe par-dessus le tableau. */
@media (max-width: 1440px) {
  .pc-lists { grid-template-columns: 228px minmax(0, 1fr); }
  .pc-lists.open { grid-template-columns: 228px minmax(0, 1fr) 340px; }
  .pc-lists.open.wide { grid-template-columns: 228px minmax(0, 1fr) 420px; }
  .pc-kv { grid-template-columns: 108px minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .pc-lists, .pc-lists.open, .pc-lists.open.wide { grid-template-columns: 204px minmax(0, 1fr); }
  .pc-fiche:not(:empty) {
    position: fixed; top: 60px; right: 0; bottom: 0; z-index: 25; width: min(400px, 100%); padding: 12px;
    background: var(--bg); box-shadow: -8px 0 24px rgba(10, 18, 28, .18);
  }
}

/* ---------- Agenda en grille (pc.js, pagePcAgenda) ---------- */
.pc-pad { flex: 1; min-height: 0; overflow-y: auto; max-width: 1100px; padding: 4px 28px 40px 10px; }
.pc-ag-card { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 2px 16px 16px 10px; overflow: hidden; }
.pc-ag-h { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 18px 20px 12px 22px; }
.pc-ag-h > .grow { flex: 1 1 260px; }
.pc-ag-h h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.pc-ag-h .pc-total { font-size: 15px; margin-top: 2px; }
.pc-ag-h .seg { margin: 0; }
.pc-ag-nav { position: relative; display: flex; align-items: center; gap: 6px; }
.pc-ag-picker { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pc-ag-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 12px 22px; }
.pc-ag-chips:empty { display: none; }
.pc-ag-sw { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 3px; background: var(--ag); }
.pc-ag-note { margin: 0 20px 12px 22px; }
.pc-ag { position: relative; flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--line); }
.pc-ag-head { position: sticky; top: 0; z-index: 3; display: grid; background: var(--surface); border-bottom: 1px solid var(--line); }
.pc-ag-ph { min-width: 0; padding: 9px 12px; border-left: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--ag, transparent); }
.pc-ag-ph strong { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-ag-ph small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* En-tete d'un jour de la semaine (comme « ME 10 » chez Denteo) : un clic ouvre ce jour seul. */
.pc-ag-ph.day { all: unset; box-sizing: border-box; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 7px; min-width: 0; padding: 8px 12px; border-left: 1px solid var(--line); cursor: pointer; }
.pc-ag-ph.day:hover { background: var(--surface-2); }
.pc-ag-ph.day:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.pc-ag-ph .wd { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pc-ag-ph .dn { font-size: 22px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pc-ag-ph.today .dn { padding: 0 7px; border-radius: 7px; background: var(--gold); color: var(--gold-ink); }
.pc-ag-ph.day small { flex-basis: 100%; }
.pc-ag-body { position: relative; display: grid; }
.pc-ag-hours { position: relative; }
.pc-ag-hours span { position: absolute; right: 8px; transform: translateY(3px); color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
/* Lignes des heures (pleines) et des demi-heures (claires), espacees selon l'echelle (--hour, pc.js). */
.pc-ag-col {
  position: relative; min-width: 0; border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2);
}
.pc-ag.week .pc-ag-col.today { background-color: color-mix(in srgb, var(--gold) 6%, transparent); }
/* Un rendez-vous : couleur de DentaGest (code du rendez-vous) en fond clair et en trait a gauche. */
.pc-ag-rdv {
  all: unset; box-sizing: border-box; position: absolute; display: flex; flex-direction: column; gap: 1px; padding: 3px 7px; overflow: hidden;
  border-left: 3px solid color-mix(in srgb, var(--rc) 72%, var(--text)); border-radius: 5px;
  background: color-mix(in srgb, var(--rc) var(--rdv-mix), var(--surface)); color: var(--text); cursor: pointer; font-size: 12px; line-height: 1.3;
}
.pc-ag-rdv:hover { z-index: 2; box-shadow: 0 2px 8px rgba(16, 24, 40, .18); }
.pc-ag-rdv:focus-visible { z-index: 2; outline: 2px solid var(--primary); outline-offset: 1px; }
.pc-ag-rdv .t, .pc-ag-rdv .c, .pc-ag-rdv .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Bloc etroit (plusieurs rendez-vous en meme temps) : seulement l’heure ; le detail reste au clic. */
.pc-ag-rdv { container-type: inline-size; }
@container (max-width: 66px) { .pc-ag-rdv .l1, .pc-ag-rdv .c, .pc-ag-rdv .a { display: none; } }
.pc-ag-rdv .t b { font-variant-numeric: tabular-nums; }
.pc-ag-rdv .c { color: var(--muted); }
.pc-ag-rdv .a { color: var(--muted); font-size: 11px; }
.pc-ag-rdv.past { opacity: .6; }
.pc-ag-rdv.confirm { outline: 1.5px dashed color-mix(in srgb, var(--rc) 72%, var(--text)); outline-offset: -1.5px; }
.pc-ag-now { position: absolute; left: -1px; right: 0; z-index: 1; height: 2px; background: var(--now); pointer-events: none; }
.pc-ag-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); }
.pc-ag-card > .pc-foot { padding: 9px 22px; }
/* Occupation dans les en-tetes de colonne : pourcentage et jauge fine (couleur unique : une seule mesure). */
.pc-ag-ph .pc-ag-occ { color: var(--text); font-weight: 600; }
.pc-ag-gauge { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.pc-ag-gauge b { display: block; height: 100%; border-radius: 2px; background: var(--primary); }
.pc-ag-ph.day .pc-ag-gauge { flex-basis: 100%; }
.pc-ag-ph.day .pc-ag-occ { flex-basis: 100%; }
/* Graphique d'occupation : une ligne par agenda (nom, barre, %, heures), en semaine une mini-barre par jour. */
.pc-occ { padding: 4px 22px 14px; }
.pc-occ.hidden { display: none; }
.pc-occ-wait { padding: 6px 0 4px; }
.pc-occ-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.pc-occ-h strong { font-size: 13px; font-weight: 600; }
.pc-occ-big { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pc-occ-grid { display: grid; grid-template-columns: minmax(120px, 220px) minmax(120px, 1fr) 48px 110px; align-items: center; gap: 7px 12px; max-width: 980px; }
.pc-occ-grid.week { grid-template-columns: minmax(120px, 220px) minmax(120px, 1fr) 48px 110px auto; }
.pc-occ-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; }
.pc-occ-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-occ-track { position: relative; height: 10px; border-radius: 4px; background: var(--fill); cursor: default; }
.pc-occ-track b { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.pc-occ-none { font-style: italic; }
.pc-occ-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-occ-hrs { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-occ-days { display: flex; gap: 3px; align-items: flex-end; }
.pc-occ-days.head { align-items: center; }
.pc-occ-days.head span { width: 18px; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.pc-occ-days.head span.today { color: var(--text); }
.pc-occ-day { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 18px; height: 22px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.pc-occ-day b { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--primary); }
.pc-occ-day.today { box-shadow: 0 0 0 1.5px var(--gold); }
.pc-occ-day em { font-style: normal; color: var(--muted); line-height: 22px; }
.pc-ag-h .btn.on { background: var(--fill-on); }

/* Detail d'un rendez-vous (carte du menu deroulant). */
.pc-rdv { display: grid; gap: 5px; padding: 14px 16px; font-size: 13.5px; }
.pc-rdv strong { font-size: 15px; font-weight: 600; }
.pc-rdv p { margin: 4px 0 0; }

/* ---------- Administration > Postes ordinateur ---------- */
.pc-poste-row { flex-wrap: wrap; }
.pc-poste-row code { font-size: 13px; background: var(--fill); padding: 1px 6px; border-radius: 5px; }
.pc-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pc-members .badge { display: inline-flex; align-items: center; gap: 4px; }
.pc-x { all: unset; cursor: pointer; padding: 0 3px; font-size: 14px; line-height: 1; opacity: .7; }
.pc-x:hover { opacity: 1; }
