/* ==========================================================================
   Conceptomètre — Design tokens
   ========================================================================== */

:root,
[data-theme='light'] {
  /* Surfaces — warm sand, architect-studio paper tones */
  --color-bg: #f7f1e6;
  --color-surface: #fdfaf3;
  --color-surface-2: #ffffff;
  --color-surface-offset: #f0e7d9;
  --color-surface-offset-2: #e6dcc7;
  --color-surface-dynamic: #dfd5bd;
  --color-divider: #e6dccb;
  --color-border: #ddd0b8;

  /* Text */
  --color-text: #221e1a;
  --color-text-muted: #7a756c;
  --color-text-faint: #b3aba0;
  --color-text-inverse: #f6f3ee;

  /* Primary accent — sauge (Avantage Anticipation) */
  --color-primary: #787c57;
  --color-primary-hover: #5f6344;
  --color-primary-active: #4a4d35;
  --color-primary-highlight: #e2e4d1;

  /* Semantic */
  --color-success: #4c7a3a;
  --color-success-highlight: #dbe6cf;
  --color-warning: #8a7a3a;
  --color-warning-highlight: #e9e3c9;
  --color-error: #a12c2c;
  --color-error-highlight: #ecd4d0;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 50 / 0.07);
  --shadow-md: 0 4px 16px oklch(0.2 0.03 50 / 0.09);
  --shadow-lg: 0 16px 40px oklch(0.2 0.03 50 / 0.14);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1240px;
  --content-full: 100%;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

[data-theme='dark'] {
  --color-bg: #191a13;
  --color-surface: #201f17;
  --color-surface-2: #26251b;
  --color-surface-offset: #2b2a1f;
  --color-surface-offset-2: #343226;
  --color-surface-dynamic: #3d3a2b;
  --color-divider: #33321f;
  --color-border: #3c3a26;

  --color-text: #eee9da;
  --color-text-muted: #a9a68f;
  --color-text-faint: #6f6c57;
  --color-text-inverse: #191a13;

  --color-primary: #a3aa79;
  --color-primary-hover: #b3ba8f;
  --color-primary-active: #c3caa3;
  --color-primary-highlight: #3a3d29;

  --color-success: #8fb96c;
  --color-success-highlight: #33402a;
  --color-warning: #c9b06a;
  --color-warning-highlight: #443c28;
  --color-error: #c96b62;
  --color-error-highlight: #46302d;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

/* Type scale */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide {
  max-width: var(--content-wide);
}
.container--narrow {
  max-width: var(--content-narrow);
}

section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}
section.section--tight {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16));
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--color-primary);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
}

.lede {
  color: var(--color-text-muted);
  max-width: 60ch;
  font-size: var(--text-lg);
  line-height: 1.5;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  min-height: 44px;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
.btn-primary:active {
  background: var(--color-primary-active);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: color-mix(in oklab, var(--color-text) 25%, transparent);
}
.btn-secondary:hover {
  border-color: var(--color-text);
  background: color-mix(in oklab, var(--color-text) 6%, transparent);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  color: var(--color-text);
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-sm {
  padding: var(--space-2) var(--space-4);
  min-height: 36px;
  font-size: var(--text-xs);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  color: var(--color-text);
}
.icon-btn:hover {
  background: color-mix(in oklab, var(--color-text) 8%, transparent);
}

/* ==========================================================================
   Header
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  z-index: 200;
}
.skip-link:focus {
  top: var(--space-4);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #565c3b;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  max-width: var(--content-wide);
  gap: var(--space-6);
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: #f7f3e9;
  text-decoration: none;
  flex-shrink: 0; /* le logo ne se fait jamais écraser par le menu */
}
.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-wordmark {
  font-family: 'Jost', var(--font-body), sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1;
  color: #f7f3e9;
}
.logo-tricolor {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 6px;
  border-radius: 1px;
  background: linear-gradient(
    to right,
    #22548C 0%, #22548C 33.33%,
    #FFFFFF 33.33%, #FFFFFF 66.66%,
    #C1272D 66.66%, #C1272D 100%
  );
}
.logo-text small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,243,233,0.62);
  margin-top: 5px;
  white-space: nowrap;
}
.site-footer .logo-mark,
.site-footer .logo-wordmark {
  color: var(--color-text);
}
.site-footer .logo-text small {
  color: var(--color-text-muted);
}
.site-header .main-nav a {
  color: rgba(247,243,233,0.68);
}
.site-header .main-nav a:hover,
.site-header .main-nav a[aria-current='page'] {
  color: #f7f3e9;
}
.site-header .icon-btn,
.site-header .btn-ghost {
  color: #f7f3e9;
}
.site-header .icon-btn:hover {
  background: rgba(255,255,255,0.1);
}
.site-header .btn-secondary {
  color: #f7f3e9;
  border-color: rgba(247,243,233,0.35);
}
.site-header .btn-secondary:hover {
  border-color: #f7f3e9;
  background: rgba(255,255,255,0.08);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.main-nav ul {
  display: flex;
  gap: var(--space-6);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.main-nav ul li {
  flex-shrink: 0;
}
.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--color-text);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header-cart {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(247,243,233,0.1);
  color: #f7f3e9;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.header-cart svg { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .header-cart span { display: none; }
}
@media (max-width: 480px) {
  .header-cart { display: none; }
}
.nav-toggle {
  display: none;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  box-shadow: var(--shadow-md);
  padding: var(--space-4) 0 var(--space-6);
  z-index: 99;
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav .container {
  display: block;
  height: auto;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
}
.mobile-nav a {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
}
.mobile-nav .btn {
  width: 100%;
  margin-top: var(--space-4);
}

@media (max-width: 1080px) {
  .main-nav ul {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header-actions .header-cta {
    display: none;
  }
  .logo-text small {
    display: none;
  }
}

@media (max-width: 1170px) and (min-width: 1081px) {
  .header-actions .header-cta {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    gap: var(--space-2);
    padding-inline: var(--space-3);
  }
  .logo-mark {
    gap: var(--space-2);
  }
  .logo-icon {
    width: 28px;
    height: 28px;
  }
  .logo-wordmark {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }
  .header-actions {
    gap: 2px;
  }
  .site-header .icon-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 1800px) and (min-width: 1081px) {
  .main-nav {
    gap: var(--space-3);
  }
  .main-nav ul {
    gap: var(--space-2);
  }
  .main-nav a {
    font-size: 0.74rem;
  }
  .header-actions {
    gap: var(--space-2);
  }
  .header-cta {
    font-size: 0.78rem;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    white-space: nowrap;
  }
  .logo-text small {
    display: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: 0;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    oklch(0.15 0.02 40 / 0.15) 0%,
    oklch(0.15 0.02 40 / 0.5) 45%,
    oklch(0.12 0.02 40 / 0.88) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #f6f0e6;
  padding-block: var(--space-16) var(--space-16);
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-cycler {
  display: grid;
  max-width: 32ch;
  margin: 0 auto var(--space-10);
}
.hero-cycler__slide {
  grid-area: 1 / 1;
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1.2;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  align-self: start;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75), 0 4px 22px rgba(0, 0, 0, 0.65), 0 0 3px rgba(0, 0, 0, 0.8);
}
.hero-cycler__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.hero-cycler__slide.is-green1 {
  color: #d7e6c2;
}
.hero-cycler__slide.is-green2 {
  color: #c3dba0;
}
.hero-sub {
  font-size: var(--text-lg);
  max-width: 52ch;
  color: #e3e0cc;
  margin: 0 auto var(--space-8);
  text-align: center;
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}
.hero .btn-secondary {
  color: #f6f0e6;
  border-color: color-mix(in oklab, #f6f0e6 45%, transparent);
}
.hero .btn-secondary:hover {
  background: color-mix(in oklab, #f6f0e6 12%, transparent);
  border-color: #f6f0e6;
}

/* ==========================================================================
   Formula / concept diagram
   ========================================================================== */

.formula-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-16);
  align-items: center;
}
@media (max-width: 860px) {
  .formula-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

.formula-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.formula-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-8) var(--space-4);
}
.formula-box {
  text-align: center;
}
.formula-box .label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-2);
  display: block;
}
.formula-swatch {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-inline: auto;
}
.formula-swatch.height {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  width: 40px;
  height: 100px;
}
.formula-swatch.width {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  width: 110px;
  height: 40px;
}
.formula-swatch.surface {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.formula-op {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text-faint);
}

.component-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-10);
}
.component-row {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.component-row img {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  object-fit: cover;
}
.component-row h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}
.component-row p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.component-row .price-tag {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-primary);
  white-space: nowrap;
  text-align: right;
}
@media (max-width: 560px) {
  .component-row {
    grid-template-columns: 56px 1fr;
  }
  .component-row .price-tag {
    grid-column: 2;
    text-align: left;
  }
  .component-row img {
    width: 56px;
    height: 56px;
  }
}

