:root { --bg:#f4f6f8; --fg:#1c2733; --muted:#6b7785; --accent:#1769aa; --ok:#1b7f3b; --err:#b00020; --border:#d5dbe1; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--fg); line-height:1.45; }
.topbar { display:flex; justify-content:space-between; align-items:center; background:var(--accent); color:#fff; padding:.6rem 1rem; }
.topbar .brand { color:#fff; font-weight:600; text-decoration:none; font-size:1.1rem; }
.topbar .link { background:none; border:0; color:#fff; cursor:pointer; text-decoration:underline; font-size:.95rem; }
main { max-width:900px; margin:0 auto; padding:1rem; }
h1 { font-size:1.4rem; } h1 small { font-weight:400; color:var(--muted); font-size:.9rem; }
h2 { font-size:1.15rem; margin-top:1.8rem; }
.card { background:#fff; border:1px solid var(--border); border-radius:10px; padding:1rem 1.2rem; margin:1rem 0; }
.card h2 { margin-top:0; }
.card.narrow { max-width:380px; margin:3rem auto; }
.grid3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:.8rem; }
.tile { display:flex; flex-direction:column; gap:.4rem; background:#fff; border:1px solid var(--border); border-radius:10px; padding:1rem; text-decoration:none; color:inherit; }
.tile:hover { border-color:var(--accent); box-shadow:0 2px 8px rgba(0,0,0,.08); }
.tile span { color:var(--accent); font-weight:600; }
label, .label { display:block; font-weight:600; margin:.9rem 0 .3rem; }
label small { font-weight:400; color:var(--muted); }
input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=search], textarea, select {
  width:100%; padding:.65rem .7rem; font:inherit; border:1px solid var(--border); border-radius:8px; background:#fff; }
textarea { resize:vertical; }
input:focus, textarea:focus, select:focus { outline:2px solid var(--accent); border-color:transparent; }
.fixed { padding:.5rem .7rem; background:#eef2f5; border-radius:8px; }
.choices { display:flex; flex-direction:column; gap:.1rem; }
.choices.inline { flex-direction:row; gap:1.5rem; }
.choice { font-weight:400; margin:.2rem 0; display:flex; align-items:center; gap:.5rem; padding:.3rem 0; }
.choice input { width:1.25rem; height:1.25rem; }
.help { color:var(--muted); font-size:.9rem; margin:.1rem 0 .5rem; }
canvas.pad { width:100%; height:auto; border:2px dashed var(--border); border-radius:8px; background:#fff; touch-action:none; cursor:crosshair; display:block; }
canvas.signature { max-width:420px; }
.pad-actions { display:flex; gap:.5rem; margin-top:.4rem; }
.btn { display:inline-block; padding:.65rem 1.1rem; font:inherit; font-weight:600; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--fg); text-decoration:none; cursor:pointer; }
.btn:hover { border-color:var(--accent); }
.btn.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn.danger { color:var(--err); border-color:var(--err); }
.btn.small { padding:.35rem .7rem; font-size:.9rem; margin:0; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.actions { display:flex; flex-wrap:wrap; gap:.6rem; margin:1rem 0; }
.actions.sticky { position:sticky; bottom:0; background:#fff; padding:.7rem 0; border-top:1px solid var(--border); margin-top:1.5rem; }
.flash { padding:.7rem 1rem; border-radius:8px; margin:.6rem 0; }
.flash.ok { background:#e5f5ea; color:var(--ok); } .flash.error { background:#fde8ec; color:var(--err); }
.filters { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:.8rem; } .filters select { width:auto; } .filters input { flex:1; min-width:180px; }
.table-wrap { overflow-x:auto; background:#fff; border:1px solid var(--border); border-radius:10px; }
table { width:100%; border-collapse:collapse; } th, td { text-align:left; padding:.55rem .8rem; border-bottom:1px solid var(--border); white-space:nowrap; }
tbody tr { cursor:pointer; } tbody tr:hover { background:#f0f6fb; }
.badge { display:inline-block; padding:.1rem .55rem; border-radius:99px; background:#e6eaee; font-size:.8rem; }
.badge.ok { background:#e5f5ea; color:var(--ok); } .badge.err { background:#fde8ec; color:var(--err); }
.muted { color:var(--muted); }
.history { padding-left:1.1rem; }
iframe.preview { width:100%; height:75vh; border:1px solid var(--border); border-radius:8px; }
@media (max-width:600px) { main { padding:.6rem; } .btn { flex:1 1 auto; text-align:center; } }
.topbar .navlink { color:#fff; margin-left:auto; margin-right:1rem; text-decoration:none; }
#autre { margin-top:.5rem; }
