/* Carnet RH : feuille de style (reprise de la maquette validée le 01/12/2026). Police Figtree hébergée sur le PC. */
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("fonts/figtree-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #EEF5EC; --surf: #FAFCF9; --ink: #15241B; --muted: #4F6355; --line: #E3ECE2; --border: #C9DBC8;
  --accent: #2F7A47; --on-accent: #FAFCF9; --tint: #DCEFDD; --tint-ink: #1F5A33;
  --neutral: #E6EEE5; --neutral-ink: #42564A; --wave: #5DB574;
  --rec: #B3261E; --on-rec: #FFFBFA; --rec-tint: #FBE8E6; --warn: #7A4F00; --warn-tint: #FBEFD5;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html { box-sizing: border-box; height: 100%; }
*, *::before, *::after { box-sizing: inherit; }
body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: relative; height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
@media (min-width: 520px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: enter .32s cubic-bezier(.22, 1, .36, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view, .toast { animation: none !important; } .progress > i, .wave i { transition: none !important; } }

.top { padding: 18px 20px 12px; display: flex; flex-direction: column; gap: 12px; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 18px; }
.bar { padding: 12px 16px 14px; border-top: 1px solid var(--line); background: var(--surf); display: flex; flex-direction: column; gap: 8px; }
.brandline { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: var(--on-accent); flex: none; }
h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h2 { margin: 0; }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--tint-ink); }
.sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.gtitle { margin: 0 4px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.section { display: flex; flex-direction: column; gap: 8px; }
.box { background: var(--surf); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.box h2 { font-size: 16px; font-weight: 800; }
.list { background: var(--surf); border-radius: 18px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.list > .row:first-child, .list > :first-child { border-top: 0; }
button.row:active { background: var(--neutral); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--tint-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex: none; }
.time { width: 44px; flex: none; font-size: 15px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.name { font-size: 16px; font-weight: 700; }
.meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--muted); flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.ok { background: var(--tint); color: var(--tint-ink); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.rec { background: var(--rec-tint); color: var(--rec); }
.chip.neutral { background: var(--neutral); color: var(--neutral-ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--tint); color: var(--tint-ink); font-size: 13px; font-weight: 700; }
.demo { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 14px; background: var(--warn-tint); color: var(--warn); font-size: 13px; font-weight: 600; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px; border: 0; border-radius: 27px; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 800; transition: transform .12s ease-out; }
.btn:active { transform: scale(.97); }
.btn.rec { background: var(--rec); color: var(--on-rec); }
.btn.ghost { background: var(--surf); color: var(--ink); border: 1px solid var(--border); }
.btn:disabled { background: var(--neutral); color: var(--muted); cursor: not-allowed; transform: none; }
.btn.small { min-height: 44px; font-size: 14px; font-weight: 700; padding: 0 16px; }
.btnrow { display: flex; gap: 10px; }
.btnrow > * { flex: 1; }
.link { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 700; color: var(--tint-ink); text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -6px; padding: 0 10px 0 4px; border: 0; background: none; font-size: 15px; font-weight: 700; color: var(--tint-ink); }

.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; pointer-events: none; color: var(--muted); }
.search input { width: 100%; min-height: 46px; padding: 0 14px 0 42px; border: 1px solid var(--border); border-radius: 23px; background: var(--surf); font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
textarea.input { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surf); font-size: 16px; line-height: 1.5; color: var(--ink); resize: none; }
select.input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surf); font-size: 15px; font-weight: 600; color: var(--ink); }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
mark { background: var(--warn-tint); color: var(--ink); border-radius: 3px; padding: 0 2px; }

.next { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 20px; border: 2px solid var(--accent); background: var(--surf); text-align: left; }
.next .big { width: 52px; height: 52px; border-radius: 16px; background: var(--tint); color: var(--tint-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.progress { height: 6px; border-radius: 3px; background: var(--neutral); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--wave); transition: width .4s ease-out; }

.nav { display: flex; border-top: 1px solid var(--line); background: var(--surf); padding: 4px 8px 8px; }
.nav button { flex: 1; min-height: 58px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.nav .ico { width: 56px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.nav [aria-current="page"] { color: var(--tint-ink); }
.nav [aria-current="page"] .ico { background: var(--tint); }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--surf); color: var(--ink); font-size: 14px; font-weight: 700; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: flex; padding: 4px; border-radius: 22px; background: var(--neutral); }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 18px; background: none; font-size: 14px; font-weight: 700; color: var(--neutral-ink); }
.seg button[aria-selected="true"] { background: var(--surf); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .14); }

