:root {
  --bg: #f3efe4; --paper: #fffdf8; --ink: #16352e; --muted: #5d6c64;
  --line: #ddd4c2; --green: #1f4a40; --gold: #e8c46a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Georgia, "Times New Roman", serif; background: var(--bg); color: var(--ink); }
a { color: var(--green); }
.admin-bar {
  background: #16352e; color: #f6f1e6; display: flex; gap: .7rem; align-items: center;
  flex-wrap: wrap; padding: .55rem 1rem; font-family: "Segoe UI", system-ui, sans-serif; font-size: .9rem;
}
.admin-bar button {
  font: 650 .85rem "Segoe UI", system-ui, sans-serif; border: 0; border-radius: 999px;
  padding: .4rem .8rem; cursor: pointer; background: var(--gold); color: #16352e;
}
header { background: #fffef9; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.bar { max-width: 1120px; margin: 0 auto; padding: .8rem 1.1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; gap: .7rem; align-items: center; text-decoration: none; color: inherit; line-height: 1.05; }
.logo { width: 42px; height: 42px; fill: none; stroke: var(--green); stroke-width: 2.2; flex: 0 0 auto; }
.brand b { display: block; font-size: 1.2rem; }
.brand small { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-family: "Segoe UI", system-ui, sans-serif; }
.nav > a { text-decoration: none; padding: .4rem .65rem; color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 .95rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font: 650 .92rem "Segoe UI", system-ui, sans-serif; cursor: pointer; background: var(--paper); color: var(--ink); }
.btn.solid { background: var(--green); color: #f6f1e6; border-color: var(--green); }
.btn.gold { background: var(--gold); color: #16352e; border-color: var(--gold); }
.btn.ghost { background: transparent; }
.btn.ghost-light { background: transparent; color: #f6f1e6; border-color: rgba(255,255,255,.35); }
.btn.wide { width: 100%; margin-top: .55rem; }
main { max-width: 1120px; margin: 0 auto; padding: 1.2rem 1.1rem 2.4rem; }
.hero { background: var(--green); color: #f6f1e6; border-radius: 22px; padding: 1.7rem 1.5rem; }
.hero .k, .panel .k { letter-spacing: .08em; text-transform: uppercase; font-size: .74rem; font-family: "Segoe UI", system-ui, sans-serif; opacity: .85; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .35rem 0 .5rem; font-weight: 600; }
.hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin: 1.1rem 0 .4rem; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.filters button { font-family: "Segoe UI", system-ui, sans-serif; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .45rem .85rem; cursor: pointer; }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#search { flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: 999px; padding: .65rem 1rem; font: 1rem "Segoe UI", system-ui, sans-serif; background: var(--paper); }
.count { color: var(--muted); font-family: "Segoe UI", system-ui, sans-serif; font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22,53,46,.08); }
.thumb { height: 148px; display: grid; place-items: center; font-size: 2.6rem; color: #fff; }
.tag { display: inline-block; font-family: "Segoe UI", system-ui, sans-serif; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; background: #efe7d4; padding: .15rem .45rem; border-radius: 999px; }
.body { padding: .95rem 1rem 1.05rem; }
.card h2 { margin: .35rem 0 .3rem; font-size: 1.12rem; }
.meta, .desc { color: var(--muted); font-family: "Segoe UI", system-ui, sans-serif; font-size: .88rem; }
.price { font-weight: 700; margin-top: .45rem; font-family: "Segoe UI", system-ui, sans-serif; }
.detail { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-top: .7rem; }
.detail .thumb { height: 220px; font-size: 4rem; }
.detail .body { padding: 1.2rem 1.3rem 1.5rem; }
.detail h1 { margin: .4rem 0; }
.back { font-family: "Segoe UI", system-ui, sans-serif; background: none; border: 0; cursor: pointer; color: var(--green); padding: 0 0 .4rem; }
.panel { max-width: 440px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem; }
.wide-panel { max-width: 640px; }
label { display: block; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 650; font-size: .9rem; margin: .7rem 0 .28rem; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .75rem; font: 1rem "Segoe UI", system-ui, sans-serif; background: #f7f3ea; }
textarea { min-height: 110px; }
.err { color: #8a2430; font-family: "Segoe UI", system-ui, sans-serif; }
.ok { color: #3d5a2a; font-family: "Segoe UI", system-ui, sans-serif; }
.who { font-family: "Segoe UI", system-ui, sans-serif; font-size: .88rem; color: var(--muted); }
.hide { display: none !important; }
[data-edit][contenteditable="true"] { outline: 1px dashed #e8c46a; outline-offset: 3px; cursor: text; }
footer { text-align: center; color: var(--muted); padding: 0 1rem 2rem; font-family: "Segoe UI", system-ui, sans-serif; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: #16352e; color: #f6f1e6; }
.gate-card { max-width: 420px; text-align: center; }
.gate-card h1 { font-size: 2rem; margin: .4rem 0; }
.logo.big { width: 64px; height: 64px; stroke: #e8c46a; fill: none; stroke-width: 2.2; }
.gate-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.gate .btn.ghost { color: #f6f1e6; border-color: rgba(255,255,255,.35); background: transparent; }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
@media (max-width: 700px) { .bar { flex-direction: column; align-items: flex-start; } .nav { margin-left: 0; } }
.thumb.img { padding: 0; }
.thumb.img img { width: 100%; height: 148px; object-fit: cover; display: block; }
.detail .thumb.img img { height: 220px; }
.drop-photo { border: 2px dashed var(--line); border-radius: 12px; padding: 1rem; text-align: center; font-family: "Segoe UI", system-ui, sans-serif; cursor: pointer; background: #f7f3ea; margin: .4rem 0; }
.drop-photo.on { border-color: var(--green); background: #e8efe8; }
#d-photo { margin: .4rem 0 0; }

.thumb.img { background:#16352e; }
.thumb.img img { width:100%; height:148px; object-fit:contain; display:block; background:#16352e; }
.detail .thumb.img img { height:220px; cursor:zoom-in; }
.photo-row { display:flex; gap:.4rem; flex-wrap:wrap; margin:.6rem 0; }
.photo-row img { height:88px; width:88px; object-fit:contain; background:#16352e; border-radius:8px; cursor:zoom-in; }
.photo-preview { display:flex; gap:.4rem; flex-wrap:wrap; margin:.5rem 0; }
.photo-preview .slot { position:relative; }
.photo-preview img { height:88px; width:88px; object-fit:contain; background:#16352e; border-radius:8px; }
.photo-preview .rm { position:absolute; top:-6px; right:-6px; border:0; border-radius:50%; width:22px; height:22px; cursor:pointer; }
.lightbox { position:fixed; inset:0; background:rgba(10,20,16,.92); z-index:40; display:grid; place-items:center; padding:1.2rem; }
.lightbox img { max-width:96vw; max-height:86vh; object-fit:contain; }
.lightbox-x { position:absolute; top:1rem; right:1rem; }

.photo-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin:.4rem 0}
#filter-city,#filter-sort{margin-left:.4rem;padding:.3rem}

.pass-wrap { position: relative; }
.pass-wrap input { width: 100%; padding-right: 2.6rem; }
.eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; }
.detail .desc { font-size: 1.05rem; line-height: 1.55; margin: .8rem 0 1rem; white-space: pre-wrap; }
.badge { display: inline-block; font: 700 .75rem "Segoe UI", system-ui, sans-serif; padding: .2rem .5rem; border-radius: 999px; margin-left: .35rem; }
.badge.reservee { background: #e8c46a; color: #16352e; }
.badge.vendue { background: #8a2430; color: #fff; }
.badge.donnee { background: #3d4a32; color: #fff; }
.btn.on-status { background: #1f4a40; color: #fff; border-color: #1f4a40; }
.cover-pick { outline: 3px solid #e8c46a; }

#d-photo,#d-photo-camera{display:none!important}