/* ==========================================================================
   Origin story
   ========================================================================== */

.story-section {
  background: var(--color-surface-offset);
}
.story-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-10);
}
.story-year {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  line-height: 1;
}
.story-grid blockquote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: 62ch;
  margin-bottom: var(--space-4);
}
.story-grid figcaption {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
@media (max-width: 640px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ==========================================================================
   How it works — asymmetric flow
   ========================================================================== */

.flow-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
  padding-block: var(--space-10);
  border-bottom: 1px solid var(--color-divider);
}
.flow-row:last-child {
  border-bottom: none;
}
.flow-row:nth-child(even) .flow-media {
  order: 2;
}
.flow-index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  letter-spacing: 0.1em;
}
.flow-row h3 {
  font-size: var(--text-xl);
  margin-block: var(--space-2) var(--space-3);
}
.flow-row p {
  color: var(--color-text-muted);
  max-width: 46ch;
}
.flow-media {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-offset-2);
}
.flow-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 760px) {
  .flow-row,
  .flow-row:nth-child(even) .flow-media {
    grid-template-columns: 1fr;
    order: initial;
  }
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: var(--space-4);
  height: clamp(420px, 55vw, 560px);
}
.gallery-grid a {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.gallery-grid a:first-child {
  grid-row: 1 / 3;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-grid a:hover img {
  transform: scale(1.045);
}
.gallery-cap {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  color: #fff;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: oklch(0.15 0.02 40 / 0.55);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
  }
  .gallery-grid a {
    aspect-ratio: 4/3;
  }
  .gallery-grid a:first-child {
    grid-row: auto;
  }
}

/* ==========================================================================
   Catalogue feuilletable (page qui tourne) — Réalisations
   ========================================================================== */

.catalogue-flipbook {
  display: flex;
  justify-content: center;
}
.catalogue-flipbook-wrap {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-4);
  background: linear-gradient(180deg, var(--color-surface-offset), var(--color-surface));
  border-radius: var(--radius-xl);
}
.catalogue-flipbook-loading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-8) 0;
}
.catalogue-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  animation: catalogue-spin 800ms linear infinite;
}
@keyframes catalogue-spin { to { transform: rotate(360deg); } }
.catalogue-book {
  width: 100%;
  filter: drop-shadow(var(--shadow-lg));
}
.catalogue-book canvas { border-radius: var(--radius-sm); }
.catalogue-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}
.catalogue-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.catalogue-nav-btn:hover:not(:disabled) { background: var(--color-primary-highlight); transform: translateY(-1px); }
.catalogue-nav-btn:disabled { opacity: 0.35; cursor: default; }
.catalogue-page-indicator {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  min-width: 4.5rem;
  text-align: center;
}
.catalogue-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms ease, transform 200ms ease;
}
.catalogue-download-btn:hover {
  background: var(--color-primary-dark, var(--color-primary));
  transform: translateY(-1px);
  filter: brightness(0.92);
}
.catalogue-shortcuts {
  display: flex;
  gap: var(--space-2);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 var(--space-1) var(--space-2);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.catalogue-shortcuts::-webkit-scrollbar { height: 5px; }
.catalogue-shortcuts::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
.catalogue-shortcut-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.catalogue-shortcut-chip:hover { background: var(--color-primary-highlight); }
.catalogue-shortcut-chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.catalogue-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-10) var(--space-6);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .catalogue-flipbook-wrap { padding: var(--space-6) var(--space-3); }
}

/* ==========================================================================
   Contact options (homepage)
   ========================================================================== */

.contact-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 860px) {
  .contact-options-grid { grid-template-columns: 1fr; }
}
.contact-option-card {
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.contact-option-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.contact-option-card svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.contact-option-card h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.contact-option-card p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.contact-option-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
}
.contact-option-cta svg { width: 14px; height: 14px; margin: 0; color: var(--color-primary); }

/* ==========================================================================
   Contact modal (homepage)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, black 55%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: 200;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card h3 { font-size: var(--text-base); margin-bottom: var(--space-3); }
.modal-card .lede { font-size: var(--text-sm); margin-bottom: var(--space-6); }
.modal-card .field { margin-bottom: var(--space-4); }
.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.modal-close:hover { color: var(--color-text); }

/* ==========================================================================
   CTA banner
   ========================================================================== */

