/* Configurateur Instead — styles partagés (hub + produit).
   Reprend intégralement la DA Instead du v1 Tabouret Newport (V4 §18) :
   fond crème, palette ambree/cuivre/stout, typo Manrope, swatches, RAL,
   boutons outline + primaire, mode embed. Étendu pour le hub multi-produits. */

/* ===== Tokens DA Instead ===== */
:root {
  --blanche: #faf5ec;
  --blonde:  #f2c84b;
  --ambree:  #c87220;
  --cuivre:  #8c4a10;
  --brune:   #4e2010;
  --stout:   #180800;

  --border-soft:    rgba(24, 8, 0, 0.08);
  --border-regular: rgba(24, 8, 0, 0.15);
  --border-strong:  rgba(24, 8, 0, 0.25);

  --text-muted:     rgba(24, 8, 0, 0.55);
  --text-subtle:    rgba(24, 8, 0, 0.7);

  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  margin: 0;
  background: var(--blanche);
  color: var(--stout);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }

/* ===== Mode embed (iframe) — V4 §18 ===== */
body.embed > header { display: none; }
body.embed .layout { padding: 1rem 2rem 2rem; max-width: none; }
body.embed model-viewer { height: min(640px, calc(100vh - 2rem)); }
@media (max-width: 960px) {
  body.embed .layout { grid-template-columns: 1fr; gap: 1.25rem; padding: 0.75rem; }
  body.embed .viewer-stage {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 300px;
    align-self: start;
    background: var(--blanche);
  }
  body.embed model-viewer { height: 100%; }
  /* Badge prix réduit */
  body.embed .price-overlay { padding: 0.4rem 0.65rem; gap: 0.4rem; border-radius: 0.4rem; }
  body.embed .price-overlay-main { gap: 0.35rem; }
  body.embed .price-overlay-label { font-size: 0.5rem; letter-spacing: 0.14em; }
  body.embed .price-overlay-value { font-size: 0.9rem; }
  body.embed .price-overlay-suffix { font-size: 0.55rem; }
  body.embed .price-overlay-cta { font-size: 0.6rem; padding: 0.2rem 0.45rem; }

  /* Accordion sections */
  body.embed .panel { gap: 0; }
  body.embed .panel-inner { padding-bottom: 0.5rem; }
  body.embed .panel-section:not(#action-bar):not(#pro-action-panel) {
    padding-top: 0;
    border-bottom: 1px solid rgba(24,8,0,0.07);
  }
  body.embed .panel-section:not(#action-bar):not(#pro-action-panel) > h2 {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
    padding: 0.85rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  body.embed .panel-section:not(#action-bar):not(#pro-action-panel) > h2::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 300;
    color: rgba(24,8,0,0.3);
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
  }
  body.embed .panel-section.open > h2::after { content: '−'; }

  /* Wrapper accordéon — max-height : plus fiable sur Android Chrome */
  body.embed .accordion-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
  }
  body.embed .panel-section.open .accordion-body {
    max-height: 1400px;
  }
  body.embed .accordion-body > :last-child { margin-bottom: 1rem; }

  /* Desktop (écran large) en embed étroit : sections déployées, pas de "+" */
  body.embed.accordion-expanded .panel-section:not(#action-bar):not(#pro-action-panel) > h2 {
    cursor: default;
  }
  body.embed.accordion-expanded .panel-section:not(#action-bar):not(#pro-action-panel) > h2::after {
    content: none;
  }
}

/* ===== Mode modal (pop-up catalogue pro · ?modal=1) =====
   3D fixe à gauche, panneau d'options scrollable à droite, tout tient dans
   la hauteur du modal sans scroll de page. Gap resserré + panneau plus
   étroit pour rapprocher le produit des options. */
body.modal-fit { overflow: hidden; height: 100vh; }
body.modal-fit .layout {
  height: 100vh;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  align-items: stretch;
}
/* position: relative (pas static) — sinon le model-viewer en position:absolute
   inset:0 prend la fenêtre entière et recouvre le panneau d'options. */
