/* SOFIA COMPANY site. Material 3 look: neutral tonal surfaces, a pastel tint for selection, pill shapes.
   The token block below is the only place with a literal colour. */
:root, ::backdrop {
  color-scheme: light;
  /* Scale: literal values. Components never use these names. Neutrals carry a faint cool tint from the logo blue. */
  --white: #ffffff;
  --n-98: #f9f9fc;  --n-96: #f3f3f7;  --n-94: #eeeef2;  --n-92: #e8e8ed;  --n-90: #e2e2e7;
  --n-80: #c6c6cc;  --n-50: #76777d;  --n-35: #4f5055;  --n-30: #46474c;  --n-25: #3b3c41;  --n-20: #2f3035;  --n-10: #1b1c20;
  --p-95: #edf0f8;  --p-90: #dde3f1;  --p-85: #cfd7e9;  --p-30: #333f58;   /* pastel tint of the logo blue */
  --red-40: #ba1a1a; --red-95: #ffedea;  /* semantic */
  --shadow-2: 0 8px 24px rgb(27 28 32 / .14), 0 2px 6px rgb(27 28 32 / .10);
  --c-scrim: rgb(27 28 32 / .40);
  /* Roles: components use only these. */
  --c-bg: var(--n-98);               --c-on-primary: var(--white);   --c-paper: var(--white);
  --c-surface-alt: var(--n-96);      --c-surface-sunk: var(--n-92);  --c-surface-high: var(--n-94);
  --c-border: var(--n-90);           --c-outline-variant: var(--n-80); --c-border-control: var(--n-50);
  --c-text-muted: var(--n-30);       --c-text: var(--n-10);
  --c-primary: var(--n-20);          --c-link: var(--n-20);          --c-focus: var(--n-10);
  --c-primary-hover: var(--n-25);    --c-primary-pressed: var(--n-35);
  --c-hover-bg: var(--n-94);         --c-selected-bg: var(--p-90);   --c-selected-text: var(--p-30);
  --c-info-bg: var(--n-94);          --c-icon-bg: var(--p-90);
  --c-cta-bg: var(--p-90);           --c-cta-bg-hover: var(--p-85);  --c-cta-text: var(--p-30);
  --c-mark-bg: var(--p-85);
  --c-danger: var(--red-40);         --c-danger-bg: var(--red-95);
  -webkit-tap-highlight-color: rgb(0 0 0 / 0); /* no cyan tap flash on Android: :active is the press feedback */

  --font-body: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);
  --fs-14: 0.875rem; --fs-16: 1rem; --fs-18: 1.125rem; --fs-22: 1.375rem; --fs-28: 1.75rem; --fs-36: 2.25rem;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --gutter: 16px; --section: 48px;
  --r-sm: 8px; --r-md: 16px; --r-lg: 28px; --r-pill: 999px;
  --h-bar: 56px; --h-search: 64px; --h-header: 72px;
  --t-fast: 150ms; --t-base: 200ms; --t-enter: 250ms; --t-exit: 160ms;
  --ease-out: cubic-bezier(.2, 0, 0, 1); --ease-in: cubic-bezier(.3, 0, 1, 1);
}
@media (min-width: 768px) { :root { --gutter: 24px; --section: 64px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

@font-face {
  font-family: "Google Sans Flex";
  src: url(/fonts/google-sans-flex-latin-wght.woff2) format("woff2");
  font-weight: 400 600;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
/* The gutter keeps the page width when the open sheet removes the scrollbar. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
/* Room for the sticky header when focus or an anchor scrolls. Not scroll-padding on html: with it,
   Chrome scrolls the page each time a control of the sticky header gets focus. */
main, main *, .site-footer * { scroll-margin-top: 80px; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font: 400 var(--fs-16)/1.5 var(--font-body); }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
p { margin: 0; }
a { color: var(--c-link); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 400; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: var(--fs-16); line-height: 1.5; font-weight: 500; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
button, input, textarea { font: inherit; color: inherit; }
a, button, label, input, textarea { touch-action: manipulation; }
.icon { flex: none; fill: currentColor; }
.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.skip {
  position: absolute; top: var(--sp-2); left: var(--sp-4); z-index: 100; padding: var(--sp-3) var(--sp-4);
  background: var(--c-paper); color: var(--c-link); font-weight: 500; border-radius: var(--r-pill); transform: translateY(-200%);
}
.skip:focus { transform: none; }
.lead { margin-top: var(--sp-4); max-width: 60ch; color: var(--c-text-muted); font-size: var(--fs-18); line-height: 1.55; }
.required-note { color: var(--c-text-muted); font-size: var(--fs-14); }

/* Header */
.site-header { position: sticky; top: calc(-1 * var(--h-bar)); z-index: 10; background: var(--c-bg); }
/* Material top app bar: the bar takes a container colour once the page scrolls. */
@supports (animation-timeline: scroll()) {
  .site-header { animation: bar-lift linear both; animation-timeline: scroll(); animation-range: 0 48px; }
  @keyframes bar-lift { to { background: var(--c-surface-alt); } }
}
/* Keyboard focus on the logo or the nav brings the phone logo row back on screen. */
.site-header:has(:is(.brand, .nav a):focus-visible) { top: 0; }
.header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand nav" "search search"; align-items: center; column-gap: var(--sp-4); }
.brand { grid-area: brand; display: flex; align-items: center; height: var(--h-bar); }
.brand img { width: 90px; height: 36px; }
/* The logo file has a white background: multiply turns that white into the colour behind it. */
.brand img, .footer-logo { mix-blend-mode: multiply; }
.nav { grid-area: nav; justify-self: end; display: flex; }
.nav { gap: var(--sp-1); }
.nav a {
  display: flex; align-items: center; min-height: 44px; padding-inline: var(--sp-4); border-radius: var(--r-pill); color: var(--c-text-muted);
  font-weight: 500; text-decoration: none; transition: background-color var(--t-fast), color var(--t-fast);
}
.nav a[aria-current="page"] { background: var(--c-selected-bg); color: var(--c-selected-text); }
.search { grid-area: search; display: flex; align-items: center; height: var(--h-search); }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-input {
  width: 100%; height: 48px; padding: 0 48px 0 52px; background: var(--c-surface-sunk); border: 0;
  border-radius: var(--r-pill); font-size: var(--fs-16); appearance: none; transition: background-color var(--t-fast);
}
.search-input::placeholder, .input::placeholder { color: var(--c-text-muted); opacity: 1; }
.search-input::-webkit-search-cancel-button, .search-input::-webkit-search-decoration { appearance: none; display: none; }
.search-clear {
  position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; background: none; border: 0; border-radius: var(--r-pill); color: var(--c-text-muted); cursor: pointer;
}
/* Material search bar: the submit button is the leading icon inside the pill. */
.search-submit {
  position: relative; z-index: 1; order: -1; display: grid; place-items: center; flex: none; width: 48px; height: 48px;
  margin-right: -48px; padding: 0; border: 0; border-radius: var(--r-pill);
  background: none; color: var(--c-text); cursor: pointer; transition: background-color var(--t-fast);
}
.search-submit:active { background: var(--c-border); }
.search-input:focus { background: var(--c-paper); }

/* Footer */
.site-footer { margin-top: var(--section); background: var(--c-surface-alt); color: var(--c-text-muted); font-size: var(--fs-14); line-height: 1.5; }
.footer-grid { display: grid; gap: var(--sp-6); padding-block: var(--sp-7) var(--sp-6); }
.footer-brand { display: flex; flex-direction: column; gap: var(--sp-3); max-width: 34ch; }
.footer-logo { width: 100px; height: 40px; }
.footer-col { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-title { color: var(--c-text); font: 500 var(--fs-14)/1.4 var(--font-body); }
.footer-list, .contact-list { margin: 0; padding: 0; list-style: none; }
.footer-list a, .contact-list a { display: inline-flex; align-items: center; gap: var(--sp-3); min-height: 40px; color: var(--c-text); text-decoration: none; overflow-wrap: anywhere; }
.footer-legal { padding-block: var(--sp-5) var(--sp-6); border-top: 1px solid var(--c-border); font-size: 0.8125rem; }
.contact-list .icon { color: var(--c-text-muted); }
.hours { display: grid; gap: var(--sp-1); margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: var(--sp-4); max-width: 18rem; }
.hours dt { color: var(--c-text-muted); }
.hours dd { margin: 0; color: var(--c-text); font-variant-numeric: tabular-nums; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 48px; padding: var(--sp-2) var(--sp-5);
  border: 1px solid var(--c-primary); border-radius: var(--r-pill); font: 500 var(--fs-16)/1.25 var(--font-body); text-align: center;
  text-decoration: none; cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast);
}
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:active { background: var(--c-primary-pressed); border-color: var(--c-primary-pressed); }
.btn-secondary { background: transparent; border-color: var(--c-border-control); color: var(--c-text); }
.btn-secondary:active { background: var(--c-surface-sunk); }
.btn[aria-busy="true"] { cursor: progress; }
.btn-block { width: 100%; }
.btn-text {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-1); background: none; border: 0;
  color: var(--c-link); font-weight: 500; cursor: pointer;
}
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding-inline: var(--sp-4); margin-inline: calc(-1 * var(--sp-4));
  border-radius: var(--r-pill); color: var(--c-link); font-weight: 500; text-decoration: none; transition: background-color var(--t-fast);
}
.icon-btn {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0; background: transparent; border: 0;
  border-radius: var(--r-pill); color: var(--c-text); cursor: pointer; transition: background-color var(--t-fast);
}
.icon-btn:active, .search-clear:active { background: var(--c-surface-sunk); }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.spinner { display: none; }
[aria-busy="true"] > .spinner { display: block; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-2) 0 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2); max-width: 100%; min-height: 44px; padding: 6px var(--sp-4) 6px var(--sp-3);
  background: transparent; border: 1px solid var(--c-outline-variant); border-radius: var(--r-sm); color: var(--c-text);
  font: 500 var(--fs-14)/1.3 var(--font-body); text-align: left; text-decoration: none; overflow-wrap: anywhere; cursor: pointer;
  transition: background-color var(--t-base), border-color var(--t-base), color var(--t-base);
}
.chip .icon { color: var(--c-text-muted); }
.chip:active { background: var(--c-surface-sunk); }
.chip-count { font-weight: 400; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.chip.is-selected { background: var(--c-selected-bg); border-color: transparent; color: var(--c-selected-text); }
.chip.is-selected .icon { color: var(--c-selected-text); }
.examples-label { margin-top: var(--sp-6); color: var(--c-text-muted); font-size: var(--fs-14); }
/* Phone: 4 example chips on two lines, so that the family tiles start on the first screen. */
@media (max-width: 767px) { .intro .chips li:nth-child(n+5) { display: none; } }

/* Family tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.tile {
  display: flex; flex-direction: column; gap: var(--sp-3); height: 100%; min-height: 140px; padding: var(--sp-4);
  background: var(--c-surface-alt); border-radius: var(--r-md); color: var(--c-text); text-decoration: none;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.tile:active { background: var(--c-surface-sunk); }
.tile-icon, .card-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: var(--r-pill); background: var(--c-icon-bg); color: var(--c-selected-text); }
.tile-name { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.tile-count { min-height: 1.4em; margin-top: auto; color: var(--c-text-muted); font-size: var(--fs-14); line-height: 1.4; font-variant-numeric: tabular-nums; }

/* Panels and banners */
.panel { padding: var(--sp-4); background: var(--c-info-bg); border-radius: var(--r-md); }
.banner { display: flex; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-4); padding: var(--sp-4); background: var(--c-info-bg); border-radius: var(--r-md); }
.banner > .icon, .note > .icon, .success > .icon { color: var(--c-text-muted); }
.banner-title { font-weight: 500; }
.banner-error { background: var(--c-danger-bg); }
.banner-error > .icon, .banner-error .banner-title { color: var(--c-danger); }
.banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-3); }
.banner-actions a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.price-line { display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-3); color: var(--c-text-muted); font-size: var(--fs-14); line-height: 1.4; }
.price-line .icon { margin-top: 2px; }