.cta-banner {
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
[data-theme='dark'] .cta-banner {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.cta-banner h2 {
  font-size: var(--text-xl);
  max-width: 28ch;
}
.cta-banner .btn-primary {
  flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-10);
  flex-wrap: wrap;
  padding-bottom: var(--space-10);
}
.footer-slogan {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  max-width: 32ch;
  color: var(--color-text-muted);
}
.footer-contact {
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-style: normal;
}
.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 34ch;
}
.footer-contact svg { width: 14px; height: 14px; margin-top: 3px; flex-shrink: 0; color: var(--color-primary); }
.footer-contact a { color: var(--color-text-muted); text-decoration: none; }
.footer-contact a:hover { color: var(--color-text); }
.footer-cols {
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}
.footer-col a {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--color-text);
}
.footer-partners {
  padding-top: var(--space-6);
  padding-bottom: var(--space-2);
  border-top: 1px solid var(--color-divider);
}
.footer-partners__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}
.footer-partners__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
}
.footer-partners__item {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.footer-partners__item:hover {
  opacity: 1;
}
.footer-partners__item img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(1);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-admin-link {
  color: var(--color-text-faint);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.footer-admin-link:hover {
  opacity: 1;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Configurator layout
   ========================================================================== */

.configurator-header {
  padding-block: var(--space-10) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
}

.stepper-nav {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-top: var(--space-6);
}
.stepper-nav button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.stepper-nav button .dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
}
.stepper-nav button.is-active {
  color: var(--color-text);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-sm);
}
.stepper-nav button.is-active .dot {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.stepper-nav button.is-done .dot {
  background: var(--color-success);
  color: #fff;
}

.configurator-body {
  padding-block: var(--space-10) var(--space-24);
}
.configurator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-10);
  align-items: start;
  min-width: 0;
}
.configurator-layout > * {
  min-width: 0;
}
@media (max-width: 980px) {
  .configurator-layout {
    grid-template-columns: 1fr;
  }
}

.wizard-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  min-height: 420px;
}
.wizard-step {
  display: none;
}
.wizard-step.is-active {
  display: block;
  animation: step-in 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.wizard-step h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.wizard-step > .step-intro {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 60ch;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

/* Dimensions form */
.dim-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field label {
  font-size: var(--text-sm);
  font-weight: 600;
}
.field .hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}
.field input[type='number'] {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  font-size: var(--text-base);
  font-family: var(--font-mono);
}
.field input[type='number']:focus {
  border-color: var(--color-primary);
}
.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  width: 100%;
}
.field input[type='text']:focus,
.field input[type='email']:focus,
.field input[type='tel']:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  outline: none;
}
.field textarea { resize: vertical; min-height: 4.5rem; }
.form-error-text {
  color: var(--color-error);
  font-size: var(--text-xs);
  margin-top: var(--space-3);
}
.input-suffix {
  position: relative;
}
.input-suffix span {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  pointer-events: none;
}

.depth-field {
  grid-column: 1 / -1;
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.depth-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.depth-row input[type='range'] {
  flex: 1;
  accent-color: var(--color-primary);
  height: 4px;
}
.depth-value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-primary);
  min-width: 5ch;
  text-align: right;
}
.depth-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.surface-readout {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}
.surface-readout .value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  line-height: 1;
}
.surface-readout .label {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
}
.toggle-row .toggle-copy strong {
  display: block;
  font-size: var(--text-sm);
}
.toggle-row .toggle-copy span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  margin: 0;
}
.switch .track {
  position: absolute;
  inset: 0;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  transition: background var(--transition-interactive);
}
.switch .thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive);
}
.switch input:checked + .track {
  background: var(--color-primary);
}
.switch input:checked ~ .thumb {
  transform: translateX(20px);
}
.switch input:focus-visible + .track {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Family groups + photo grid */
.family-group {
  margin-bottom: var(--space-8);
}
.family-group h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: var(--space-4);
}
.photo-card {
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-2);
  position: relative;
  cursor: pointer;
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  padding: 0;
}
.photo-card:hover {
  border-color: var(--color-text-faint);
}
.photo-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 22%, transparent);
}
.photo-card .thumb {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--color-surface-offset);
  position: relative;
}
.thumb-zoom-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: none;
  background: color-mix(in oklab, #000 55%, transparent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  transition: var(--transition-interactive);
  z-index: 2;
}
.thumb-zoom-btn:hover {
  background: color-mix(in oklab, #000 75%, transparent);
  transform: scale(1.08);
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-card .meta {
  padding: var(--space-3) var(--space-4);
}
.photo-card .meta strong {
  display: block;
  font-size: var(--text-sm);
}
.photo-card .meta .price {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  margin-top: 2px;
  display: block;
}
.photo-card .meta .price--discounted {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.photo-card .meta .price-old {
  text-decoration: line-through;
  color: var(--color-text-faint);
  font-weight: 400;
}
.photo-card .meta .discount-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.photo-card .check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: var(--transition-interactive);
}
.photo-card.is-selected .check {
  opacity: 1;
  transform: none;
}
.photo-card .check svg {
  width: 14px;
  height: 14px;
}

/* Skip step */
.skip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-8);
}
.skip-row p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 40ch;
}

/* Accessories */
.accessory-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}
.accessory-row img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
}
.accessory-row h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 2px;
}
.accessory-row p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.accessory-row .price-each {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
}
.accessory-row.is-disabled {
  opacity: 0.5;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: end;
}
.qty-control button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-control button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.qty-control input {
  width: 3ch;
  text-align: center;
  font-family: var(--font-mono);
  background: transparent;
  border: none;
}
.linear-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: end;
}
.linear-control input {
  width: 6ch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  text-align: center;
}
.linear-control span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Machining checkboxes */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  cursor: pointer;
}
.check-row input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}
.check-row .copy strong {
  display: block;
  font-size: var(--text-sm);
}
.check-row .copy span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.check-row .fee {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-primary);
  white-space: nowrap;
}
.granite-only {
  display: none;
}
.granite-only.is-visible {
  display: flex;
}

.sink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* Recap step */
.recap-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-8);
}
.recap-line {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding-block: var(--space-2);
}
.recap-line.is-muted {
  color: var(--color-text-muted);
}
.recap-line + .recap-line {
  border-top: 1px dashed var(--color-divider);
}
.recap-subline {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding-bottom: var(--space-2);
  margin-top: calc(-1 * var(--space-1));
}
.recap-line--doc a {
  color: var(--color-primary);
  text-decoration: underline;
}
.recap-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--space-4);
  margin-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}
.recap-total .amount {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
}

/* Summary sidebar */
.summary-panel {
  position: sticky;
  top: calc(76px + var(--space-6));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}
.summary-panel h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding-block: var(--space-2);
  color: var(--color-text-muted);
}
.summary-line strong {
  color: var(--color-text);
  font-weight: 500;
}
.summary-line .amt {
  font-family: var(--font-mono);
}
.summary-divider {
  border: none;
  border-top: 1px dashed var(--color-divider);
  margin: var(--space-2) 0;
}
.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--space-4);
  margin-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}
