/* Lune à parcelles « Amour de Lune ». Tout est rangé sous .sml pour ne pas toucher au reste du site (Shopify ou démo).
   Layout : la Lune occupe la scène, la fiche de la parcelle se pose par-dessus, les lieux suggérés en dessous. Thème sombre par choix. */
.sml {
  --sml-night: #0e1328;
  --sml-night-2: #161c38;
  --sml-ivory: #ece6d6;
  --sml-ivory-soft: #b9b4a8;
  --sml-gold: #e2b866;
  --sml-line: rgba(236, 230, 214, 0.18);
  --sml-display: "Cormorant Garamond", "Garamond", "Baskerville", Georgia, serif;
  --sml-ui: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
  background: var(--sml-night); color: var(--sml-ivory);
  font-family: var(--sml-ui); font-size: 15px; line-height: 1.5;
  display: grid; gap: 20px;
}
.sml *, .sml *::before, .sml *::after { box-sizing: border-box; }
.sml [hidden] { display: none !important; }
.sml-hero { text-align: center; display: grid; gap: 6px; }
.sml-hero h1, .sml-hero h2 { font-family: var(--sml-display); font-weight: 500; font-size: clamp(32px, 6vw, 56px); line-height: 1.05; margin: 0; text-wrap: balance; color: var(--sml-ivory); letter-spacing: 0; }
.sml-hero p { margin: 0 auto; color: var(--sml-ivory-soft); max-width: 52ch; }

.sml-stage { position: relative; height: clamp(400px, 72vh, 700px); border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #1d2550 0%, var(--sml-night-2) 45%, var(--sml-night) 100%); }
.sml-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sml-stage canvas[data-r="moon"] { cursor: grab; touch-action: none; }
.sml-stage canvas.sml-dragging { cursor: grabbing; }
.sml-labels { position: absolute; inset: 0; pointer-events: none; }
.sml-lbl { position: absolute; opacity: 0; transform: translate(-50%, -170%); font-size: 12px; letter-spacing: .04em; white-space: nowrap;
  color: var(--sml-ivory); background: rgba(14, 19, 40, .82); border-radius: 4px; padding: 2px 7px; transition: opacity .2s; font-variant-numeric: tabular-nums; }
.sml-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sml-ivory-soft); font-family: var(--sml-display); font-size: 22px; }
.sml-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 12px; color: var(--sml-ivory-soft); white-space: nowrap; }
.sml-tools { position: absolute; left: 16px; top: 16px; display: flex; gap: 8px; }
.sml-legend { position: absolute; left: 16px; bottom: 14px; margin: 0; padding: 8px 10px; list-style: none; display: grid; gap: 4px;
  font-size: 12px; color: var(--sml-ivory); background: rgba(14, 19, 40, .75); border-radius: 8px; }
