/* Les Dinedourelles — galerie en ligne : grand blanc, titres serif fins,
   interface sans-serif nette, une seule couleur d'accent (terre de Sienne). */
:root {
  --paper: #ffffff;
  --soft: #f6f5f2;
  --shade: #ecebe7;
  --ink: #141414;
  --muted: #6b6b6b;
  --line: #e7e5e0;
  --accent: #9c4a2a;
  --accent-soft: #f6ece6;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
body { background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.promo { padding: 9px 16px; background: var(--ink); color: #fff; text-align: center; font-size: 13px; }
.promo b { color: #f0c7b3; font-weight: 600; }

/* ---------- En-tête ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; padding-block: 16px; }
.logo { font: 400 30px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.logo i { color: var(--accent); }
.search { display: flex; align-items: center; gap: 10px; justify-self: center; width: 100%; max-width: 560px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); transition: border-color .2s ease, background-color .2s ease; }
.search:focus-within { border-color: var(--ink); background: var(--paper); }
.search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search svg, .icon-link svg, .heart svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.search svg { color: var(--muted); }
.icons { display: flex; align-items: center; gap: 20px; }
.icon-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.icon-link:hover { color: var(--accent); }
#favBtn[aria-pressed="true"] { color: var(--accent); }
#favBtn[aria-pressed="true"] svg { fill: var(--accent); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; }
.lang { min-width: 38px; height: 32px; justify-content: center; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.nav { display: flex; gap: 28px; padding-bottom: 12px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: 14px; font-weight: 500; }
.nav button { padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.nav button:hover { color: var(--accent); }
.nav button[aria-pressed="true"] { border-color: var(--ink); }
.nav button.hot { color: var(--accent); }

/* ---------- Ouverture ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 540px; background: var(--soft); }
.hero-img { position: relative; overflow: hidden; background: var(--shade); }
.hero-img button { position: absolute; inset: 0; width: 100%; opacity: 0; transition: opacity .9s ease; }
.hero-img button.on { opacity: 1; z-index: 1; }
.hero-img img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.03); transition: transform 6s ease; }
.hero-img button.on img { transform: scale(1); }
.hero-img .cap { position: absolute; left: 20px; bottom: 18px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 600; max-width: calc(100% - 40px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-text { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 56px clamp(28px, 5vw, 80px); }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font: 400 clamp(44px, 5vw, 72px)/1.02 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.hero h1 i { color: var(--accent); }
.hero p { max-width: 44ch; color: var(--muted); font-size: 17px; }
.cta { display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; transition: background-color .2s ease, color .2s ease; }
.cta:hover { background: var(--accent); }
.cta.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cta.ghost:hover { background: var(--ink); color: #fff; }
.cta.wide { width: 100%; }
.dots { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dots span { width: 28px; height: 2px; background: var(--line); transition: background-color .3s ease; }
.dots span.on { background: var(--ink); }

/* ---------- Sections ---------- */
.block { padding-block: 72px 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
h2 { font: 400 clamp(32px, 3.4vw, 46px)/1.05 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.count { margin-top: 6px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.cat { text-align: left; }
.cat .ph { aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--shade); }
.cat .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat:hover .ph img { transform: scale(1.05); }
.cat h3 { margin-top: 14px; font-size: 17px; font-weight: 600; }
.cat p { color: var(--muted); font-size: 14px; }

.prices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.price-tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 26px 24px; border: 1px solid var(--line); border-radius: 6px; text-align: left; transition: border-color .2s ease, background-color .2s ease; }
.price-tile:hover { border-color: var(--ink); background: var(--soft); }
.price-tile b { font: 400 28px/1.05 var(--serif); }
.price-tile span { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- Catalogue ---------- */
.tools { display: flex; align-items: center; gap: 12px; }
.clear { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.clear::after { content: "✕"; font-size: 11px; }
.sort select { appearance: none; height: 42px; padding: 0 38px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; font-size: 14px; cursor: pointer; }

.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 20px; }
.card { position: relative; display: block; text-align: left; width: 100%; }
.card .ph { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--shade); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .ph img { transform: scale(1.05); }
.tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; }
.heart { position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); transition: transform .2s var(--ease); }
.heart:hover { transform: scale(1.08); }
.heart.on svg { fill: var(--accent); stroke: var(--accent); }
.card h3 { margin-top: 14px; font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .sub { margin-top: 2px; color: var(--muted); font-size: 13px; }
.card .pr { margin-top: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { grid-column: 1 / -1; padding: 60px 20px; border: 1px dashed var(--line); border-radius: 6px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); font: 400 26px/1.2 var(--serif); }
.more-wrap { display: flex; justify-content: center; margin-top: 44px; }

/* ---------- Confiance, maison, pied ---------- */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 88px; padding-inline: 0; background: var(--line); border-block: 1px solid var(--line); }
.trust > div { padding: 34px 28px; background: var(--paper); }
.trust svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trust h3 { margin: 14px 0 4px; font-size: 16px; }
.trust p { color: var(--muted); font-size: 14px; }

.insta { display: grid; grid-template-columns: 1fr 1.3fr; gap: 44px; align-items: center; margin-top: 88px; padding: 56px; border-radius: 8px; background: var(--accent-soft); }
.insta h2 { margin-top: 10px; }
.insta p { max-width: 54ch; margin: 14px 0 24px; color: var(--muted); }
.house-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.insta .handle { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.insta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.insta-grid button { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--shade); }
.insta-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.insta-grid button:hover img { transform: scale(1.06); }

.site-foot { margin-top: 88px; padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #c9c9c9; font-size: 14px; }
.cols { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.site-foot .logo { color: #fff; }
.foot-text { max-width: 34ch; margin-top: 14px; }
.site-foot h4 { margin-bottom: 14px; color: #fff; font-size: 14px; }
.site-foot li { list-style: none; margin: 8px 0; }
.site-foot a:hover, .site-foot button:hover { color: #fff; }
.site-foot ul button { color: inherit; text-align: left; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 48px; padding-top: 22px; border-top: 1px solid #2c2c2c; color: #8d8d8d; font-size: 13px; }

/* ---------- Fiche objet ---------- */
.sheet { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 0; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.sheet::backdrop { background: rgba(20, 20, 20, .55); backdrop-filter: blur(3px); }
.sheet[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
.close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); font-size: 15px; }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.gallery { padding: 24px; background: var(--soft); }
.stage { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: var(--shade); }
.stage img { width: 100%; height: 100%; object-fit: contain; animation: pop .4s var(--ease); }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.thumbs button { flex: none; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; outline: 2px solid transparent; outline-offset: -2px; }
.thumbs button[aria-current="true"] { outline-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info { display: flex; flex-direction: column; gap: 16px; padding: 48px 40px 36px; overflow-y: auto; }
.info h2 { font-size: clamp(28px, 2.6vw, 38px); }
.sheet-price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.specs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 20px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
.specs dt, .specs dd { padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; }

/* ---------- Écrans moyens et téléphones ---------- */
@media (max-width: 1000px) {
  .top { grid-template-columns: auto 1fr; gap: 12px 20px; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .icons { justify-self: end; gap: 14px; }
  .cats, .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prices, .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insta { grid-template-columns: 1fr; padding: 36px; }
  .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding-inline: 16px; }
  .promo { font-size: 12px; }
  .logo { font-size: 26px; }
  .icon-link .lbl { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-img { height: 360px; }
  .hero-text { gap: 18px; padding: 30px 16px 40px; }
  .block { padding-top: 56px; }
  .head { flex-direction: column; align-items: flex-start; }
  .tools { width: 100%; justify-content: space-between; }
  .products { gap: 28px 12px; }
  .card h3 { font-size: 14px; }
  .heart { width: 34px; height: 34px; top: 8px; right: 8px; }
  .tag { display: none; }
  .prices { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .insta { padding: 28px 20px; }
  .insta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .cols { grid-template-columns: 1fr; gap: 28px; }
  .sheet { width: 100vw; max-width: 100vw; max-height: 100%; height: 100%; border-radius: 0; }
  .sheet-body { grid-template-columns: 1fr; }
  .gallery { padding: 60px 12px 12px; }
  .info { padding: 24px 18px calc(28px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Page d'un objet (générée par pages.py) ---------- */
.obj { padding-block: 28px 0; }
.crumbs { margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.crumbs a:hover { color: var(--accent); }
.obj-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.obj-grid .gallery { border-radius: 8px; }
.obj-grid .info { position: sticky; top: 110px; padding: 8px 0 0; overflow: visible; }
.obj-grid h1 { font: 400 clamp(32px, 3.2vw, 46px)/1.05 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.obj-desc { color: var(--muted); font-size: 15px; max-width: 62ch; }
.obj-page .products .card { display: block; }
@media (max-width: 760px) {
  .obj-grid { grid-template-columns: 1fr; gap: 20px; }
  .obj-grid .gallery { padding: 12px; }
  .obj-grid .info { position: static; padding: 0; }
}
.obj-page .top { grid-template-columns: auto auto; justify-content: space-between; }
.obj-page .top > span { display: none; }

/* Bandeau « prototype » (temporaire) */
.proto { padding: 8px 16px; background: var(--accent-soft); color: var(--accent); text-align: center; font-size: 13px; line-height: 1.4; border-bottom: 1px solid rgba(156, 74, 42, .18); }
.proto b { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; margin-right: 2px; }

/* Description de l'objet dans la fiche */
.sheet-desc { padding: 14px 16px; border-radius: 8px; background: var(--soft); }
.sheet-desc h3 { margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sheet-desc p { color: var(--ink); font-size: 15px; line-height: 1.6; white-space: pre-line; }
.sheet-desc[data-note]:not([data-note=""])::after { content: attr(data-note); display: block; margin-top: 8px; color: var(--muted); font-size: 12px; font-style: italic; }