body.modal-fit .viewer-stage { position: relative; top: 0; height: 100%; }
/* La 3D se pose à plat sur le crème (comme la home) : pas de carte arrondie
   ni d'ombre qui tranche avec le fond. Pleine hauteur de colonne (sinon la
   règle body.embed la plafonne à 640px ancrés en haut → produit trop haut). */
body.modal-fit .viewer-stage model-viewer {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}
/* Le téléchargement 3D est déjà dans la liste Ressources du panneau de droite
   du modal → on retire le bouton du configurateur pour éviter le doublon.
   "Demander un devis" est aussi retiré : l'ajout au devis pro est juste au-dessus. */
body.modal-fit #btn-3d,
body.modal-fit #btn-devis { display: none; }
body.modal-fit .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Zone scrollable — tout le contenu sauf #pro-action-panel. */
body.modal-fit .panel-inner {
  flex: 1 1 0%;
  overflow-y: auto;
  padding-right: 0.5rem;
  padding-bottom: 1rem;
}
/* CTA "Ajouter à mon devis" : hors du scroll, épinglé en bas du panneau. */
body.modal-fit #pro-action-panel {
  flex-shrink: 0;
  background: var(--blanche);
  padding-top: 0.5rem;
  border-top: 1px solid rgba(24, 8, 0, 0.07);
}

/* Zone CTAs pro dans le viewer — bas gauche du 3D en mode modal */
#viewer-pro-actions {
  position: absolute;
  bottom: 2.5rem;
  left: 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
#viewer-pro-actions #pro-add-btn {
  background: #c87220;
  color: #faf5ec;
  border: none;
  border-radius: 2px;
  padding: 0.75rem 1.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(24,8,0,0.25);
}
#viewer-pro-actions #pro-add-btn:hover { background: #a85e18; }
#viewer-pro-actions .viewer-pro-link {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: #faf5ec;
  text-decoration: none;
  background: rgba(24,8,0,0.45);
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#viewer-pro-actions .viewer-pro-link:hover { background: rgba(24,8,0,0.65); }
#viewer-pro-actions #pro-add-feedback {
  font-size: 0.72rem;
  color: #faf5ec;
  background: rgba(24,8,0,0.5);
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-align: center;
}
@media (max-width: 900px) {
  body.modal-fit { overflow: auto; height: auto; }
  body.modal-fit .layout {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1.25rem;
  }
  body.modal-fit .viewer-stage { height: 320px; }
  body.modal-fit .panel { height: auto; overflow: visible; }
  /* Le geste vertical scrolle la page (sinon la 3D capte tout le toucher) ;
     le geste horizontal continue de faire tourner le produit. */
  body.modal-fit .viewer-stage model-viewer { touch-action: pan-y; }
  /* Mobile : on sépare les overlays pour ne pas masquer la 3D.
     Prix en haut, boutons devis en barre centrée en bas. */
  body.modal-fit .price-overlay-wrap { top: 0.75rem; right: 0.75rem; }
  /* Mobile : prix overlay compact (prix public + prix pro + encadré réduits) */
  .price-overlay { padding: 0.3rem 0.5rem; gap: 0.4rem; border-radius: 0.4rem; }
  .price-overlay-value { font-size: 0.85rem; }
  .price-overlay-pro-price { font-size: 0.8rem; }
  .price-overlay-strike { font-size: 0.62rem; }
  .price-overlay-label, .price-overlay-label-pro { font-size: 0.46rem; letter-spacing: 0.1em; }
  .price-overlay-suffix { font-size: 0.5rem; }
  .price-overlay-pro-stack { gap: 0.1rem; }
  .price-overlay-cta { font-size: 0.55rem; padding: 0.18rem 0.4rem; }
  body.modal-fit #viewer-pro-actions {
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    max-width: calc(100% - 1.5rem);
  }
}

/* ===== Header standalone (hub + produit) ===== */
header.app-header {
  padding: 1rem 2rem;
  background: var(--blanche);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
header.app-header h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}
header.app-header .back-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
header.app-header .back-link:hover { color: var(--stout); opacity: 1; }