.note { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--neutral); font-size: 13px; line-height: 1.5; color: var(--neutral-ink); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fact { background: var(--surf); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fact dt { font-size: 12px; color: var(--muted); }
.fact dd { margin: 0; font-size: 15px; font-weight: 700; }
.points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.points li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; }
.ts { flex: none; min-width: 56px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 16px; background: var(--tint); color: var(--tint-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tr { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surf); transition: box-shadow .2s; }
.tr.me { background: var(--neutral); }
.tr.now { box-shadow: inset 0 0 0 2px var(--accent); }
.tr .who { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; color: var(--tint-ink); }
.tr.me .who { color: var(--muted); }
.tr p { margin: 0; font-size: 15px; line-height: 1.55; }

.player { display: flex; align-items: center; gap: 12px; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: var(--surf); }
.play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex: none; }
.track { position: relative; height: 28px; display: flex; align-items: center; cursor: pointer; }
.track .rail { position: absolute; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--neutral); }
.track .fill { position: absolute; left: 0; height: 6px; border-radius: 3px; background: var(--wave); }
.track .mk { position: absolute; width: 3px; height: 16px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.ptime { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.timer { font-size: 64px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.wave { display: flex; align-items: center; gap: 3px; width: 100%; height: 64px; }
.wave i { flex: 1 1 0; min-width: 2px; height: 4px; border-radius: 2px; background: var(--wave); transition: height .14s ease-out; }
blockquote { margin: 0; padding: 14px; border-radius: 12px; background: var(--neutral); font-size: 15px; line-height: 1.55; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; background: var(--neutral); color: var(--muted); }
.steps .done .n { background: var(--accent); color: var(--on-accent); }
.steps .run .n { background: var(--warn-tint); color: var(--warn); }
.steps .todo span:nth-child(2) { color: var(--muted); }
.steps .st { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }

.card { display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 16px; border-radius: 18px; border: 0; background: var(--surf); text-align: left; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mini { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--bg); min-width: 0; }
.mini span:first-child { font-size: 11px; color: var(--muted); }
.mini span:last-child { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wchip { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--surf); color: var(--ink); font-size: 14px; font-weight: 700; }
.wchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hit { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 14px; border-radius: 16px; border: 0; background: var(--surf); text-align: left; }
.hit .h { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; }
.hit p { margin: 0; font-size: 15px; line-height: 1.5; }

.set { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border-top: 1px solid var(--line); }
.list > .set:first-child { border-top: 0; }
label.set { cursor: pointer; }
.set .grow span:first-child { font-size: 15px; font-weight: 700; }
.set .grow span:last-child { font-size: 13px; color: var(--muted); line-height: 1.4; }
.set input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.themes { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.themes::-webkit-scrollbar { display: none; }
.theme { flex: none; width: 104px; padding: 6px; border-radius: 18px; border: 2px solid var(--line); background: var(--surf); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.theme[aria-checked="true"] { border-color: var(--accent); }
.theme .pv { height: 72px; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.theme .pv b { flex: 1; border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.theme .pv i { display: block; height: 5px; border-radius: 3px; }
.theme .pv u { display: block; height: 12px; border-radius: 6px; }
.theme .nm { padding: 0 4px 2px; font-size: 13px; font-weight: 700; }

.cv { background: var(--surf); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.cv .lbl { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 5px 10px; border-radius: 12px; background: var(--neutral); color: var(--neutral-ink); font-size: 13px; }

.qr { padding: 10px; background: #FBFDFC; border-radius: 10px; display: grid; grid-template-columns: repeat(21, 6px); grid-auto-rows: 6px; flex: none; }
.qr i { display: block; }
.qr i.on { background: #111A14; }

.intro { flex: 1; min-height: 0; overflow-y: auto; padding: 32px 24px 24px; display: flex; flex-direction: column; gap: 28px; }
.intro .hero { display: flex; flex-direction: column; gap: 14px; }
.intro .logo { width: 56px; height: 56px; border-radius: 16px; }
.intro h1 { font-size: 34px; }
.intro .lead { margin: 0; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 30ch; }
.how { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.how li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--surf); }
.how .n { width: 32px; height: 32px; border-radius: 10px; background: var(--tint); color: var(--tint-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.how strong { display: block; font-size: 16px; margin-bottom: 2px; }
.how span { font-size: 14px; line-height: 1.5; color: var(--muted); }

.toast { position: absolute; left: 16px; right: 16px; bottom: 96px; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgb(0 0 0 / .22); animation: toast .3s cubic-bezier(.22, 1, .36, 1); }
.toast button { margin-left: auto; min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 800; flex: none; }
[hidden] { display: none !important; }
@keyframes toast { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.empty { padding: 20px; text-align: center; font-size: 15px; color: var(--muted); }

/* --- Ajouts de la vraie version ------------------------------------------- */
body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl2 { font-size: 14px; font-weight: 700; }
input.input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surf); font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
input.input:focus, select.input:focus, textarea.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--tint); }
.err { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--rec-tint); color: var(--rec); font-size: 14px; font-weight: 600; }
.daynav { display: flex; align-items: center; gap: 4px; margin-left: -10px; }
.daynav button { width: 40px; height: 40px; border: 0; border-radius: 20px; background: none; color: var(--tint-ink); display: flex; align-items: center; justify-content: center; }
.daynav button:active { background: var(--tint); }
.pill.off { background: var(--rec-tint); color: var(--rec); }
.pill.wait { background: var(--warn-tint); color: var(--warn); }
.cvimg { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.danger { color: var(--rec) !important; }
.login { flex: 1; overflow-y: auto; padding: 48px 24px 24px; display: flex; flex-direction: column; gap: 24px; }
.login .logo { width: 56px; height: 56px; border-radius: 16px; }
.pc-page { max-width: 760px; margin: 0 auto; padding: 32px 24px 48px; display: flex; flex-direction: column; gap: 20px; }
.pc-page .qrbox { background: #fff; border-radius: 16px; padding: 12px; width: max-content; }
.pc-page .qrbox svg { display: block; width: 220px; height: 220px; }
.pc-page code { font-size: 13px; background: var(--neutral); padding: 2px 6px; border-radius: 6px; }
.app.pc-wide { max-width: none; height: auto; min-height: 100%; overflow: visible; }

/* --- Calendrier ------------------------------------------------------------ */
.calnav { display: flex; align-items: center; gap: 4px; margin-left: -10px; }
.calnav > button:not(.link) { width: 44px; height: 44px; border: 0; border-radius: 22px; background: none; color: var(--tint-ink); display: flex; align-items: center; justify-content: center; }
.calnav > button:not(.link):active { background: var(--tint); }
.calmonth { min-width: 9.5em; text-align: center; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.calgrid { background: var(--surf); border-radius: 18px; padding: 10px 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.calwk, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.calwk span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 2px 0 6px; }
.cal button { min-height: 52px; padding: 6px 0; border: 0; border-radius: 14px; background: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; transition: background-color .15s ease-out, transform .12s ease-out; }
.cal button:active { transform: scale(.94); }
.cal .d { width: 30px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 13px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tint); color: var(--tint-ink); font-size: 11px; font-weight: 800; line-height: 18px; font-variant-numeric: tabular-nums; }
.cal .n.busy { background: var(--warn-tint); color: var(--warn); }
.cal .n0 { height: 18px; }
.cal .past .d { color: var(--muted); font-weight: 500; }
.cal [aria-current="date"] .d { color: var(--accent); font-weight: 800; box-shadow: inset 0 0 0 2px var(--accent); }
.cal [aria-pressed="true"] { background: var(--ink); }
.cal [aria-pressed="true"] .d { color: var(--bg); box-shadow: none; }
.cal [aria-pressed="true"] .n { background: var(--bg); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .cal button { transition: none; } .cal button:active { transform: none; } }
