:root {
  --bg: #f4f7f7;
  --card: #ffffff;
  --text: #142025;
  --muted: #69767c;
  --line: #dfe7e8;
  --brand: #006d70;
  --brand-2: #00a87d;
  --brand-soft: #e7f7f2;
  --danger: #ed3b45;
  --shadow: 0 8px 24px rgba(21, 49, 55, .08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 520px; margin: 0 auto; min-height: 100vh; padding: max(18px, env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom)); }
.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.hello h1 { font-size: 1.35rem; margin:0; }
.hello p { margin:.2rem 0 0; color:var(--muted); font-size:.92rem; }
.icon-btn, .round-btn { border:0; background:var(--card); box-shadow:var(--shadow); border-radius:50%; width:44px; height:44px; display:grid; place-items:center; color:var(--text); }
.card { background:var(--card); border:1px solid rgba(0,0,0,.03); border-radius:var(--radius); box-shadow:var(--shadow); }
.summary { padding:18px; display:grid; grid-template-columns:92px 1fr; gap:18px; align-items:center; }
.ring { width:86px; height:86px; border-radius:50%; background:conic-gradient(var(--brand-2) var(--progress), #dfe9e8 0); display:grid; place-items:center; position:relative; }
.ring::after { content:""; width:66px; height:66px; background:#fff; border-radius:50%; position:absolute; }
.ring strong, .ring span { z-index:1; position:absolute; }
.ring strong { margin-top:-8px; font-size:1.35rem; }
.ring span { margin-top:24px; color:var(--muted); font-size:.78rem; }
.summary-copy strong { display:block; font-size:1.05rem; }
.summary-copy span { display:block; color:var(--muted); margin-top:5px; }
.progress { height:8px; background:#e5ecec; border-radius:99px; margin-top:14px; overflow:hidden; }
.progress > div { height:100%; width:var(--width); background:linear-gradient(90deg,var(--brand),var(--brand-2)); border-radius:99px; }
.search { margin:16px 0 20px; display:flex; align-items:center; gap:10px; padding:0 14px; height:54px; }
.search input { width:100%; border:0; outline:0; background:transparent; color:var(--text); }
.section-head { display:flex; align-items:center; justify-content:space-between; margin:18px 2px 10px; }
.section-head h2 { margin:0; font-size:.84rem; letter-spacing:.04em; color:#5d6b71; text-transform:uppercase; }
.section-head button { border:0; background:transparent; color:var(--brand); }
.current { padding:14px; display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,#e8f8f2,#f8fffc); }
.play { width:48px; height:48px; border:0; border-radius:50%; background:var(--brand-2); color:white; font-size:1.1rem; }
.current .meta { flex:1; }
.current .meta strong { display:block; }
.current .meta span { color:var(--muted); font-size:.86rem; }
.stop-mini { width:46px; height:46px; border:0; border-radius:50%; color:white; background:var(--danger); font-size:1.1rem; }
.item { padding:13px; display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; margin-bottom:10px; }
.item-title strong { display:block; }
.item-title span { color:var(--muted); font-size:.86rem; }
.quick { display:flex; gap:7px; align-items:center; }
.quick button { min-width:48px; height:38px; border:0; border-radius:12px; background:#eef6f7; color:#0c5a63; font-weight:700; }
.quick .start { min-width:38px; width:38px; border-radius:50%; background:var(--brand); color:white; }
.primary { width:100%; border:0; border-radius:17px; min-height:56px; color:white; font-weight:800; font-size:1rem; background:linear-gradient(135deg,var(--brand),#007c78); box-shadow:0 10px 22px rgba(0,109,112,.22); }
.primary:disabled { opacity:.5; cursor:not-allowed; }
.bottom-nav { position:fixed; left:50%; transform:translateX(-50%); bottom:0; width:min(520px,100%); height:78px; padding-bottom:env(safe-area-inset-bottom); display:flex; background:rgba(255,255,255,.96); border-top:1px solid var(--line); backdrop-filter:blur(12px); }
.bottom-nav button { flex:1; border:0; background:transparent; color:var(--muted); font-size:.76rem; }
.bottom-nav .active { color:var(--brand); font-weight:800; }
.screen-title { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.screen-title h1 { flex:1; margin:0; text-align:center; font-size:1.15rem; }
.tabs { display:flex; gap:6px; overflow:auto; margin-bottom:16px; }
.tabs button { border:0; border-radius:999px; background:#edf2f2; padding:9px 14px; color:var(--muted); }
.tabs .active { background:var(--brand-soft); color:var(--brand); font-weight:800; }
.result-section { margin-top:18px; }
.result-section h3 { color:var(--muted); font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; margin:0 0 8px; }
.result { padding:14px; margin-bottom:9px; display:flex; gap:12px; align-items:center; }
.badge { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; background:#edf5f5; font-size:1.2rem; }
.result .copy { flex:1; }
.result strong { display:block; }
.result span { color:var(--muted); font-size:.84rem; }
.result.selected { background:#eaf4ff; border-color:#cde0f6; }
.timer-card { padding:16px; display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,#e8f8f2,#f8fffc); }
.timer-card .copy { flex:1; }
.timer-card strong { display:block; }
.timer-card span { color:var(--muted); }
.big-timer { width:220px; height:220px; margin:28px auto 18px; border-radius:50%; background:conic-gradient(var(--brand-2) 78%, #c8f0e5 0); display:grid; place-items:center; box-shadow:var(--shadow); }
.big-timer::before { content:""; width:190px; height:190px; background:var(--card); border-radius:50%; position:absolute; }
.big-timer .time { z-index:1; text-align:center; }
.big-timer strong { display:block; font-size:2.8rem; }
.big-timer span { color:var(--muted); }
.timer-actions { display:flex; justify-content:center; gap:46px; margin:10px 0 24px; }
.timer-action { text-align:center; }
.timer-action button { width:64px; height:64px; border:0; border-radius:50%; box-shadow:var(--shadow); font-size:1.4rem; }
.timer-action .stop { background:var(--danger); color:#fff; }
.timer-action span { display:block; margin-top:7px; font-size:.86rem; }
.field { padding:16px; margin-bottom:14px; }
.field label { display:block; font-size:.86rem; margin-bottom:8px; color:var(--muted); }
.field textarea, .field input { width:100%; border:1px solid var(--line); border-radius:13px; padding:12px; outline:0; background:#fff; }
.material-placeholder { display:flex; align-items:center; gap:12px; padding:16px; margin-bottom:18px; opacity:.8; }
.material-placeholder div { flex:1; }
.material-placeholder strong { display:block; }
.material-placeholder span { color:var(--muted); font-size:.82rem; }
.toast { position:fixed; left:50%; bottom:94px; transform:translate(-50%,20px); background:#17363a; color:#fff; padding:12px 16px; border-radius:14px; opacity:0; pointer-events:none; transition:.25s; z-index:20; white-space:nowrap; }
.toast.show { opacity:1; transform:translate(-50%,0); }
.empty { text-align:center; color:var(--muted); padding:30px 12px; }
@media (max-width: 420px) {
  .app-shell { padding-left:12px; padding-right:12px; }
  .summary { grid-template-columns:80px 1fr; gap:12px; }
  .ring { width:76px; height:76px; }
  .ring::after { width:58px; height:58px; }
  .quick button { min-width:43px; padding:0 8px; }
}

/* ---------- v0.2 ---------- */
.top-actions { display:flex; align-items:center; gap:8px; }
.pill { border:0; border-radius:999px; padding:6px 10px; font-size:.74rem; font-weight:700; white-space:nowrap; }
.pill.ok { background:var(--brand-soft); color:var(--brand); }
.pill.sync { background:#eef3ff; color:#2d55a8; }
.pill.pending { background:#fff4dc; color:#8a5a00; cursor:pointer; }
.pill.offline { background:#fde8ea; color:#a1232c; }
.search .placeholder { color:var(--muted); text-align:left; flex:1; }
button.search { width:100%; border:1px solid rgba(0,0,0,.03); font-size:1rem; }
.item.line { width:100%; text-align:left; border:1px solid rgba(0,0,0,.03); color:var(--text); }
.line-right { display:flex; align-items:center; gap:6px; }
.flag { font-size:.85rem; }
.round-spacer { width:44px; height:44px; }
.round-btn:disabled { opacity:.35; cursor:default; }
.screen-title h1 small { display:block; font-size:.8rem; color:var(--muted); font-weight:600; margin-top:2px; }
.result { width:100%; text-align:left; color:var(--text); }
.empty.small { padding:6px 12px; }
.big-timer { position:relative; }
.big-timer.paused { background:conic-gradient(#f0b429 78%, #fdf0d0 0); }
.timer-action button { background:var(--card); color:var(--text); }
.hint { color:var(--muted); font-size:.84rem; text-align:center; }
.link { border:0; background:transparent; color:var(--brand); text-decoration:underline; padding:0; font-size:inherit; }
.link.danger, .danger { color:var(--danger); }
.error { color:var(--danger); background:#fde8ea; border-radius:12px; padding:10px 12px; }
.notice { background:#f3f6f6; border-radius:12px; padding:10px 12px; }
.ro-value { font-size:1.3rem; font-weight:800; }

/* connexion */
.login { min-height:80vh; display:flex; flex-direction:column; justify-content:center; text-align:center; gap:6px; }
.login img { margin:0 auto 6px; border-radius:18px; }
.login h1 { margin:0; }
.login p { margin:0 0 12px; color:var(--muted); }
.login-form { display:flex; flex-direction:column; gap:10px; text-align:left; margin-top:12px; }
.login-form input { height:52px; border:1px solid var(--line); border-radius:14px; padding:0 14px; font-size:1rem; background:#fff; }
.as-link { display:grid; place-items:center; text-decoration:none; margin-top:12px; }

/* feuille du bas */
body.sheet-open { overflow:hidden; }
.sheet-backdrop { position:fixed; inset:0; background:rgba(10,30,34,.35); z-index:30; }
.sheet { position:fixed; left:50%; bottom:0; transform:translateX(-50%); width:min(520px,100%); max-height:90vh; overflow:auto;
  background:var(--card); border-radius:24px 24px 0 0; padding:18px 16px calc(18px + env(safe-area-inset-bottom)); z-index:31;
  box-shadow:0 -10px 30px rgba(0,0,0,.15); display:flex; flex-direction:column; gap:12px; }
.sheet-head { display:flex; align-items:flex-start; gap:12px; }
.sheet-head > div { flex:1; }
.sheet-head strong { display:block; font-size:1.05rem; }
.sheet-head span { color:var(--muted); font-size:.86rem; }
.stepper { display:flex; align-items:center; justify-content:center; gap:22px; margin:6px 0; }
.stepper button { width:58px; height:58px; border-radius:50%; border:0; background:#eef6f7; color:#0c5a63; font-size:1.6rem; font-weight:700; }
.stepper output { min-width:110px; text-align:center; font-size:2.2rem; font-weight:800; }
.chips { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.chips.scroll { flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; padding-bottom:2px; }
.chip { border:0; border-radius:999px; background:#edf2f2; padding:9px 14px; color:var(--text); white-space:nowrap; }
.chip.active { background:var(--brand); color:#fff; font-weight:700; }
.field-label { font-size:.86rem; color:var(--muted); }
.sheet textarea { width:100%; border:1px solid var(--line); border-radius:13px; padding:12px; background:#fff; resize:vertical; }
.sheet-actions { display:grid; grid-template-columns:1fr 2fr; gap:10px; }
.secondary { border:1px solid var(--line); background:#fff; border-radius:17px; min-height:56px; font-weight:700; color:var(--text); }
.secondary.danger { color:var(--danger); border-color:#f6c9cd; }
.bottom-nav button span { display:block; font-size:1.2rem; }
.intervention-cta { background:linear-gradient(135deg,#fff8e8,#fffdf6); border-color:#f3e2b8; }
.field input[type=text] { width:100%; border:1px solid var(--line); border-radius:13px; padding:12px; outline:0; background:#fff; font-size:1rem; }
.timer-card .link { white-space:nowrap; }
.sheet-actions + .hint { margin-top:10px; }
.sub-title { color:var(--muted); font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; margin:16px 0 8px; }
.new-inter { border:1px dashed #b9d9d4; background:#f6fbfa; }
.new-inter .badge { background:var(--brand-soft); color:var(--brand); font-weight:800; }
.notice code { font-size:.8rem; }
.check { display:flex; align-items:flex-start; gap:10px; margin-top:12px; font-size:.92rem; color:var(--text); cursor:pointer; }
.check input { width:22px; height:22px; margin:0; accent-color:var(--brand); flex:none; }
em.nb { color:#8a5a00; font-style:normal; font-weight:700; }
.key-banner { width:100%; display:flex; align-items:center; gap:12px; padding:12px 14px; margin-bottom:14px; text-align:left; color:var(--text); background:linear-gradient(135deg,#fff8e8,#fffdf6); border-color:#f3e2b8; }
.key-banner .copy { flex:1; }
.key-banner strong { display:block; }
.key-banner span span { color:var(--muted); font-size:.85rem; }
.steps ol { padding-left:20px; margin:8px 0 14px; line-height:1.5; }
.steps input { width:100%; height:50px; border:1px solid var(--line); border-radius:13px; padding:0 12px; font-family:ui-monospace,monospace; margin:6px 0 12px; }
.hint.left { text-align:left; }

/* Récents : liste compacte */
.recent-list { list-style:none; margin:0 0 16px; padding:4px 0; }
.recent + .recent { border-top:1px solid var(--line); }
.recent-row { display:flex; align-items:center; gap:8px; padding:0 10px 0 4px; }
.recent-main { flex:1; min-width:0; border:0; background:transparent; text-align:left; padding:10px 8px; color:var(--text); border-radius:12px; }
.recent-main strong, .recent-main span { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.recent-main strong { font-size:.95rem; }
.recent-main span { color:var(--muted); font-size:.8rem; margin-top:2px; }
.recent-main:active { background:#f1f6f6; }
.recent-play { flex:none; width:40px; height:40px; border:0; border-radius:50%; background:var(--brand); color:#fff; font-size:.95rem; }
.recent.open { background:#f6fbfa; }
.recent-quick { display:flex; gap:6px; padding:0 12px 12px; flex-wrap:wrap; }
.recent-quick button { flex:1; min-width:52px; height:40px; border:0; border-radius:12px; background:#e6f3f3; color:#0c5a63; font-weight:800; }
.recent-quick .more { background:#fff; border:1px solid var(--line); color:var(--text); font-weight:600; }