/* V4 §18 — Bloc prix temps réel + CTA devis remonté en haut. */
.price-block { display: flex; align-items: center; gap: 1rem; }
.price-info { text-align: right; line-height: 1.2; }
.price-info .price-label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-weight: 500;
  display: block;
  margin-bottom: 0.15rem;
}
header.app-header .header-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ambree);
  white-space: nowrap;
}
.price-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--ambree);
  color: var(--blanche);
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}
.price-cta:hover { background: var(--cuivre); opacity: 1; }

/* ===== HUB (index.html) ===== */
.hub-intro {
  max-width: 1400px;
  margin: 3rem auto 2rem;
  padding: 0 3rem;
}
.hub-intro h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--stout);
}
.hub-intro p { margin: 0; color: var(--text-muted); font-size: 1rem; }

.hub-grid {
  max-width: 1400px;
  margin: 0 auto 4rem;
  padding: 0 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-regular);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blanche);
  transition: transform 0.25s var(--easing), box-shadow 0.25s var(--easing), border-color 0.25s var(--easing);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 8, 0, 0.08);
  border-color: var(--ambree);
  opacity: 1;
}
.product-card .preview {
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #fff 0%, var(--blanche) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-card .preview model-viewer {
  width: 100%;
  height: 100%;
  background: transparent;
  --progress-bar-color: transparent;
}
.product-card .meta { padding: 1.25rem 1.25rem 1.5rem; }
.product-card .category {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cuivre);
  font-weight: 500;
  margin-bottom: 0.45rem;
}
.product-card .name {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--stout);
}
.product-card .tagline {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.product-card .price-range {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ambree);
}
.product-card .price-range span {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Layout produit (product.html) ===== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 3rem;
  padding: 3rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}
/* Wrapper double-buffer : 2 model-viewers superposés. C'est le wrapper
   qui porte le sticky, pas les viewers (qui sont en absolute). */
.viewer-stage {
  position: sticky;
  top: 1rem;
  align-self: start;
  width: 100%;
  height: min(680px, calc(100vh - 2rem));
}
.viewer-stage model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--blanche);
  --poster-color: transparent;
  transition: opacity 0.4s var(--easing);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
/* Le viewer "back" (en train de charger ou ancien front passé derrière)
   est totalement transparent et ne capte pas la souris. Crossfade géré
   en JS qui ajoute/retire cette classe sur l'un des deux. */
.viewer-stage model-viewer.behind {
  opacity: 0;
  pointer-events: none;
}

.price-overlay-wrap {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  z-index: 2;
}
.price-overlay {
  padding: 0.5rem 0.8rem;
  background: var(--ambree);
  color: #fff;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.6rem;
  box-shadow: 0 8px 24px -8px rgba(200, 114, 32, 0.45);
  pointer-events: none;
  font-feature-settings: "tnum";
}
.price-overlay-cta {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--ambree);
  text-decoration: none;
  background: var(--blanche);
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  box-shadow: 0 4px 14px -6px rgba(24, 8, 0, 0.25);
}
.price-overlay-cta:hover {
  background: var(--ambree);
  color: var(--blanche);
  opacity: 1;
}
.price-overlay-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.price-overlay-ttc {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-style: italic;
  opacity: 0.75;
}
.price-overlay-ttc-suffix {
  font-weight: 500;
  letter-spacing: 0.08em;
}
.price-overlay-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}
/* CTA échantillons sous les nuances de Balt — capte le moment où le visiteur
   évalue la matière/les coloris pour proposer le kit physique. */
.balt-samples-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--ambree);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ambree);
  background: transparent;
  transition: background-color 0.2s var(--easing), color 0.2s var(--easing);
}
.balt-samples-cta:hover {
  background: var(--ambree);
  color: var(--blanche);
  opacity: 1;
}