.summary-total-row .amt {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
}

.cart-block {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.cart-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item .cart-meta strong {
  display: block;
}
.cart-item .cart-meta span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.cart-item .cart-price {
  font-family: var(--font-mono);
  white-space: nowrap;
}
.cart-item-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.cart-item-actions button {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: underline;
}
.cart-item-actions button:hover {
  color: var(--color-primary);
}
.project-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--space-4);
  margin-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  font-weight: 600;
}
.project-total-row .amt {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
}
.empty-cart {
  text-align: center;
  padding: var(--space-6) var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

@media (max-width: 980px) {
  .summary-panel {
    position: static;
  }
}

/* Toast confirmation */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1), transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 300;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Floating bubbles — total + WhatsApp, follow the viewport on the configurator. Kept compact
   (icon-first, minimal footprint) so they behave like a standard chat/FAB widget rather than
   a wide bar that would cover sticky sidebar or banner content underneath. */
/* Anchored bottom-left: the summary sidebar is sticky on the right column, so a right-side
   bubble would collide with it at every scroll depth. The left column (wizard form) scrolls
   normally, so any overlap there is transient (like a standard floating chat widget). */
.floating-bubbles {
  position: fixed;
  bottom: var(--space-5);
  left: var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  z-index: 250;
}
.bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-lg);
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.bubble--cart-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: none;
}
.bubble--cart {
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.bubble--cart:hover { background: var(--color-primary-hover); transform: translateY(-1px); }
.bubble--cart i { width: 18px; height: 18px; }
.bubble--cart .bubble-value {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: #a12c2c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.bubble--total {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  white-space: nowrap;
}
.bubble--total i {
  width: 15px;
  height: 15px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.bubble--total .bubble-value {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-sm);
}
.bubble--whatsapp {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
}
.bubble--whatsapp:hover {
  background: #1ebe5a;
  transform: translateY(-1px) scale(1.04);
}
.bubble--whatsapp i {
  width: 22px;
  height: 22px;
}
@media (max-width: 640px) {
  .floating-bubbles {
    left: var(--space-3);
    bottom: var(--space-3);
    gap: var(--space-2);
  }
  .bubble--total {
    padding: var(--space-2) var(--space-3);
  }
  .bubble--total .bubble-value {
    font-size: var(--text-xs);
  }
  .bubble--whatsapp {
    width: 44px;
    height: 44px;
  }
  .bubble--whatsapp i {
    width: 20px;
    height: 20px;
  }
}

/* Utility */
.text-muted {
  color: var(--color-text-muted);
}
.mt-0 {
  margin-top: 0;
}

/* ==========================================================================
   Builder v2 — Zen gamme, multi-meubles, plans de travail
   ========================================================================== */

.mini-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(6px);
}
.mini-nav .container {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-block: var(--space-3);
  scrollbar-width: none;
}
.mini-nav .container::-webkit-scrollbar { display: none; }
.mini-nav a {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}
.mini-nav a:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

.section-block {
  padding-block: var(--space-12);
  border-bottom: 1px solid var(--color-divider);
}
.section-block:last-of-type {
  border-bottom: none;
}
.section-block h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.section-block .step-intro {
  color: var(--color-text-muted);
  max-width: 62ch;
  margin-bottom: var(--space-8);
}
.step-details-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-left: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  vertical-align: middle;
}
.step-details-toggle:hover {
  color: var(--color-primary-hover);
}

.step-shop-link {
  margin-top: var(--space-4);
}
.step-shop-link a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.step-shop-link a:hover {
  color: var(--color-primary-hover);
}
.step-shop-link a i {
  width: 15px;
  height: 15px;
}

.list-see-all-toggle {
  background: none;
  border: none;
  padding: 0;
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.list-see-all-toggle:hover {
  color: var(--color-primary-hover);
}
#accessoriesList .list-see-all-toggle,
#machiningList .list-see-all-toggle {
  margin: var(--space-3) 0;
}
.lede-more-toggle {
  margin-left: var(--space-2);
  margin-top: 0;
  vertical-align: baseline;
}
.catalog-loading {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-6) 0;
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.zen-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  background: var(--color-success-highlight);
  border: 1px solid color-mix(in oklab, var(--color-success) 30%, transparent);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}
.zen-banner strong {
  display: block;
  color: var(--color-success);
  font-size: var(--text-sm);
}
.zen-banner span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.zen-banner.is-personalized {
  background: var(--color-warning-highlight);
  border-color: color-mix(in oklab, var(--color-warning) 30%, transparent);
}
.zen-banner.is-personalized strong {
  color: var(--color-warning);
}

.standards-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}
.standards-info__text h4 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}
.standards-info__text h4 svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}
.standards-info__text ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.standards-info__text li {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.standards-info__text li strong {
  color: var(--color-text);
}
.standards-info #helpPdfBtn {
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .standards-info {
    flex-direction: column;
    align-items: flex-start;
  }
}

.ensemble-details {
  margin-bottom: var(--space-6);
}
.ensemble-details .standards-info {
  margin-bottom: var(--space-5);
}

.ensemble-example {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin: 0 0 var(--space-8);
  text-align: center;
}
.ensemble-details .ensemble-example {
  margin-bottom: 0;
}
.ensemble-example img {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  margin: 0 auto var(--space-3);
}
.ensemble-example figcaption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

.badge-zen {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-success);
  background: var(--color-success-highlight);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  margin-top: 4px;
}
.price-delta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-warning);
  display: block;
  margin-top: 2px;
}

.item-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  background: var(--color-surface);
}
.item-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}
.item-card-header h3 {
  font-size: var(--text-base);
  font-family: var(--font-display);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}
.item-card-title {
  white-space: nowrap;
}
.item-card-remove {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: underline;
}
.item-card-remove:hover {
  color: var(--color-error);
}

.item-card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.item-card-validate,
.item-card-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  background: transparent;
}
.item-card-validate:hover,
.item-card-edit:hover {
  background: var(--color-primary-highlight);
}
.item-card-validate i,
.item-card-edit i {
  width: 14px;
  height: 14px;
}
.item-card-trash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--color-text-faint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
}
.item-card-trash:hover {
  color: var(--color-error);
  border-color: var(--color-error);
}
.item-card-trash i {
  width: 15px;
  height: 15px;
}
.item-card.is-validated {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
}
.item-card-check {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  vertical-align: -2px;
  margin-right: 4px;
}
.item-card-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-sm);
}
.item-card-summary .amt {
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-weight: 600;
}
.empty-meubles-note {
  padding: var(--space-6);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
  margin-bottom: var(--space-6);
}

.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.field-group .field-full {
  grid-column: 1 / -1;
}



select.select-field {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  width: 100%;
  color: var(--color-text);
}
select.select-field:focus {
  border-color: var(--color-primary);
}

