:root {
  /* Charte Little Bee, dérivée du logo : vert sauge #899A85, vert profond #535E4E, miel #DEC06A, noir du trait. */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f8f3;
  --ink: #1f281d;
  --muted: #556052;
  --line: #e6eae0;
  --brand: #535e4e;
  --brand-strong: #3f4a3b;
  --on-brand: #ffffff;
  --sage: #899a85;
  --honey: #dec06a;
  --honey-strong: #b38b12;
  --on-honey: #1f281d;
  --font-title: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ok: #14633b;
  --ok-bg: #e2f4e9;
  --bad: #a11f19;
  --bad-bg: #fbe4e2;
  --warn: #7a4d00;
  --warn-bg: #ffefc0;
  --focus: #1f281d;
  --shadow: 0 1px 2px rgba(31, 40, 29, .04);
  --radius: 14px;
  /* Types d'éléments (agenda, organisation) : teintes douces d'identification. Les couleurs vives sont réservées au sens : rouge = urgence / retard, orange = à traiter, vert = fait. */
  --t-task: #d9822b; --t-project: #7b5cc4; --t-interview: #2f9e6a; --t-meeting: #3b82c4; --t-event: #c2577f; --t-absence: #7f8a7c; --t-deadline: #5f6f7d;
  --alert-red: #c0362c; --alert-orange: #d9822b; --alert-green: #2f9e6a; --alert-blue: #3b82c4;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-title); }
h1 { font-size: 1.5rem; line-height: 1.2; }
h2 { font-size: 1.15rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }
.app.wide { max-width: 1120px; }
.app.wide-plan { max-width: 980px; }   /* planning hebdomadaire du salarié : les 7 jours tiennent sans défilement */

/* ---------- boutons ---------- */
.btn {
  appearance: none; border: 2px solid transparent; border-radius: 12px; min-height: 48px; padding: 10px 18px;
  font: inherit; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; text-align: center; line-height: 1.2;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-strong); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.btn-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.btn-link { background: none; border: 0; color: var(--ink); text-decoration: underline; min-height: 44px; padding: 8px; font: inherit; cursor: pointer; }
.btn-sm { min-height: 40px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- cartes & formulaires ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 22px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { display: block; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: 12px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--honey); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 0; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--honey-strong); flex: none; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.error:empty { display: none; }
.hint { color: var(--muted); font-size: .9rem; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px; }

/* ---------- connexion ---------- */
.login { padding-top: 24px; }
.brand { text-align: center; margin-bottom: 22px; }
.brand picture, .brand img { display: block; }
.brand img { width: min(320px, 82%); height: auto; margin: 0 auto; }
.brand h1 { margin-top: 14px; color: var(--brand); }
.brand p { color: var(--muted); margin-top: 10px; }
.logo-row { margin-bottom: 14px; }
.logo-row picture, .logo-row img { display: block; }
.logo-row img { height: 34px; width: auto; max-width: 100%; }

/* ---------- entête ---------- */
/* flex-wrap: si le bloc de boutons (.row, largeur fixe) ne tient plus à côté du nom, il passe sous le nom au lieu d'écraser
   .who jusqu'à une largeur quasi nulle (c'était la cause du texte affiché lettre par lettre). */
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.topbar .who { flex: 1 1 200px; min-width: 0; }
.topbar .who strong { display: block; overflow-wrap: break-word; }
.topbar .who span { color: var(--muted); font-size: .9rem; }

/* ---------- compteur ---------- */
.balance { text-align: center; padding: 22px 18px; }
.balance .label { color: var(--muted); font-weight: 600; }
.balance .big { font-size: clamp(1.75rem, 8.4vw, 2.6rem); white-space: nowrap; font-weight: 800; line-height: 1.1; margin: 6px 0; font-variant-numeric: tabular-nums; }
.balance .status { font-weight: 650; }
.balance.credit { background: var(--ok-bg); border-color: var(--ok); }
.balance.credit .big, .balance.credit .status { color: var(--ok); }
.balance.deficit { background: var(--bad-bg); border-color: var(--bad); }
.balance.deficit .big, .balance.deficit .status { color: var(--bad); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
.split div { background: var(--surface); border-radius: 12px; padding: 10px; }
.split dt { color: var(--muted); font-size: .8rem; }
.split dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.pending-note { margin-top: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.actions { display: grid; gap: 10px; }

/* ---------- historique ---------- */
.entry { background: var(--surface); border: 1px solid var(--line); border-left-width: 6px; border-radius: 14px; padding: 12px 14px; }
.entry.pending { border-left-color: var(--honey); }
.entry.approved { border-left-color: var(--ok); }
.entry.rejected { border-left-color: var(--bad); }
.entry .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.entry .date { font-weight: 700; }
.entry .what { margin-top: 2px; }
.entry .impact { margin-top: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.entry .impact.plus { color: var(--ok); }
.entry .impact.minus { color: var(--bad); }
.entry .impact.est { color: var(--muted); font-weight: 600; }
.entry .note { margin-top: 4px; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.entry .btn { margin-top: 8px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.approved { background: var(--ok-bg); color: var(--ok); }
.badge.rejected { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: var(--surface-2); color: var(--ink); }

/* ---------- fenêtres ---------- */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(20, 22, 28, .55); }
dialog .dlg { padding: 20px; overflow: auto; max-height: calc(100vh - 24px); }
dialog h2 { margin-bottom: 14px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; min-width: 0; overflow-wrap: anywhere; hyphens: auto; text-align: center; border: 2px solid var(--line); border-radius: 12px; padding: 12px 8px; cursor: pointer; font-weight: 650; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.seg input:checked + label { background: var(--honey); border-color: var(--honey-strong); color: var(--on-honey); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.duration { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; }
.duration span { font-weight: 600; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; min-height: 40px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.preview { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-height: 44px; font-weight: 600; }
.pin-display { font-size: 2.4rem; font-weight: 800; letter-spacing: .25em; text-align: center; background: var(--surface-2); border-radius: 14px; padding: 14px; font-variant-numeric: tabular-nums; }
.dlg .buttons { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.dlg .buttons .btn { flex: 1 1 140px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); z-index: 1000; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Bandeau « nouvelle version disponible » : contrairement au toast, reste affiché tant que l'utilisateur n'a pas mis à jour. */
.update-banner { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; background: var(--brand); color: var(--on-brand); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); z-index: 1000; font-weight: 600; }
.update-banner[hidden] { display: none; }
.update-banner button { flex: none; background: var(--honey); color: var(--on-honey); border: 0; border-radius: 999px; min-height: 38px; padding: 6px 16px; font: inherit; font-weight: 700; cursor: pointer; }

/* Étapes d'installation iOS (Mon compte / Paramètres). */
.install-steps { margin: 4px 0 0; padding-left: 1.25em; display: grid; gap: 6px; color: var(--ink); }
.install-steps li { padding-left: 4px; }

/* ---------- direction ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-head h1 { display: flex; align-items: center; gap: 10px; }
.admin-head picture, .admin-head img { display: block; }
.admin-head img { height: 38px; width: auto; max-width: 100%; }
.admin-head .dir-tag { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); border: 1.5px solid var(--brand); border-radius: 999px; padding: 2px 10px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; border-bottom: 2px solid var(--line); scrollbar-width: thin; }
.tab { flex: none; background: none; border: 0; border-bottom: 4px solid transparent; padding: 10px 14px; font: inherit; font-weight: 650; color: var(--muted); cursor: pointer; min-height: 44px; margin-bottom: -8px; }
.tab[aria-selected=true] { color: var(--ink); border-bottom-color: var(--honey); }
.tab .count { background: var(--honey); color: var(--on-honey); border-radius: 999px; padding: 1px 8px; font-size: .8rem; margin-left: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat .k { color: var(--muted); font-size: .9rem; font-weight: 600; }
.stat .v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat.credit .v { color: var(--ok); }
.stat.deficit .v { color: var(--bad); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { flex: 1 1 170px; min-width: 160px; }
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; overflow-y: hidden; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-size: .85rem; text-transform: none; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
td .actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.pos { color: var(--ok); font-weight: 700; }
.neg { color: var(--bad); font-weight: 700; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .app.wide { padding-left: 12px; padding-right: 12px; }
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable td { display: block; width: 100%; }
  table.stackable thead { display: none; }
  table.stackable tr { border-bottom: 8px solid var(--bg); padding: 8px 4px; }
  table.stackable td { border: 0; padding: 4px 12px; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  table.stackable td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; flex: none; }
  table.stackable td.select-cell::before, table.stackable td.actions-td::before { content: none; }
  table.stackable td.actions-td { justify-content: flex-start; }
  table.stackable td.num { text-align: right; }
}

/* ---------- impression des codes ---------- */
.print-sheet { display: none; }
@media print {
  body.printing-codes > *:not(#print-sheet) { display: none !important; }
  body.printing-codes { background: #fff; color: #000; }
  body.printing-codes #print-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; padding: 6mm; }
  .slip { border: 1px dashed #555; padding: 6mm; break-inside: avoid; }
  .slip h3 { margin: 0 0 2mm; font-size: 13pt; }
  .slip .code { font-size: 26pt; font-weight: 800; letter-spacing: .2em; margin: 3mm 0; }
  .slip p { margin: 1mm 0; font-size: 10pt; }
}

/* dates compactes dans les tableaux larges */
@media (min-width: 761px) {
  td[data-label="Date"] { min-width: 8.5rem; }
}

/* ====================================================================== */
/* Version 2 : absences, tâches, calendriers, rétroplanning               */
/* ====================================================================== */
:root {
  --line-strong: #c9d0be;
  --k-rest: #1d5f9c; --k-rest-bg: #dcecfa;
  --k-sick: #a11f19; --k-sick-bg: #fbe4e2;
  --k-other: #6b3fa0; --k-other-bg: #ece1f8;
  --st-todo: #6f7a6c; --st-doing: #2f7fd0; --st-done: #14633b;
  --p-urgent: #a11f19; --p-high: #b45f06; --p-low: #6f7a6c;
}
[hidden] { display: none !important; }
h3 { font-size: 1rem; margin: 0; }
.grow { flex: 3 1 220px !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 10px; }
@media (max-width: 520px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.warn-text { color: var(--warn); font-weight: 700; }
.done-text { text-decoration: line-through; color: var(--muted); }
.push-right { margin-left: auto; }
dialog.wide { width: min(760px, calc(100vw - 24px)); }
.dlg .buttons.spread { justify-content: flex-start; }
.dlg .buttons.spread .btn:last-child { margin-left: auto; }

/* onglets */
.tabs-3 { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
.tabs-3 .tab { text-align: center; padding-left: 4px; padding-right: 4px; }
.tab .count.new { background: var(--bad); color: #fff; }
.tab .count.late { background: var(--bad); color: #fff; }
.badge.new { background: var(--honey); color: var(--on-honey); }
.badge.prio-urgent { background: var(--bad-bg); color: var(--p-urgent); }
.badge.prio-high { background: var(--warn-bg); color: var(--p-high); }
.badge.prio-low { background: var(--surface-2); color: var(--p-low); }
.badge.st-todo { background: var(--surface-2); color: var(--st-todo); }
.badge.st-doing { background: var(--k-rest-bg); color: var(--st-doing); }
.badge.st-done { background: var(--ok-bg); color: var(--st-done); }

/* choix segmentés à boutons */
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-views { display: inline-grid; grid-template-columns: repeat(3, auto); }
.segbtn { border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 12px; min-height: 44px; font: inherit; font-weight: 650; cursor: pointer; }
.segbtn[aria-pressed=true] { background: var(--honey); border-color: var(--honey-strong); color: var(--on-honey); }
.segbtn.st-doing[aria-pressed=true] { background: var(--st-doing); border-color: var(--st-doing); color: #fff; }
.segbtn.st-done[aria-pressed=true] { background: var(--st-done); border-color: var(--st-done); color: #fff; }

/* cartes de tâches (salarié) */
.task-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--st-todo); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.task-card.st-doing { border-left-color: var(--st-doing); }
.task-card.st-done { border-left-color: var(--st-done); opacity: .85; }
.task-card.late { border-left-color: var(--bad); }
.task-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.task-card .title { overflow-wrap: anywhere; }
.task-card .desc { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: .95rem; }
.done-list summary { cursor: pointer; font-weight: 650; padding: 10px 0; min-height: 44px; }
.thread { max-height: 40vh; overflow: auto; display: grid; gap: 10px; }
.comment { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.comment.from-admin { background: var(--warn-bg); }
.comment .meta { color: var(--muted); font-size: .8rem; }
.comment p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }

/* calendrier mensuel */
.monthnav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.month-title { min-width: 10ch; text-align: center; flex: 1 1 auto; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.cal-head { background: var(--surface-2); text-align: center; font-size: .8rem; font-weight: 700; padding: 6px 0; color: var(--muted); }
.cal-cell { min-height: 96px; padding: 4px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.cal-cell:nth-child(7n + 8) { border-left: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.out { opacity: .45; }
.cal-cell.weekend { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.cal-cell.today .cal-day { background: var(--honey); color: var(--on-honey); border-radius: 999px; }
.cal-day { display: inline-block; min-width: 1.6em; text-align: center; font-size: .8rem; font-weight: 700; margin-bottom: 2px; }
.cal-items { display: grid; gap: 2px; }
.cal-chip { display: block; font-size: .72rem; line-height: 1.25; font-weight: 650; padding: 1px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent; }
.cal-chip.k-rest, .day-item.k-rest .badge-k { background: var(--k-rest-bg); color: var(--k-rest); }
.cal-chip.k-sick { background: var(--k-sick-bg); color: var(--k-sick); }
.cal-chip.k-other { background: var(--k-other-bg); color: var(--k-other); }
.cal-chip.pending { background: transparent; border: 1px dashed currentColor; }
.cal-chip.task { background: var(--surface-2); color: var(--ink); border-left: 4px solid var(--p-low); }
.cal-chip.task.p-normal { border-left-color: var(--honey-strong); }
.cal-chip.task.p-high { border-left-color: var(--p-high); }
.cal-chip.task.p-urgent { border-left-color: var(--p-urgent); }
.cal-chip.task.st-done { text-decoration: line-through; opacity: .6; }
.cal-chip.task.late { color: var(--bad); }
.cal-more { font-size: .72rem; color: var(--muted); font-weight: 700; padding-left: 4px; }
.legend { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: baseline; }
.legend .dot { margin-right: 0; }
.dot.k-rest { background: var(--k-rest); } .dot.k-sick { background: var(--k-sick); } .dot.k-other { background: var(--k-other); }
.dot.pending-dot { background: transparent; border: 2px dashed var(--muted); }
.dot.st-todo-dot { background: var(--st-todo); } .dot.st-doing-dot { background: var(--st-doing); } .dot.st-done-dot { background: var(--st-done); } .dot.late-dot { background: var(--bad); }
.now-card { padding: 12px 16px; }
.day-item { border-left: 6px solid var(--muted); }
.day-item.k-rest { border-left-color: var(--k-rest); } .day-item.k-sick { border-left-color: var(--k-sick); } .day-item.k-other { border-left-color: var(--k-other); }
.task-pick { display: grid; gap: 4px; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; border-left: 6px solid var(--st-todo); }
.task-pick.st-doing { border-left-color: var(--st-doing); } .task-pick.st-done { border-left-color: var(--st-done); }
@media (max-width: 640px) {
  .cal-cell { min-height: 60px; padding: 2px; }
  .cal-chip { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
  .cal-chip.pending { border-width: 1px; }
  .cal-more { font-size: .65rem; padding: 0; }
  .cal-head { font-size: .7rem; }
}

/* liste des tâches */
tr.project-row td { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
tr.step-row td:first-child { padding-left: 28px; }
tr.late-row td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.task-title { display: flex; gap: 6px; align-items: baseline; }
.branch { color: var(--muted); }
.status-select { min-height: 40px; padding: 4px 8px; font-weight: 650; width: auto; min-width: 8.5rem; }
.status-select.st-doing { border-color: var(--st-doing); } .status-select.st-done { border-color: var(--st-done); }
.step-item, .step-edit { display: grid; gap: 8px; }
@media (max-width: 760px) {
  table.stackable td .status-select { min-width: 0; }
  tr.step-row td:first-child { padding-left: 24px; }
}


.filters-box > summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.filters-box[open] > summary { margin-bottom: 6px; }

/* ====================================================================== */
/* Planning des équipes                                                    */
/* ====================================================================== */
:root {
  --a-section: #1d5f9c; --a-section-bg: #dcecfa;
  --a-kitchen: #2d6a2f; --a-kitchen-bg: #dff1dc;
  --a-closing: #6b3fa0; --a-closing-bg: #ece1f8;
  --a-office: #7a4d00; --a-office-bg: #ffe6a8;
  --a-break: #556052; --a-break-bg: #e4e6da;
  --a-other: #8a3a5c; --a-other-bg: #f9dfe9;
  --today-bg: #f6ebc4;
}
.a-section { --a: var(--a-section); --a-bg: var(--a-section-bg); }
.a-kitchen { --a: var(--a-kitchen); --a-bg: var(--a-kitchen-bg); }
.a-closing { --a: var(--a-closing); --a-bg: var(--a-closing-bg); }
.a-office { --a: var(--a-office); --a-bg: var(--a-office-bg); }
.a-break { --a: var(--a-break); --a-bg: var(--a-break-bg); }
.a-other { --a: var(--a-other); --a-bg: var(--a-other-bg); }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 5px; background: var(--a-bg); border: 2px solid var(--a); flex: none; }
.swatch.a-break { background: repeating-linear-gradient(45deg, var(--a-bg) 0 3px, transparent 3px 6px); }

/* barre d'onglets à quatre entrées */
.tabs-4 { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
.tabs-4 .tab { text-align: center; padding-left: 2px; padding-right: 2px; font-size: .95rem; }
.tabs-4 .tab .count { margin-left: 4px; padding: 1px 7px; }

/* grille horaire d'une journée */
.pgrid-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.plgrid { min-width: 760px; }
.pg-row { display: flex; border-top: 1px solid var(--line); min-height: 52px; }
.pg-row:first-child { border-top: 0; }
.pg-label { flex: none; width: 170px; position: sticky; left: 0; z-index: 3; background: var(--surface); padding: 6px 10px; display: flex; flex-direction: column; justify-content: center; gap: 2px; align-items: flex-start; border-right: 1px solid var(--line-strong); }
.pg-label strong { overflow-wrap: anywhere; line-height: 1.2; }
.pg-track { position: relative; flex: 1 1 auto; min-width: 560px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--hours)) 100%; }
.pg-head { min-height: 0; background: var(--surface-2); }
.pg-head .pg-label, .pg-head .pg-track { background-color: var(--surface-2); }
.pg-scale { height: 26px; }
.pg-hour { position: absolute; top: 4px; font-size: .72rem; font-weight: 700; color: var(--muted); padding-left: 3px; }
.pg-row.me .pg-label { background: color-mix(in srgb, var(--honey) 22%, var(--surface)); }
.pg-row.clickable { cursor: pointer; }
.pg-row.clickable:hover .pg-label { background: var(--surface-2); }
.pblock { position: absolute; top: 5px; bottom: 5px; border-radius: 7px; background: var(--a-bg); color: var(--a); border-left: 4px solid var(--a); padding: 2px 6px; overflow: hidden; font-size: .78rem; line-height: 1.2; display: flex; flex-direction: column; justify-content: center; }
.pblock span { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pblock small { font-size: .7rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pblock.a-break { background: repeating-linear-gradient(45deg, var(--a-bg) 0 5px, transparent 5px 10px); border-left-style: dashed; }
/* Crèche réelle d'un créneau (salariés multi-crèches / multisite) : mêmes teintes que partout ailleurs (--tint-h, voir plus bas), jamais une nouvelle palette. */
.pblock-site { display: flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: hsl(var(--tint-h) 42% 38%); }
.pblock-site-dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--tint-h) 42% 38%); border: 1px solid hsl(var(--tint-h) 42% 30%); flex: none; }
.pg-cov { background: var(--surface-2); }
.pg-cov .pg-label { background: var(--surface-2); }
.cov { position: absolute; top: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; border-radius: 7px; font-weight: 800; font-size: .85rem; background: var(--ok-bg); color: var(--ok); }
.cov.low { background: var(--bad-bg); color: var(--bad); outline: 2px solid var(--bad); outline-offset: -2px; }
.cov.zero:not(.low) { background: transparent; color: var(--muted); }

/* vue semaine */
.plan-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table.plan-week { min-width: 800px; border-collapse: separate; border-spacing: 0; }
.plan-week th, .plan-week td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 0; vertical-align: middle; }
.plan-week tr > :first-child { border-left: 0; }
.plan-week tbody tr:last-child > * { border-bottom: 0; }
.plan-week thead th { padding: 4px 6px; text-align: center; }
.plan-week thead th:first-child { text-align: left; padding-left: 12px; }
.plan-week .day-th .btn-link { min-height: 36px; text-decoration: none; font-weight: 700; }
.plan-week .day-th .btn-link:hover { text-decoration: underline; }
.plan-week .day-th.today { background: var(--honey); }
.plan-week .day-th.today .btn-link { color: var(--on-honey); }
.plan-week .emp-th { position: sticky; left: 0; z-index: 2; background: var(--surface); min-width: 140px; max-width: 190px; white-space: normal; padding: 6px 12px; font-size: .95rem; text-align: left; }
.plan-week tr.cov-tr .emp-th, .plan-week tr.cov-tr td { background: var(--surface-2); }
.plan-week tr.me .emp-th { background: color-mix(in srgb, var(--honey) 25%, var(--surface)); }
.plan-week tr.me td { background: color-mix(in srgb, var(--honey) 12%, var(--surface)); }
.plan-cell.today { background: var(--today-bg); }
.plan-cell.conflict { box-shadow: inset 0 0 0 2px var(--bad); }
.cell-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 60px; padding: 6px 4px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.cell-btn:hover { background: color-mix(in srgb, var(--honey) 25%, transparent); }
.cell-btn .ranges { font-weight: 650; font-size: .82rem; line-height: 1.25; }
.cell-btn small { color: var(--muted); font-size: .75rem; }
.plan-team .cell-btn { min-height: 48px; }
.plan-week td.total { text-align: center; padding: 6px 8px; }
.plan-week td.total.over { background: var(--bad-bg); color: var(--bad); }
.cov-cell { text-align: center; font-size: .82rem; font-weight: 700; padding: 6px 4px !important; color: var(--ok); }
.cov-cell small { display: block; font-weight: 500; color: var(--muted); }
.cov-cell.low { background: var(--bad-bg) !important; color: var(--bad); }
.cov-cell.low small { color: var(--bad); }

/* badges du planning */
.badge.alert-Heures { background: var(--warn-bg); color: var(--warn); }
.badge.alert-Encadrement { background: var(--bad-bg); color: var(--bad); }
.badge.alert-Absence { background: var(--k-other-bg); color: var(--k-other); }
.badge.abs-rest { background: var(--k-rest-bg); color: var(--k-rest); }
.badge.abs-sick { background: var(--k-sick-bg); color: var(--k-sick); }
.badge.abs-other { background: var(--k-other-bg); color: var(--k-other); }
.badge.pending[class*="abs-"] { background: transparent; border: 1px dashed currentColor; }
.plan-alerts { display: grid; gap: 8px; }
.plan-alerts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-alerts li { line-height: 1.6; }
.plan-status.is-published { border-left: 6px solid var(--ok); }
.plan-status:not(.is-published) { border-left: 6px solid var(--honey-strong); }
.daychips { display: flex; gap: 6px; flex-wrap: wrap; }
.daychips .segbtn { padding: 8px 12px; }
.daychips .segbtn.is-today:not([aria-pressed=true]) { border-color: var(--honey-strong); }
.print-title { display: none; }

/* fenêtres de saisie du planning */
.block-edit { display: grid; gap: 10px; padding: 12px; box-shadow: none; }
.grid-time { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px; }
.grid-3-eq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.min-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.min-grid input { padding-left: 6px; padding-right: 6px; text-align: center; }
@media (max-width: 520px) {
  .grid-time { grid-template-columns: 1fr 1fr; }
  .grid-time .field:last-child { grid-column: 1 / -1; }
  .grid-3-eq { grid-template-columns: 1fr; }
  .min-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.apply-days { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; margin: 0; }
.apply-days legend { font-weight: 650; padding: 0 6px; }
.daychecks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.daycheck { min-height: 40px; width: auto; }

/* planning côté salarié */
.plan-day { display: grid; gap: 8px; padding: 14px; }
.plan-day.today { border-left: 6px solid var(--honey-strong); }
.plan-day.off { box-shadow: none; background: var(--surface-2); }
.plan-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-blocks li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan-blocks .time { font-weight: 800; font-variant-numeric: tabular-nums; }

/* impression du planning */
@page plan { size: landscape; margin: 10mm; }
@media print {
  .plan-printable { page: plan; }
  .admin-head, .tabs, .no-print, .toast, .plan-legend + .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .print-title { display: block; margin: 0 0 6mm; font-size: 14pt; }
  .plan-scroll, .pgrid-scroll { overflow: visible; border-color: #999; }
  table.plan-week { min-width: 0; font-size: 9pt; }
  .plan-week .emp-th { position: static; }
  .cell-btn { min-height: 0; }
  .plgrid { min-width: 0; }
  .pg-label { position: static; }
  .pg-track { min-width: 0; }
  .card { box-shadow: none; }
}
.plan-alerts > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.plan-alerts[open] > summary { margin-bottom: 8px; }

.block-foot { display: flex; gap: 8px; align-items: center; }
.block-foot input { flex: 1 1 auto; min-width: 0; }
.block-foot .btn { flex: none; }

.ranges { display: flex; flex-direction: column; align-items: center; }
.rng { white-space: nowrap; }
.plan-day .badge { margin-left: 8px; }
.tabs-4 .tab { font-size: .88rem; min-width: 0; }
.tabs-4 .tab .count { margin-left: 3px; padding: 0 6px; font-size: .72rem; }
@media (max-width: 640px) {
  .plgrid { min-width: 0; }
  .pg-label { width: 108px; padding: 6px; font-size: .85rem; }
  .pg-track { min-width: 480px; }
  .plan-team { min-width: 0 !important; }
  .plan-team .emp-th { min-width: 100px; padding: 6px 8px; font-size: .85rem; }
}
.tabs-4 .tab { position: relative; padding-left: 0; padding-right: 0; }
.tabs-4 .tab .count { position: absolute; top: 2px; right: 0; margin: 0; min-width: 18px; text-align: center; }
.tabs-4 .tab { font-size: .82rem; }
.tabs-4 .tab .count { top: 0; right: -2px; min-width: 16px; padding: 0 4px; font-size: .68rem; line-height: 16px; }

/* ====================================================================== */
/* Stocks                                                                  */
/* ====================================================================== */
.tabs-5 { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; }
.tabs-5 .tab { position: relative; text-align: center; padding-left: 0; padding-right: 0; font-size: .8rem; min-width: 0; }
@media (min-width: 480px) { .tabs-5 .tab { font-size: .95rem; } }
.tabs-5 .tab .count { position: absolute; top: 0; right: -2px; margin: 0; min-width: 16px; padding: 0 4px; font-size: .68rem; line-height: 16px; text-align: center; }

.badge.lv-ok { background: var(--ok-bg); color: var(--ok); }
.badge.lv-low { background: var(--warn-bg); color: var(--warn); }
.badge.lv-out { background: var(--bad-bg); color: var(--bad); }
.lv-card.lv-out { border-left: 6px solid var(--bad); }
.lv-card.lv-low { border-left: 6px solid var(--honey-strong); }
.lv-card.lv-ok { border-left: 6px solid var(--ok); }
.lv-card.lv-out .v { color: var(--bad); }
.stock-cat { margin-top: 4px; }
.stock-table td .qty-cell { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: baseline; min-width: 150px; }
.stock-table td .qty-cell .meter { grid-column: 1 / -1; margin-top: 4px; }
.qty { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.stock-table tr.lv-row.lv-out td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.stock-table tr.lv-row.lv-low td:first-child { box-shadow: inset 4px 0 0 var(--honey-strong); }
.stock-table tr.archived-row td { opacity: .65; }
.sr-only-th { width: 1%; }
.btn-link.inline { display: inline; min-height: 0; padding: 0; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); overflow: visible; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ok); }
.meter.lv-low .meter-fill { background: var(--honey-strong); }
.meter.lv-out .meter-fill { background: var(--bad); }
.meter-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 8px; }
.stepper .btn { font-size: 1.5rem; padding: 0; }
.stepper input { text-align: center; font-size: 1.4rem; font-weight: 800; }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.inv-row label { margin: 0; overflow-wrap: anywhere; }
.inv-row input { text-align: center; font-weight: 700; }
.mv { padding: 12px 14px; display: grid; gap: 2px; box-shadow: none; }
.stock-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--ok); border-radius: 14px; padding: 14px; }
.stock-card.lv-low { border-left-color: var(--honey-strong); }
.stock-card.lv-out { border-left-color: var(--bad); }
.stock-main { display: grid; gap: 4px; min-width: 0; }
.stock-main .title { overflow-wrap: anywhere; }
.stock-qty { text-align: right; display: grid; justify-items: end; }
.stock-qty .qty { font-size: 1.6rem; line-height: 1.1; }
.stock-card > .btn { grid-column: 1 / -1; }
@media (min-width: 560px) { .stock-card { grid-template-columns: minmax(0, 1fr) auto auto; } .stock-card > .btn { grid-column: auto; } }
.stock-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.stock-actions .btn { flex: 1 1 8rem; }
@media (min-width: 560px) { .stock-actions { grid-column: auto; flex-wrap: nowrap; } .stock-actions .btn { flex: 0 0 auto; } }
.stock-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.stock-tools .field { flex: 1 1 200px; }

@media print {
  body:has(dialog.print-dlg[open]) #app { display: none !important; }
  dialog.print-dlg { position: static; width: auto; max-width: none; max-height: none; box-shadow: none; border: 0; }
  dialog.print-dlg .buttons { display: none !important; }
  dialog.print-dlg::backdrop { display: none; }
}

@media (min-width: 761px) {
  .stock-table { table-layout: fixed; }
  .stock-table th:nth-child(1) { width: 19%; }
  .stock-table th:nth-child(2) { width: 17%; }
  .stock-table th:nth-child(3) { width: 20%; }
  .stock-table th:nth-child(4) { width: 15%; }
  .stock-table th:nth-child(5) { width: 29%; }
  .stock-table td .thresholds { white-space: nowrap; }
  .stock-table td { overflow-wrap: anywhere; }
  .stock-table td.actions-td .actions-cell { flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
  .stock-table td.actions-td .btn { white-space: nowrap; padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 760px) {
  .stock-table td[data-label="Article"] { display: block; text-align: left; padding-top: 10px; }
  .stock-table td[data-label="Article"]::before { content: none; }
  .stock-table td[data-label="Article"] strong { font-size: 1.05rem; }
}


/* ---------- Espace direction : coins et tableau de bord ---------- */
.corners { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.corner { flex: none; background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 8px 16px; min-height: 44px; font: inherit; font-weight: 750; cursor: pointer; }
.corner[aria-selected=true] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.corner .count { border-radius: 999px; padding: 1px 8px; font-size: .8rem; margin-left: 6px; background: var(--bad); color: #fff; }
.tabs[hidden] { display: none; }

.badge.cat-works { background: var(--honey); color: var(--on-honey); }
.badge.cat-maintenance { background: var(--k-rest-bg); color: var(--k-rest); }
.badge.plan-ok { background: var(--ok-bg); color: var(--ok); }
.badge.plan-warn { background: var(--warn-bg); color: var(--warn); }
.badge.plan-late { background: var(--bad-bg); color: var(--bad); }
.plan-btn { border: 0; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; min-height: 32px; padding: 4px 12px; }

.dash-head { align-items: baseline; }
.dash-corner { display: grid; gap: 14px; margin-top: 26px; }
.dash-corner > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.dash-corner > header h2 { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); color: var(--brand); }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.dash-tile { display: grid; gap: 2px; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 6px solid var(--ok); border-radius: 14px; padding: 12px 14px; font: inherit; cursor: pointer; }
.dash-tile.alert { border-left-color: var(--bad); }
.dash-tile.warn { border-left-color: var(--honey-strong); }
.dash-tile.info { border-left-color: var(--k-rest); }
.dash-tile .k { color: var(--muted); font-weight: 650; font-size: .9rem; }
.dash-tile .v { font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-tile.alert .v { color: var(--bad); }
.dash-tile .sub { color: var(--muted); font-size: .85rem; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.dash-card { display: grid; gap: 10px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.dash-card h2 { font-size: 1.05rem; }
.dash-card h3 { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dash-list li:first-child { border-top: 0; }
.dash-list .main { min-width: 0; overflow-wrap: anywhere; }
.dash-list .main p { margin: 2px 0 0; }
.dash-empty { margin: 0; }
.dash-card td:first-child strong { white-space: nowrap; }
.dash-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.dash-quiet { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 12px 14px; font-weight: 650; }
@media (max-width: 760px) {
  .corners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .corner { padding: 8px 10px; font-size: .95rem; text-align: center; }
  .dash-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-tile { padding: 10px 12px; }
  .dash-tile .v { font-size: 1.7rem; }
}

/* ---------- Icônes du menu ---------- */
.nav-ico { width: 1.4em; height: 1.4em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-ico .acc { fill: var(--honey); stroke: none; }
.corner { display: inline-flex; align-items: center; gap: 8px; }
.btn-ico { display: inline-flex; align-items: center; gap: 6px; }
.btn-ico .nav-ico { width: 1.2em; height: 1.2em; }

/* Tâches récurrentes et raccourcis de la liste */
.badge.recur { background: color-mix(in srgb, var(--honey) 28%, var(--surface)); color: var(--brand-strong); border: 1px solid color-mix(in srgb, var(--honey) 60%, transparent); }
.seg.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .seg.seg-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Espace salarié : menu Accueil · Temps & Planning · Tâches · Stocks ---------- */
.tabs-main { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; overflow: visible; border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; }
.tabs-main .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; margin: 0; padding: 8px 2px 6px; min-height: 64px; font-size: .78rem; line-height: 1.15; text-align: center; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.tabs-main .tab .nav-ico { width: 1.9em; height: 1.9em; color: var(--brand); }
.tabs-main .tab[aria-selected=true] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.tabs-main .tab[aria-selected=true] .nav-ico { color: var(--on-brand); }
.tabs-main .tab .count { position: absolute; top: -6px; right: -3px; margin: 0; min-width: 18px; padding: 0 5px; font-size: .7rem; line-height: 18px; text-align: center; }
.tabs-main .lbl { overflow-wrap: anywhere; }
@media (min-width: 560px) { .tabs-main .tab { font-size: .95rem; flex-direction: row; justify-content: center; gap: 8px; min-height: 52px; } .tabs-main .tab .nav-ico { width: 1.5em; height: 1.5em; } }
.tabs-sub { margin-top: 0; }
.tabs-sub .tab { position: relative; text-align: center; padding-left: 4px; padding-right: 4px; font-size: .95rem; }
.tabs-sub .tab .count { position: absolute; top: 0; right: -2px; margin: 0; min-width: 16px; padding: 0 4px; font-size: .68rem; line-height: 16px; }

/* accueil salarié : sur desktop, « Aujourd'hui » et le compteur/planning profitent de la largeur côte à côte (voir .app.wide) ;
   sur mobile les deux colonnes s'empilent, dans le même ordre, sans rien changer aux cartes elles-mêmes. */
.home-grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 860px) { .home-grid { grid-template-columns: 1.3fr 1fr; } }

.home-balance { display: grid; justify-items: center; width: 100%; font: inherit; color: inherit; cursor: pointer; }
.home-card { display: grid; gap: 10px; }
.home-card h2 { font-size: 1.05rem; }
.home-list { list-style: none; margin: 0; padding: 0; }
.home-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.home-list li:first-child { border-top: 0; }
.home-list .main { min-width: 0; overflow-wrap: anywhere; }
.home-list .main p { margin: 2px 0 0; }
.home-list .when { display: grid; justify-items: end; flex: none; font-variant-numeric: tabular-nums; }
.home-list li.today { background: color-mix(in srgb, var(--honey) 22%, transparent); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.home-news { border-color: var(--honey-strong); }
.home-card .btn-link { padding: 4px 0; min-height: 32px; }

/* ---------- notifications : cloche, centre, lignes lues / non lues ---------- */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding-inline: 10px; }
.bell .nav-ico { width: 22px; height: 22px; }
.bell.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 20px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notif { display: flex; align-items: stretch; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; position: relative; }
.notif.unread { background: color-mix(in srgb, var(--honey) 16%, var(--surface)); border-color: color-mix(in srgb, var(--honey) 55%, var(--line)); }
.notif.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--honey-strong); }
.notif-open { flex: 1 1 auto; min-width: 0; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: none; border: 0; padding: 12px 8px 12px 16px; font: inherit; color: inherit; cursor: pointer; }
.notif-open:hover .notif-title { text-decoration: underline; }
.notif-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); }
.notif-ico .nav-ico { width: 22px; height: 22px; }
.notif-text { display: grid; gap: 3px; min-width: 0; }
.notif-title { font-weight: 600; overflow-wrap: anywhere; }
.notif.unread .notif-title { font-weight: 800; }
.notif-body { color: var(--ink); font-size: .92rem; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.notif-meta { color: var(--muted); font-size: .8rem; }
.notif-toggle { flex: none; align-self: center; padding: 8px 12px; font-size: .82rem; white-space: nowrap; }
.notif.flash, .flash { animation: lb-flash 2.6s ease-out; }
@keyframes lb-flash { 0%, 35% { box-shadow: 0 0 0 4px var(--honey); } 100% { box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; outline: 3px solid var(--honey); } }
tr.flash { outline: 3px solid var(--honey); outline-offset: -3px; animation: none; }
.notif-list.compact .notif { border-radius: 12px; }
.notif-list.compact .notif-open { padding-block: 10px; }
.home-news { border-color: color-mix(in srgb, var(--honey) 55%, var(--line)); }
.mention-box { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; }
.mention-box summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.chip[aria-pressed="true"] { background: var(--honey); border-color: var(--honey-strong); color: var(--on-honey); }
.card .block { display: block; margin-top: 6px; }
@media (max-width: 480px) {
  .notif { flex-wrap: wrap; }
  .notif-toggle { margin: 0 0 8px 68px; padding: 2px 0; }
  .topbar .row { gap: 8px; }
}
.topbar .row { flex-wrap: nowrap; flex: none; }
.mention-box .chips { max-height: 190px; overflow-y: auto; padding: 2px; }
.mention-box .chip { width: auto; flex: 0 0 auto; min-height: 34px; padding: 3px 12px; font-size: .85rem; }

/* ---------- absences : déclaration, justificatifs, statuts ---------- */
.btn-xl { min-height: 60px; font-size: 1.1rem; border-radius: 16px; }
.type-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.type-tile { display: grid; gap: 2px; text-align: left; background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-left-width: 8px; border-radius: 14px; padding: 12px 14px; min-height: 64px; font: inherit; cursor: pointer; }
.type-tile:hover { border-color: var(--ink); }
.type-tile strong { font-size: 1.05rem; }
.type-tile.t-sick { border-left-color: var(--k-sick); }
.type-tile.t-leave { border-left-color: var(--k-rest); }
.type-tile.t-family { border-left-color: var(--k-other); }
.type-tile.t-appointment { border-left-color: var(--sage); }
.type-tile.t-training { border-left-color: var(--honey-strong); }
.type-tile.t-other { border-left-color: var(--muted); }
@media (min-width: 520px) { .type-grid { grid-template-columns: 1fr 1fr; } }

.reassure { background: var(--surface-2); box-shadow: none; padding: 12px 14px; font-size: .95rem; }
.preview { color: var(--muted); font-size: .92rem; min-height: 1.3em; }
.doc-zone { border: 2px dashed var(--sage); border-radius: 14px; padding: 12px; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.doc-pick { min-height: 56px; flex-wrap: wrap; }
.doc-chosen { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 8px 12px; }
.doc-chosen[hidden] { display: none; }
.doc-name { overflow-wrap: anywhere; min-width: 0; }
.doc-name .muted { color: inherit; opacity: .85; }
.doc-note { font-size: .9rem; }
.doc-ok { color: var(--ok); font-weight: 700; }
.doc-missing { color: var(--warn); font-weight: 700; background: var(--warn-bg); border-radius: 10px; padding: 6px 12px; display: inline-block; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.doc-list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; overflow-wrap: anywhere; }
.doc-receipt { box-shadow: none; background: var(--surface-2); }
.doc-alert { display: grid; gap: 2px; width: 100%; text-align: left; font: inherit; color: var(--warn); background: var(--warn-bg); border: 2px solid var(--honey-strong); cursor: pointer; box-shadow: none; }

.done { display: flex; gap: 12px; align-items: center; }
.done h2 { margin: 0; }
.done-mark { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); font-size: 1.6rem; font-weight: 800; }
.done-line { color: var(--ink); }

.entry.absence { border-left-color: var(--line); display: grid; gap: 8px; }
.entry.absence .btn { margin-top: 0; }
.entry.absence .ab-type { overflow-wrap: anywhere; }
.periods { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.period { display: grid; gap: 6px; }
.periods > .period:only-child { padding: 0; }
.period:not(:only-child) { border-top: 1px solid var(--line); padding-top: 10px; }
.period-dates { font-weight: 650; font-variant-numeric: tabular-nums; }
.entry.ab-missing { border-left-color: var(--honey-strong); }
.entry.ab-pending { border-left-color: var(--honey); }
.entry.ab-received { border-left-color: var(--k-rest); }
.entry.ab-approved { border-left-color: var(--ok); }
.entry.ab-rejected { border-left-color: var(--bad); }
.entry.ab-processed { border-left-color: var(--sage); }
.badge.ab-missing { background: var(--warn-bg); color: var(--warn); }
.badge.ab-pending { background: var(--warn-bg); color: var(--warn); }
.badge.ab-received { background: var(--k-rest-bg); color: var(--k-rest); }
.badge.ab-approved { background: var(--ok-bg); color: var(--ok); }
.badge.ab-rejected { background: var(--bad-bg); color: var(--bad); }
.badge.ab-processed { background: var(--surface-2); color: var(--ink); }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-name .btn { margin-inline-end: 6px; }
.entry.absence .doc-list li { align-items: flex-start; }
.entry.absence .actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Suivi RH & échéances (direction seule) ---------- */
.badge.hl-late, .badge.hl-urgent { background: var(--bad-bg); color: var(--bad); }
.badge.hl-soon { background: var(--warn-bg); color: var(--warn); }
.badge.hl-upcoming { background: var(--k-rest-bg); color: var(--k-rest); }
.badge.hl-done { background: var(--ok-bg); color: var(--ok); }
.badge.hl-planned { background: var(--surface-2); color: var(--ink); }
.hr-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.hr-tiles .dash-tile[aria-pressed=true] { outline: 3px solid var(--honey-strong); outline-offset: 2px; }
.hr-priority { background: var(--surface-2); border-radius: 16px; padding: 14px; }
.hr-group { gap: 10px; }
.hr-group > h4 { margin: 8px 0 0; font-size: 1.05rem; }
.hr-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--k-rest); border-radius: 14px; padding: 12px 14px; }
.hr-item.lv-late, .hr-item.lv-urgent { border-left-color: var(--bad); }
.hr-item.lv-soon { border-left-color: var(--honey-strong); }
.hr-item.lv-upcoming { border-left-color: var(--k-rest); }
.hr-item.lv-done { border-left-color: var(--ok); }
.hr-main { display: grid; gap: 4px; min-width: 0; }
.hr-main h3, .hr-main h4 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.hr-main p { margin: 0; overflow-wrap: anywhere; }
.hr-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hr-due { font-weight: 650; font-variant-numeric: tabular-nums; }
.hr-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.hr-actions .btn { white-space: nowrap; }
.hr-action { margin: 0; }
.hr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.hr-emp-line { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.hr-events, .hr-mini, .hr-rules-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hr-events li { border-left: 3px solid var(--line); padding-left: 10px; }
.hr-mini li { display: grid; gap: 2px; }
.hr-block { gap: 10px; }
.hr-block p { margin: 0; }
.hr-block { background: var(--surface-2); }
.hr-block h3 { margin: 0; }
.pre { white-space: pre-line; }
.seg-views.seg-5 { grid-template-columns: repeat(5, auto); }
.seg.seg-status { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hr-rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.hr-rule.off { opacity: .7; }
.hr-rule h4 { margin: 0; font-size: 1.02rem; }
.hr-rule .hr-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
.hr-rule .check { min-height: 40px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-weight: 650; padding: 0; margin-bottom: 6px; }
@media (max-width: 760px) {
  .hr-item, .hr-rule { grid-template-columns: 1fr; }
  .hr-actions { flex-direction: row; flex-wrap: wrap; }
  .seg-views.seg-5 { display: flex; flex-wrap: wrap; }
  .seg.seg-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.field > .label { display: block; font-weight: 650; margin-bottom: 4px; }

/* ---------- Sélecteur d'établissement (espace direction) ---------- */
.site-bar { position: sticky; top: 0; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 6px 12px; margin-bottom: 12px; box-shadow: 0 2px 8px rgb(0 0 0 / .06); }
.site-bar label { margin: 0; font-weight: 750; white-space: nowrap; }
.site-bar select { flex: 1 1 230px; min-width: 0; max-width: 440px; min-height: 42px; }
.site-bar.on { border-color: var(--honey-strong); background: color-mix(in srgb, var(--honey) 24%, var(--surface)); }
.site-bar .btn-link { margin-left: auto; }
@media (max-width: 560px) { .site-bar { flex-wrap: nowrap; gap: 8px; padding: 6px 10px; } .site-bar label { font-size: .9rem; } .site-bar select { flex: 1 1 0; max-width: none; } .site-bar .btn-link { display: none; } }

/* ====================================================================== */
/* Organisation : projets, rétroplanning, pièces jointes                  */
/* La couleur d'un projet (--pc) n'est jamais seule : elle accompagne     */
/* toujours son nom. Elle reste un accent (pastille, bordure, barre).     */
/* ====================================================================== */
.field > .lbl { display: block; font-weight: 600; margin-bottom: 6px; }
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap > input { flex: 1 1 auto; min-width: 0; }
.check.inline { display: inline-flex; margin-right: 6px; }
.tabs-2 { display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; }
.tabs-2 .tab { text-align: center; }
.seg-2v { grid-template-columns: repeat(2, auto); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }

/* pastilles de projet */
.pdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--pc); flex: none; margin-right: 6px; vertical-align: baseline; box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 25%, transparent); }
.pbadge { display: inline-flex; align-items: center; max-width: 100%; gap: 0; padding: 2px 10px 2px 8px; border: 1px solid color-mix(in srgb, var(--pc) 55%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--pc) 13%, var(--surface)); color: var(--ink); font: inherit; font-size: .8rem; font-weight: 650; line-height: 1.4; }
button.pbadge { cursor: pointer; min-height: 0; }
button.pbadge:hover { background: color-mix(in srgb, var(--pc) 24%, var(--surface)); }
.pbadge-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.notif-project { display: block; margin-bottom: 3px; }
.st-cell { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
tr.in-project td:first-child { box-shadow: inset 4px 0 0 var(--pc); }
tr.in-project.late-row td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.cal-chip.task.pj { border-left-color: var(--pc); }
.task-pick .pbadge { justify-self: start; }

/* barre de progression */
.pbar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.pbar-fill { display: block; height: 100%; background: var(--pc); border-radius: 999px; min-width: 0; }

/* statuts */
.badge.pst-active { background: var(--k-rest-bg); color: var(--st-doing); }
.badge.pst-late { background: var(--bad-bg); color: var(--bad); }
.badge.pst-done { background: var(--ok-bg); color: var(--ok); }
.badge.pst-upcoming { background: var(--surface-2); color: var(--muted); }
.badge.pst-paused { background: var(--warn-bg); color: var(--warn); }
.badge.ts-todo { background: var(--surface-2); color: var(--st-todo); }
.badge.ts-doing { background: var(--k-rest-bg); color: var(--st-doing); }
.badge.ts-done { background: var(--ok-bg); color: var(--st-done); }
.badge.ts-late { background: var(--bad-bg); color: var(--bad); }
.late-flag { color: var(--bad); font-weight: 700; font-size: .9rem; }
.ms-glyph { color: var(--honey-strong); font-weight: 800; }
.ms-glyph.final { color: var(--honey-strong); }
.ms-glyph.big { font-size: 1.3rem; line-height: 1; }

/* participants */
.avatars { display: inline-flex; align-items: center; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .7rem; font-weight: 800; background: var(--surface-2); color: var(--ink); border: 2px solid var(--surface); margin-left: -6px; flex: none; }
.avatar:first-child { margin-left: 0; }
.avatar.lead { background: var(--honey); color: var(--on-honey); }
.avatar.more { background: var(--line); color: var(--muted); }

/* cartes de projet */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; align-items: stretch; }
.pcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--pc); border-radius: var(--radius); padding: 14px 16px 16px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.pcard:hover { border-color: color-mix(in srgb, var(--pc) 60%, var(--line)); }
.pcard-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pcard-top h3 { display: flex; align-items: baseline; font-size: 1.05rem; min-width: 0; }
.pcard-open { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pcard-open::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.pcard-open:focus-visible { outline: none; }
.pcard-open:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.pcard-desc { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; font-size: .88rem; }
.chip-site { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .78rem; font-weight: 650; }
.pcard-people { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pcard-progress { display: grid; gap: 6px; }
.pcard-next { font-size: .9rem; background: color-mix(in srgb, var(--honey) 20%, var(--surface)); border-radius: 10px; padding: 6px 10px; }
.pcard-next.late { background: var(--bad-bg); color: var(--bad); }
.pcard-mine { border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 4px; }
.pcard.pst-done { opacity: .85; }
.pcard.pst-paused { border-top-style: dashed; }
.role-counts { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.role-count { display: inline-flex; align-items: center; gap: 6px; }
.rdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); flex: none; }
.prio .rdot, .role-bucket.prio .rdot { background: var(--bad); }
.soon .rdot, .role-bucket.soon .rdot { background: #d9852b; }
.done .rdot, .role-bucket.done .rdot { background: var(--st-done); }

/* fiche d'un projet */
.psheet-head { border-top: 6px solid var(--pc); display: grid; gap: 12px; }
.psheet-title { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 1.35rem; overflow-wrap: anywhere; }
.psheet-title .pdot { width: 16px; height: 16px; margin-right: 8px; }
.psheet-title .badge { margin-left: 8px; font-size: .85rem; }
.psheet-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; font-size: .92rem; }
.psheet-progress { display: grid; gap: 6px; }
.psheet-progress .pbar { height: 14px; }
.ptabs { margin-bottom: 0; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.role-card { border-color: color-mix(in srgb, var(--pc) 50%, var(--line)); }
.role-bucket { display: grid; gap: 8px; }
.role-bucket h4 { margin: 0; display: flex; gap: 8px; align-items: center; font-family: var(--font-title); }
.role-bucket summary { cursor: pointer; font-weight: 650; display: flex; gap: 8px; align-items: center; min-height: 44px; }
.ms-list, .next-list, .people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ms-item { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ms-item:first-child { border-top: 0; }
.ms-item.done .ms-main strong { text-decoration: line-through; color: var(--muted); }
.ms-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.ms-main .badge { justify-self: start; }
.next-list li { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.next-list li:first-child { border-top: 0; }
.next-list .btn-link { padding: 0; min-height: 0; font-weight: 650; text-decoration: none; }
.next-list .btn-link:hover { text-decoration: underline; }
.people-list li { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.people-list li > div { display: grid; gap: 2px; justify-items: start; }
.people-list .avatar { margin-left: 0; width: 34px; height: 34px; }

/* tâches d'un projet */
.pstep h3 { font-size: 1rem; }
.ptask { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.pstep .ptask:first-of-type { border-top: 0; }
.ptask.sub { padding-left: 22px; }
.ptask.mine { background: color-mix(in srgb, var(--honey) 14%, transparent); box-shadow: -8px 0 0 color-mix(in srgb, var(--honey) 14%, transparent), 8px 0 0 color-mix(in srgb, var(--honey) 14%, transparent); }
.ptask.late .ptask-title { color: var(--bad); }
.ptask-main { display: grid; gap: 2px; min-width: 0; }
.ptask-title { background: none; border: 0; padding: 0; text-align: left; font: inherit; font-weight: 650; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; min-height: 0; }
.ptask-title:hover { text-decoration: underline; }
.ptask-title.plain { cursor: default; font-weight: 500; }
.ptask-title.plain:hover { text-decoration: none; }
.ptask-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .ptask { flex-direction: column; gap: 6px; } .ptask-side { justify-content: flex-start; } }

/* fenêtre d'une tâche : dépendances, sous-tâches */
.dep-list { display: grid; gap: 0; max-height: 200px; overflow: auto; border: 2px solid var(--line); border-radius: 12px; padding: 4px 12px; }
.dep-list .check { min-height: 40px; }
.sub-row { display: flex; gap: 10px; align-items: center; padding: 2px 0; }
.sub-row label { flex: 1 1 auto; margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.sub-row input { width: 22px; height: 22px; accent-color: var(--honey-strong); flex: none; }
.task-info { gap: 8px; }

/* choix de la couleur, participants */
.cswatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cswatch { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.cswatch[aria-checked=true] { border-color: var(--ink); background: color-mix(in srgb, var(--pc) 14%, var(--surface)); }
.cswatch-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--pc); flex: none; }
.member-list { border: 2px solid var(--line); border-radius: 12px; max-height: 260px; overflow: auto; padding: 4px 12px; display: grid; }
.member-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 2px 0; border-top: 1px solid var(--line); }
.member-row:first-child { border-top: 0; }
.member-row .check { flex: 1 1 200px; }
.member-row .role-input { flex: 1 1 160px; min-height: 40px; }

/* documents et pièces jointes */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.doc-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.doc-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.file-kind { flex: none; min-width: 3.4rem; text-align: center; padding: 4px 6px; border-radius: 8px; background: var(--surface-2); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.file-link { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.replan-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.replan-row { border-top: 1px solid var(--line); padding: 4px 0; }
.replan-row:first-child { border-top: 0; }
.replan-row .check { align-items: flex-start; }
.dash-project { align-items: stretch; }
.dash-project .main { flex: 1 1 auto; display: grid; gap: 4px; }
.dash-project .pbar { margin: 2px 0; }

/* rétroplanning : frise sur ordinateur, ligne verticale sur téléphone */
.rp-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.lg-bar { width: 22px; height: 10px; border-radius: 5px; background: var(--pc); display: inline-block; }
.lg-ms { width: 10px; height: 10px; border: 2px solid var(--ink); transform: rotate(45deg); display: inline-block; }
.lg-ms.final { border-color: var(--honey-strong); background: var(--honey); }
.lg-today { width: 3px; height: 14px; background: var(--honey-strong); display: inline-block; }
.rp-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rp { --rp-label: 300px; min-width: calc(var(--rp-label) + var(--rp-min)); }
.rp-row { display: flex; border-top: 1px solid var(--line); min-height: 46px; }
.rp-body { position: relative; }
.rp-body > .rp-row:first-of-type { border-top: 0; }
.rp-label { flex: none; width: var(--rp-label); position: sticky; left: 0; z-index: 3; background: var(--surface); padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; justify-content: center; align-items: flex-start; border-right: 1px solid var(--line-strong); }
.rp-track { position: relative; flex: 1 1 auto; z-index: 2; }
.rp-overlay { position: absolute; top: 0; bottom: 0; left: var(--rp-label); right: 0; pointer-events: none; z-index: 1; }
.rp-mline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.rp-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--honey-strong); opacity: .9; }
.rp-msline { position: absolute; top: 0; bottom: 0; border-left: 1px dashed color-mix(in srgb, var(--ink) 40%, transparent); }
.rp-msline.final { border-left: 2px dashed var(--honey-strong); }
.rp-msline.done { opacity: .35; }
.rp-head { position: sticky; top: 0; z-index: 5; background: var(--surface-2); min-height: 44px; border-top: 0; }
.rp-head .rp-label { background: var(--surface-2); }
.rp-cap { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rp-month { position: absolute; top: 0; bottom: 0; padding: 4px 6px; font-size: .78rem; font-weight: 700; border-left: 1px solid var(--line-strong); white-space: nowrap; overflow: hidden; }
.rp-today-pill { position: absolute; bottom: 3px; transform: translateX(-50%); background: var(--honey); color: var(--on-honey); font-size: .68rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; z-index: 2; white-space: nowrap; }
.rp-group { padding: 6px 10px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: color-mix(in srgb, var(--honey) 14%, var(--surface)); border-top: 1px solid var(--line); position: sticky; left: 0; }
.rp-line { display: flex; gap: 4px; align-items: center; width: 100%; }
.rp-name { font-weight: 700; overflow-wrap: anywhere; }
.rp-sub { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.rp-toggle { display: inline-flex; gap: 6px; align-items: baseline; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; min-height: 0; flex: 1 1 auto; }
.rp-toggle:hover .rp-name { text-decoration: underline; }
.caret { width: 1em; flex: none; color: var(--muted); }
.rp-edit { background: none; border: 1px solid var(--line); border-radius: 8px; width: 28px; height: 28px; cursor: pointer; color: var(--muted); flex: none; }
.rp-edit:hover { color: var(--ink); border-color: var(--ink); }
.rp-step { background: color-mix(in srgb, var(--pc) 5%, var(--surface)); }
.rp-step .rp-label { background: color-mix(in srgb, var(--pc) 7%, var(--surface)); }
.rp-step.open { border-top-color: var(--line-strong); }
.rp-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 26px; min-width: 8px; padding: 0; border: 1.5px solid var(--pc); border-radius: 8px; background: color-mix(in srgb, var(--pc) 22%, var(--surface)); overflow: hidden; cursor: pointer; }
.rp-bar.st-late { border-color: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 35%, transparent); }
.rp-bar.st-upcoming, .rp-bar.st-todo { border-style: dashed; }
.rp-fill { position: absolute; inset: 0 auto 0 0; background: var(--pc); opacity: .9; }
.rp-note { position: absolute; top: 50%; transform: translateY(-50%); font-size: .75rem; font-weight: 700; color: var(--muted); white-space: nowrap; pointer-events: none; }
.rp-nodate { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); font-size: .78rem; color: var(--muted); font-style: italic; }
.rp-task .rp-label { padding-left: 24px; }
.rp-task { min-height: 44px; }
.rp-tlink { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; min-height: 0; overflow-wrap: anywhere; }
.rp-tlink:hover { text-decoration: underline; }
.rp-tlink.plain { cursor: default; font-weight: 500; }
.rp-tlink.plain:hover { text-decoration: none; }
.rp-tbar { position: absolute; top: 50%; transform: translateY(-50%); height: 14px; min-width: 8px; padding: 0; border: 1.5px solid var(--pc); border-radius: 7px; background: color-mix(in srgb, var(--pc) 35%, var(--surface)); cursor: pointer; }
.rp-tbar.ts-doing { background: color-mix(in srgb, var(--pc) 70%, var(--surface)); }
.rp-tbar.ts-done { background: var(--st-done); border-color: var(--st-done); opacity: .75; }
.rp-tbar.ts-late { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 45%, var(--surface)); }
.rp-tdot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; padding: 0; border-radius: 50%; border: 2px solid var(--pc); background: var(--surface); cursor: pointer; }
.rp-tdot.ts-done { background: var(--st-done); border-color: var(--st-done); }
.rp-tdot.ts-doing { background: var(--pc); }
.rp-tdot.ts-late { border-color: var(--bad); background: var(--bad); }
.rp-task.mine { background: color-mix(in srgb, var(--honey) 16%, var(--surface)); }
.rp-task.mine .rp-label { background: color-mix(in srgb, var(--honey) 22%, var(--surface)); font-weight: 700; }
.rp-task.mine .rp-tbar { background: var(--pc); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pc); }
.rp-task.other .rp-tbar, .rp-task.other .rp-tdot { opacity: .55; }
.rp-task.other .rp-label { color: var(--muted); }
.rp-ms-row .rp-label { background: color-mix(in srgb, var(--honey) 8%, var(--surface)); }
.rp-ms { position: absolute; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: default; min-height: 0; }
button.rp-ms { cursor: pointer; }
.rp-ms-glyph { font-size: 1.7rem; line-height: 1; font-weight: 700; color: var(--ink); }
.rp-ms.final .rp-ms-glyph { color: var(--honey-strong); }
.rp-ms.done .rp-ms-glyph { color: var(--st-done); font-size: 1.3rem; }
.rp-ms.late .rp-ms-glyph { color: var(--bad); }
.rp-ms-txt { position: absolute; left: 100%; margin-left: 4px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.rp-ms-txt.left { left: auto; right: 100%; margin-left: 0; margin-right: 4px; }
.rp-desktop { display: block; }
.rp-mobile { display: none; }
.focus-mine .rp-step .rp-label { font-weight: 600; }

.rpm { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; }
.rpm::before { content: ''; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line-strong); }
.rpm-item { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.rpm-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); font-weight: 800; font-size: .9rem; z-index: 1; margin-top: 8px; }
.rpm-item.st-done .rpm-mark { background: var(--ok-bg); border-color: var(--st-done); color: var(--st-done); }
.rpm-item.st-doing .rpm-mark, .rpm-item.st-late .rpm-mark { border-color: var(--pc); color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, var(--surface)); }
.rpm-item.st-late .rpm-mark { border-color: var(--bad); color: var(--bad); }
.rpm-item.ms .rpm-mark { border-radius: 8px; color: var(--ink); }
.rpm-item.ms.final .rpm-mark { color: var(--honey-strong); border-color: var(--honey-strong); }
.rpm-item.ms.done .rpm-mark { color: var(--st-done); border-color: var(--st-done); background: var(--ok-bg); }
.rpm-item.ms.late .rpm-mark { color: var(--bad); border-color: var(--bad); }
.rpm-item.today .rpm-mark { background: var(--honey); border-color: var(--honey-strong); color: var(--on-honey); }
.rpm-item.today .rpm-body { background: color-mix(in srgb, var(--honey) 22%, var(--surface)); border-color: var(--honey-strong); padding: 8px 12px; }
.rpm-body { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; display: grid; gap: 4px; text-align: left; font: inherit; color: var(--ink); }
.rpm-btn { cursor: pointer; width: 100%; }
.rpm-item.now .rpm-body { border-color: var(--pc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 30%, transparent); }
.rpm-body summary { cursor: pointer; display: grid; gap: 4px; list-style: none; min-height: 44px; align-content: center; }
.rpm-body summary::-webkit-details-marker { display: none; }
.rpm-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.now-tag { background: var(--honey); color: var(--on-honey); border-radius: 999px; padding: 1px 8px; font-size: .75rem; font-weight: 800; }
.rpm-prog { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.rpm-tasks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.rpm-tasks li { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rpm-tasks li.mine { background: color-mix(in srgb, var(--honey) 18%, transparent); border-radius: 8px; padding: 8px; }
.rpm-tasks li.other { opacity: .7; }
.rpm-tasks .btn-link { justify-self: start; min-height: 0; padding: 0; text-align: left; font-weight: 650; text-decoration: none; }

@media (max-width: 720px) {
  .psheet-title { font-size: 1.2rem; }
  .ptabs .tab { font-size: .82rem; padding-left: 2px; padding-right: 2px; }
  .ptabs .tab .count { margin-left: 3px; padding: 0 5px; }
}
@media print {
  .rp-tools .btn, .pcard-open::after { display: none; }
}
/* Onglets de la fiche projet : pastille de comptage dans le flux (les autres « tabs-4 » la posent en coin) */
.ptabs .tab .count { position: static; display: inline-block; margin-left: 5px; min-width: 0; padding: 0 7px; font-size: .74rem; line-height: 18px; vertical-align: middle; }
.avatar { font-size: .64rem; letter-spacing: -.02em; width: 30px; height: 30px; }
/* Petits écrans : libellés du menu principal et rubriques du projet lisibles sans coupure au milieu d'un mot */
@media (max-width: 460px) {
  .tabs-main .tab { font-size: .7rem; letter-spacing: -.01em; }
  .tabs-main .lbl { overflow-wrap: normal; hyphens: manual; }
  .ptabs { grid-template-columns: repeat(2, 1fr); row-gap: 0; }
  .ptabs .tab { font-size: .88rem; min-height: 42px; margin-bottom: 0; padding-top: 8px; padding-bottom: 8px; display: flex; align-items: center; justify-content: center; }
}
/* Rétroplanning : frise sur un grand conteneur, chronologie verticale dans un conteneur étroit (espace salarié inclus) */
.rp-wrap { container-type: inline-size; }
@container (max-width: 680px) {
  .rp-desktop { display: none; }
  .rp-mobile { display: block; }
}
@media (min-width: 560px) {
  .tabs-main .tab { font-size: .88rem; gap: 6px; }
  .tabs-main .lbl { overflow-wrap: normal; }
}

/* ---------- Exploitation : contrôles & échéances ---------- */
.ops-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 640px) { .ops-tiles { grid-template-columns: 1fr 1fr; } .ops-tiles .dash-tile .sub { font-size: .8rem; } }
.ops-tiles .dash-tile[aria-pressed=true] { outline: 3px solid var(--honey-strong); outline-offset: 2px; }
.seg-4v { grid-template-columns: repeat(4, auto); }
.seg-2v { grid-template-columns: repeat(2, auto); }
.ops-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--ok); border-radius: 14px; padding: 12px 14px; }
.ops-item.lv-late { border-left-color: var(--bad); }
.ops-item.lv-soon { border-left-color: var(--honey-strong); }
.ops-item.lv-upcoming { border-left-color: var(--k-rest); }
.ops-item.lv-ok { border-left-color: var(--ok); }
.ops-item.lv-na { border-left-color: var(--line); opacity: .8; }
.ops-main { display: grid; gap: 4px; min-width: 0; }
.ops-main h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.ops-main p { margin: 0; overflow-wrap: anywhere; }
.ops-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ops-due { font-weight: 650; font-variant-numeric: tabular-nums; }
.ops-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ops-actions .btn { white-space: nowrap; }
.ops-site { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 750; background: var(--brand); color: var(--on-brand); white-space: nowrap; }
.ops-cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.ops-cat .pdot { margin-right: 0; }
.badge.ops-nature { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); font-weight: 650; }
.badge.ops-nature.n-regulatory { border-color: var(--brand); }
.ops-headline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.ops-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px 16px; margin: 0; background: var(--surface-2); border-radius: 14px; padding: 14px; }
.ops-fact { display: grid; gap: 2px; min-width: 0; }
.ops-fact dt { color: var(--muted); font-size: .85rem; font-weight: 650; }
.ops-fact dd { margin: 0; overflow-wrap: anywhere; }
.ops-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.ops-bar .btn { flex: 1 1 170px; }
.ops-tasks, .ops-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ops-tasks li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ops-tasks .btn-link { min-height: 32px; padding: 0; font-weight: 650; text-align: left; }
.ops-history li { display: grid; gap: 4px; border-left: 3px solid var(--ok); padding-left: 12px; }
.ops-rec { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.ops-custom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ops-custom input { width: 96px; }
.ops-custom select { width: auto; }
.ops-cat-row { display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(110px, 150px) auto auto; gap: 8px 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.ops-cat-row.add { grid-template-columns: minmax(140px, 1fr) minmax(110px, 150px) auto; background: var(--surface-2); }
.ops-cat-row.off { opacity: .65; }
.ops-cat-row .pdot { margin: 0; }
.ops-pick { display: grid; gap: 4px; text-align: left; border-left: 6px solid var(--k-rest); cursor: pointer; font: inherit; color: var(--ink); }
.ops-pick.lv-late { border-left-color: var(--bad); }
.ops-pick.lv-soon { border-left-color: var(--honey-strong); }
.ops-pick.lv-ok { border-left-color: var(--ok); }
.ops-starters { display: grid; gap: 8px; }
.cal-chip.ops { background: var(--k-rest-bg); color: var(--k-rest); }
.cal-chip.ops.lv-late { background: var(--bad-bg); color: var(--bad); }
.cal-chip.ops.lv-soon { background: var(--warn-bg); color: var(--warn); }
.cal-chip.ops.lv-ok { background: var(--ok-bg); color: var(--ok); }
.ops-link { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ops-link .btn-link { min-height: 32px; padding: 0; font-weight: 700; }
.badge.ops-linked { background: color-mix(in srgb, var(--honey) 28%, var(--surface)); color: var(--brand-strong); border: 1px solid color-mix(in srgb, var(--honey) 60%, transparent); }
button.badge.ops-linked { cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; }
@media (max-width: 760px) {
  .ops-item { grid-template-columns: 1fr; }
  .ops-actions { flex-direction: row; flex-wrap: wrap; }
  .ops-actions .btn { flex: 1 1 140px; }
  .seg-4v { display: flex; flex-wrap: wrap; }
  .ops-cat-row { grid-template-columns: auto minmax(0, 1fr); }
  .ops-cat-row > * { min-width: 0; }
  .ops-cat-row.add { grid-template-columns: 1fr; }
}

/* ---------- Planning du salarié : « Mon planning » / « Toute l'équipe » ---------- */
.seg.seg-views2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
.plan-mine .emp-th { min-width: 120px; }
@media (max-width: 640px) {
  .plan-mine { min-width: 0 !important; }
  .plan-mine .emp-th { min-width: 84px; font-size: .8rem; padding: 6px; }
  .plan-mine .emp-th .badge { display: block; width: max-content; margin-top: 2px; }
  .plan-mine td.total { padding: 6px 4px; font-size: .85rem; }
}

/* ---------- Tâche « Non exécutée » (clôturée sans avoir été faite, motif obligatoire) ---------- */
:root { --st-skipped: #8a4b08; --st-skipped-bg: #fbe9d3; }
.segbtn.st-skipped[aria-pressed=true] { background: var(--st-skipped); border-color: var(--st-skipped); color: #fff; }
.task-card.st-skipped { border-left-color: var(--st-skipped); }
.status-select.st-skipped { border-color: var(--st-skipped); }
.badge.ts-skipped, .badge.st-skipped { background: var(--st-skipped-bg); color: var(--st-skipped); }
.seg.seg-4 .segbtn { padding-left: 6px; padding-right: 6px; }

/* ---------- Espace direction : fond teinté selon la crèche choisie (neutre pour « Toutes les crèches ») ---------- */
body { transition: background-color .3s ease; }
@media (prefers-reduced-motion: reduce) { body { transition: none; } }
body[data-site-tint] { --bg: hsl(var(--tint-h) 45% 98%); }
body[data-site-tint] .site-bar.on { border-color: hsl(var(--tint-h) 42% 38%); background: hsl(var(--tint-h) 60% 95%); }

/* ---------- Planning salarié : « Mon planning » (grille horaire, un jour par ligne, mêmes couleurs que le planning de la journée) ---------- */
.wk-card { padding: 16px; }
.wk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.wk-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wk-who h2 { font-size: 1.25rem; overflow-wrap: anywhere; }
.wk-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--honey); color: var(--on-honey); display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.wk-head .monthnav { flex: 1 1 auto; justify-content: flex-end; }
.wk-head .month-title { font-size: 1rem; }
.wk-grid .pg-row { min-height: 60px; }
.wk-grid .pg-label { width: 120px; }
.wk-grid .pg-head { min-height: 0; }
.wk-grid .pg-head .pg-label { justify-content: center; }
.wk-grid .pg-row.wk-today .pg-label { background: var(--today-bg); }
.wk-grid .pg-row.wk-today { box-shadow: inset 0 0 0 2px var(--honey-strong); }
.pblock.wk-full { left: 4px; right: 4px; width: auto; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.pblock.wk-off { background: var(--surface-2); color: var(--muted); border-left: 4px solid var(--line-strong); }
.pblock.wk-abs { background: var(--k-other-bg); color: var(--k-other); border-left: 4px solid var(--k-other); }
@media (max-width: 640px) {
  .wk-grid .pg-label { width: 92px; }
  .wk-head .monthnav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .wk-head .monthnav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; width: 100%; }
  .wk-head .month-title { font-size: .9rem; }
  .wk-head .monthnav .btn:last-child { grid-column: 1 / -1; }
}

/* ---------- Export PDF / impression A4 (voir js/print.js) ---------- */
@page sheet-land { size: A4 landscape; margin: 10mm; }
@page sheet-port { size: A4 portrait; margin: 10mm; }
.print-sheet .ps-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12mm; border-bottom: 2px solid #535e4e; padding-bottom: 3mm; margin-bottom: 5mm; }
.print-sheet .ps-head h1 { font-size: 16pt; }
.print-sheet .ps-head p { font-size: 10pt; color: #444; margin-top: 1mm; }
.print-sheet .ps-brand { white-space: nowrap; color: #535e4e; font-weight: 700; }
@media print {
  body.printing-sheet > *:not(#print-sheet) { display: none !important; }
  body.printing-sheet { background: #fff !important; color: #000; }
  body.printing-sheet #print-sheet { display: block; }
  #print-sheet.ps-landscape { page: sheet-land; }
  #print-sheet.ps-portrait { page: sheet-port; }
  #print-sheet .no-print, #print-sheet button:not(.keep-print) { display: revert; }
  #print-sheet .no-print { display: none !important; }
  #print-sheet .card { box-shadow: none; }
  #print-sheet .pgrid-scroll, #print-sheet .plan-scroll, #print-sheet .tablewrap { overflow: visible; }
  #print-sheet .plgrid { min-width: 0; }
  #print-sheet table { font-size: 9pt; }
  #print-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* espace salarié : nombre d'espaces variable (le stagiaire n'a pas « Stocks ») ; « Mon organisation » sur 4 angles */
.tabs-main { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.seg-views.seg-4v { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 560px; }
.seg-views.seg-4v .segbtn { padding: 8px 2px; font-size: .8rem; min-height: 42px; overflow-wrap: anywhere; }
.ag-person-filter select { min-height: 40px; }
@media (max-width: 640px) { .corner { min-width: 0; } .corner span:not(.count) { min-width: 0; overflow-wrap: anywhere; } }
