/* Public listing pages (M21): tokens of docs/05-charte-graphique.md, PEB colours of the prototype (pA to pG). */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(Inter-Regular.ttf) format("truetype"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(Inter-SemiBold.ttf) format("truetype"); }
@font-face { font-family: Outfit; font-weight: 600; font-display: swap; src: url(Outfit-SemiBold.ttf) format("truetype"); }

:root {
  --primary: #3F6AE0; --primary-hover: #2E55C4; --on-primary: #FFFFFF; --primary-lighter: #D7E3FF; --on-primary-lighter: #3F6AE0;
  --header: #E7EBF6; --sheet: #F8F9FD; --surface: #FFFFFF; --title: #111827; --body: #1F2937; --secondary: #6B7280;
  --light: #9CA3AF; --border: #E2E6F0; --field-border: #DDE2EE; --neutral: #F3F5FA; --shadow: rgba(15, 23, 42, .08);
  --peb-a: #15803D; --peb-b: #2F7D22; --peb-c: #9DBF2E; --peb-d: #F2C318; --peb-e: #F29A16; --peb-f: #C2410C; --peb-g: #B91C1C;
  --peb-dark-text: #1F2937;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary-lighter: #26365F; --on-primary-lighter: #C9D8FF; --header: #161B27; --sheet: #0F131C; --surface: #1B2130;
    --title: #F3F4F6; --body: #E5E7EB; --secondary: #A7B0C0; --light: #8892A6; --border: #2A3245; --field-border: #323B50;
    --neutral: #1F2636; --shadow: rgba(0, 0, 0, .35); --on-primary: #FFFFFF;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sheet); color: var(--body); font: 400 14px/20px Inter, system-ui, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: Outfit, Inter, system-ui, sans-serif; font-weight: 600; color: var(--title); margin: 0; }
h1 { font-size: 28px; line-height: 34px; }
h2 { font-size: 20px; line-height: 28px; }
h3 { font-size: 18px; line-height: 22px; }

.top { background: var(--header); padding: 20px 16px 72px; }
.wrap { max-width: 1080px; margin: 0 auto; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 18px Outfit, Inter, sans-serif; color: var(--title); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.langs { display: flex; gap: 4px; }
.langs a { padding: 6px 10px; border-radius: 16px; color: var(--secondary); font-size: 13px; text-transform: uppercase; }
.langs a.on { background: var(--surface); color: var(--primary); }
.hero { margin-top: 28px; }
.hero p { color: var(--secondary); margin: 8px 0 0; max-width: 560px; }

.sheet { background: var(--sheet); border-radius: 40px 40px 0 0; margin-top: -48px; padding: 24px 16px 48px; }
.search { display: grid; grid-template-columns: 1fr; gap: 10px; background: var(--surface); border-radius: 16px; padding: 14px;
  box-shadow: 0 4px 16px var(--shadow); }
@media (min-width: 760px) { .search { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; align-items: end; } }
.search label { display: block; font-size: 12px; color: var(--secondary); margin-bottom: 4px; }
.search input, .search select { width: 100%; height: 46px; border: 1px solid var(--field-border); border-radius: 23px; padding: 0 16px;
  font: 400 15px Inter, sans-serif; color: var(--body); background: var(--surface); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 24px; border: 0;
  background: var(--primary); color: var(--on-primary); font: 600 15px Inter, sans-serif; cursor: pointer; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn.out { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.count { color: var(--secondary); margin: 20px 0 12px; font-size: 13px; }

.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card { background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px var(--shadow); color: var(--body); display: block; }
.card:hover { text-decoration: none; transform: translateY(-1px); }
.photo { position: relative; aspect-ratio: 16 / 9; background: var(--neutral); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.price { position: absolute; left: 12px; bottom: 12px; background: var(--surface); border-radius: 12px; padding: 4px 10px;
  font: 600 16px Outfit, Inter, sans-serif; color: var(--title); }
.price small { font: 400 12px Inter, sans-serif; color: var(--secondary); }
.card .body { padding: 14px 14px 16px; }
.card h3 { margin-bottom: 4px; }
.muted { color: var(--secondary); font-size: 13px; }
.meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.meta .right { margin-left: auto; color: var(--secondary); font-size: 12px; }
.chip { display: inline-block; background: var(--neutral); color: var(--secondary); border-radius: 10px; padding: 2px 8px; font-size: 12px; }
.peb { display: inline-block; border-radius: 6px; padding: 2px 8px; font: 600 12px Inter, sans-serif; color: #FFFFFF; }
.peb-A { background: var(--peb-a); } .peb-B { background: var(--peb-b); } .peb-C { background: var(--peb-c); color: var(--peb-dark-text); }
.peb-D { background: var(--peb-d); color: var(--peb-dark-text); } .peb-E { background: var(--peb-e); color: var(--peb-dark-text); }
.peb-F { background: var(--peb-f); } .peb-G { background: var(--peb-g); }
.empty { text-align: center; padding: 48px 16px; color: var(--secondary); }
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

/* Sheet of a listing */
.gallery { display: grid; gap: 8px; }
.gallery .main { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--neutral); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .tag { position: absolute; right: 12px; bottom: 12px; background: rgba(17, 24, 39, .7); color: #FFFFFF; border-radius: 10px;
  padding: 2px 8px; font-size: 12px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; }
.thumbs a { flex: 0 0 72px; height: 56px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; }
.thumbs a:focus, .thumbs a:hover { border-color: var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .layout { grid-template-columns: 3fr 2fr; align-items: start; } .aside { position: sticky; top: 16px; } }
.big-price { font: 600 30px/36px Outfit, Inter, sans-serif; color: var(--title); }
.big-price small { font: 400 15px Inter, sans-serif; color: var(--secondary); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.tile { background: var(--surface); border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 8px var(--shadow); }
.tile b { display: block; font: 600 16px Outfit, Inter, sans-serif; color: var(--title); }
.tile span { font-size: 12px; color: var(--secondary); }
.box { background: var(--surface); border-radius: 16px; padding: 16px; box-shadow: 0 4px 16px var(--shadow); margin-bottom: 16px; }
.box p { margin: 8px 0 0; white-space: pre-line; }
.label { color: var(--secondary); font-size: 13px; margin: 20px 0 8px; }
.rows { background: var(--surface); border-radius: 16px; padding: 0 16px; box-shadow: 0 4px 16px var(--shadow); }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rows div:last-child { border-bottom: 0; }
.rows span:last-child { color: var(--secondary); text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { background: var(--neutral); border-radius: 14px; padding: 6px 12px; font-size: 13px; }
.owner { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--primary-lighter); color: var(--on-primary-lighter);
  display: flex; align-items: center; justify-content: center; font-weight: 600; }
.contact { width: 100%; margin-top: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--secondary); margin-bottom: 8px; }
footer { color: var(--light); font-size: 12px; text-align: center; padding: 24px 16px 40px; }
footer a { color: var(--secondary); }
.aside h1.title { margin-top: 14px; }