.item-live-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--color-divider);
  font-size: var(--text-sm);
}
.item-live-row .amt {
  font-family: var(--font-mono);
  color: var(--color-primary);
}

.add-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  background: transparent;
}
.add-card-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.plan-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(120px, 100%), 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.plan-photo-grid .photo-card .thumb {
  aspect-ratio: 1/1;
}

.stone-only-block {
  display: none;
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.stone-only-block.is-visible {
  display: block;
}

.qty-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}
.qty-check-row .copy strong {
  display: block;
  font-size: var(--text-sm);
}
.qty-check-row .copy span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.personalize-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.personalize-toggle svg {
  transition: transform var(--transition-interactive);
}
.personalize-toggle.is-open svg {
  transform: rotate(180deg);
}
.personalize-content {
  display: none;
  margin-top: var(--space-8);
}
.personalize-content.is-open {
  display: block;
}

.anticipation-block {
  background: var(--color-primary-highlight);
  border: 1px solid color-mix(in oklab, var(--color-primary) 30%, transparent);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}
.anticipation-block__head h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-hover);
  margin: 0 0 var(--space-2);
}
.anticipation-block__head h3 svg { width: 16px; height: 16px; }
.anticipation-block__head p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
  max-width: 62ch;
}
.anticipation-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
  margin: 0 0 var(--space-5);
  max-width: 62ch;
}
.anticipation-picker__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--text-sm);
}
.anticipation-picker__row label {
  font-weight: 600;
}
.anticipation-picker__row select {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.anticipation-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid color-mix(in oklab, var(--color-primary) 25%, transparent);
  font-size: var(--text-sm);
}
.anticipation-result strong {
  color: var(--color-primary-hover);
  font-family: var(--font-mono);
  font-size: var(--text-base);
}

/* ---------- Calendrier des 50 semaines (Avantage Anticipation) ---------- */
.week-calendar {
  margin-top: var(--space-5);
}
.week-calendar__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}
.week-calendar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: var(--space-2);
  max-height: 320px;
  overflow-y: auto;
  padding: var(--space-1) var(--space-1) var(--space-2);
}
.week-calendar__cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.week-calendar__cell:hover:not(:disabled) {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.week-calendar__cell .wc-date {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
}
.week-calendar__cell .wc-discount {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary-hover);
}
.week-calendar__cell:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--color-surface-2);
}
.week-calendar__cell:disabled .wc-discount {
  color: var(--color-text-faint);
}
.week-calendar__cell.is-selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.week-calendar__cell.is-selected .wc-date,
.week-calendar__cell.is-selected .wc-discount {
  color: #fff;
}
.week-calendar__selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid color-mix(in oklab, var(--color-primary) 30%, transparent);
  font-size: var(--text-sm);
}
.week-calendar__selected strong { color: var(--color-primary-hover); }

.upload-block, .contact-block {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}
.upload-block h3, .contact-block h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}
.upload-block h3 svg, .contact-block h3 svg { width: 16px; height: 16px; color: var(--color-primary); }
.upload-file-list {
  list-style: none;
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.upload-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}
.upload-file-list button {
  background: none;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
}
.upload-file-list button:hover { color: var(--color-error); }
.contact-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 720px) {
  .contact-fields { grid-template-columns: 1fr; }
}

.payment-block {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
}
.payment-block h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}
.payment-block h3 svg { width: 16px; height: 16px; color: var(--color-primary); }
.payment-methods-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
.payment-methods-row .btn { flex: 1 1 220px; }
.payment-status {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.final-cta-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.final-cta-row .btn {
  flex: 1 1 240px;
  min-width: 0;
  white-space: normal;
  text-align: center;
  height: auto;
  line-height: 1.3;
  padding-block: var(--space-4);
}

/* ---------- Étape 6 : bloc de finalisation (dropdown + gros bouton vert) ---------- */
.finalize-cta-block {
  margin-top: var(--space-8);
}
.finalize-select-row {
  margin-bottom: var(--space-4);
}
.finalize-select-row label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.finalize-select-row select {
  width: 100%;
  font-size: var(--text-sm);
  font-family: inherit;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.btn-block-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  border: none;
  background: #4c8a3a;
  color: #fff;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(76,138,58,0.35);
  transition: background 140ms ease, transform 140ms ease;
}
.btn-block-cta:hover { background: #3f7530; transform: translateY(-1px); }
.btn-block-cta:active { transform: translateY(0); }
.btn-block-cta svg { width: 20px; height: 20px; }
.finalize-payment-reveal {
  margin-top: var(--space-5);
}

.recap-group-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: var(--space-6) 0 var(--space-3);
}
.recap-group-title:first-child {
  margin-top: 0;
}

@media (max-width: 640px) {
  .field-group {
    grid-template-columns: 1fr;
  }
  .final-cta-row .btn {
    min-width: 100%;
    width: 100%;
    white-space: normal;
    height: auto;
    text-align: center;
    line-height: 1.3;
    padding-block: var(--space-4);
  }
  .zen-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .badge-zen {
    white-space: nowrap;
  }
  .accessory-row {
    grid-template-columns: 56px 1fr;
    grid-template-areas: "img text" "ctrl ctrl";
  }
  .accessory-row img {
    grid-area: img;
    width: 56px;
    height: 56px;
  }
  .accessory-row > div:not(.qty-control):not(.linear-control) {
    grid-area: text;
  }
  .accessory-row .qty-control,
  .accessory-row .linear-control {
    grid-area: ctrl;
    justify-self: start;
    margin-top: var(--space-2);
  }
}

/* ---------- Custom dropdown (replaces native <select> for reliability) ---------- */
.custom-select {
  position: relative;
  min-width: 0;
}
.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}
.custom-select-trigger svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.custom-select.is-open .custom-select-trigger svg {
  transform: rotate(180deg);
}
.custom-select.is-open .custom-select-trigger {
  border-color: var(--color-primary);
}
.custom-select-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: var(--space-1);
}
.custom-select-options[hidden] {
  display: none;
}
.custom-select-options li {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
}
.custom-select-options li:hover {
  background: var(--color-surface-offset);
}
.custom-select-options li[aria-selected="true"] {
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 10%, transparent);
}

