:root { --bg: #F5E6C8; --card: #FDFAF4; --ink: #3A2010; --brand: #6B3A2A; --gold: #D4A853; --muted: #8B5E4A; --line: #E4D3B4;
  --red: #b3261e; --orange: #e08a00; --green: #2e7d32; --blue: #1f5fa8; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--brand); color: #FDFAF4; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; color: #FDFAF4; text-decoration: none; font-weight: 800; font-size: 19px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.top nav a { color: #F5E6C8; text-decoration: none; margin-left: 14px; font-weight: 600; font-size: 15px; }
main { max-width: 820px; margin: 0 auto; padding: 16px; }
h1 { font-family: Georgia, serif; color: var(--brand); font-size: 26px; margin: 6px 0 8px; }
h2 { font-family: Georgia, serif; color: var(--brand); font-size: 20px; margin: 24px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card.narrow { max-width: 420px; } .center { text-align: center; margin-left: auto; margin-right: auto; }
.card.inline, li.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pre { white-space: pre-wrap; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
input[type=text], input:not([type]), input[type=email], input[type=password], textarea {
  width: 100%; font: inherit; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.pin { font-size: 28px; letter-spacing: 10px; text-align: center; max-width: 260px; }
.pin.small { font-size: 17px; letter-spacing: 4px; max-width: 160px; padding: 8px; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; margin-top: 12px; }
.btn.big { width: 100%; padding: 16px; font-size: 19px; margin-top: 20px; }
.btn.small { padding: 6px 12px; margin: 0; font-size: 14px; }
.btn:disabled { opacity: .55; }
.b-ok { background: var(--green); } .b-warn { background: var(--orange); } .b-cours { background: var(--blue); } .b-grey { background: #8a7f73; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 8px 0; font-weight: 600; }
.flash.err { background: #fbe2df; color: var(--red); } .flash.ok { background: #e3f1e4; color: var(--green); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.tile { display: block; padding: 22px 18px; border-radius: 16px; text-decoration: none; color: #fff; background: var(--brand); }
.tile.dc { background: #222; } .tile b { display: block; font-size: 20px; } .tile span { opacity: .85; font-size: 14px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.cat input, .u input { position: absolute; opacity: 0; pointer-events: none; }
.cat span { display: block; height: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; font-weight: 600; cursor: pointer; }
.cat i { font-style: normal; font-size: 24px; display: block; } .cat b { display: block; } .cat small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.cat input:checked + span { border-color: var(--brand); background: #F5E6C8; box-shadow: inset 0 0 0 1px var(--brand); }
.urg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.u span { display: block; border: 2px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; cursor: pointer; text-align: center; }
.u small { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }
.u.normale input:checked + span { border-color: var(--brand); background: #F5E6C8; }
.u.urgente input:checked + span { border-color: var(--orange); background: #fdecd0; }
.u.bloquant input:checked + span { border-color: var(--red); background: #fbe2df; }
@media (max-width: 480px) { .urg { grid-template-columns: 1fr; } }
.photos .previews { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pv { position: relative; } .pv img { width: 86px; height: 86px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.pv button { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 17px; line-height: 1; }
label.add { display: inline-block; font-weight: 700; background: var(--brand); color: #fff; padding: 12px 16px; border-radius: 10px; margin: 0 8px 8px 0; cursor: pointer; }
label.add.ghost { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.list { list-style: none; padding: 0; margin: 8px 0; }
.list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.list li a { text-decoration: none; color: inherit; display: block; }
.list li b { display: block; } .list li small { color: var(--muted); }
.row.urg-bloquant { border-left: 5px solid var(--red); } .row.urg-urgente { border-left: 5px solid var(--orange); }
.badge { display: inline-block; font-size: 12px; font-weight: 800; border-radius: 20px; padding: 2px 9px; margin-right: 4px; background: var(--line); color: var(--ink); }
.badge.nouveau { background: var(--brand); color: #fff; } .badge.en_cours { background: var(--blue); color: #fff; }
.badge.repare { background: var(--green); color: #fff; } .badge.remplacer { background: var(--orange); color: #fff; }
.badge.u-bloquant { background: var(--red); color: #fff; } .badge.u-urgente { background: var(--orange); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { text-decoration: none; border: 1.5px solid var(--brand); color: var(--brand); border-radius: 20px; padding: 6px 12px; font-weight: 600; font-size: 15px; }
.chip.small { font-size: 13px; padding: 4px 10px; } .chip.on { background: var(--brand); color: #fff; }
.chip em { font-style: normal; background: var(--red); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 12px; margin-left: 4px; }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.gallery img { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.timeline { list-style: none; padding: 0 0 0 14px; border-left: 3px solid var(--gold); }
.timeline li { margin: 0 0 12px; } .timeline .pre { background: #fff; border-radius: 8px; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; } .actions .btn { margin: 0; }
.big-ico { font-size: 54px; }
