/* Configurateur /custom — desktop figé + panneau flottant · mobile = scroll page */

/*
 * DEV (rideon-2026) : body { background: #000 }.
 * BF (legacy style.css) : body sans fond → blanc sous le header sticky
 * rgba(0,0,0,.85)+blur → header plus clair. Même fond noir que la scène.
 */
html:has(body.custom-page) {
  background-color: var(--black-pure, #000);
}

body.custom-page {
  --font-main: "Space Grotesk", sans-serif;
  --font-headline: "mono45-headline", Impact, sans-serif;
  --headline-word-spacing: 0;
  --h3-size: clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  font-family: var(--font-main);
  font-size: 16px; /* DEV body ; legacy BF = 14px → textes/rem perçus plus denses */
  color: var(--white-pure, #fff);
  background-color: var(--black-pure, #000);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* DEV rideon-2026 : box-sizing global. Sans ça .custom-panel width+padding ≈ 434px vs 400. */
body.custom-page,
body.custom-page *,
body.custom-page *::before,
body.custom-page *::after {
  box-sizing: border-box;
}

body.custom-page .site-top {
  flex: 0 0 auto;
}

body.custom-page .site-footer,
.custom-page .site-footer,
body.custom-page .rideon-community,
body.custom-page .rideon-reassurance,
body.custom-page .bf-community-2026,
body.custom-page .site-bottom {
  display: none !important;
}

/* Desktop : page figée, seul le panneau interne scroll */
@media (min-width: 901px) {
  html:has(body.custom-page) {
    height: 100%;
    overflow: hidden;
  }

  body.custom-page {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.admin-bar.custom-page {
    height: calc(100dvh - 32px);
    max-height: calc(100dvh - 32px);
  }

  /* Étape 3 : scroll de page (mini-boutique), plus de viewport figé */
  html:has(body.custom-page--step-3) {
    height: auto;
    overflow-x: clip;
    overflow-y: auto;
  }

  body.custom-page--step-3 {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow-x: clip;
    overflow-y: visible;
    overscroll-behavior: auto;
  }

  body.admin-bar.custom-page--step-3 {
    height: auto;
    max-height: none;
  }
}

.custom-main {
  --cfg-panel-width: min(380px, calc(100vw - 2rem));
  --cfg-stack-shift: calc(var(--cfg-panel-width) * 0.42 + 1.5rem);
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  color: var(--white-pure, #fff);
  background:
    radial-gradient(ellipse 70% 55% at 68% 42%, rgba(255, 255, 255, 0.1), transparent 58%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(255, 255, 255, 0.05), transparent 50%),
    #0a0a0a;
  overflow: hidden;
}

@media (min-width: 901px) {
  .custom-main {
    min-height: 0;
    overflow: hidden;
  }
}

/* Preview pleine page — décalé à droite pour équilibrer le panneau */
.custom-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: var(--cfg-stack-shift);
  box-sizing: border-box;
  pointer-events: none;
}

.custom-stage__stack {
  position: relative;
  width: min(78vw, 86vh, 920px);
  aspect-ratio: 1;
  margin: 0;
  transform: translateZ(0);
  transform-origin: center center;
}

/* GT / GTS / XRC : assets plus « petits » dans le cadre → zoom x2 de tout le stack */
.custom-stage.is-zoom-2x .custom-stage__stack {
  transform: translateZ(0) scale(2);
}

.custom-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.custom-stage__name {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vh, 2rem);
  z-index: 2;
  margin: 0;
  font-family: var(--font-headline, Impact, sans-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* Panneau flottant gauche */
.custom-panel {
  position: absolute;
  z-index: 5;
  top: clamp(0.75rem, 2vh, 1.25rem);
  left: clamp(0.75rem, 2vw, 1.25rem);
  bottom: clamp(0.75rem, 2vh, 1.25rem);
  width: var(--cfg-panel-width);
  max-width: var(--cfg-panel-width);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(10, 10, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
  overflow: hidden;
}

/* Titre panneau = Mono45 / --h3-size (comme dialog), pas d’eyebrow Grotesk lime */
.custom-panel__title {
  margin: 0;
  flex: 0 0 auto;
  font-family: var(--font-headline, "mono45-headline", Impact, sans-serif);
  font-size: var(--h3-size);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  word-spacing: var(--headline-word-spacing, 0);
  color: var(--white-pure, #fff);
}

.custom-steps {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.custom-steps__btn {
  position: relative;
  z-index: 0;
  isolation: isolate; /* ::before z-index:-1 reste au-dessus du fond panneau */
  width: 2.5rem;
  height: 2.7rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.25s ease;
}

.custom-steps__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.14);
  /*
   * Data-URI : évite mask SVG externe (auth BF / fetch mask sans credentials
   * → pastille invisible). Fichier source : assets/illustrations/step-blob.svg
   */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90.72 98.2'%3E%3Cpath fill='%23000' d='M90.03 51.19c-2.87-17.41-12.4-33.14-26.5-43.71C45.2-6.27 26.82.24 12.88 16.44a87.6 87.6 0 0 0-9.66 13.61C-.61 36.68-.75 43.86 1.35 51.19c2.15 7.51 5.1 14.62 9.05 21.37 7.36 12.56 18.3 22.49 33.06 25.1 12.93 2.28 22.69-2.84 32.22-10.74 8.08-6.7 14.26-13.46 14.95-24.45.24-3.84.04-7.42-.6-11.27Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90.72 98.2'%3E%3Cpath fill='%23000' d='M90.03 51.19c-2.87-17.41-12.4-33.14-26.5-43.71C45.2-6.27 26.82.24 12.88 16.44a87.6 87.6 0 0 0-9.66 13.61C-.61 36.68-.75 43.86 1.35 51.19c2.15 7.51 5.1 14.62 9.05 21.37 7.36 12.56 18.3 22.49 33.06 25.1 12.93 2.28 22.69-2.84 32.22-10.74 8.08-6.7 14.26-13.46 14.95-24.45.24-3.84.04-7.42-.6-11.27Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background 0.25s ease;
}

.custom-steps__btn.is-active,
.custom-steps__btn:hover {
  color: #0b0b0b;
}

.custom-steps__btn.is-active::before,
.custom-steps__btn:hover::before {
  background: var(--electric-lime, #e9ff00);
}

.custom-steps__random {
  margin-left: auto;
  appearance: none;
  height: 2.35rem;
  padding: 0 0.9rem;
  border-radius: var(--pill-radius, 100px);
  border: 1px solid var(--white-pure, #fff);
  background: transparent;
  color: var(--white-pure, #fff);
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.custom-steps__random:hover {
  background: var(--electric-lime, #e9ff00);
  border-color: var(--electric-lime, #e9ff00);
  color: var(--black-pure, #000);
  transform: translateY(-1px);
}

.custom-panel__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  /* Marge pour ring lime des swatches (gauche) + piste scrollbar (droite). */
  padding: 0.2rem 0.65rem 0.35rem 0.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.custom-panel__scroll::-webkit-scrollbar {
  width: 6px;
}

.custom-panel__scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: var(--pill-radius, 100px);
}

.custom-panel__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.custom-panel__pages {
  min-height: min-content;
}

.custom-field {
  margin-bottom: 1.15rem;
}

.custom-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.custom-field__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.custom-field__label {
  display: block;
  margin: 0 0 0.55rem;
  font-family: var(--font-headline, Impact, sans-serif);
  font-size: 1.25rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--white-pure, #fff);
}

.custom-field__head .custom-field__label {
  margin: 0;
}

/* Infobulle accessoire (?) */
.custom-tip {
  position: relative;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.custom-tip__mark {
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.custom-tip__bubble {
  position: absolute;
  left: 0;
  top: calc(100% + 0.45rem);
  z-index: 40;
  width: min(16.5rem, 72vw);
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 20, 0.96);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.custom-tip:hover .custom-tip__bubble,
.custom-tip:focus-visible .custom-tip__bubble,
.custom-tip.is-open .custom-tip__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-tip:hover,
.custom-tip:focus-visible,
.custom-tip.is-open {
  border-color: var(--electric-lime, #e9ff00);
  color: var(--electric-lime, #e9ff00);
  outline: none;
}

.custom-swatch-group__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
}

.custom-swatch-group__head .custom-swatch-group__label {
  margin: 0;
}

.custom-swatch-group__head .custom-tip {
  width: 1rem;
  height: 1rem;
}

.custom-swatch-group__head .custom-tip__mark {
  font-size: 0.62rem;
}

.custom-field__selected {
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
  text-align: right;
}

.custom-field__hint {
  margin: 0 0 0.65rem;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
}

.custom-swatch--oem .custom-swatch__chip {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.custom-radios {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.custom-radios--boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
}

.custom-radio {
  display: block;
  cursor: pointer;
}

.custom-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Options planche / rails : opaques. Idle = surface-dark · selected = lime */
.custom-radio__ui {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--surface-mute, #dedede);
  background: var(--surface-dark, #1a1a1a);
  color: var(--white-pure, #fff);
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.84rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.custom-radio__ui small {
  color: inherit;
  opacity: 0.65;
  font-size: 0.72rem;
  white-space: nowrap;
}

.custom-radio:hover .custom-radio__ui {
  border-color: var(--electric-lime, #e9ff00);
}

.custom-radio input:checked + .custom-radio__ui {
  border-color: var(--electric-lime, #e9ff00);
  background: var(--electric-lime, #e9ff00);
  color: var(--black-pure, #000);
}

.custom-radio input:checked + .custom-radio__ui small {
  opacity: 0.75;
}

.custom-radio.is-missing .custom-radio__ui {
  opacity: 0.55;
}

.custom-radio.is-oos {
  cursor: pointer;
}

.custom-radio.is-oos .custom-radio__ui {
  opacity: 0.72;
  text-decoration: line-through;
}

.custom-radio.is-oos.is-preview .custom-radio__ui,
.custom-radio.is-preview .custom-radio__ui {
  text-decoration: none;
  opacity: 1;
}

/* Swatches couleurs */
.custom-swatch-groups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-swatch-group__label {
  margin: 0 0 0.35rem;
  font-family: var(--font-headline, Impact, sans-serif);
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.custom-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  /* Respiration pour le ring lime — taille des chips inchangée (2rem). */
  padding: 0.35rem 0.25rem;
}

.custom-swatch {
  position: relative;
  display: block;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}

.custom-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-swatch__chip {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--pill-radius, 100px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: #2a2a2a;
  background-image: var(--swatch-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.custom-swatch:hover .custom-swatch__chip {
  transform: translateY(-1px);
}

.custom-swatch input:checked + .custom-swatch__chip {
  border-color: #fff;
  box-shadow:
    0 0 0 2px #0a0a0a,
    0 0 0 4px var(--electric-lime, #e9ff00),
    inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.custom-swatch.is-missing .custom-swatch__chip {
  opacity: 0.45;
}

/* Rupture stock : swatch barré, cliquable → dialog OOS */
.custom-swatch.is-oos {
  cursor: pointer;
}

.custom-swatch.is-oos .custom-swatch__chip {
  /* Couleur pleine (pas d’opacité) — seule la barre indique la rupture. */
  position: relative;
}

.custom-swatch.is-oos .custom-swatch__chip::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    transparent 46%,
    rgba(255, 255, 255, 0.9) 48%,
    rgba(255, 255, 255, 0.9) 52%,
    transparent 54%
  );
  pointer-events: none;
}

.custom-swatch.is-oos:hover .custom-swatch__chip {
  transform: none;
}

.custom-swatch.is-oos input:checked + .custom-swatch__chip,
.custom-swatch.is-preview input:checked + .custom-swatch__chip {
  border-color: #fff;
  box-shadow:
    0 0 0 2px #0a0a0a,
    0 0 0 4px rgba(255, 255, 255, 0.45),
    inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.custom-swatch--none .custom-swatch__chip {
  background:
    linear-gradient(135deg, transparent 46%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.55) 52%, transparent 54%),
    var(--surface-dark, #1a1a1a);
}

.custom-swatch--fallback .custom-swatch__chip {
  background-image: none;
}

/* Étape 3 — grille Protections / Accessoires (miniatures + prix) */
.custom-field--step3 + .custom-field--step3 {
  margin-top: 0.85rem;
}

.custom-acc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.custom-accessories__empty {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.custom-acc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white-pure, #fff);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.custom-acc-card__hit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  cursor: pointer;
}

.custom-acc-card__hit input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-acc-card:hover {
  border-color: rgba(233, 255, 0, 0.55);
  background: rgba(255, 255, 255, 0.07);
}

.custom-acc-card.is-selected {
  border-color: var(--electric-lime, #e9ff00);
  background: rgba(233, 255, 0, 0.1);
  box-shadow: inset 0 0 0 1px rgba(233, 255, 0, 0.35);
}

.custom-acc-card.is-missing {
  opacity: 0.5;
}

.custom-acc-card.is-missing .custom-acc-card__hit {
  cursor: not-allowed;
}

.custom-acc-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f4f5;
}

.custom-acc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
  box-sizing: border-box;
}

.custom-acc-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 30%, rgba(76, 192, 232, 0.2), transparent 55%),
    #f4f4f5;
}

.custom-acc-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0 0.15rem 0.1rem;
}

.custom-acc-card__name {
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
}

.custom-acc-card__price {
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.custom-acc-card.is-selected .custom-acc-card__price {
  color: rgba(233, 255, 0, 0.9);
}

.custom-acc-card__check {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.custom-acc-card.is-selected .custom-acc-card__check {
  border-color: transparent;
  background: var(--electric-lime, #e9ff00);
}

.custom-acc-card.is-selected .custom-acc-card__check::after {
  content: '';
  position: absolute;
  left: 0.32rem;
  top: 0.14rem;
  width: 0.28rem;
  height: 0.5rem;
  border: solid #111;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-acc-card__variant {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.15rem 0.15rem;
}

.custom-acc-card__variant-label {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.custom-acc-card__variant select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  padding: 0.35rem 0.45rem;
}

.custom-acc-card__variant select:disabled {
  opacity: 0.45;
}

/* ——— Étape 3 : mini-boutique (codes /shop) ——— */
.custom-main.is-step-3 {
  --cfg-panel-width: 100%;
  --cfg-stack-shift: 0px;
  --cfg-upsell-bg: #ffffff;
  --cfg-upsell-ink: #0b0b0b;
  --cfg-upsell-muted: #444444;
  --cfg-upsell-line: #e8e8e8;
  --cfg-upsell-surface: #f5f5f5;
  --shop-card-media: var(--surface-light, #f5f5f5);
  --container-width: 1440px;
  display: block;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  color: var(--cfg-upsell-ink);
  background: var(--cfg-upsell-bg);
  font-size: 16px;
  line-height: 1.5;
}

.custom-main.is-step-3 .custom-panel {
  position: relative;
  inset: auto;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  color: var(--cfg-upsell-ink);
}

.custom-main.is-step-3 .custom-panel__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.custom-main.is-step-3 .custom-panel__scroll {
  flex: none;
  min-height: 0;
  height: auto;
  overflow: visible;
  padding: 0;
  scrollbar-gutter: auto;
}

.custom-main.is-step-3 .custom-page--upsell {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.custom-main.is-step-3 .custom-steps__btn {
  color: rgba(17, 17, 17, 0.45);
}

.custom-main.is-step-3 .custom-steps__btn::before {
  background: rgba(17, 17, 17, 0.1);
}

.custom-main.is-step-3 .custom-steps__btn.is-active,
.custom-main.is-step-3 .custom-steps__btn:hover {
  color: #0b0b0b;
}

.custom-main.is-step-3 .custom-steps__btn.is-active::before,
.custom-main.is-step-3 .custom-steps__btn:hover::before {
  background: var(--electric-lime, #e9ff00);
}

/* Sous-header sticky : étapes + titre (sans preview) */
.custom-upsell-bar {
  position: sticky;
  top: var(--site-top-offset, 100px);
  z-index: 30;
  margin: 0;
  padding: 0.7rem 20px;
  border-bottom: 1px solid var(--cfg-upsell-line, #e8e8e8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.custom-upsell-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.5rem;
  max-width: var(--container-width, 1440px);
  margin: 0 auto;
}

.custom-upsell-bar__steps {
  flex: 0 0 auto;
}

.custom-upsell-bar__steps .custom-steps {
  margin: 0;
}

.custom-upsell-bar__copy {
  flex: 1 1 14rem;
  min-width: 0;
}

.custom-upsell-bar__title {
  margin: 0 0 0.15rem;
  font-family: var(--font-headline, 'mono45-headline', Impact, sans-serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--cfg-upsell-ink, #111);
}

.custom-upsell-bar__text {
  margin: 0;
  max-width: 40rem;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: clamp(0.9rem, 1.8vw, 1.02rem);
  line-height: 1.45;
  color: var(--cfg-upsell-muted, #444);
}

/* Zone boutique */
.custom-upsell-shop {
  width: 100%;
  max-width: var(--container-width, 1440px);
  margin: 0 auto;
  padding: 1.75rem 20px 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.custom-shop-section__head {
  /* div : évite style.css `header { position:fixed }` */
  position: relative;
  z-index: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0 0 0.55rem;
  border: 0;
  border-bottom: 1px solid var(--cfg-upsell-line, rgba(17, 17, 17, 0.1));
  background: transparent;
  width: auto;
  top: auto;
  left: auto;
  right: auto;
}

.custom-shop-section__title {
  margin: 0;
  font-family: var(--font-headline, 'mono45-headline', Impact, sans-serif);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--cfg-upsell-ink, #111);
}

.custom-shop-section__meta {
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cfg-upsell-muted, rgba(17, 17, 17, 0.5));
}

.custom-main.is-step-3 .custom-acc-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.25rem;
}

/* Produits : calque shop-card (/shop) */
.custom-main.is-step-3 .custom-acc-card {
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--cfg-upsell-ink);
  box-shadow: none;
  overflow: visible;
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.custom-main.is-step-3 .custom-acc-card:hover {
  border: 0;
  background: transparent;
  transform: scale(1.02);
}

.custom-main.is-step-3 .custom-acc-card.is-selected {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.custom-main.is-step-3 .custom-acc-card__hit {
  gap: 0;
}

.custom-main.is-step-3 .custom-acc-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  min-height: 240px;
  max-height: 240px;
  margin: 0 0 1rem;
  padding: 10px;
  aspect-ratio: auto;
  border-radius: 30px;
  background: var(--shop-card-media, #f5f5f5);
  outline: 2px solid transparent;
  outline-offset: 0;
  transition: outline-color 0.2s ease;
}

.custom-main.is-step-3 .custom-acc-card__media img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  padding: 0;
  object-fit: contain;
}

.custom-main.is-step-3 .custom-acc-card.is-selected .custom-acc-card__media {
  outline-color: #0b0b0b;
  box-shadow: 0 0 0 3px rgba(233, 255, 0, 0.65);
}

.custom-main.is-step-3 .custom-acc-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.35rem;
  text-align: center;
}

.custom-main.is-step-3 .custom-acc-card__name {
  margin: 0;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-wrap: balance;
  color: #0b0b0b;
}

.custom-main.is-step-3 .custom-acc-card__price {
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: #363636;
}

.custom-main.is-step-3 .custom-acc-card.is-selected .custom-acc-card__price {
  color: #0b0b0b;
}

.custom-main.is-step-3 .custom-acc-card__check {
  top: 0.85rem;
  right: 0.85rem;
}

/* Swatches taille — même langage que PDP (button-variable-items) */
.custom-main.is-step-3 .custom-acc-card__sizes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
  padding: 0 0.25rem;
}

.custom-main.is-step-3 .custom-acc-card__variant-label {
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #363636;
}

.custom-acc-size-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.custom-acc-size {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.custom-acc-size input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-acc-size__ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d1d1d1;
  border-radius: 999px;
  background: #f5f5f5;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  color: #363636;
  white-space: nowrap;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.custom-acc-size:hover .custom-acc-size__ui {
  border-color: #363636;
}

.custom-acc-size.is-selected .custom-acc-size__ui,
.custom-acc-size input:checked + .custom-acc-size__ui {
  border-color: #363636;
  box-shadow: 0 0 0 1px #363636;
  background: #fff;
}

.custom-acc-size.is-oos {
  cursor: not-allowed;
  opacity: 0.4;
}

.custom-main.is-step-3 .custom-accessories__empty {
  color: var(--cfg-upsell-muted);
}

/* Footer sticky sous-total — barre boutique + mini preview planche
 * Colonne gauche ~4.5rem : pastille Axeptio (bas-gauche, ~48px) ne masque plus meta/preview. */
.custom-main.is-step-3 .custom-summary {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(4.5rem, 1fr) auto auto minmax(0, 1.25fr);
  grid-template-areas:
    'lines lines lines lines'
    '. meta preview actions'
    'note note note note'
    'status status status status';
  column-gap: 0.85rem;
  row-gap: 0.45rem;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.55rem 20px calc(0.55rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--cfg-upsell-line, #e8e8e8);
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04);
}

/* Mini preview à droite du sous-total, hauteur = footer */
.custom-summary__preview {
  display: none;
}

.custom-main.is-step-3 .custom-summary__preview {
  --cfg-crop-aspect: 1.75;
  grid-area: preview;
  position: relative;
  display: block;
  height: 56px;
  width: auto;
  max-width: 120px;
  aspect-ratio: var(--cfg-crop-aspect, 1.75);
  flex: 0 0 auto;
  align-self: center;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.custom-main.is-step-3 .custom-summary__preview[hidden] {
  display: none !important;
}

.custom-main.is-step-3 .custom-summary__lines {
  grid-area: lines;
  display: none;
  max-height: 10rem;
  margin: 0 0 0.15rem;
  padding: 0.55rem 0.75rem;
  overflow-y: auto;
  border: 1px solid var(--cfg-upsell-line, #e8e8e8);
  border-radius: 12px;
  background: #fafafa;
  scrollbar-color: rgba(17, 17, 17, 0.25) transparent;
}

.custom-main.is-step-3 .custom-summary.is-recap-open .custom-summary__lines {
  display: block;
}

.custom-main.is-step-3 .custom-summary__line {
  color: rgba(11, 11, 11, 0.62);
}

.custom-main.is-step-3 .custom-summary__line-price {
  color: rgba(11, 11, 11, 0.9);
}

/* Pack / Offert / remise : bleu Ride On lisible sur fond clair (pas lime ni vert) */
.custom-main.is-step-3 .custom-summary__line--discount,
.custom-main.is-step-3 .custom-summary__line--discount .custom-summary__line-label,
.custom-main.is-step-3 .custom-summary__line--discount .custom-summary__line-price,
.custom-main.is-step-3 .custom-summary__line.is-offered .custom-summary__line-price--offered {
  color: #1789b5; /* dérivé --onewheel-blue #4cc0e8, contraste OK sur blanc */
  font-weight: 600;
}

.custom-main.is-step-3 .custom-summary__line-price--offered s {
  color: rgba(11, 11, 11, 0.35);
  font-weight: 400;
}

.custom-summary__recap-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: none; /* visible seulement étape 3 */
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0b0b0b;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.custom-main.is-step-3 .custom-summary__recap-toggle {
  display: inline-flex;
}

.custom-summary__recap-toggle[hidden] {
  display: none !important;
}

.custom-summary__recap-toggle::after {
  content: '▾';
  display: inline-block;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.custom-summary.is-recap-open .custom-summary__recap-toggle::after {
  transform: rotate(180deg);
}

.custom-main.is-step-3 .custom-summary__total {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin: 0;
  text-align: left;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #666;
}

.custom-main.is-step-3 .custom-summary__total strong {
  font-family: var(--font-headline, 'mono45-headline', Impact, sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #0b0b0b;
}

.custom-main.is-step-3 .custom-summary__note {
  grid-area: note;
  margin: 0;
  font-size: 0.8rem;
  color: var(--cfg-upsell-muted);
}

.custom-main.is-step-3 .custom-summary__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.55rem;
  width: auto;
  max-width: none;
  margin: 0;
}

.custom-main.is-step-3 .custom-summary__status {
  grid-area: status;
  margin: 0;
  color: #363636;
}

.custom-main.is-step-3 .custom-summary__status a {
  color: #0b0b0b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.custom-main.is-step-3 .custom-summary__actions .btn-pill-shop--ghost {
  border-color: #0b0b0b;
  color: #0b0b0b;
  background: #fff;
}

.custom-main.is-step-3 .custom-summary__actions .btn-pill-shop,
.custom-main.is-step-3 .custom-summary__actions .btn-pill-shop--ghost,
.custom-main.is-step-3 .custom-summary__actions .btn-pill-blue {
  min-height: 2.75rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Mini preview footer : stage = fenêtre ; stack scalé en JS */
.custom-main.is-step-3 .custom-summary__preview .custom-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  padding-left: 0;
  border-radius: 0;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.custom-main.is-step-3 .custom-summary__preview .custom-stage__stack {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  margin: 0;
  opacity: 1;
  transition: none;
}

/* Le crop JS pose le transform inline ; neutralise le zoom stage desktop. */
.custom-main.is-step-3 .custom-summary__preview .custom-stage.is-zoom-2x .custom-stage__stack {
  transform: none;
}

.custom-main.is-step-3 .custom-summary__preview .custom-layer {
  object-fit: contain;
  object-position: center;
  width: 100%;
  height: 100%;
}

.custom-main.is-step-3 .custom-summary__preview .custom-stage__name {
  display: none;
}

/* Planche principale masquée à l’étape 3 (mini-preview footer uniquement) */
.custom-main.is-step-3 > .custom-stage {
  display: none !important;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.custom-summary {
  flex: 0 0 auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-summary__lines {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0 0 0.65rem;
  /* Desktop : ~8–9 lignes (Elite + plug + remise) sans mini-scroll ; mobile override plus bas */
  max-height: 10.75rem;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.custom-summary__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.custom-summary__line-label {
  min-width: 0;
}

.custom-summary__line-price {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-variant-numeric: tabular-nums;
}

.custom-summary__line.is-missing {
  color: rgba(255, 120, 120, 0.92);
}

.custom-summary__line.is-missing .custom-summary__line-price {
  color: rgba(255, 120, 120, 0.92);
}

.custom-summary__line.is-offered .custom-summary__line-price--offered,
.custom-summary__line--discount .custom-summary__line-price {
  color: var(--electric-lime, #e9ff00);
}

.custom-summary__line-price--offered s {
  color: rgba(255, 255, 255, 0.4);
  margin-right: 0.25rem;
}

.custom-summary__line-price--sale s,
.custom-summary__line.is-sale .custom-summary__line-price s {
  color: rgba(255, 255, 255, 0.45);
  margin-right: 0.25rem;
  font-weight: 400;
}

.custom-summary__line--discount {
  color: var(--electric-lime, #e9ff00);
}

.custom-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.95rem;
}

.custom-summary__total strong {
  font-size: 1.2rem;
  color: var(--electric-lime, #e9ff00);
}

.custom-summary__note {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
}

.custom-summary__note.is-error {
  color: #ff3b30; /* rouge Ride On (notices / validation) */
}

.custom-summary__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Boutons summary = .btn-pill-* (style.css) */
.custom-summary__actions .btn-pill-shop,
.custom-summary__actions .btn-pill-shop--ghost,
.custom-summary__actions .btn-pill-blue {
  flex: 1 1 auto;
}

.custom-summary__actions .btn-pill-shop:disabled,
.custom-summary__actions .btn-pill-shop--ghost:disabled,
.custom-summary__actions .btn-pill-blue:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.custom-summary__status {
  min-height: 1.1rem;
  margin: 0.65rem 0 0;
  font-family: var(--font-main, 'Space Grotesk', sans-serif);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.custom-summary__status.is-error {
  color: #ff3b30; /* rouge Ride On */
  font-weight: 600;
}

.custom-summary__status a {
  color: var(--electric-lime, #e9ff00);
}

@media (min-width: 1400px) {
  .custom-main {
    --cfg-panel-width: 400px;
    --cfg-stack-shift: calc(var(--cfg-panel-width) * 0.4 + 2rem);
  }

  .custom-main.is-step-3 {
    --cfg-panel-width: 100%;
    --cfg-stack-shift: 0px;
  }

  .custom-stage__stack {
    width: min(72vw, 84vh, 1040px);
  }
}

@media (max-width: 1100px) {
  .custom-main.is-step-3 .custom-acc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .custom-upsell-bar__inner {
    gap: 0.55rem 1rem;
  }
}

@media (max-width: 720px) {
  .custom-main.is-step-3 .custom-acc-card__media {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    border-radius: 22px;
  }
}

@media (max-width: 380px) {
  .custom-acc-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— Mobile : scroll de page (descendre options · remonter voir la board) ——— */
@media (max-width: 900px) {
  html:has(body.custom-page) {
    height: auto;
    overflow-x: clip;
    overflow-y: auto;
  }

  body.custom-page {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow-x: clip;
    overflow-y: visible;
    overscroll-behavior: auto;
  }

  .custom-main {
    --cfg-stack-shift: 0px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .custom-stage {
    position: sticky;
    /* inset:auto APRÈS top remettait top:auto → sticky inopérant sur mobile */
    inset: auto;
    top: var(--site-top-offset, 80px);
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0.45rem 0 0.35rem;
    gap: 0.25rem;
    /* clip le zoom GT/GTS/Rally/XRC (marges vides du cadre asset) */
    overflow: hidden;
    pointer-events: none;
    /* Fond opaque : le panneau défile dessous sans transparaitre */
    background:
      radial-gradient(ellipse 70% 55% at 50% 40%, rgba(255, 255, 255, 0.08), transparent 58%),
      #0a0a0a;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  }

  .custom-stage__name {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    flex: 0 0 auto;
    align-self: flex-start;
    width: auto;
    max-width: calc(100% - 1rem);
    margin: 0 0 0 0.75rem;
    text-align: left;
    font-size: clamp(1.1rem, 4.8vw, 1.45rem);
    opacity: 0.94;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  }

  /* Largeur pleine, hauteur contenue (plus de carré 96vw) */
  .custom-stage__stack {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    height: clamp(200px, 52vw, 280px);
    aspect-ratio: auto;
    transform: translateZ(0) scale(1);
    transform-origin: center center;
  }

  /* Même présence visuelle que Pint : assets GT/GTS/Rally/XRC plus petits dans le cadre */
  .custom-stage.is-zoom-2x .custom-stage__stack {
    transform: translateZ(0) scale(1.82);
  }

  .custom-main.is-step-3 .custom-panel {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .custom-upsell-bar {
    top: var(--site-top-offset, 80px);
    padding: 0.65rem 0.85rem;
  }

  .custom-upsell-shop {
    padding: 1.1rem 0.85rem 1rem;
    gap: 1.5rem;
  }

  .custom-main.is-step-3 .custom-summary__preview .custom-stage {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    flex: none;
    min-height: 0;
    order: initial;
    gap: 0;
    overflow: hidden;
    background: transparent !important;
  }

  .custom-main.is-step-3 .custom-summary__preview .custom-stage__stack {
    flex: none;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
    opacity: 1;
  }

  .custom-main.is-step-3 .custom-summary__preview .custom-stage.is-zoom-2x .custom-stage__stack {
    transform: none;
  }

  .custom-main.is-step-3 .custom-summary {
    /* Sous-total + mini board à droite ; vide à gauche pour Axeptio */
    grid-template-columns: minmax(4.5rem, 1fr) auto auto;
    grid-template-areas:
      'lines lines lines'
      '. meta preview'
      'actions actions actions'
      'note note note'
      'status status status';
    column-gap: 0.75rem;
    row-gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    background: #fff;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06);
  }

  .custom-main.is-step-3 .custom-summary__preview {
    height: 48px;
    max-width: 100px;
    justify-self: end;
  }

  .custom-main.is-step-3 .custom-summary__total {
    justify-self: end;
    align-items: flex-end;
    text-align: right;
  }

  .custom-main.is-step-3 .custom-summary__lines {
    max-height: 8.5rem;
  }

  .custom-main.is-step-3 .custom-summary__actions {
    justify-content: stretch;
  }

  .custom-main.is-step-3 .custom-summary__actions .btn-pill-shop,
  .custom-main.is-step-3 .custom-summary__actions .btn-pill-shop--ghost,
  .custom-main.is-step-3 .custom-summary__actions .btn-pill-blue {
    flex: 1 1 auto;
  }

  .custom-main.is-step-3 .custom-acc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 0.75rem;
  }

  .custom-acc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .custom-panel {
    position: relative;
    inset: auto;
    top: auto;
    left: auto;
    bottom: auto;
    z-index: 2; /* sous .custom-stage sticky */
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    border-radius: 22px 22px 0 0;
    padding: 0.85rem 0.85rem calc(1rem + env(safe-area-inset-bottom, 0px));
    gap: 0.65rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
    overflow: visible;
  }

  .custom-panel__title {
    font-size: clamp(1.15rem, 4vw, 1.45rem);
  }

  /* Plus de scroll interne : le document scroll */
  .custom-panel__scroll {
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
    touch-action: manipulation;
    padding: 0.15rem 0.1rem 0.25rem;
    scrollbar-gutter: auto;
  }

  .custom-field {
    margin-bottom: 0.85rem;
  }

  .custom-field__label {
    font-size: 1.1rem;
  }

  .custom-radios--boards {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .custom-radio__ui {
    min-height: 2.6rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
    align-items: center;
  }

  .custom-swatch {
    width: 2.55rem;
    height: 2.55rem;
  }

  .custom-swatches {
    gap: 0.7rem;
  }

  /* Actions collées en bas d’écran pendant le scroll page */
  .custom-summary {
    position: sticky;
    bottom: 0;
    z-index: 6;
    flex: 0 0 auto;
    margin: 0.35rem -0.85rem calc(-1 * (0.15rem + env(safe-area-inset-bottom, 0px)));
    padding: 0.75rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.94) 18%, rgba(10, 10, 10, 0.98) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Étape 3 : footer déjà light sticky — pas de gradient sombre mobile */

  .custom-summary__lines {
    max-height: 5.5rem;
  }

  .custom-summary__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .custom-summary__actions .btn-pill-shop,
  .custom-summary__actions .btn-pill-shop--ghost,
  .custom-summary__actions .btn-pill-blue {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .custom-summary__actions:has([data-cfg-prev][hidden]) [data-cfg-next]:not([hidden]) {
    grid-column: 1 / -1;
  }

  .custom-summary__status {
    text-align: center;
  }
}

@media (max-width: 420px) {
  .custom-stage__stack {
    height: clamp(190px, 54vw, 250px);
  }

  .custom-stage.is-zoom-2x .custom-stage__stack {
    transform: translateZ(0) scale(1.9);
  }

  .custom-radios--boards {
    grid-template-columns: 1fr;
  }
}

/* —— Dialog OOS (même shell que dialog Acheter PDP) —— */
.cfg-oos-dialog.rideon-dialog__panel,
.cfg-oos-dialog .rideon-dialog__panel {
  width: min(40rem, calc(100vw - 2rem));
}

/* Sécurité : bandeau titre collé au panel (pas le header fixed legacy) */
.cfg-oos-dialog .rideon-dialog__banner {
  position: relative;
  width: auto;
  height: auto;
}

.cfg-oos-dialog__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px 24px;
  align-items: center;
}

.cfg-oos-dialog__illu {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}

.cfg-oos-dialog__illu img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
}

.cfg-oos-dialog__cta-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  max-width: 22rem;
}

.cfg-oos-dialog__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--pill-radius, 100px);
  background: var(--black-pure, #000);
  color: #fff;
  font-family: var(--font-main, "Space Grotesk", system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cfg-oos-dialog__pill:hover {
  background: #000;
  color: #fff;
}

.cfg-oos-dialog__option-text {
  margin: 0;
  padding: 0 4px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.72);
  text-wrap: pretty;
}

.cfg-oos-dialog__body {
  display: flex;
  flex-direction: column;
}

.cfg-oos-dialog__simple-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  align-self: flex-end;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.48);
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cfg-oos-dialog__simple-arrow {
  text-decoration: none;
  font-weight: 700;
}

.cfg-oos-dialog__simple-link:hover {
  color: var(--black-pure, #000);
}

/* Ligne aperçu OOS : toute la ligne en rouge erreur (comme status plug) */
.custom-summary__line.is-preview,
.custom-summary__line.is-preview .custom-summary__line-label,
.custom-summary__line.is-preview .custom-summary__line-price--preview {
  color: #ff3b30;
  text-decoration: none;
}

.custom-summary__line.is-preview .custom-summary__line-price--preview {
  font-weight: 600;
  font-style: normal;
}

.custom-summary__missing-tag {
  font-style: normal;
  opacity: 0.85;
}

html.cfg-oos-dialog-open,
html.cfg-oos-dialog-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

@media (max-width: 640px) {
  .cfg-oos-dialog__layout {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
    text-align: center;
  }

  .cfg-oos-dialog__illu {
    order: -1;
    width: 100%;
  }

  .cfg-oos-dialog__illu img {
    max-width: 120px;
    margin: 0 auto;
  }

  .cfg-oos-dialog__cta-col {
    align-items: stretch;
    width: 100%;
    max-width: 20rem;
    margin-inline: auto;
  }

  .cfg-oos-dialog__option-text {
    text-align: center;
    font-size: 0.85rem;
  }

  .cfg-oos-dialog__simple-link {
    align-self: center;
    text-align: center;
    margin-top: 16px;
  }
}