/* ---------- Catalog carousel: tabs + horizontal manual-slide ---------- */
.catalog-tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-4);
  scrollbar-width: thin;
}
.catalog-tab {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-interactive);
}
.catalog-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}
.catalog-tab.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.catalog-slide-wrap {
  position: relative;
}
.catalog-slide {
  display: none;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-1) var(--space-1) var(--space-3);
  scrollbar-width: thin;
}
.catalog-slide.is-active {
  display: flex;
}
.catalog-slide .photo-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
}
.catalog-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}
.catalog-arrow:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.catalog-arrow svg {
  width: 18px;
  height: 18px;
}
.catalog-arrow-prev {
  left: -14px;
}
.catalog-arrow-next {
  right: -14px;
}
.catalog-group-count {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

/* Machining rows with photo */
.qty-check-row.has-photo {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--space-4);
}
.qty-check-row .thumb-sm {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-offset);
  flex-shrink: 0;
}
.qty-check-row .thumb-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Equipment rows: éviers / robinets / tables de cuisson — ref + price + photo + qty */
.equip-subgroup {
  margin-bottom: var(--space-6);
}
.equip-subgroup h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.equip-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}
.equip-row img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
}
.equip-row h5 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 2px;
}
.equip-row .equip-ref {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: block;
}
.equip-row .equip-price {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  display: block;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .catalog-arrow {
    display: none;
  }
  .catalog-slide .photo-card {
    flex-basis: 140px;
  }
  .qty-check-row.has-photo {
    grid-template-columns: 48px 1fr;
    grid-template-areas: "img text" "ctrl ctrl";
  }
  .qty-check-row.has-photo .thumb-sm {
    grid-area: img;
    width: 48px;
    height: 48px;
  }
  .qty-check-row.has-photo .copy {
    grid-area: text;
  }
  .qty-check-row.has-photo .qty-control {
    grid-area: ctrl;
    justify-self: start;
    margin-top: var(--space-2);
  }
  .equip-row {
    grid-template-columns: 56px 1fr;
    grid-template-areas: "img text" "ctrl ctrl";
  }
  .equip-row img {
    grid-area: img;
    width: 56px;
    height: 56px;
  }
  .equip-row > div:not(.qty-control) {
    grid-area: text;
  }
  .equip-row .qty-control {
    grid-area: ctrl;
    justify-self: start;
    margin-top: var(--space-2);
  }
}

/* ---------- Boutique ---------- */
.shop-hero {
  padding-top: var(--space-10);
  padding-bottom: var(--space-6);
}
#shop-browser {
  padding-top: var(--space-2);
  padding-bottom: var(--space-14);
}

/* Fil d'ariane */
.shop-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
}
.shop-breadcrumb__back {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.shop-breadcrumb__back:hover { text-decoration: underline; }
.shop-breadcrumb__sep {
  color: var(--color-text-faint);
}
.shop-breadcrumb__current {
  color: var(--color-text-muted);
}

/* Liste verticale univers / rayons — un bouton pleine largeur par ligne, taille uniforme */
.shop-drawer-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  max-width: 640px;
}
.shop-drawer-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: var(--transition-interactive);
  text-align: left;
}
.shop-drawer-btn:hover {
  border-color: var(--color-text-faint);
  background: var(--color-surface-3, var(--color-surface-2));
}
.shop-drawer-btn.is-soon {
  opacity: 0.6;
}
.shop-drawer-btn__label { flex: 1; }
.shop-drawer-btn__count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}
.shop-drawer-btn__badge {
  font-size: 0.65em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-weight: 500;
}
.shop-drawer-btn__arrow {
  color: var(--color-text-faint);
  font-size: var(--text-lg);
  line-height: 1;
}
.shop-soon-badge {
  font-size: 0.65em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: var(--space-1);
  opacity: 0.85;
}
.shop-card .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shop-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.shop-card__ref {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-faint);
  margin-top: 4px;
}
.shop-empty {
  color: var(--color-text-muted);
  padding: var(--space-6) 0;
}

/* ---------- Boutique : remise, quantité, panier & checkout ---------- */
.shop-card__price-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: 2px;
}
.shop-card__price-old {
  text-decoration: line-through;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}
.shop-card__discount-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.shop-card__cart-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}
.shop-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.shop-qty-stepper button {
  border: none;
  background: var(--color-surface-2);
  width: 30px;
  height: 30px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
}
.shop-qty-stepper button:hover { background: var(--color-border); }
.shop-qty-stepper input {
  width: 40px;
  height: 30px;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--text-sm);
  -moz-appearance: textfield;
}
.shop-qty-stepper input::-webkit-outer-spin-button,
.shop-qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-cart-section {
  padding-top: var(--space-6);
  padding-bottom: var(--space-16);
}
.shop-cart__note {
  color: var(--color-text-muted);
}
.shop-cart__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.shop-cart__item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.shop-cart__item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--color-surface-2);
}
.shop-cart__item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-sm);
}
.shop-cart__item-info span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.shop-cart__item-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.shop-cart__item-total {
  white-space: nowrap;
}
.shop-cart__summary {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-5);
  margin-top: var(--space-4);
}
.shop-cart__total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-lg);
  margin-bottom: var(--space-5);
}
#shopShareCartBtn {
  margin-bottom: var(--space-3);
}
.shop-cart__actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.shop-cart__actions-row > button {
  margin-bottom: 0;
}
.shared-cart-banner {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md, 10px);
  font-weight: 600;
  margin-bottom: var(--space-5);
}
.shared-cart-banner.is-pending {
  background: rgba(180, 140, 20, 0.12);
  color: #8a6a10;
}
.shared-cart-banner.is-approved {
  background: rgba(30, 130, 76, 0.12);
  color: #1e824c;
}
.shared-cart-banner.is-rejected {
  background: rgba(190, 40, 40, 0.12);
  color: #be2828;
}
.shared-cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.shop-share-block {
  margin: var(--space-4) 0 var(--space-6);
}
.shop-share-result {
  background: var(--color-surface-alt, rgba(0,0,0,0.03));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 10px);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}
.shop-share-result p {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
}
.shop-share-link-row {
  display: flex;
  gap: var(--space-2);
}
.shop-share-link-row input {
  flex: 1;
  min-width: 0;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  font-size: var(--text-sm);
  background: var(--color-surface);
  color: var(--color-text);
}
.shop-checkout-form h3 {
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.services-sub {
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-top: var(--space-2);
}
.services-estimate {
  background: var(--color-surface-alt, rgba(0,0,0,0.03));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 10px);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}
