:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  background: #f7f4ee;
  color: #272a23;
  --accent: #345344;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
header { background: #fffdf9; border-bottom: 1px solid #ddd8cb; }
.site-header, main { width: min(1100px, calc(100% - 36px)); margin-inline: auto; }
.site-brand { display: flex; align-items: center; gap: 12px; padding: 18px 0; font-weight: 700; text-decoration: none; }
.logo { width: 40px; height: 40px; object-fit: contain; }
main { padding-bottom: 64px; }
.hero { padding: clamp(32px, 8vw, 90px) 0 32px; }
.banner { display: block; margin-bottom: clamp(24px, 4vw, 48px); max-height: 320px; width: 100%; object-fit: cover; border-radius: 12px; }
h1, h2 { font-family: Georgia, serif; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.2rem, 7vw, 4.2rem); }
h2 { font-size: 1.45rem; }
p { line-height: 1.55; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { border: 1px solid #ddd8cb; border-radius: 12px; overflow: hidden; background: #fffdf9; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--accent); }
.hero > p { max-width: 65ch; font-size: clamp(1.125rem, 2vw, 1.25rem); }
.hero.intro-large > p { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
.card { display: flex; flex-direction: column; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.card-body h2, .card-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-body h2 { -webkit-line-clamp: 2; }
.card-summary { margin: 0; -webkit-line-clamp: 3; }
.card-details { margin-top: auto; }
.card-details p { margin: 0; }
.card-details .status { margin-top: 8px; }
@media (min-width: 540px) {
  .card-body h2 { min-height: 2.24em; }
}
.card img, .placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.placeholder { display: grid; place-items: center; background: #e5e8db; color: #384339; }
.price { font-weight: 700; }
.status { color: var(--accent); }
.status::first-letter { text-transform: uppercase; }
.back { display: inline-block; margin-block: 28px; }
.detail { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 5vw, 52px); }
.detail img { display: block; width: 100%; border-radius: 8px; }
.detail video { display: block; width: 100%; max-height: 520px; margin-top: 16px; border-radius: 8px; background: #222; }
.gallery { display: grid; margin-top: 12px; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.gallery img { aspect-ratio: 1; object-fit: cover; }
.description { white-space: pre-line; }
.button { display: inline-block; margin-top: 12px; padding: 12px 18px; background: var(--accent); color: white; border-radius: 8px; }
@media (max-width: 640px) { .detail { grid-template-columns: 1fr; } }

body { background: var(--page, #f7f4ee); }
body.terracotta { --page: #fcf0e9; --accent: #8a422e; }
body.ardoise { --page: #edf2f6; --accent: #2e4e67; }
.label { color: var(--accent); }
.price del { color: #5a584e; font-weight: 400; }

.hero.has-banner { padding-top: clamp(24px, 4vw, 48px); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.article-info { position: relative; min-width: 0; }
.article-info h1 { font-size: clamp(1.85rem, 4vw, 3rem); overflow-wrap: anywhere; }
.article-info:has(> .editor-icon) h1 { padding-right: 56px; }
.article-info > .editor-icon { position: absolute; top: 0; right: 0; }
.editor-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 8px;
  text-decoration: none;
}
.editor-icon svg { display: block; width: 21px; height: 21px; }
.editor-icon:hover { background: #fffdf9; }
.editor-icon:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.photo-viewer {
  width: min(900px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  border: 0;
  border-radius: 12px;
  background: #222;
  color: #fff;
  padding: 12px;
}
.photo-viewer::backdrop { background: rgb(0 0 0 / 75%); }
.photo-viewer img { width: 100%; height: 72vh; object-fit: contain; touch-action: pan-y; }
.photo-viewer button { font: inherit; min-width: 44px; min-height: 44px; cursor: pointer; }
.photo-viewer [data-close] { display: block; margin-left: auto; }
.photo-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
.photo-controls span { order: -1; }

@media (min-width: 360px) and (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card-body { gap: 8px; padding: 12px; }
  .card-body h2 { font-size: 1.125rem; min-height: 2.24em; }
  .card-summary, .card-details .status { font-size: .875rem; }
  .card-details .status { margin-top: 4px; }
}
