/* Latitudes Françaises - personalizer (product page). Brand tokens shared with the theme CSS. */
.lf-personnalisable {
  --lf-ink: #1F2A44;
  --lf-gold: #B08D57;
  --lf-ivory: #F6F1E8;
  --lf-paper: #FBF8F2;
  --lf-line: rgba(31, 42, 68, .16);
}

/* Preview in place of the gallery */
.lf-preview { position: sticky; top: 24px; }
.lf-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: var(--lf-ivory);
  box-shadow: 0 18px 40px rgba(31, 42, 68, .18), 0 2px 6px rgba(31, 42, 68, .08);
  box-sizing: border-box;
  transition: border-color .25s ease, border-width .25s ease;
  border: 0 solid transparent;
}
.lf-canvas { width: 100%; aspect-ratio: 3 / 4; }
.lf-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.lf-frame--noir, .lf-frame--blanc, .lf-frame--naturel, .lf-frame--fonce { border-width: 14px; }
.lf-frame--50.lf-frame--noir, .lf-frame--50.lf-frame--blanc, .lf-frame--50.lf-frame--naturel, .lf-frame--50.lf-frame--fonce { border-width: 10px; }
.lf-frame--noir { border-color: #1C1C1C; }
.lf-frame--blanc { border-color: #F4F3EF; box-shadow: 0 18px 40px rgba(31, 42, 68, .18), inset 0 0 0 1px rgba(0, 0, 0, .06); }
.lf-frame--naturel { border-color: #C9A57B; }
.lf-frame--fonce { border-color: #5A3D2B; }
.lf-preview__note { margin: 14px auto 0; max-width: 560px; text-align: center; font-size: 12px; color: rgba(31, 42, 68, .6); }

/* Controls */
.lf-perso { margin: 0 0 8px; color: var(--lf-ink); }
.lf-step { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.lf-step:first-child { margin-top: 0; }
.lf-step label { margin: 0; font: inherit; letter-spacing: inherit; }
.lf-step__n {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--lf-ink); color: var(--lf-paper);
  font-size: 12px; letter-spacing: 0;
}
.lf-perso input[type="text"] {
  display: block; width: 100%; box-sizing: border-box;
  margin: 0 0 8px; padding: 12px 14px;
  border: 1px solid var(--lf-line); border-radius: 6px;
  background: #fff; color: var(--lf-ink); font-size: 15px;
}
.lf-perso input[type="text"]:focus { outline: none; border-color: var(--lf-gold); box-shadow: 0 0 0 3px rgba(176, 141, 87, .18); }
.lf-search { position: relative; }
.lf-results {
  position: absolute; z-index: 20; top: 100%; left: 0; right: 0;
  margin: -4px 0 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--lf-line); border-radius: 6px;
  box-shadow: 0 12px 28px rgba(31, 42, 68, .14);
}
.lf-results li { padding: 10px 14px; font-size: 14px; cursor: pointer; }
.lf-results li:hover { background: var(--lf-ivory); }
.lf-hint { margin: 2px 0 0; font-size: 12.5px; color: rgba(31, 42, 68, .65); }

.lf-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lf-swatch {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 8px; border: 1px solid var(--lf-line); border-radius: 6px;
  background: #fff; color: var(--lf-ink); font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden;
}
.lf-swatch span { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 1px solid rgba(0, 0, 0, .1); }
.lf-swatch--ivoire span { background: linear-gradient(135deg, #F3EEE4 50%, #22304A 50%); }
.lf-swatch--nuit span { background: linear-gradient(135deg, #142238 50%, #E2C27D 50%); }
.lf-swatch--sable span { background: linear-gradient(135deg, #E9DCC8 50%, #4B3426 50%); }
.lf-swatch--moderne span { background: linear-gradient(135deg, #FFFFFF 50%, #111111 50%); }
.lf-swatch--asphalte span { background: linear-gradient(135deg, #2A2C2E 50%, #ECEAE5 50%); }
.lf-swatch--nautique span { background: linear-gradient(135deg, #F4F1EA 50%, #1F3B5A 50%); }
.lf-swatch--pastel span { background: linear-gradient(135deg, #F6DCD3 50%, #3B2F5B 50%); }
.lf-swatch--ocean span { background: linear-gradient(135deg, #E7F0F1 50%, #2E6F86 50%); }
.lf-swatch--abstract span { background: linear-gradient(135deg, #F2EDE4 50%, #E07A5F 50%); }
.lf-swatch--nara span { background: linear-gradient(135deg, #EFE7DA 50%, #7A5C3E 50%); }
.lf-swatch--gaia span { background: linear-gradient(135deg, #E8ECE2 50%, #2F4A3A 50%); }
.lf-swatch--playhome span { background: linear-gradient(135deg, #FFF6E5 50%, #FF6B6B 50%); }
.lf-swatch--sky span { background: linear-gradient(135deg, #EAF4FB 50%, #2A6FB0 50%); }
.lf-swatch--humble span { background: linear-gradient(135deg, #ECE9E4 50%, #5C5C5C 50%); }
.lf-swatch[aria-pressed="true"], .lf-chip[aria-pressed="true"] { border-color: var(--lf-ink); box-shadow: inset 0 0 0 1px var(--lf-ink); }
.lf-markers { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; }
.lf-markers > span { margin-right: 4px; color: rgba(31, 42, 68, .7); }
.lf-chip { padding: 6px 12px; border: 1px solid var(--lf-line); border-radius: 999px; background: #fff; color: var(--lf-ink); font-size: 13px; cursor: pointer; }

@media (max-width: 689px) {
  .lf-preview { position: static; margin-bottom: 8px; }
  .lf-frame--noir, .lf-frame--blanc, .lf-frame--naturel, .lf-frame--fonce { border-width: 9px; }
}

/* Scenes: tabs + stage (plain preview, or photo with the object placed on it) */
.lf-scene-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 auto 14px; max-width: 560px; }
.lf-scene-tab { padding: 7px 14px; border: 1px solid var(--lf-line); border-radius: 999px; background: #fff; color: var(--lf-ink); font-size: 12.5px; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.lf-scene-tab[aria-pressed="true"] { background: var(--lf-ink); color: var(--lf-paper); border-color: var(--lf-ink); }
.lf-stage { position: relative; max-width: 560px; margin: 0 auto; }
.lf-stage--scene { aspect-ratio: 1 / 1; background-size: cover; background-position: center; overflow: hidden; border-radius: 4px; }
.lf-stage--scene .lf-frame { position: absolute; max-width: none; margin: 0; box-shadow: 0 10px 22px rgba(40, 30, 20, .28), 0 2px 5px rgba(40, 30, 20, .18); }
.lf-stage--scene .lf-frame .lf-canvas { height: 100%; width: 100%; aspect-ratio: auto !important; }
.lf-stage--scene .lf-frame--noir, .lf-stage--scene .lf-frame--blanc, .lf-stage--scene .lf-frame--naturel, .lf-stage--scene .lf-frame--fonce { border-width: 6px; }

/* Phone case look: rounded corners, white rim of the tough case, camera opening */
.lf-frame--case { max-width: 270px; border-radius: 13% / 6.4%; overflow: hidden; border: 3px solid #F7F7F5 !important; background: #F7F7F5; }
.lf-frame--case .lf-canvas { position: relative; }
.lf-frame--case::after {
  content: ""; position: absolute; z-index: 2; left: 6%; top: 3%; width: 33%; aspect-ratio: 1 / 1;
  border-radius: 24%; background: rgba(20, 20, 22, .82); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
  pointer-events: none;
}
.lf-stage--scene .lf-frame--case { border-radius: 13% / 6.4%; box-shadow: 0 16px 30px rgba(40, 30, 20, .32), 0 3px 6px rgba(40, 30, 20, .2); }
@media (max-width: 689px) { .lf-swatches { grid-template-columns: repeat(3, 1fr); } }

/* Option sliders: styles (poster thumbnails), shapes and markers (icons) */
.lf-sublabel { margin: 16px 0 8px; font-size: 13px; color: rgba(31, 42, 68, .7); }
.lf-slider { position: relative; display: flex; align-items: center; gap: 6px; }
.lf-slider__track {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 2px 10px; flex: 1; min-width: 0; scrollbar-width: thin;
}
.lf-slider__nav {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--lf-line);
  background: #fff; color: var(--lf-ink); font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.lf-slider__nav:hover { border-color: var(--lf-ink); }
.lf-opt {
  flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px; border: 1px solid var(--lf-line); border-radius: 8px; background: #fff; color: var(--lf-ink);
  cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.lf-opt:hover { transform: translateY(-2px); border-color: rgba(31, 42, 68, .4); }
.lf-opt[aria-pressed="true"] { border-color: var(--lf-ink); box-shadow: inset 0 0 0 1px var(--lf-ink), 0 6px 14px rgba(31, 42, 68, .12); }
.lf-opt__name { font-size: 12px; white-space: nowrap; }
.lf-opt--style { width: 92px; }
.lf-opt__thumb { width: 78px; height: 104px; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 6px rgba(31, 42, 68, .15); display: block; }
.lf-opt--shape, .lf-opt--marker { width: 78px; }
.lf-opt__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: var(--lf-ivory); }
.lf-opt__icon svg { width: 28px; height: 28px; fill: rgba(31, 42, 68, .1); stroke: var(--lf-ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.lf-opt__icon svg .lf-ico-fill { fill: var(--lf-gold); stroke: var(--lf-gold); }
.lf-opt[aria-pressed="true"] .lf-opt__icon { background: var(--lf-ink); }
.lf-opt[aria-pressed="true"] .lf-opt__icon svg { stroke: var(--lf-paper); fill: rgba(251, 248, 242, .15); }
.lf-opt[aria-pressed="true"] .lf-opt__icon svg .lf-ico-fill { fill: var(--lf-gold); stroke: var(--lf-gold); }
@media (max-width: 689px) { .lf-slider__nav { display: none; } }
.lf-slider--fits .lf-slider__nav { display: none; }

/* Canvas: no frame, a 2 cm wooden stretcher seen as depth on the right and bottom edges */
.lf-frame--canvas { box-shadow: 4px 4px 0 -1px rgba(0, 0, 0, .14), 7px 7px 0 -1px rgba(0, 0, 0, .09), 0 18px 34px rgba(31, 42, 68, .22) !important; border: 0 !important; }
.lf-stage--scene .lf-frame--canvas { box-shadow: 3px 3px 0 -1px rgba(0, 0, 0, .16), 5px 5px 0 -1px rgba(0, 0, 0, .1), 0 10px 22px rgba(40, 30, 20, .28) !important; }