/* Home */
.intro { display: flex; flex-direction: column; padding-top: var(--sp-4); }
.intro h1 { max-width: 18ch; font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.02em; }
.section { padding-top: var(--section); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1) var(--sp-4); margin-bottom: var(--sp-4); }
.band { margin-top: var(--section); padding-block: var(--section); background: var(--c-surface-alt); }
.steps { display: grid; gap: var(--sp-5); margin: var(--sp-5) 0 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: flex-start; gap: var(--sp-3); }
.steps h3 { padding-top: var(--sp-2); font-size: var(--fs-16); line-height: 1.5; }
.steps p { color: var(--c-text-muted); }
.step-num {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--r-pill);
  background: var(--c-icon-bg); color: var(--c-selected-text); font: 500 var(--fs-16)/1 var(--font-head);
}
.cards { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-5); background: var(--c-surface-alt); border-radius: var(--r-lg); }
.card p { color: var(--c-text-muted); }
.card .check-line { display: flex; align-items: center; gap: var(--sp-2); color: var(--c-text); font-weight: 500; }
.check-line .icon { color: var(--c-selected-text); }
.card .btn { margin-top: auto; }

/* Building photo */
/* Phone: the photo comes first, above the headline. */
.hero-photo { position: relative; order: -1; margin: 0 0 var(--sp-5); }
.hero-photo img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 55%;
  border-radius: var(--r-lg); background: var(--c-surface-high);
}
.photo-tag {
  position: absolute; left: var(--sp-3); bottom: var(--sp-3); display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 40px; padding: 0 var(--sp-4) 0 var(--sp-3); background: var(--c-paper); border-radius: var(--r-pill);
  color: var(--c-text); font-size: var(--fs-14); font-weight: 500; text-decoration: none;
}