.price-overlay-value {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Pro avec remise : layout 2 lignes dans l'overlay orange. */
.price-overlay-pro-stack {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.price-overlay-pro-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  white-space: nowrap;
}
.price-overlay-strike {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: line-through;
  opacity: 0.6;
}
.price-overlay-label-pro {
  opacity: 1;
  font-weight: 700;
}
.price-overlay-pro-price {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.price-overlay-remised {
  font-weight: 700;
}
.header-price-strike {
  font-weight: 400;
  font-size: 0.85em;
  text-decoration: line-through;
  opacity: 0.5;
  margin-right: 0.35rem;
}
.price-overlay-suffix {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
/* Fallback : si on a une seule instance (legacy), même style sticky. */
body:not(:has(.viewer-stage)) model-viewer {
  width: 100%;
  height: min(680px, calc(100vh - 2rem));
  background: var(--blanche);
  --poster-color: transparent;
  transition: opacity 0.35s var(--easing);
  position: sticky;
  top: 1rem;
  align-self: start;
}

/* ===== Panneau config ===== */
.panel {
  background: var(--blanche);
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}
/* Plus de filets séparateurs entre sections (Franck : on gagne de la place).
   Espacement vertical assuré par le padding seul. */
.panel-section {
  border-top: 0;
  padding-top: 1rem;
}
.panel-section:first-child { padding-top: 0; }
#pro-action-panel { padding-top: 0.85rem; }
.panel-section h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cuivre);
}
.panel-section .stack { display: flex; flex-direction: column; gap: 1.75rem; }

/* ===== Fields / Labels ===== */
.field { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-bottom: 0.55rem;
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* ===== Swatches (nuancier) ===== */
.swatches { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.swatch {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  transition: transform 0.18s var(--easing), border-color 0.18s var(--easing);
}
.swatch:hover { transform: scale(1.08); }
/* Nom du coloris au survol — tooltip instantané au-dessus du swatch. */
.swatch[data-label]::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 3px 8px;
  background: var(--stout);
  color: var(--blanche);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.15s var(--easing), transform 0.15s var(--easing);
}
.swatch[data-label]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.swatch.active { border-color: var(--ambree); }

/* ===== Boutons hauteur / variantes (Newport, Ella, Cicero…) =====
   .height-group : 3 hauteurs Newport (3 colonnes fixes).
   .variant-group : axes du configurateur multi-axes (Cicero) ou variantes
   simples (Ella sans/avec accoudoirs) — auto-fit pour s'adapter au nombre
   d'options sans casser visuellement. */
.height-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.variant-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 0.4rem; }

/* .height-btn — boutons hauteurs Newport : ambrée plein à l'état actif. */
.height-btn {
  padding: 0.625rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-regular);
  background: var(--blanche);
  color: var(--stout);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s var(--easing);
}
.height-btn:hover {
  border-color: var(--ambree);
  color: var(--ambree);
}
.height-btn.active {
  background: var(--ambree);
  color: var(--blanche);
  border-color: var(--ambree);
}

/* .variant-btn — boutons d'axes (Cicero forme/taille/hauteur, Ella
   accoudoirs, Ella bar hauteur) : style technique, sobre, sans coloris.
   Plus petits que les height-btn pour traduire la nature "spec" de la
   sélection multi-axes. Actif = encadré stout + fond très léger, pas de
   fond ambrée. */
.variant-btn {
  padding: 0.45rem 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border-regular);
  background: var(--blanche);
  color: var(--stout);
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s var(--easing);
  letter-spacing: 0.01em;
}
.variant-btn:hover {
  border-color: var(--stout);
  color: var(--stout);
}
.variant-btn.active {
  background: rgba(24, 8, 0, 0.06);
  color: var(--stout);
  border-color: var(--stout);
  font-weight: 600;
}
/* Valeur d'axe indisponible pour la sélection courante (combinaison non
   fabriquée) : grisée et non cliquable. */
.variant-btn--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
}

/* ===== Info RAL sélectionné ===== */
.ral-info {
  margin-top: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: rgba(200, 114, 32, 0.08);
  border: 1px solid rgba(200, 114, 32, 0.15);
  border-radius: 4px;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--stout);
}
.ral-info .ral-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

/* ===== Swatch « + » pour couleur RAL personnalisée ===== */
.swatch-picker {
  position: relative;
  background: conic-gradient(from 0deg, #ff4a4a, #ffd14a, #6dff4a, #4affd1, #4a6dff, #d14aff, #ff4a4a);
  box-shadow: inset 0 0 0 3px var(--blanche), inset 0 0 0 4px rgba(24, 8, 0, 0.15);
  overflow: hidden;
}
.swatch-picker::after {
  content: '+';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--stout);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}
