/* Tâches, planning, routines — style iOS (Rappels / Calendrier). */
.sect { display: flex; flex-direction: column; }
.sect .section-title { margin: 6px 16px 6px; }

/* cellule de tâche (comme une ligne de Rappels) */
.trow { gap: 12px; padding: 10px 14px 10px 14px; align-items: flex-start; --sep-left: 52px; }
.tcheck { width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; flex: none; color: transparent; transition: background .2s, box-shadow .2s, transform .3s var(--spring); }
.tcheck.p-urgent { box-shadow: inset 0 0 0 1.5px var(--red); } .tcheck.p-high { box-shadow: inset 0 0 0 1.5px var(--orange); }
.tcheck svg { transform: scale(.4); transition: transform .3s var(--spring); }
.tcheck.on { background: var(--accent); box-shadow: none; color: #fff; } .tcheck.on svg { transform: scale(1); }
.tcheck.pop { animation: check-pop .4s var(--spring); }
@keyframes check-pop { 40% { transform: scale(1.2); } }
.tmain { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.tt { display: flex; align-items: baseline; gap: 6px; font-size: 17px; letter-spacing: -.02em; min-width: 0; }
.tt > span:not(.flag) { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.28; }
.tt .flag { font-weight: 700; flex: none; letter-spacing: -.05em; }
.trow.done .tt span:not(.flag) { color: var(--faint); }
.tmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.tmeta > span { display: inline-flex; align-items: center; gap: 3px; }
.tmeta svg.i.sm { width: 13px; height: 13px; }
.tmeta .late { color: var(--red); } .tmeta .today { color: var(--accent-text); }
.tm-biz { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.tm-biz i { width: 8px; height: 8px; border-radius: 50%; }
.no { color: var(--faint); font-size: 12px; margin-left: auto; font-variant-numeric: tabular-nums; }

/* tableau */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; align-items: start; }
.bcol { background: var(--surface-3); border-radius: var(--radius-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; scroll-snap-align: start; transition: background .2s; }
:root[data-theme="dark"] .bcol { background: var(--surface); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bcol { background: var(--surface); } }
.bcol.over { background: var(--accent-soft); }
.bhead { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-weight: 600; font-size: 15px; } .bhead .muted { margin-left: auto; }
.bcards { display: flex; flex-direction: column; gap: 8px; }
.bcard { background: var(--surface); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: transform .25s var(--spring), opacity .2s; }
:root[data-theme="dark"] .bcard { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bcard { background: var(--surface-2); } }
.bcard .tt { font-size: 15px; font-weight: 500; }
.bcard.done .tt span:not(.flag) { color: var(--faint); text-decoration: line-through; }
.bcard.lift { opacity: .35; transform: scale(.97); }
.bcard.ghost { position: fixed; z-index: 120; pointer-events: none; transform: rotate(-2deg) scale(1.03); box-shadow: var(--shadow-lg); cursor: grabbing; }
.badd { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 10px; border-radius: 12px; color: var(--accent-text); font-size: 15px; }
@media (max-width: 899px) { .board { grid-template-columns: repeat(4, 84%); } }

/* agenda */
.weeknav { display: flex; align-items: center; gap: 4px; padding: 6px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cday { background: var(--surface); border-radius: var(--radius); min-height: 200px; display: flex; flex-direction: column; overflow: hidden; }
.cday.past { opacity: .75; }
.chead { display: flex; align-items: center; gap: 6px; padding: 8px 6px 4px 12px; }
.chead .wd { color: var(--muted); font-size: 13px; text-transform: capitalize; } .chead .dn { font-size: 20px; font-weight: 600; flex: 1; }
.cday.today .chead .dn { color: #fff; background: var(--red); border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; flex: none; font-size: 17px; margin-right: auto; }
.citems { display: flex; flex-direction: column; gap: 4px; padding: 0 6px 8px; }
.cev { display: flex; align-items: flex-start; gap: 6px; text-align: left; padding: 5px 8px; border-radius: 6px; font-size: 13px; font-weight: 500; background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 3px 0 0 var(--c); min-width: 0; letter-spacing: 0; }
.cev .tm { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; } .cev .tm:empty { display: none; }
.cev .tl { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.cev.done .tl { text-decoration: line-through; color: var(--faint); } .cev.late { box-shadow: inset 3px 0 0 var(--red); }
.cempty { padding: 4px 8px; }
@media (max-width: 899px) { .cal { grid-template-columns: 1fr; } .cday { min-height: 0; } .cday.past:not(.today) .citems:has(.cempty) { display: none; } }

/* planning */
.plan { padding: 0; }
.plan-t { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.plan-t th, .plan-t td { border-bottom: .5px solid var(--line); padding: 8px; vertical-align: top; text-align: left; }
.plan-t thead th { font-size: 13px; color: var(--muted); font-weight: 400; text-transform: capitalize; }
.plan-t thead th .dn { font-size: 20px; color: var(--text); font-weight: 600; }
.plan-t thead th.today .dn { color: var(--red); }
.plan-t td.today { background: color-mix(in srgb, var(--red) 5%, transparent); }
.plan-t tbody th { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 160px; font-weight: 400; }
.plan-t td { min-width: 96px; }
.shift { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 3px 0 0 var(--c); font-size: 12px; text-align: left; }
.shift b { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; } .shift span { color: var(--muted); }
.addshift { width: 100%; height: 26px; border-radius: 6px; color: var(--faint); display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.plan-t td:hover .addshift, .plan-t td:not(:has(.shift)) .addshift { opacity: 1; }
@media (hover: none) { .addshift { opacity: 1; } }

/* récurrentes et formulaires */
.daypick { display: flex; gap: 6px; justify-content: space-between; } .daypick button { width: 40px; height: 40px; border-radius: 50%; background: var(--fill); font-weight: 600; font-size: 15px; transition: background .15s, color .15s; }
.daypick button.on { background: var(--accent); color: #fff; }
.bigtitle { font-size: 22px; font-weight: 600; background: transparent; padding: 4px 2px; min-height: 44px; box-shadow: none !important; border-radius: 0; border-bottom: .5px solid var(--line-2); }

/* interrupteur iOS */

/* fiche d'une tâche (feuille) */
.drawer-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.3); animation: fade .25s var(--out); display: flex; justify-content: flex-end; }
.drawer { width: min(560px, 100%); height: 100%; background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: drawer-in .38s var(--spring); }
.drawer-wrap.closing { animation: fade-out .25s var(--out) forwards; } .drawer-wrap.closing .drawer { animation: drawer-out .25s var(--out) forwards; }
@keyframes drawer-in { from { transform: translateX(100%); } } @keyframes drawer-out { to { transform: translateX(100%); } }
.dhead { display: flex; align-items: center; gap: 6px; padding: 6px 8px; padding-top: calc(6px + env(safe-area-inset-top)); min-height: 52px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--material-line); }
.dhead .btn.ghost { color: var(--accent-text); font-weight: 400; } .dhead .btn.strong { font-weight: 600; }
.dbody { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.dbody > * { flex-shrink: 0; }
.dbody .section-title { margin: 0 16px 6px; }
.dtop { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.dtitle { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; background: transparent; padding: 0; min-height: 0; resize: none; overflow: hidden; box-shadow: none !important; border-radius: 6px; }
.dtitle:focus { background: var(--fill); }
.item input.inline { width: auto; min-height: 34px; padding: 4px 8px; font-size: 15px; background: var(--fill); border-radius: 8px; }
.item input.inline[type="time"] { width: 92px; }
.inline-add { background: transparent; padding: 0; min-height: 28px; box-shadow: none !important; font-size: 17px; }
.plus-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.ddesc { min-height: 96px; background: transparent; border-radius: 0; }
.chk.on .grow { color: var(--muted); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ftile { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface); }
.ftile .thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ftile .doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1; color: var(--accent-text); font-weight: 600; font-size: 12px; }
.ftile .fmeta { display: flex; flex-direction: column; padding: 6px 8px; font-size: 12px; min-width: 0; }
.ftile .fx { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.empty-files { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: var(--accent-text); font-size: 15px; width: 100%; }
.timeline { display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
.cmt { display: flex; gap: 8px; align-items: flex-end; }
.bubble { background: var(--surface); border-radius: 18px 18px 18px 4px; padding: 8px 12px; min-width: 0; max-width: 85%; }
.bubble .who { font-size: 12px; } .bubble .txt { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.evt { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding-left: 6px; }
.evt i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); flex: none; }
.dfoot { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); border-top: .5px solid var(--material-line); background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.composer { min-height: 36px; max-height: 140px; resize: none; border-radius: 18px; padding: 7px 14px; font-size: 16px; background: var(--surface); box-shadow: inset 0 0 0 .5px var(--line-2); }
.dfoot .btn.icon { width: 36px; min-height: 36px; }
@media (max-width: 760px) { .drawer { width: 100%; } }
.dbody .item input.inline[type="date"] { width: 148px; }
.dbody .item .grow + input.inline { margin-left: 8px; }
.rq-lines { padding: 10px 0; } .rq-line input { min-height: 40px; } .rq-q { width: 76px; flex: none; } .rq-u { width: 76px; flex: none; } .rq-lines > .btn { align-self: flex-start; }

/* [Claude 2026-10-29] The whole week fits a portrait tablet (800 px): narrower name column and day cells; phones still scroll. */
@media (max-width: 1000px) and (min-width: 600px) { .plan-t { min-width: 0; table-layout: fixed; } .plan-t tbody th, .plan-t thead th:first-child { min-width: 0; width: 120px; } .plan-t td { min-width: 0; padding: 6px 4px; } .plan-t thead th { padding: 8px 4px; } .plan-t .shift { font-size: 12px; overflow-wrap: anywhere; } }
/* [Claude 2026-11-03] Due date + time keep their own room: on a phone they move under « Échéance » instead of covering it. */
.dbody .item.due-row { flex-wrap: wrap; row-gap: 8px; }
.dbody .item.due-row .grow { min-width: 6em; }
.dbody .item.due-row .due-in { display: inline-flex; gap: 8px; margin-left: auto; flex-wrap: nowrap; }
@media (max-width: 480px) { .dbody .item.due-row .due-in { flex: 1 0 100%; justify-content: flex-end; } }

/* [Claude 2026-11-04] Planning : tâches par créneau, vue Journée par lieu, fiche d'une personne. */
.shift .sduty { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.sdots { display: inline-flex; flex-wrap: wrap; gap: 2px; } .sduty .sdn { font-variant-numeric: tabular-nums; }
.pdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px; }
.pstrip button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border-radius: 10px; }
.pstrip .wd { font-size: 11px; color: var(--muted); text-transform: capitalize; } .pstrip .dn { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pstrip .ct { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; } .pstrip .ct svg { width: 10px; height: 10px; }
.pstrip button.today .dn { color: var(--red); }
.pstrip button.on { background: var(--accent); } .pstrip button.on * { color: #fff !important; }
.pplace { padding: 0; overflow: hidden; }
.pplace-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.pplace-h .pbar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); }
.pperson { border-top: .5px solid var(--line); padding: 10px 14px 12px; }
.pwho { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.phours { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.pduties { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 0 42px; }
.pduty { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.pduty:hover { background: var(--fill); }
.pduty .tm { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; min-width: 38px; }
.pduty .tl { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pduty.done .tl { text-decoration: line-through; color: var(--muted); }
.pnone { margin: 6px 0 0 42px; }
.pperson.orphan { background: color-mix(in srgb, var(--red) 6%, transparent); }
.pperson.orphan .phours { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.pwarn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.pday-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.card.list.pduties { margin: 0; padding: 4px; }
@media (max-width: 600px) { .pduties, .pnone { margin-left: 0; } }

/* [Claude 2026-11-04] Relevé d'une routine (température…) sur la fiche de la tâche. */
.reading-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.reading-card .section-title { padding: 0; }
.reading-last { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; }
.reading-last b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); }
.reading-last.out b { color: var(--red); } .reading-last .tiny { color: var(--muted); }
.reading-form { gap: 8px; align-items: center; } .reading-form .reading-in { flex: 1; min-width: 0; font-size: 20px; font-variant-numeric: tabular-nums; }
/* [Claude 2026-11-06] FE-15: the 24 px task tick gets a 44 px invisible hit area on touch screens. */
@media (pointer: coarse) { .tcheck { position: relative; } .tcheck::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; } }
/* [Claude 2026-11-07] UX walks: a checklist point ticks on its whole row (48 px); the staff « do » view of a routine;
   Travail rows say « en retard » in red; past days fold under « Jours précédents ». */
.item.chk { padding-top: 0; padding-bottom: 0; }
.chk-row { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 48px; padding: 8px 0; text-align: left; color: inherit; background: none; border: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chk-row:disabled { cursor: default; }
.chk-row .tcheck { width: 28px; height: 28px; }
.chk.on .chk-row .grow { color: var(--muted); }
.staff-task .st-title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; }
.staff-task .btn.lg { min-height: 52px; font-size: 17px; }
.staff-task .st-loss { color: var(--red); }
.st-more > summary { cursor: pointer; padding: 6px 0; min-height: 44px; display: flex; align-items: center; }
.st-foot-task { align-items: stretch; }
.st-foot-task .btn.lg { min-height: 54px; font-size: 17px; }
.item .small.late, .item.late .small { color: var(--red); }
.work-past > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; list-style: none; }
.work-past > summary::before { content: '▸'; margin-right: 6px; } .work-past[open] > summary::before { content: '▾'; }
/* [Claude 2026-11-07] « À préparer »: the customer's name big; a scanned slip's sale pulses once in view */
.prep-who { font-size: 22px; line-height: 1.2; }
.prep-pulse { animation: prep-pulse 1.4s ease-out 2; }
@keyframes prep-pulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .prep-pulse { animation: none; } }
/* [Claude 2026-11-07] clock card: lateness in orange, a big button */
.people-clock .ck-late { color: var(--orange); font-weight: 600; }
.people-clock .btn.lg { min-height: 48px; }
/* [Claude 2026-11-07] the clock card is on Home and Travail, where people.css is not loaded: its layout lives here too */
.people-clock { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 16px; border-left: 4px solid var(--blue); }
.people-clock.present { border-left-color: var(--green); }
.people-clock > .grow { min-width: 0; flex: 1; }
.people-clock > .btn { width: 100%; }