/* Location */
.visit, .contact-visit { display: grid; gap: var(--sp-2); }
.visit { margin-top: var(--sp-4); }
.visit-info { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-5); background: var(--c-surface-alt); border-radius: var(--r-lg); }
.visit-name { color: var(--c-text); font-weight: 500; }
.contact-visit > h2 { font-size: var(--fs-22); }
address { font-style: normal; color: var(--c-text-muted); }
.visit-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-2); }
.map {
  display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r-lg); background: var(--c-surface-high);
  filter: grayscale(1); transition: filter var(--t-base);
}
.map:hover, .map:focus { filter: none; }

/* Catalogue */
.page { padding-top: var(--sp-6); }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-4); }
.catalogue h1 { flex-basis: 100%; font-size: var(--fs-22); line-height: 1.2; overflow-wrap: anywhere; }
.count { min-height: 1.4em; color: var(--c-text-muted); font-size: var(--fs-14); line-height: 1.4; font-variant-numeric: tabular-nums; }
.slow { margin-top: var(--sp-3); color: var(--c-text-muted); font-size: var(--fs-14); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4); }
.filters-label, .refine-label { font-size: var(--fs-14); font-weight: 500; }
.filter-chips { display: contents; }
.refine { margin-top: var(--sp-4); }
.typo { margin-top: var(--sp-4); font-weight: 500; }
.catalogue .tiles { margin-top: var(--sp-5); }
.results { display: grid; column-gap: var(--sp-5); margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.results > li { border-bottom: 1px solid var(--c-border); }
/* html.is-list: a search or a family (set before the first paint), else the family tiles. */
.is-list .catalogue :is(.lead, .tiles), html:not(.is-list) .catalogue .results { display: none; }
/* Until the catalogue arrives, what follows the list stays invisible: it would move (layout shift). */
body:has([data-skeleton]:not([hidden])) :is(.paging, .wholesale, .site-footer) { visibility: hidden; }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: var(--sp-3); min-height: 88px;
  margin-inline: calc(-1 * var(--sp-2)); padding: var(--sp-3) var(--sp-2); border-radius: var(--r-sm); color: var(--c-text);
  text-decoration: none; transition: background-color var(--t-fast);
}
.row:active { background: var(--c-surface-sunk); }
.thumb { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; background: var(--c-paper); border-radius: var(--r-md); }
.thumb img { width: 64px; height: 64px; object-fit: contain; }
.no-photo { background: var(--c-surface-high); color: var(--c-text-muted); }
.row-text { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.row-name {
  display: -webkit-box; overflow: hidden; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere;
  -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
}
mark { background: var(--c-mark-bg); color: inherit; border-radius: 4px; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.row-sub { flex: 1 1 0; min-width: 0; overflow: hidden; color: var(--c-text-muted); font-size: var(--fs-14); line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.cta {
  display: inline-flex; align-items: center; flex: none; height: 32px; padding: 0 var(--sp-3); background: var(--c-cta-bg); border-radius: var(--r-pill);
  color: var(--c-cta-text); font-size: var(--fs-14); font-weight: 500; white-space: nowrap; transition: background-color var(--t-fast);
}
.skeleton { display: grid; grid-template-columns: 64px 1fr; gap: var(--sp-3); min-height: 88px; padding-block: var(--sp-3); }
.sk-thumb, .sk-lines span { background: var(--c-surface-high); border-radius: var(--r-md); }
.sk-thumb { height: 64px; }
.sk-lines { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-1); }
.sk-lines span { width: 85%; height: 16px; }
.sk-lines span + span { width: 45%; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-4); }
.empty > .icon { color: var(--c-text-muted); }
.tips { margin: 0; padding-left: 1.25em; }
.paging { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-5); }
.shown:empty { display: none; }
.shown { min-height: 1.4em; color: var(--c-text-muted); font-size: var(--fs-14); line-height: 1.4; text-align: center; font-variant-numeric: tabular-nums; }
.wholesale { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-6); }