.services-estimate__list {
  margin-bottom: var(--space-4);
}
.services-estimate__line {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}
.services-estimate__disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin: var(--space-3) 0 var(--space-4);
}
.shop-order-confirm {
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

@media (max-width: 640px) {
  .shop-cart__item {
    grid-template-columns: 48px 1fr auto;
    grid-template-areas:
      "thumb info remove"
      "qty qty total";
  }
  .shop-cart__item-thumb { grid-area: thumb; }
  .shop-cart__item-info { grid-area: info; }
  .js-cart-remove { grid-area: remove; }
  .shop-qty-stepper { grid-area: qty; margin-top: var(--space-2); }
  .shop-cart__item-total { grid-area: total; margin-top: var(--space-2); text-align: right; }
}

/* ---------- Lightbox: zoom sur les vignettes/images du site ---------- */
img:not(.no-zoom) {
  cursor: zoom-in;
}
.catalogue-book img {
  cursor: inherit;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 15, 15, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  animation: lightbox-fade-in 0.15s ease-out;
}
@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lightbox-overlay[hidden] {
  display: none;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
body.lightbox-open {
  overflow: hidden;
}
@media (max-width: 640px) {
  .lightbox-overlay {
    padding: var(--space-4);
  }
  .lightbox-close {
    top: var(--space-4);
    right: var(--space-4);
  }
}

/* ==========================================================================
   Recherche sur le site
   ========================================================================== */
body.site-search-lock {
  overflow: hidden;
}
.site-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(20, 18, 12, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(12vh, 96px) var(--space-4) var(--space-6);
}
.site-search-panel {
  width: 100%;
  max-width: 640px;
  max-height: min(70vh, 640px);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,0.35));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.site-search-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  flex-shrink: 0;
}
.site-search-input-icon {
  color: var(--color-text-muted);
  display: inline-flex;
  flex-shrink: 0;
}
.site-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-text);
}
.site-search-input::placeholder {
  color: var(--color-text-muted);
}
.site-search-results {
  overflow-y: auto;
  padding: var(--space-2) 0;
}
.site-search-hint {
  padding: var(--space-6) var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
}
.site-search-group-title {
  padding: var(--space-3) var(--space-5) var(--space-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  font-weight: 600;
}
.site-search-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-5);
  text-decoration: none;
  color: var(--color-text);
}
.site-search-result:hover {
  background: color-mix(in oklab, var(--color-primary) 8%, transparent);
}
.site-search-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.site-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-search-result-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.site-search-result-text strong {
  font-size: var(--text-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-search-result-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@keyframes searchHighlightPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-primary) 55%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in oklab, var(--color-primary) 0%, transparent); }
}
.search-highlight {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-md);
  animation: searchHighlightPulse 1.1s ease-out 2;
}

/* Panier partagé — specs éditables (meubles/plans sur mesure) et pièces jointes */
.shop-cart__item-wrap {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.shop-cart__item-wrap .shop-cart__item {
  border: none;
  border-radius: 0;
}
.shop-cart__specs {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px dashed var(--color-divider);
  background: var(--color-surface-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.specs-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex: 1 1 140px;
}
.specs-row label.specs-row-full {
  flex-basis: 100%;
}
.specs-row select,
.specs-row textarea {
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}
.specs-row .input-suffix input {
  width: 100%;
}
.shared-cart-docs {
  margin: var(--space-5) 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.upload-file-list__empty {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  list-style: none;
}

/* ---------- Boutique : rayons en arborescence (menu latéral + vignettes) ---------- */
.shop-hero { padding-top: var(--space-8); padding-bottom: var(--space-4); }
.shop-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}
.shop-side-toggle { display: none; }
.shop-side {
  position: sticky;
  top: calc(var(--header-h, 72px) + var(--space-4));
  max-height: calc(100vh - var(--header-h, 72px) - var(--space-8));
  overflow-y: auto;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  overscroll-behavior: contain;
}
.shop-tree__title { margin: 0 0 var(--space-2); font-weight: 700; }
.shop-tree__title a { color: var(--color-text); text-decoration: none; }
.shop-tree, .shop-tree ul { list-style: none; margin: 0; padding: 0; }
.shop-tree ul { margin-left: var(--space-3); padding-left: var(--space-2); border-left: 1px solid var(--color-divider); }
.shop-tree__link {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2);
  padding: 7px var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.3;
}
.shop-tree__link:hover { background: var(--color-surface-offset); }
.shop-tree__link small { font-family: var(--font-mono); font-size: 0.72rem; color: var(--color-text-faint); }
.shop-tree__link em { font-style: normal; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-faint); }
.shop-tree__link.is-soon { color: var(--color-text-muted); }
.shop-tree__link--d0 { font-weight: 600; }
.shop-tree__item.is-open > .shop-tree__link { font-weight: 600; }
.shop-tree__item.is-current > .shop-tree__link { background: var(--color-primary-highlight); color: var(--color-primary-active); font-weight: 700; }

.shop-main { min-width: 0; }
.shop-breadcrumb { margin-bottom: var(--space-3); gap: 6px var(--space-2); }
.shop-breadcrumb a { text-decoration: none; }
.shop-head__title { font-size: var(--text-xl); margin: 0 0 var(--space-2); }
.shop-head__desc { color: var(--color-text-muted); margin: 0 0 var(--space-4); max-width: 60ch; }

.shop-search-row { margin-bottom: var(--space-5); }
.shop-search {
  display: flex; align-items: center; gap: var(--space-2);
  max-width: 480px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  padding: 0 var(--space-4);
}
.shop-search i, .shop-search svg { width: 18px; height: 18px; color: var(--color-text-muted); flex-shrink: 0; }
.shop-search input { border: none; background: transparent; flex: 1; min-width: 0; padding: 12px 0; font: inherit; font-size: 16px; color: var(--color-text); outline: none; }
.shop-search:focus-within { border-color: var(--color-primary); }

.shop-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.shop-tiles--roots { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: var(--space-4); }
.shop-tile {
  display: flex; flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition-interactive);
}
.shop-tile:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shop-tile__img {
  aspect-ratio: 4 / 3;
  background: var(--color-surface-offset);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-faint);
  overflow: hidden;
}
.shop-tile__img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.shop-tile__img svg { width: 34px; height: 34px; }
.shop-tile__name { padding: var(--space-3) var(--space-3) 2px; font-weight: 600; font-size: var(--text-sm); line-height: 1.3; }
.shop-tile__count { padding: 0 var(--space-3) var(--space-3); font-size: var(--text-xs); color: var(--color-text-muted); }
.shop-tile--big .shop-tile__name { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); }
.shop-tile.is-soon { opacity: 0.6; }

