/* InnoRenov Chantier – application mobile de rapports */
@font-face { font-family: "Poppins"; font-weight: 600; src: url("../../assets/fonts/poppins-600.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Open Sans"; font-weight: 300 800; src: url("../../assets/fonts/opensans.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #0C1406; --ink-2: #1a2612; --green: #379237; --green-700: #2B7A2B; --green-800: #20601f;
  --lime: #AFC80A; --lime-300: #c9de3a; --mint: #EDFBE2; --mint-2: #D5EAD8;
  --text: #1c2616; --muted: #5a6553; --line: #dfe6d8; --bg: #f2f5ee; --card: #fff;
  --red: #c62828; --red-bg: #fdecea; --amber: #8a4f00; --amber-bg: #fff3e0; --slate: #37474f; --slate-bg: #eceff1;
  --r: 14px; --shadow: 0 1px 2px rgba(12,20,6,.06), 0 4px 14px rgba(12,20,6,.06);
  --font-h: "Poppins", system-ui, -apple-system, sans-serif;
  --font-b: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --top: 60px; --nav: 64px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: var(--font-b); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); min-height: 100dvh; }
h1, h2, h3 { font-family: var(--font-h); font-weight: 600; color: var(--ink); line-height: 1.25; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-700); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.ico { width: 22px; height: 22px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Barre supérieure ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; padding-top: var(--sat); }
.topbar-in { display: flex; align-items: center; gap: 6px; min-height: var(--top); max-width: 820px; margin: 0 auto; padding: 0 8px; }
.topbar h1 { color: #fff; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: .78rem; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title { flex: 1; min-width: 0; padding: 0 6px; }
.tb-logo { height: 34px; width: auto; margin-left: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: none; border: 0; color: inherit; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn.dark:hover { background: var(--mint); }
.save-state { font-size: .78rem; color: rgba(255,255,255,.75); display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; white-space: nowrap; }
.save-state .ico { width: 16px; height: 16px; color: var(--lime); }
.offline { background: var(--amber-bg); color: var(--amber); text-align: center; font-size: .85rem; padding: 6px; font-weight: 600; }

/* ---------- Mise en page ---------- */
.page { max-width: 820px; margin: 0 auto; padding: 16px 14px calc(var(--nav) + 90px + var(--sab)); }
.page.no-nav { padding-bottom: calc(110px + var(--sab)); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 4px 10px; }
.section-title h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 10px; }
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 1px solid transparent; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; cursor: pointer; text-decoration: none; color: inherit; transition: border-color .15s, transform .1s; min-height: 64px; }
.item:hover { border-color: var(--mint-2); }
.item:active { transform: scale(.99); }
.item-main { flex: 1; min-width: 0; }
.item-title { display: block; font-family: var(--font-h); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { display: block; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .chev { color: #a9b3a2; }
.avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); color: var(--green-700); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-h); font-weight: 600; flex: none; }
.avatar.dark { background: var(--ink); color: var(--lime); }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { width: 48px; height: 48px; color: var(--mint-2); margin-bottom: 8px; }
.empty h3 { margin-bottom: 6px; }
.search { position: relative; margin-bottom: 12px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.search input { padding-left: 44px !important; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--slate-bg); color: var(--slate); white-space: nowrap; }
.b-open { background: var(--red-bg); color: #a31515; }
.b-progress { background: var(--amber-bg); color: var(--amber); }
.b-done, .b-sent { background: var(--mint); color: var(--green-800); }
.b-draft { background: #fff8d6; color: #6b5800; }
.b-urgent { background: var(--red); color: #fff; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent; font-family: var(--font-h); font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn .ico { width: 20px; height: 20px; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: var(--lime-300); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c7c3; }
.btn-danger:hover { background: var(--red-bg); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }
.fab { position: fixed; right: max(16px, calc(50vw - 394px)); bottom: calc(var(--nav) + 16px + var(--sab)); z-index: 25; height: 56px; padding: 0 22px; border-radius: 18px; background: var(--lime); color: var(--ink); border: 0; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-h); font-weight: 600; box-shadow: 0 8px 24px -6px rgba(12,20,6,.35); cursor: pointer; }
.fab:hover { background: var(--lime-300); }

/* ---------- Navigation basse ---------- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--sab); }
.bottomnav-in { display: flex; max-width: 820px; margin: 0 auto; height: var(--nav); }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .74rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.bottomnav a .ico { width: 24px; height: 24px; }
.bottomnav a[aria-current="page"] { color: var(--green-700); }
.bottomnav a[aria-current="page"] .ico { background: var(--mint); border-radius: 999px; padding: 2px 14px; box-sizing: content-box; }

/* ---------- Barre d'actions du rapport ---------- */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + var(--sab)); }
.actionbar-in { display: flex; gap: 10px; max-width: 820px; margin: 0 auto; }
.actionbar .btn { flex: 1; }

/* ---------- Formulaires ---------- */
.stack { display: grid; gap: 14px; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.fld { display: grid; gap: 6px; }
.fld > span, .lbl { font-weight: 600; font-size: .9rem; color: var(--ink); }
.fld small { color: var(--muted); font-size: .82rem; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid #cdd6c5; border-radius: 12px; background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a6553' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(55,146,55,.15); }
input[type=range] { width: 100%; margin: 0; accent-color: var(--green-700); height: 32px; }
.grid-2 > *, .fld { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; }
input[type=date], input[type=time], input[type=datetime-local] { display: block; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; }
.switch > span { display: block; }
.switch > span > .ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: #cfd8c7; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--green-700); }
.switch input:checked::after { transform: translateX(20px); }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: .85rem; color: var(--muted); cursor: pointer; padding: 0 6px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(12,20,6,.15); }
.seg.status button[aria-pressed="true"][data-v="open"] { background: var(--red-bg); color: #a31515; }
.seg.status button[aria-pressed="true"][data-v="progress"] { background: var(--amber-bg); color: var(--amber); }
.seg.status button[aria-pressed="true"][data-v="done"] { background: var(--mint); color: var(--green-800); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: .88rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.chip .ico { width: 18px; height: 18px; }

/* ---------- Présences ---------- */
.att { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.att:last-child { border-bottom: 0; }
.att-name { flex: 1 1 160px; min-width: 0; }
.att-name strong { display: block; font-size: .95rem; }
.att-name span { font-size: .82rem; color: var(--muted); }
.att .seg { flex: 1 1 260px; }
.att .seg button[aria-pressed="true"][data-v="present"] { background: var(--mint); color: var(--green-800); }
.att .seg button[aria-pressed="true"][data-v="absent"] { background: var(--red-bg); color: #a31515; }
.att .seg button[aria-pressed="true"][data-v="excused"] { background: var(--amber-bg); color: var(--amber); }

/* ---------- Observations ---------- */
.obs { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 10px; cursor: pointer; border: 1.5px solid transparent; transition: border-color .15s; }
.obs:hover { border-color: var(--mint-2); }
.obs-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.obs-num { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex: none; }
.obs-lot { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.obs-body { white-space: pre-wrap; word-break: break-word; }
.obs-body.empty-text { color: var(--muted); font-style: italic; }
.obs-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.obs-meta span { display: inline-flex; align-items: center; gap: 4px; }
.obs-meta .ico { width: 16px; height: 16px; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line); }
.quick-add { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.quick-add .btn { min-height: 56px; }

/* ---------- Photos dans l'éditeur ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.ph .ph-actions { position: absolute; right: 4px; top: 4px; display: flex; gap: 4px; }
.ph .ph-actions button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(12,20,6,.72); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ph .ph-actions .ico { width: 18px; height: 18px; }
.ph.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.5); border-top-color: var(--green-700); border-radius: 50%; animation: spin .8s linear infinite; }
.ph-add { aspect-ratio: 1; border-radius: 12px; border: 2px dashed #b9c5ae; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--green-700); cursor: pointer; }
.ph-add .ico { width: 28px; height: 28px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Feuilles modales ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(12,20,6,.5); animation: fade .18s ease; }
.sheet { width: 100%; max-width: 640px; max-height: 94dvh; background: #fff; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; max-height: 88dvh; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; font-size: 1.1rem; }
.sheet-body { padding: 18px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 20px calc(12px + var(--sab)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }

/* ---------- Visionneuse & annotation ---------- */
.viewer { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; gap: 6px; padding: calc(6px + var(--sat)) 8px 6px; color: #fff; background: rgba(0,0,0,.6); flex-wrap: wrap; }
.viewer-bar .grow { flex: 1; }
.viewer-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.viewer-stage img, .viewer-stage canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
.color-dot { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.color-dot[aria-pressed="true"] { border-color: #fff; }

/* ---------- Envoi ---------- */
.rcpt { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.rcpt input { width: 22px; height: 22px; accent-color: var(--green-700); flex: none; }
.rcpt strong { display: block; }
.rcpt.disabled { opacity: .5; cursor: not-allowed; }
.result { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: .9rem; }
.result .ico { width: 18px; height: 18px; }
.result.ok .ico { color: var(--green-700); }
.result.err .ico { color: var(--red); }

/* ---------- Connexion / installation ---------- */
.auth-body { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(800px 400px at 80% -10%, rgba(175,200,10,.25), transparent 60%), var(--ink); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; padding: 28px 24px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); }
.auth-card.wide { max-width: 520px; }
.auth-card h1 { font-size: 1.35rem; margin: 6px 0 4px; }
.auth-card .btn { margin-top: 8px; }
.auth-logo { height: 48px; width: auto; background: var(--ink); padding: 8px 14px; border-radius: 12px; box-sizing: content-box; }
.hint { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }
.h-sm { font-size: 1rem; margin: 20px 0 10px; }
.checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.checks li { display: flex; gap: 8px; } .checks li.ok span { color: var(--green-700); font-weight: 700; } .checks li.err { color: var(--red); font-weight: 600; }
.notice { padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-size: .92rem; }
.notice.ok { background: var(--mint); color: var(--green-800); }
.notice.err { background: var(--red-bg); color: #8a1c1c; }
code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 24px + var(--sab)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); }

.skeleton { height: 70px; border-radius: var(--r); background: linear-gradient(90deg, #e7ece2 25%, #f3f6ef 50%, #e7ece2 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.tabs { display: flex; gap: 4px; background: #fff; border-radius: 14px; padding: 4px; box-shadow: var(--shadow); margin-top: 14px; }
.tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: none; font-family: var(--font-h); font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--lime); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   v3 – Pointage, annuaire, administration
   ===================================================================== */
.muted { color: var(--muted); }
.red { color: var(--red); }
.nowrap { flex-wrap: nowrap !important; }
.h3 { font-size: 1.02rem; margin: 0; }
.grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 520px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 > :last-child { grid-column: 1 / -1; } }
.btn-xl { min-height: 58px; font-size: 1.05rem; border-radius: 14px; }
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #a91f1f; }
.badge .ico { width: 13px; height: 13px; }
.b-lime { background: var(--lime); color: var(--ink); }
.b-info { background: #e3f0fb; color: #1b4f7a; }
.notice { display: flex; gap: 8px; align-items: flex-start; }
.notice .ico { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.notice.warn { background: var(--amber-bg); color: var(--amber); }
.card.tint { background: var(--mint); box-shadow: none; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; text-decoration: none; color: var(--text); }
.chip[aria-current="page"], .chips.scroll .chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.tabs a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; font-family: var(--font-h); font-weight: 600; color: var(--muted); text-decoration: none; font-size: .92rem; text-align: center; padding: 0 6px; }
.tabs a[aria-selected="true"] { background: var(--ink); color: var(--lime); }
.sheet.wide { max-width: 760px; }
.spin { width: 18px; height: 18px; border: 2.5px solid var(--mint-2); border-top-color: var(--green-700); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
pre { white-space: pre-wrap; word-break: break-all; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: .8rem; margin: 6px 0; }

/* ---------- Pointage ---------- */
.clock-hero { text-align: center; padding: 18px 12px 20px; border-radius: 22px; background: radial-gradient(500px 220px at 50% -40%, rgba(175,200,10,.35), transparent 70%), var(--ink); color: #fff; margin-bottom: 14px; }
.clock-date { font-size: .95rem; color: rgba(255,255,255,.75); }
.clock-date::first-letter, .day-head h3::first-letter { text-transform: uppercase; }
.clock-now { font-family: var(--font-h); font-weight: 600; font-size: 3.2rem; line-height: 1.1; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.status-pill .ico { width: 12px; height: 12px; }
.status-pill.off { background: rgba(255,255,255,.12); color: #fff; }
.status-pill.off .ico { color: #b9c5ae; }
.status-pill.on { background: var(--lime); color: var(--ink); }
.status-pill.on .ico { color: var(--green-800); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.clock-hero.active { padding-top: 22px; }
.elapsed { font-family: var(--font-h); font-weight: 600; font-size: 3.6rem; line-height: 1.05; font-variant-numeric: tabular-nums; margin: 14px 0 4px; color: #fff; }
.since { color: rgba(255,255,255,.8); }
.gps-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-size: .92rem; }
.gps-card > span { flex: 1; min-width: 180px; }
.gps-card .ico.ok { color: var(--green-700); }
.gps-card .ico.warn { color: var(--amber); }
.gps-card.ok { background: var(--mint); }
.gps-card.warn { background: var(--amber-bg); color: #5c3a00; }
.gps-strict { flex-basis: 100%; font-weight: 700; color: var(--red); }
#pnote .notice { margin: 0 0 10px; }
.plist { display: grid; gap: 8px; }
.pitem { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 2px solid transparent; border-radius: 14px; box-shadow: var(--shadow); padding: 14px; cursor: pointer; min-height: 68px; font: inherit; color: inherit; }
.pitem[aria-checked="true"] { border-color: var(--green-700); background: #f6fbf1; }
.pitem .radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b9c5ae; flex: none; position: relative; }
.pitem[aria-checked="true"] .radio { border-color: var(--green-700); }
.pitem[aria-checked="true"] .radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--green-700); }
.pitem-main { flex: 1; min-width: 0; }
.pitem-main strong { display: block; font-family: var(--font-h); color: var(--ink); }
.pitem-main .sub { display: block; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitem-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.clock-action { position: sticky; bottom: calc(var(--nav) + var(--sab) + 8px); z-index: 20; margin-top: 18px; padding-top: 10px; background: linear-gradient(transparent, var(--bg) 22%); }
.clock-btn { width: 100%; min-height: 76px; border: 0; border-radius: 20px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 14px; padding: 12px 22px; text-align: left; cursor: pointer; color: #fff; box-shadow: 0 10px 26px -10px rgba(12,20,6,.5); transition: transform .1s, opacity .2s; font: inherit; }
.clock-btn .ico { grid-row: 1 / 3; width: 32px; height: 32px; }
.clock-btn .cb-label { font-family: var(--font-h); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .03em; }
.clock-btn .cb-sub { font-size: .88rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock-btn:active { transform: scale(.985); }
.clock-btn.in { background: var(--green-700); }
.clock-btn.in:hover { background: var(--green-800); }
.clock-btn.out { background: var(--red); }
.clock-btn.out:hover { background: #a91f1f; }
.clock-btn[disabled] { background: #9aa592; box-shadow: none; cursor: not-allowed; }
.clock-btn.loading { opacity: .8; }
.clock-help { text-align: center; font-size: .82rem; color: var(--muted); margin: 8px 6px 0; }
.done-card { display: flex; gap: 10px; align-items: flex-start; background: var(--mint); color: var(--green-800); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.done-card .ico { width: 22px; height: 22px; flex: none; }

/* ---------- Mes heures ---------- */
.stats-row { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.stats-row.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats-row.four { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; text-decoration: none; color: inherit; display: block; }
.stat-card span { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.stat-card strong { display: block; font-family: var(--font-h); font-size: 1.45rem; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-card.warn { background: var(--amber-bg); }
.stat-card.warn strong { color: var(--amber); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 4px 8px; }
.day-head h3 { font-size: .95rem; }
.day-head span { font-family: var(--font-h); font-weight: 600; color: var(--green-700); }
.srow .dur { font-family: var(--font-h); font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Projets & annuaire ---------- */
.co-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; cursor: pointer; border: 1.5px solid transparent; }
.co-card:hover { border-color: var(--mint-2); }
.co-head { display: flex; gap: 12px; align-items: center; }
.co-title { flex: 1; min-width: 0; }
.co-title strong { display: block; font-family: var(--font-h); color: var(--ink); }
.co-info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: .85rem; color: var(--muted); }
.co-info span { display: inline-flex; gap: 5px; align-items: center; }
.co-info .ico { width: 14px; height: 14px; }
.co-contacts { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .9rem; }
.co-contacts li { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ct-pick { display: grid; gap: 6px; }
.ct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.ct-main { flex: 1 1 220px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.ct-rec { display: flex; gap: 8px; align-items: center; font-size: .85rem; cursor: pointer; }
.ct-row input { width: 22px; height: 22px; accent-color: var(--green-700); flex: none; }
.map { height: 280px; border-radius: 14px; overflow: hidden; background: var(--line); margin: 8px 0 4px; z-index: 0; }
.proj-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.proj-card-head strong { font-family: var(--font-h); color: var(--ink); font-size: 1.05rem; }
.att-co { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--font-h); font-weight: 600; color: var(--ink); padding: 12px 0 2px; font-size: .92rem; border-top: 1px solid var(--line); }
.att-co:first-child { border-top: 0; padding-top: 0; }
.att-co span { font-family: var(--font-b); font-weight: 400; color: var(--muted); font-size: .82rem; }
#att .att { border-bottom: 0; padding: 6px 0; }
.rc-group { margin-top: 6px; }
.rc-group .rcpt { padding-left: 4px; }

/* ---------- Administration ---------- */
.admin-tabs { margin-bottom: 14px; }
.filters { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); align-items: end; }
.filters .switch, .filters .btn-row { grid-column: 1 / -1; }
@media (min-width: 900px) { .filters { grid-template-columns: repeat(5, 1fr); } }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--lime); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr[data-sid] { cursor: pointer; }
.table tbody tr[data-sid]:hover { background: #f8fbf5; }
.table .badge { margin: 0 4px 4px 0; }
@media (max-width: 760px) {
  .table-wrap { background: none; box-shadow: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; padding: 8px 4px; }
  .table td { border: 0; padding: 4px 12px; display: flex; gap: 10px; }
  .table td::before { content: attr(data-label); flex: 0 0 96px; color: var(--muted); font-size: .8rem; }
  .table td[data-label=""]::before { display: none; }
}
details.howto { margin-top: 12px; }
details.howto summary, details.audit summary { cursor: pointer; font-weight: 600; color: var(--green-700); min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
details.howto p { font-size: .9rem; }
details.audit { margin-bottom: 8px; }
details.audit summary { color: var(--text); font-weight: 400; }

/* ---------- Ordinateur : navigation latérale ---------- */
.nav-brand { display: none; }
.page.wide { max-width: 1180px; }
@media (min-width: 1024px) {
  body.has-nav { padding-left: 232px; }
  body.has-nav .bottomnav { top: 0; bottom: 0; left: 0; right: auto; width: 232px; border-top: 0; border-right: 1px solid var(--line); padding: 0; background: #fff; }
  body.has-nav .nav-brand { display: flex; align-items: center; height: calc(var(--top) + var(--sat)); padding: 0 20px; background: var(--ink); }
  body.has-nav .nav-brand img { height: 36px; width: auto; }
  body.has-nav .bottomnav-in { flex-direction: column; height: auto; gap: 4px; padding: 16px 12px; }
  body.has-nav .bottomnav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: .95rem; }
  body.has-nav .bottomnav a[aria-current="page"] { background: var(--mint); }
  body.has-nav .bottomnav a[aria-current="page"] .ico { background: none; padding: 0; }
  body.has-nav .tb-logo { display: none; }
  body.has-nav .page { padding-bottom: 60px; }
  body.has-nav .fab { bottom: 24px; }
  body.has-nav .toast { bottom: 24px; }
  body.has-nav .clock-action { bottom: 12px; }
  .page:not(.wide) { max-width: 760px; }
}

/* Les colonnes de grille ne doivent jamais dépasser l'écran (textes longs sur une ligne) */
.list, .plist, .stack, .ct-pick { grid-template-columns: minmax(0, 1fr); }
.list > *, .plist > *, .stack > * { min-width: 0; }
.proj-card-head > div, .co-head > div, .item-main { min-width: 0; }
.chips.scroll .chip[aria-pressed="true"] { color: var(--lime); }