/* Product sheet: bottom sheet on a phone, dialog from 1024 px */
.sheet {
  width: 100%; max-width: 100%; max-height: 92vh; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--c-bg); color: var(--c-text); box-shadow: var(--shadow-2);
  overflow: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--t-exit) var(--ease-in), transform var(--t-exit) var(--ease-in), overlay var(--t-exit) allow-discrete, display var(--t-exit) allow-discrete;
}
.sheet[open] { opacity: 1; transform: none; transition-duration: var(--t-enter); transition-timing-function: var(--ease-out); }
@starting-style { .sheet[open] { opacity: 0; transform: translateY(24px); } }
.sheet::backdrop { background: var(--c-scrim); opacity: 0; transition: opacity var(--t-base), overlay var(--t-base) allow-discrete, display var(--t-base) allow-discrete; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet-body { display: flex; flex-direction: column; padding: var(--sp-2) var(--sp-4) max(16px, env(safe-area-inset-bottom)); }
.sheet-close { align-self: flex-end; }
.sheet-photo { display: grid; place-items: center; width: 100%; max-width: 280px; aspect-ratio: 1; margin-inline: auto; overflow: hidden; background: var(--c-paper); border-radius: var(--r-md); }
.sheet-photo img { width: 100%; height: 100%; object-fit: contain; }
.sheet-photo.no-photo { align-content: center; gap: var(--sp-2); font-size: var(--fs-14); }
/* Phone: keep « Demander le prix » on a short screen; 87 % of the items have no photo. */
@media (max-width: 1023px) {
  .sheet-photo { max-height: 35vh; max-height: 35dvh; }
  .sheet-photo.no-photo { aspect-ratio: auto; height: 96px; }
}
.sheet-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-4); }
.sheet h2 { overflow-wrap: anywhere; }
.sheet-path { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--sp-2); font-size: var(--fs-14); }
.sheet-path a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }

/* Contact */
.contact { display: grid; gap: var(--sp-5); }
.form { display: flex; flex-direction: column; gap: var(--sp-5); }
.note { display: flex; align-items: flex-start; gap: var(--sp-3); overflow-wrap: anywhere; min-height: calc(4.5em + 2 * var(--sp-4)); }
/* contact.js writes the article name after the first paint: one height of 3 lines (2 from 768 px), text at the top, keeps the form and the text still. */
.note p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.summary { margin-top: 0; }
.summary ul { margin: var(--sp-2) 0 0; padding-left: 1.25em; }
.summary a { display: inline-flex; align-items: center; min-height: 44px; }
.summary li + li { margin-top: var(--sp-1); }
.group { min-width: 0; margin: 0; padding: 0; border: 0; }
.group > * + * { margin-top: var(--sp-5); }
.group > legend { width: 100%; padding: 0 0 var(--sp-2); font: 400 var(--fs-22)/1.4 var(--font-head); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; margin-inline: 0; padding: 0; border: 0; }
.field-row { display: flex; flex-direction: column; gap: var(--sp-5); }
.label { padding: 0; font-weight: 500; }
.radios > .label { margin-bottom: var(--sp-2); }
.helper { color: var(--c-text-muted); font-size: var(--fs-14); line-height: 1.4; }
.input {
  width: 100%; min-height: 52px; padding: var(--sp-3) var(--sp-4); background: var(--c-paper); border: 1px solid var(--c-border-control);
  border-radius: var(--r-sm); font-size: var(--fs-16);
}
textarea.input { min-height: 160px; resize: vertical; }
.input:focus-visible { border-color: var(--c-focus); box-shadow: inset 0 0 0 1px var(--c-focus); outline: none; }
.input[aria-invalid="true"] { border-color: var(--c-danger); box-shadow: inset 0 0 0 1px var(--c-danger); }
.field-error { display: flex; align-items: flex-start; gap: var(--sp-2); color: var(--c-danger); }
.field-error .icon { margin-top: 4px; }
.radio-grid { display: grid; gap: var(--sp-2); }
.radio {
  display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-outline-variant); border-radius: var(--r-md); cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast);
}
.radio input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--c-selected-text); }
.radio:has(:checked) { background: var(--c-selected-bg); border-color: transparent; color: var(--c-selected-text); }
.btn-submit { width: 100%; min-width: 15rem; }
.success { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-5); }
.narrow { max-width: calc(640px + 2 * var(--gutter)); }