.sml-legend li { display: flex; align-items: center; gap: 8px; }
.sml-sw { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.sml-sw-classique { background: rgba(226, 184, 102, .3); border: 1.5px solid var(--sml-gold); }
.sml-sw-amour { background: rgba(240, 143, 176, .55); border: 1.5px solid #f3a6c0; }
.sml-sw-confiance { background: rgba(108, 196, 236, .55); border: 1.5px solid #8fd3f0; }
.sml-sw-cachee { background: rgba(169, 155, 232, .5); border: 1.5px solid #c9bff5; }
.sml-chip .sml-sw { margin-right: 4px; vertical-align: -1px; }
.sml-sw-sold { background: rgba(14, 19, 40, .9); border: 1px solid var(--sml-line); }

.sml-panel { position: absolute; right: 16px; top: 16px; width: min(330px, calc(100% - 32px));
  background: rgba(14, 19, 40, .92); border: 1px solid var(--sml-line); border-radius: 10px; padding: 18px; display: grid; gap: 8px; }
.sml-panel h3 { margin: 0; font-family: var(--sml-display); font-weight: 400; font-size: 28px; line-height: 1.1; color: var(--sml-ivory); letter-spacing: 0; }
.sml-code { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--sml-gold); font-variant-numeric: tabular-nums; }
.sml-panel p { margin: 0; color: var(--sml-ivory-soft); font-size: 14px; }
.sml-panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sml-panel dt { color: var(--sml-ivory-soft); }
.sml-panel dd { margin: 0; }
.sml-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sml-btn { font: inherit; font-weight: 500; border-radius: 8px; padding: 10px 14px; cursor: pointer; border: 1px solid var(--sml-gold); background: var(--sml-gold); color: var(--sml-night); line-height: 1.2; }
.sml-btn.sml-ghost { background: rgba(14, 19, 40, .7); color: var(--sml-ivory); border-color: var(--sml-line); }
.sml-btn.sml-small { padding: 6px 10px; font-size: 13px; }
.sml-btn:focus-visible, .sml-chip:focus-visible { outline: 2px solid var(--sml-gold); outline-offset: 2px; }
.sml-note { font-size: 12px; color: var(--sml-ivory-soft); }
.sml-pay { display: grid; gap: 6px; border-top: 1px solid var(--sml-line); padding-top: 10px; }
.sml-pay-lbl { font-size: 12px; color: var(--sml-ivory-soft); }
.sml-pay-code { font-size: 20px; letter-spacing: .12em; color: var(--sml-gold); font-variant-numeric: tabular-nums; }

.sml-list { display: grid; gap: 10px; }
.sml-list h4 { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--sml-ivory-soft); }
.sml-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sml-chip { font: inherit; font-size: 14px; color: var(--sml-ivory); background: transparent; border: 1px solid var(--sml-line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.sml-chip[aria-pressed="true"] { border-color: var(--sml-gold); color: var(--sml-gold); }
.sml-legal { font-size: 12px; color: var(--sml-ivory-soft); border-top: 1px solid var(--sml-line); padding-top: 14px; margin: 0; display: grid; gap: 4px; }

@media (max-width: 640px) {
  .sml-panel { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; padding: 12px 14px; gap: 6px; }
  .sml-panel h3 { font-size: 22px; } .sml-panel p { font-size: 13px; }
  .sml-hint { display: none; } /* sur téléphone, la consigne est déjà dans le texte au-dessus de la Lune */
  .sml-legend { display: none; } /* sur téléphone, la liste « Nos quartiers » sous la Lune sert de légende */
  .sml-tools { left: 12px; top: 12px; }
}

.sml-counter { display: grid !important; justify-items: center; gap: 6px; margin: 16px auto 0 !important; max-width: calc(100% - 32px); text-align: center; font-variant-numeric: lining-nums; }
.sml-ed-tag { display: flex; align-items: center; gap: 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; padding-left: .34em;
  background: linear-gradient(100deg, #c9963f 0%, #f6dc9c 40%, #fff3d0 50%, #f6dc9c 60%, #c9963f 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.sml-ed-tag::before, .sml-ed-tag::after { content: ""; width: clamp(28px, 8vw, 64px); height: 1px; background: linear-gradient(90deg, transparent, rgba(226,184,102,.7)); }
.sml-ed-tag::after { background: linear-gradient(270deg, transparent, rgba(226,184,102,.7)); }
.sml-ed-line { font-family: var(--sml-display); font-style: italic; font-size: 17px; color: rgba(236,230,214,.82); text-wrap: balance; }
.sml-ed-line b { font-style: normal; font-weight: 600; color: var(--sml-gold); font-size: 1.12em; }
.sml-ed-dot { color: var(--sml-gold); opacity: .7; margin: 0 .35em; font-style: normal; }
.sml-ed-bar { display: block; width: 120px; height: 2px; border-radius: 2px; background: rgba(236,230,214,.12); overflow: hidden; }
.sml-ed-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9963f, #f6dc9c); }
@media (prefers-reduced-motion: no-preference) {
  .sml-ed-tag { animation: smlEdReflet 6s ease-in-out infinite; }
  .sml-ed-bar i { animation: smlEdRemplit 1.8s .6s cubic-bezier(.6,0,.2,1) both; }
}
@keyframes smlEdReflet { 0%, 60% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes smlEdRemplit { from { width: 0; } }
.sml-nw { white-space: nowrap; display: inline-block; }
@media (min-width: 700px) { .sml-ed-line { font-size: 19px; } .sml-ed-tag { font-size: 11px; } }
@media (max-width: 480px) { .sml-ed-dot { display: block; height: 0; overflow: hidden; } }

@media (pointer: coarse) { .sml-stage canvas[data-r="moon"] { touch-action: pan-y; } }
.sml-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sml-zoom { display: inline-flex; gap: 4px; } .sml-zoom .sml-btn { width: 34px; padding-inline: 0; font-size: 18px; line-height: 1; }
.sml-hint-flash { color: var(--sml-gold) !important; }