.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.shop-toolbar__count { font-weight: 600; }
.shop-toolbar__sort { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.shop-toolbar__sort select { font: inherit; font-size: 16px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text); }
.shop-products.photo-grid { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.shop-card .thumb img { object-fit: contain; background: #fff; }
.shop-more { display: block; margin: var(--space-6) auto 0; }

@media (max-width: 1000px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .shop-side-toggle {
    display: inline-flex; align-items: center; gap: var(--space-2);
    justify-self: start;
    font: inherit; font-weight: 600;
    padding: 10px var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface-2);
    color: var(--color-text);
    cursor: pointer;
  }
  .shop-side-toggle svg { width: 18px; height: 18px; }
  .shop-side { display: none; position: static; max-height: none; }
  body.shop-side-open .shop-side { display: block; }
  .shop-tree__link { padding: 10px var(--space-2); font-size: var(--text-base); }
}
@media (max-width: 640px) {
  .shop-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .shop-tiles--roots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .shop-tile__name { font-size: 0.95rem; }
  .shop-products.photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .shop-card .meta { padding: var(--space-2) var(--space-3); }
  .shop-card .meta strong { font-size: 0.95rem; }
  .shop-card__cart-row { flex-direction: column; align-items: stretch; }
  .shop-card__cart-row .shop-qty-stepper { justify-content: space-between; }
  .shop-card__cart-row .shop-qty-stepper input { flex: 1; }
}

/* Boutons flottants sur téléphone : une seule rangée compacte, sans la pastille du total
   (le nombre d'articles reste sur l'icône du panier), et un espace en bas de page
   pour que le pied de page ne soit jamais caché. */
@media (max-width: 640px) {
  .floating-bubbles { flex-direction: row; align-items: center; }
  .bubble--total { display: none; }
  .bubble--cart { width: 44px; height: 44px; }
  .bubble--whatsapp { width: 44px; height: 44px; }
  body:has(.floating-bubbles) .site-footer { padding-bottom: 80px; }
}
/* Boutique : boutons flottants à droite (le menu des rayons et les textes sont à gauche) */
#shopFloatingBubbles { left: auto; right: var(--space-5); align-items: flex-end; }
@media (max-width: 640px) { #shopFloatingBubbles { right: var(--space-3); } }
#shop-browser { scroll-margin-top: calc(var(--header-h, 80px) + 8px); }

/* ---------- Panier commun (icône d'en-tête, page panier, configurateur) ---------- */
.header-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; color: inherit; }
.header-cart__count {
  position: absolute; top: -2px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--radius-full);
  background: #a12c2c; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
}
.header-cart__count[hidden] { display: none; }

.finalize-note { font-size: var(--text-sm); color: var(--color-text-muted); margin: var(--space-3) 0 0; }
.added-to-cart {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  background: var(--color-primary-highlight);
}
.added-to-cart__title { display: flex; gap: var(--space-2); align-items: flex-start; font-weight: 600; margin: 0 0 var(--space-4); }
.added-to-cart__title svg { flex-shrink: 0; color: var(--color-primary); margin-top: 2px; }
.added-to-cart__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.added-to-cart__actions .btn { display: inline-flex; align-items: center; gap: var(--space-2); }
.added-to-cart__actions svg, .cart-actions svg { width: 18px; height: 18px; }
.shop-cart__projects { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; margin: 0 0 var(--space-3); }

.cart-page { padding: var(--space-10) 0 var(--space-16); }
.cart-page__title { font-size: var(--text-2xl); margin: 0 0 var(--space-8); }
.cart-empty { padding: var(--space-8) 0; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-8); align-items: start; }
.cart-block { margin-bottom: var(--space-8); }
.cart-block > h2, .cart-summary h2, .cart-checkout h2 { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-lg); margin: 0 0 var(--space-4); }
.cart-block > h2 svg, .cart-checkout h2 svg { width: 20px; height: 20px; color: var(--color-primary); }
.cart-project, .cart-line, .cart-summary, .cart-checkout, .cart-paid {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
}
.cart-project { padding: var(--space-4) var(--space-5); margin-bottom: var(--space-3); }
.cart-project__head { display: flex; justify-content: space-between; gap: var(--space-4); align-items: flex-start; }
.cart-project__head h3 { margin: 0 0 4px; font-size: var(--text-base); }
.cart-project__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.cart-project__meta svg { width: 15px; height: 15px; }
.cart-project__total { font-size: var(--text-lg); white-space: nowrap; }
.cart-project__details { margin: var(--space-3) 0 var(--space-2); font-size: var(--text-sm); }
.cart-project__details summary { cursor: pointer; color: var(--color-primary); font-weight: 600; }
.cart-project__details ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.cart-project__details li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border-bottom: 1px dashed var(--color-divider); }
.cart-project__details li small { display: block; color: var(--color-text-muted); }
.cart-project__details li.is-discount { color: var(--color-success); font-weight: 600; }
.cart-project__actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.cart-project__actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.cart-project__actions svg { width: 15px; height: 15px; }
.cart-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; padding: var(--space-3) var(--space-4); margin-bottom: var(--space-2); }
.cart-line__img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: var(--radius-md); border: 1px solid var(--color-divider); display: block; }
.cart-line__info strong { display: block; }
.cart-line__info span { font-size: var(--text-sm); color: var(--color-text-muted); }
.cart-line__info s { color: var(--color-text-faint); }
.cart-line__actions { display: flex; align-items: center; gap: var(--space-3); }
.cart-line__total { min-width: 90px; text-align: right; }
.cart-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cart-actions .btn { display: inline-flex; align-items: center; gap: var(--space-2); }
.cart-side { position: sticky; top: calc(var(--header-h, 80px) + var(--space-4)); display: flex; flex-direction: column; gap: var(--space-4); }
.cart-summary { padding: var(--space-5); }
.cart-summary__row { display: flex; justify-content: space-between; padding: 6px 0; }
.cart-summary__row[hidden] { display: none; }
.cart-summary__total { border-top: 1px solid var(--color-divider); margin-top: var(--space-2); padding-top: var(--space-3); font-size: var(--text-lg); }
.cart-summary__deposit { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-3); margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--color-primary-highlight); }
.cart-summary__deposit strong { font-size: var(--text-lg); color: var(--color-primary-active); }
.cart-summary__deposit small { grid-column: 1 / -1; color: var(--color-text-muted); }
.cart-summary__note { font-size: var(--text-xs); color: var(--color-text-muted); margin: var(--space-3) 0 0; }
.cart-checkout { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.cart-checkout .field { display: flex; flex-direction: column; gap: 4px; }
.cart-checkout input, .cart-checkout textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); }
.cart-error { color: var(--color-error); font-weight: 600; margin: 0; }
.cart-error[hidden] { display: none; }
.cart-paid { padding: var(--space-5); }
.cart-paid__title { display: flex; gap: var(--space-2); align-items: flex-start; font-weight: 700; font-size: var(--text-base); }
.cart-paid__title svg { color: var(--color-success); flex-shrink: 0; }
.cart-paid--return { margin-bottom: var(--space-6); }
@media (max-width: 1000px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-side { position: static; }
}
@media (max-width: 640px) {
  .cart-page { padding-top: var(--space-6); }
  .cart-line { grid-template-columns: 56px minmax(0, 1fr); }
  .cart-line__img { width: 56px; height: 56px; }
  .cart-line__actions { grid-column: 1 / -1; justify-content: space-between; }
  .cart-project__head { flex-direction: column; gap: var(--space-2); }
}
.cart-block[hidden] { display: none; }