/* Hover only where a pointer can hover */
@media (hover: hover) {
  .search-submit:hover, .btn-primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
  .btn-secondary:hover, .icon-btn:hover, .search-clear:hover, .link-arrow:hover { background: var(--c-hover-bg); }
  .search-submit:hover { background: var(--c-border); }
  /* Neutral, so that a hovered chip or radio row never looks selected. */
  .chip:not(.is-selected):hover, .radio:not(:has(:checked)):hover { background: var(--c-hover-bg); }
  .tile:hover { background: var(--c-surface-high); }
  .nav a:not([aria-current]):hover { background: var(--c-hover-bg); color: var(--c-text); }
  .search-input:not(:focus):hover { background: var(--c-border); }
  .row:hover { background: var(--c-surface-alt); }
  .row:hover .cta { background: var(--c-cta-bg-hover); }
  .photo-tag:hover { background: var(--c-surface-alt); }
  .btn-text:hover, .footer-list a:hover, .contact-list a:hover { text-decoration: underline; }
}

@media (min-width: 768px) {
  main, main *, .site-footer * { scroll-margin-top: 88px; }
  .site-header { top: 0; }
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search nav"; height: var(--h-header); column-gap: var(--sp-5); }
  .brand { height: 48px; }
  .brand img { width: 100px; height: 40px; }
  .search { width: 100%; max-width: 640px; height: auto; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue h1 { flex-basis: auto; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paging { align-items: center; }
  .btn-submit { width: auto; align-self: flex-start; }
  .visit { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro { padding-top: var(--sp-7); }
  .hero-photo { order: 0; margin: var(--sp-6) 0 0; }
  .hero-photo img { aspect-ratio: 12 / 5; }
  .photo-tag { left: var(--sp-5); bottom: var(--sp-5); }
  .visit .map { height: 100%; min-height: 360px; aspect-ratio: auto; }
  .note { min-height: calc(3em + 2 * var(--sp-4)); }
  .note p { -webkit-line-clamp: 2; line-clamp: 2; }
  /* 768–1023: still the bottom sheet, but not a 950 px wide button. The 1024 rule replaces both values. */
  .sheet { max-width: 640px; margin-inline: auto; }
}

@media (min-width: 1024px) {
  .intro h1 { font-size: 3.5rem; line-height: 1.07; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-photo img { aspect-ratio: 3 / 1; }
  h2, .catalogue h1 { font-size: 2rem; line-height: 1.25; }
  .results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.3fr); gap: var(--sp-6); }
  .contact { grid-template-columns: 5fr 7fr; grid-template-rows: auto 1fr; gap: var(--sp-5) var(--sp-7); align-items: start; }
  .contact-main { grid-column: 2; grid-row: 1 / span 2; }
  .contact-visit { grid-column: 1; grid-row: 2; }
  .contact-visit .visit { grid-template-columns: minmax(0, 1fr); }
  .contact-visit .map { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .radio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-5); }
  .field-row > .field { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
  .field-row .label { grid-row: 1; }
  .field-row .helper { grid-row: 2; }
  .field-row .input { grid-row: 3; }
  .field-row .field-error { grid-row: 4; }
  .sheet { width: 720px; max-width: calc(100% - 64px); margin: auto; border-radius: var(--r-lg); transform: scale(.98); }
  @starting-style { .sheet[open] { transform: scale(.98); } }
  .sheet-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-5); }
  .sheet-close { position: absolute; top: var(--sp-2); right: var(--sp-2); }
  .sheet-photo { max-width: none; }
  .sheet-text { margin-top: 0; padding-right: var(--sp-7); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { transition-duration: .01ms !important; animation: none !important; }
  .sheet, .sheet[open] { transform: none !important; }
}