.swatch-picker.active {
  box-shadow:
    inset 0 0 0 3px var(--blanche),
    inset 0 0 0 4px rgba(24, 8, 0, 0.15),
    0 0 0 2px var(--ambree);
}
.swatch-picker input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

/* ===== Roue chromatique (V4 §18.5 — fond crème, pas blanc) ===== */
#picker-panel {
  background: var(--blanche) !important;
  border-color: var(--border-regular) !important;
  border-radius: var(--radius);
}

/* ===== Prix dans le panneau (panneau interne, distinct du header) ===== */
.price {
  font-family: var(--font-sans);
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 1rem 0;
  color: var(--stout);
}

/* ===== Boutons par défaut : OUTLINE STOUT (V3 §7) ===== */
.btn,
button {
  width: 100%;
  padding: 0.875rem 1rem;
  background: transparent;
  color: var(--stout);
  border: 1px solid var(--stout);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.25s var(--easing), color 0.25s var(--easing), border-color 0.25s var(--easing);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn:hover,
button:hover {
  background: var(--ambree);
  color: var(--blanche);
  border-color: var(--ambree);
  opacity: 1;
}

/* Bouton primaire : ambrée plein (Devis) */
.btn-primary {
  background: var(--ambree) !important;
  color: var(--blanche) !important;
  border-color: var(--ambree) !important;
}
.btn-primary:hover {
  background: var(--cuivre) !important;
  color: var(--blanche) !important;
  border-color: var(--cuivre) !important;
}

/* Bouton secondaire (outline) — équivalent du défaut */
.btn-outline,
.btn-secondary {
  background: transparent !important;
  color: var(--stout) !important;
  border: 1px solid var(--stout) !important;
}
.btn-outline:hover,
.btn-secondary:hover {
  background: var(--ambree) !important;
  color: var(--blanche) !important;
  border-color: var(--ambree) !important;
}

/* Bouton inline compact (ex. OK RAL) */
.btn-inline {
  width: auto;
  padding: 0.5rem 0.9rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}

.actions { display: flex; flex-direction: column; gap: 0.6rem; }

/* ===== Toast ===== */
#toast,
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--stout);
  color: var(--blanche);
  padding: 0.75rem 1.125rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.3s var(--easing);
  pointer-events: none;
  z-index: 1000;
}

/* ===== Modale Télécharger fichier 3D (GLB / STEP) ===== */
.dl3d-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 8, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.dl3d-backdrop[hidden] { display: none; }
.dl3d-card {
  background: var(--blanche);
  border: 1px solid var(--border-regular);
  border-radius: 8px;
  max-width: 460px;
  width: 100%;
  padding: 1.75rem 1.75rem 1.5rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(24, 8, 0, 0.25);
}
.dl3d-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.dl3d-close:hover {
  color: var(--stout);
  background: rgba(24, 8, 0, 0.06);
  border: 0;
}
.dl3d-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--stout);
}
.dl3d-sub {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--text-subtle);
}
.dl3d-options { display: flex; flex-direction: column; gap: 0.6rem; }
.dl3d-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  background: var(--blanche);
  border: 1px solid var(--border-regular);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--stout);
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.2s var(--easing), background 0.2s var(--easing);
}
.dl3d-option:hover {
  border-color: var(--ambree);
  background: #fff;
  color: var(--stout);
}
.dl3d-option strong {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--stout);
  text-transform: none;
}
.dl3d-option span {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}
.dl3d-option:hover strong { color: var(--stout); }
.dl3d-option:hover span { color: var(--text-subtle); }
.dl3d-note {
  margin: 1rem 0 0;
  padding: 0.65rem 0.8rem;
  background: rgba(200, 114, 32, 0.08);
  border-left: 3px solid var(--ambree);
  border-radius: 2px;
  font-size: 0.8125rem;
  color: var(--stout);
  line-height: 1.5;
}

/* ===== Accessibilité ===== */
*:focus-visible {
  outline: 2px solid var(--ambree);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
