/* Structure Mobile First : une colonne, cibles tactiles ≥ 48 px, aucune largeur fixe, zones sûres iPhone, pas de défilement horizontal. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-family: var(--font); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-tap-highlight-color: transparent; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.app { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
.head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--gap); min-height: calc(var(--head-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); background: var(--accent); color: var(--accent-contrast); }
.head h1 { margin: 0; font-size: 1.125rem; font-weight: 650; line-height: 1.2; flex: 1; min-width: 0; }
.head .tag { flex: none; font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.5); }
.main { min-width: 0; padding: 16px max(16px, env(safe-area-inset-right)) calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px) max(16px, env(safe-area-inset-left)); }
.view { max-width: 720px; margin: 0 auto; display: grid; gap: var(--gap); }
.view > h2 { margin: 4px 0 0; font-size: 1.375rem; line-height: 1.25; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--nav-h); padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: .75rem; line-height: 1.1; text-align: center; min-width: 0; }
.nav a .ic { font-size: 1.25rem; line-height: 1; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 650; box-shadow: inset 0 3px 0 var(--accent); }
body.kb-open .nav { display: none; }               /* clavier mobile ouvert : la barre ne masque jamais le champ en cours de saisie */
body.kb-open .main { padding-bottom: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card p { margin: 0 0 8px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list a, .list .row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.list .grow { flex: 1; min-width: 0; }
.badge { display: inline-block; flex: none; font-size: .75rem; line-height: 1.3; padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.err { background: var(--err-soft); color: var(--err); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 10px 18px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-contrast); font-weight: 650; cursor: pointer; width: 100%; }
.btn.secondary { background: transparent; color: var(--accent); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input, .field textarea { min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; width: 100%; }   /* 16 px : pas de zoom automatique iOS */
.state { text-align: center; padding: 28px 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.state .big { font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.state.err { border-color: var(--err); background: var(--err-soft); color: var(--err); }
.state p { margin: 4px 0 0; color: inherit; }
.skeleton { display: grid; gap: 10px; }
.skeleton i { display: block; height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--line), var(--surface), var(--line)); background-size: 200% 100%; animation: sh 1.4s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } }
.demo-banner { padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-text); font-size: .875rem; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Présentation bureau : la barre devient un rail latéral ; le contenu reste centré et lisible. Ce n'est PAS la mise en page de référence. */
@media (min-width: 900px) {
  .app { grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; }
  .head { grid-column: 1 / -1; }
  .nav { position: sticky; top: calc(var(--head-h) + env(safe-area-inset-top)); grid-row: 2; grid-column: 1; grid-auto-flow: row; grid-auto-columns: auto; grid-auto-rows: min-content; align-content: start; gap: 4px; align-self: start; height: calc(100vh - var(--head-h)); border-top: 0; border-right: 1px solid var(--line); padding: 12px 8px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; font-size: .9375rem; min-height: var(--tap); border-radius: 10px; text-align: left; }
  .nav a[aria-current="page"] { box-shadow: none; background: var(--accent-soft); }
  .main { grid-row: 2; grid-column: 2; padding: 24px; }
}
.view > h3 { margin: 8px 0 0; font-size: 1.0625rem; }

/* ── A2 : authentification et gestion des accès ─────────────────────────────────────────────────────────────────────────────────── */
.btn.small { min-height: 44px; padding: 6px 12px; width: auto; font-size: .9375rem; }
.btn.danger { background: var(--err); border-color: var(--err); color: var(--surface); }
.btn.secondary.danger { background: transparent; color: var(--err); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.row-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.stack { display: grid; gap: var(--gap); }
.notice { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.notice.err { border-color: var(--err); background: var(--err-soft); color: var(--err); font-weight: 600; }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.notice.warn { background: var(--warn-soft); color: var(--warn-text); font-weight: 600; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.list .row .sub { display: block; color: var(--muted); font-size: .875rem; }
.list .row-link { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; width: 100%; }
.head .who { flex: none; max-width: 38vw; font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head .hbtn { flex: none; min-height: 44px; min-width: 44px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.55); border-radius: 10px; background: transparent; color: inherit; cursor: pointer; font-weight: 600; }
.center-card { max-width: 420px; margin: 4vh auto 0; display: grid; gap: var(--gap); }
.center-card h2 { margin: 0; font-size: 1.375rem; text-align: center; }
.center-card p.lead { margin: 0; text-align: center; color: var(--muted); }
.big-code { font-size: 2.25rem; font-weight: 700; letter-spacing: .3em; text-align: center; padding: 14px 8px 14px 18px; border: 2px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); font-variant-numeric: tabular-nums; }
.qr { display: block; width: min(100%, 280px); height: auto; margin: 0 auto; background: #fff; border: 8px solid #fff; border-radius: 8px; image-rendering: pixelated; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.copy-row input { min-width: 0; min-height: var(--tap); padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg .btn { padding: 8px 6px; font-size: .9375rem; }
/* clavier numérique */
.pinpad { display: grid; gap: 18px; justify-items: center; outline: none; }
.pinpad.busy { opacity: .6; pointer-events: none; }
.dots { display: flex; gap: 14px; min-height: 24px; }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; }
.dot.on { background: var(--accent); }
.keys { display: grid; grid-template-columns: repeat(3, minmax(64px, 84px)); gap: 12px; }
.key { min-height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 1.5rem; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.key:active { background: var(--accent-soft); }
.key-gap { display: block; }
@media (max-width: 359px) { .keys { grid-template-columns: repeat(3, minmax(56px, 1fr)); gap: 8px; } .key { min-height: 56px; } .big-code { font-size: 1.75rem; letter-spacing: .2em; } }
@media (max-height: 560px) and (orientation: landscape) { .keys { grid-template-columns: repeat(6, minmax(52px, 1fr)); } .key { min-height: 52px; } .center-card { margin-top: 0; } }
.hidden { display: none !important; }
.app.plain { grid-template-rows: auto 1fr; }
.app.plain .main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .app.plain { grid-template-columns: 1fr; } .app.plain .main { grid-column: 1; } }
.back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; }
/* A2 — en-tête : le titre ne se coupe jamais ; l'identité passe sur sa propre ligne sur téléphone */
.head h1 { white-space: nowrap; flex: 1 1 auto; }
@media (max-width: 599px) { .head { flex-wrap: wrap; row-gap: 0; } .head .who { order: 5; flex: 1 0 100%; max-width: none; padding: 0 0 8px; } }
/* A2 — très petits écrans : libellés de navigation sur une ligne, lignes de liste qui passent à la ligne au lieu d'écraser le texte */
.nav a span:not(.ic) { max-width: 100%; white-space: nowrap; }
@media (max-width: 359px) { .nav a { font-size: .6875rem; padding: 6px 0; } }
.list .row { flex-wrap: wrap; }
.list .row .grow { flex: 1 1 11rem; min-width: 0; }

/* ── C1 / B1 : tableau de bord, filtres, tuiles, états de modules ─────────────────────────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 76px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.tile .num { font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: .875rem; line-height: 1.25; }
.tile.err { border-color: var(--err); background: var(--err-soft); } .tile.err .num, .tile.err span { color: var(--err); }
.tile.warn { border-color: var(--warn-text); background: var(--warn-soft); } .tile.warn .num, .tile.warn span { color: var(--warn-text); }
.chipbar { display: flex; flex-wrap: wrap; gap: 8px; }
.chipbtn { min-height: 44px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; touch-action: manipulation; }
.chipbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.list .row-link .sub, .list a.sub { display: block; color: var(--muted); font-size: .875rem; }
.list .row a.sub { text-decoration: underline; }
.state .note { color: var(--muted); font-size: .9375rem; }
.lead { color: var(--muted); margin: 0; }
.stack > .lead, .view > .lead { margin: 0; }
.notice .btn { margin-top: 8px; }
.notice p { margin: 0; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .view.wide { max-width: 1100px; }
  [data-kind="admin"] .view.wide > .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  [data-kind="admin"] .view.wide > .stack > .tiles, [data-kind="admin"] .view.wide > .stack > .notice, [data-kind="admin"] .view.wide > .stack > h3, [data-kind="admin"] .view.wide > .stack > ul.list { grid-column: 1 / -1; }
}
a.btn, a.btn:hover { text-decoration: none; }
.tile { justify-content: flex-start; }
.tile .badge { align-self: flex-start; }

/* ── F1 : icônes, cloche, « Ma journée », « Mon planning », publications (mobile d'abord ; cibles ≥ 44 px ; zones sûres ; clair/sombre via les jetons) ───────────────────────── */
.icon { display: block; flex: none; }
.nav a .ic { display: flex; align-items: center; justify-content: center; height: 24px; }
.nav a { font-size: .6875rem; gap: 3px; }
.head .hbtn.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0; width: 44px; }
.head .bell .count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--err); color: #fff; font-size: .6875rem; line-height: 18px; text-align: center; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.card.soft { border-color: transparent; background: var(--accent-soft); }
.day-hero { display: grid; gap: 4px; }
.day-hero .date { font-size: .9375rem; color: var(--muted); text-transform: capitalize; }
.day-hero .hours { font-size: 2rem; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-hero .sub { color: var(--muted); font-size: .9375rem; }
.interv { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.interv .t { font-weight: 650; font-variant-numeric: tabular-nums; }
.interv .d { color: var(--muted); font-size: .875rem; }
.interv.ongoing { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.interv.done { opacity: .72; }
.seg4 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--accent-soft); border-radius: 12px; }
.seg4 button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-weight: 600; cursor: pointer; }
.seg4 button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.navbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.navbar .ttl { text-align: center; font-weight: 650; text-transform: capitalize; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.weekrow { display: grid; grid-template-columns: 4.2rem 1fr auto; gap: 4px 10px; align-items: start; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-height: 44px; color: inherit; text-decoration: none; width: 100%; text-align: left; cursor: pointer; }
.weekrow.today { border-color: var(--accent); }
.weekrow .dn { font-weight: 650; text-transform: capitalize; } .weekrow .dn small { display: block; color: var(--muted); font-weight: 400; }
.weekrow .it { display: grid; gap: 2px; font-variant-numeric: tabular-nums; } .weekrow .tot { color: var(--muted); font-variant-numeric: tabular-nums; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mgrid .hd { text-align: center; font-size: .75rem; color: var(--muted); padding: 2px 0; }
.mgrid .cell { position: relative; min-height: 48px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font-size: .875rem; }
.mgrid .cell.empty { border-color: transparent; background: transparent; cursor: default; }
.mgrid .cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mgrid .cell.has { background: var(--accent-soft); }
.mgrid .cell small { font-size: .6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 359px) { .mgrid { gap: 2px; } .mgrid .cell { min-height: 44px; } .mgrid .cell small { font-size: .625rem; } .weekrow { grid-template-columns: 3.4rem 1fr auto; padding: 8px; } }
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; }
details.fold > summary { min-height: 48px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
details.fold > :not(summary) { margin-bottom: 12px; }
.pubrow { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); } .pubrow:last-child { border-bottom: 0; }
.pubrow .top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.linkbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--accent); color: var(--accent); background: transparent; font-weight: 650; text-decoration: none; cursor: pointer; }
.linkbtn.primary { background: var(--accent); color: var(--accent-contrast); }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.banner.warn { background: var(--warn-soft); color: var(--warn-text); border-color: transparent; } .banner .icon { margin-top: 2px; }
/* [B2] UAT / agendas partagés : lignes lisibles, titres longs sans débordement */
.interv .ttl2 { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.interv.uat-item, .interv.ag-item { grid-template-columns: minmax(64px, auto) 1fr auto; }
.agrow { gap: 4px; }
.agrow .btnrow { justify-content: space-between; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 2px; }
.check input[type=checkbox] { appearance: none; -webkit-appearance: none; display: grid; place-content: center; width: 44px; height: 44px; margin: 0; flex: none; border: 2px solid var(--muted); border-radius: 10px; background: var(--surface); }
.check input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
.check input[type=checkbox]:checked::after { content: ''; width: 11px; height: 21px; border: solid var(--accent-contrast); border-width: 0 4px 4px 0; transform: rotate(45deg) translate(-2px, -2px); }
.check input[type=checkbox]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.head .hbtn#logout:has(svg) { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 44px; }

/* ── [D] tâches, notes, signalements : pastilles, états, formulaires ─────────────────────────────────────────────────────────────────── */
.nav a { position: relative; }
.nav a .nb { position: absolute; top: 4px; left: 50%; margin-left: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--err); color: var(--surface); font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.field select { min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; width: 100%; }
.field .hint { color: var(--muted); font-size: .875rem; }
.work-item { display: grid; gap: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.work-item .top { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.work-item .ttl { flex: 1 1 60%; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.work-item.late { border-color: var(--err); box-shadow: inset 4px 0 0 var(--err); }
.work-item.high { box-shadow: inset 4px 0 0 var(--warn-text); }
.work-item.late.high { box-shadow: inset 4px 0 0 var(--err); }
.work-item.done { opacity: .75; }
.work-item.unread { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.work-item.cancelled { opacity: .6; text-decoration: line-through; }
.work-item button.open, .work-item a.open { all: unset; display: block; cursor: pointer; min-height: 44px; }
.work-item .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.work-item .acts .btn { width: auto; flex: 1 1 140px; }
.work-detail { display: grid; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.work-detail pre, .work-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.timeline li { padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: .9375rem; overflow-wrap: anywhere; }
.msg { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); overflow-wrap: anywhere; max-width: 92%; }
.msg.me { justify-self: end; background: var(--surface); border: 1px solid var(--line); }
.msg .who { display: block; color: var(--muted); font-size: .8125rem; }
.cols { display: grid; gap: 12px; }
@media (min-width: 900px) { .cols.two { grid-template-columns: 1fr 1fr; } .cols.three { grid-template-columns: repeat(3, 1fr); } }
.daychk { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 4px; }
.daychk label { position: relative; display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; cursor: pointer; }
.daychk input { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); margin: 0; opacity: 0; cursor: pointer; }
.daychk input:checked + span { color: var(--accent-contrast); }
.daychk label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.daychk label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px); z-index: 2; }
.row .stack > input[type=text], .card > .cols > input[type=text] { min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; width: 100%; }
.list .row-link .grow .chips:not(:empty) { margin-top: 6px; }

/* ── [F1b] documents, fiches de paie, échanges ─────────────────────────────────────────────────────────────────────────────────────────────── */
.backlink { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; width: fit-content; color: var(--accent); font-weight: 650; text-decoration: none; }
.filters { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field select, .field input, .field textarea { max-width: 100%; min-width: 0; }
.field select { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }            /* un libellé long n'élargit plus la liste ni ne déborde de l'écran */
.field input[type=file] { min-height: var(--tap); padding: 8px 10px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); width: 100%; font-size: 16px; }
.field input[type=date], .field input[type=datetime-local] { min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; width: 100%; }
.mono { display: block; overflow-wrap: anywhere; word-break: break-all; font-variant-numeric: tabular-nums; }
.doc-item { list-style: none; }
.doc-item .row-link .ttl, .ps-item .ttl { overflow-wrap: anywhere; }
.doc-item .row-link .sub { overflow-wrap: anywhere; }
.ps-item .top { display: flex; align-items: center; gap: 10px; }
.ps-item .top .ttl { flex: 1; min-width: 0; }
.ps-item .muted.small { overflow-wrap: anywhere; }
.check.radio { align-items: flex-start; }
.check.radio input[type=radio] { width: 44px; height: 44px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
.check.radio label { display: grid; gap: 2px; padding: 8px 0; }
.lockcard .lockrow { display: flex; align-items: flex-start; gap: 10px; }
.lockcard .lockrow p { margin: 0; }
.recap-list .row { min-height: 44px; }
.exch-seg { display: flex; flex-wrap: wrap; gap: 8px; }
a.chipbtn { display: inline-flex; align-items: center; text-decoration: none; }
a.chipbtn[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
fieldset.stack { border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; margin: 0; }
fieldset.stack > legend { padding: 0 6px; font-weight: 650; }
.linkbtn[aria-expanded="true"] { background: var(--accent-soft); }
[data-kind="admin"] .view.wide.single > .stack { grid-template-columns: minmax(0, 1fr); }
.row-actions input[type=text], .row-actions input[type=search] { min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; width: 100%; min-width: 0; }

/* ── [G] Vacances : contrôles (niveau écrit en toutes lettres, jamais la couleur seule), calendrier mensuel, historique ───────────────────────────────────────────────── */
.ov { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-left-width: 5px; border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
.ov .lv { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.ov.warning { border-color: var(--warn-text); background: var(--warn-soft); color: var(--warn-text); } .ov.warning .lv { color: var(--warn-text); }
.ov.block { border-color: var(--err); background: var(--err-soft); color: var(--err); } .ov.block .lv { color: var(--err); }
.ov.info { border-left-color: var(--accent); }
.row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; } .row-head h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.quote { margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--line); color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.regbody { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; max-height: 50vh; overflow: auto; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tl li { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--line); min-width: 0; overflow-wrap: anywhere; } .tl li .sub { color: var(--muted); font-size: .875rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; color: var(--muted); font-size: .75rem; font-weight: 700; padding: 2px 0; }
.cal-d { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 48px; min-width: 0; padding: 4px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.cal-d .n { font-variant-numeric: tabular-nums; font-weight: 600; } .cal-d .m { display: flex; gap: 2px; min-height: 16px; }
.cal-d .mk { min-width: 16px; padding: 0 4px; border-radius: 99px; font-size: .6875rem; line-height: 16px; font-weight: 700; text-align: center; }
.cal-d .mk.abs { background: var(--accent); color: var(--accent-contrast); } .cal-d .mk.req { background: var(--warn-soft); color: var(--warn-text); border: 1px solid var(--warn-text); line-height: 14px; }
.cal-d.school { background: var(--accent-soft); } .cal-d.sel, .cal-d[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; }
.cal-nav .grow { text-align: center; } .cal-nav h3 { margin: 0; }
@media (min-width: 900px) { .cal { gap: 6px; } .cal-d { min-height: 64px; } }
.cal-nav .btn { min-width: var(--tap); padding-inline: 0; }
/* calendrier : sur téléphone, une ligne par jour (cibles ≥ 44 px, aucun défilement horizontal) ; grille de 7 colonnes dès 700 px */
.cal-d .w { display: none; }
@media (max-width: 699px) {
  .cal { grid-template-columns: minmax(0, 1fr); } .cal-h, .cal-pad { display: none; }
  .cal-d { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: var(--tap); padding: 6px 14px; text-align: left; }
  .cal-d .n { min-width: 2ch; text-align: right; } .cal-d .w { display: inline; color: var(--muted); text-transform: capitalize; flex: 1 1 auto; min-width: 0; } .cal-d .m { flex: none; }
}
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .cal-nav .grow { flex: 1 1 auto; min-width: 0; }
#vac-actions .confirm-host, #vac-actions .btnrow > .btn { display: block; width: 100%; } #vac-actions .confirm-host > .btn { width: 100%; }

/* [H1/H2] centre de notifications, notifications sur l'appareil, bandeaux système (hors ligne, mise à jour) — polices sans sérif uniquement (jetons) */
.sysbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); font-size: .9375rem; line-height: 1.35; text-align: center; }
.sysbar.warn { background: var(--warn-soft); color: var(--warn-text); }
.sysbar.info { background: var(--accent-soft); color: var(--text); }
.sysbar + .app .head { top: 0; }
.hbtn.bell.urgent .count { background: var(--err); color: var(--surface); }
.hbtn.bell.urgent { outline: 2px solid var(--err); outline-offset: -2px; }
.row-link.notif { min-height: var(--tap); }
.row-link.notif.unread strong { color: var(--text); }
.row-link.notif:focus-visible, .row .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#notif-device ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 6px; }
#notif-device h4 { margin: 12px 0 6px; font-size: .9375rem; }

/* [H1] centre de notifications : AUCUN attribut style en ligne (CSP style-src 'self') */
.notif-row { padding: 0; display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.notif-main { min-width: 0; }
.row-link.notif-open { width: 100%; text-align: left; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.row-link .ndot, .ndot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.ndot.on { background: var(--accent); }
.notif strong.nread { font-weight: 500; }
