@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:ital,wght@1,700&display=swap');

:root {
  --ink: #1f3824;
  --muted: #647268;
  --paper: #f7f1de;
  --surface: #fffdf7;
  --line: #dcd7c5;
  --green: #2e5634;
  --green-dark: #1f4228;
  --yellow: #edbf28;
  --yellow-soft: #f8df82;
  --shadow: 0 24px 70px rgba(46, 86, 52, .16);
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: linear-gradient(90deg, rgba(25,60,34,.96) 0%, rgba(25,60,34,.86) 44%, rgba(25,60,34,.28) 100%), url('assets/salles-background.jpg') center 20% / cover fixed no-repeat; }
button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: white; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
main { max-width: 1240px; margin: auto; padding: 0 32px 80px; }
.hero { min-height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.24); }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; font-weight: 700; }
.brand-logo { position: relative; display: block; width: 238px; height: 50px; overflow: hidden; background: white; }
.brand-logo img { position: absolute; width: 260px; max-width: none; left: -12px; top: -96px; }
.brand-label { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.3); color: rgba(255,255,255,.8); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; }
.privacy-pill { font-size: 12px; color: white; border: 1px solid rgba(255,255,255,.3); padding: 8px 12px; border-radius: 30px; background: rgba(22,52,30,.5); }
.privacy-pill span, .live-dot { display: inline-block; width: 7px; height: 7px; background: var(--green); border-radius: 50%; margin-right: 6px; }
.intro { padding: 54px 0 42px; position: relative; }
.intro::after { content: "300"; position: absolute; right: 4%; top: 20%; color: var(--yellow); font-size: clamp(80px, 12vw, 150px); line-height: 1; font-weight: 700; letter-spacing: -.09em; opacity: .38; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; color: var(--yellow); font-weight: 700; font-size: 11px; margin: 0 0 14px; }
h1 { font-size: clamp(48px, 6vw, 82px); line-height: .9; letter-spacing: -.055em; margin: 0; max-width: 800px; }
h1 { color: white; text-shadow: 0 2px 18px rgba(0,0,0,.16); }
h1 em { font-family: "Fraunces", serif; color: var(--yellow); font-weight: 700; text-decoration: underline; text-decoration-color: white; text-decoration-thickness: .1em; text-underline-offset: .09em; }
.intro > p:last-child { color: rgba(255,255,255,.82); max-width: 460px; margin: 24px 0 0; font-size: 17px; }
.workspace { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(420px, 1.2fr); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.controls { border-right: 1px solid var(--line); }
.step { border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-heading { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 0; background: transparent; padding: 22px 24px; color: inherit; cursor: pointer; }
.step-heading:focus-visible, button:focus-visible, label:focus-within { outline: 3px solid rgba(237,191,40,.55); outline-offset: 2px; }
.step-number { color: var(--green); font-size: 11px; font-weight: 700; }
.step-heading strong, .step-heading small { display: block; }
.step-heading strong { font-size: 15px; }
.step-heading small { color: var(--muted); margin-top: 3px; }
.chevron { transition: transform .2s; }
.open .chevron { transform: rotate(180deg); }
.step-body { display: none; padding: 0 24px 24px 70px; }
.open .step-body { display: block; animation: reveal .22s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-5px); } }
.upload-zone { min-height: 140px; border: 1.5px dashed #9da79f; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; background: #f8f7f1; transition: .2s; }
.upload-zone:hover { border-color: var(--green); background: #f8f2d9; }
.upload-zone strong { font-size: 14px; margin-top: 7px; }
.upload-zone small { color: var(--muted); font-size: 11px; }
.upload-icon { color: var(--green); font-size: 23px; }
.choice-divider { display: flex; align-items: center; gap: 9px; margin: 12px 0; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.choice-divider::before, .choice-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.camera-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 11px; padding: 13px; background: var(--green); color: white; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s; }
.camera-button:hover { transform: translateY(-1px); background: var(--green-dark); }
.camera-button > span, #capturePhoto > span { color: var(--yellow); font-size: 15px; }
.camera-panel { margin-top: 12px; overflow: hidden; border-radius: 12px; background: #101712; box-shadow: 0 10px 26px rgba(20,35,25,.2); }
.camera-view { position: relative; aspect-ratio: 3 / 4; max-height: 360px; overflow: hidden; background: #0a0d0b; }
.camera-view video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-guide { position: absolute; inset: 9%; border: 1px solid rgba(237,191,40,.75); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 999px rgba(0,0,0,.08); }
.camera-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 1px; background: rgba(255,255,255,.16); }
.camera-actions button { border: 0; padding: 12px 8px; cursor: pointer; font-size: 11px; font-weight: 700; }
#cancelCamera { background: #243128; color: white; }
#capturePhoto { background: var(--yellow); color: var(--green-dark); }
.field-row { display: flex; justify-content: space-between; margin-top: 20px; font-size: 12px; font-weight: 600; }
input[type="range"] { width: 100%; accent-color: var(--green); }
.text-button { border: 0; background: none; color: var(--green); padding: 8px 0 0; font-size: 12px; cursor: pointer; text-decoration: underline; }
button:disabled { opacity: .42; cursor: not-allowed; }
.model-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; border: 0; }
.model-picker legend { grid-column: 1 / -1; margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.model-card { position: relative; display: block; min-width: 0; border: 2px solid transparent; border-radius: 11px; padding: 5px; background: #f1eee3; cursor: pointer; transition: border-color .18s, transform .18s, background .18s; }
.model-card:hover { transform: translateY(-2px); }
.model-card:has(input:checked) { border-color: var(--yellow); background: #fff8dc; box-shadow: 0 0 0 1px var(--green); }
.model-card input { position: absolute; opacity: 0; }
.model-thumb { display: block; overflow: hidden; width: 100%; aspect-ratio: 1; border-radius: 7px; background: linear-gradient(135deg, #deded8 25%, #f8f8f4 25% 50%, #deded8 50% 75%, #f8f8f4 75%); background-size: 12px 12px; }
.model-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.model-name { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 7px 3px 3px; font-size: 11px; font-weight: 700; }
.model-name b { padding: 3px 5px; border-radius: 20px; background: var(--green); color: var(--yellow); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.preview-panel { background: linear-gradient(145deg, #f2cf56, var(--yellow)); padding: 28px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.preview-heading { display: flex; justify-content: space-between; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.preview-heading small { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.canvas-wrap { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1; margin: 0 auto; overflow: hidden; background: #d8d8ce; box-shadow: 0 18px 50px rgba(31,66,40,.28); touch-action: none; cursor: grab; transition: border-radius .25s; }
.canvas-wrap.dragging { cursor: grabbing; }
.canvas-wrap.circle { border-radius: 50%; }
canvas { width: 100%; height: 100%; display: block; }
.empty-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #89918c; text-align: center; pointer-events: none; background: repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 12px, transparent 12px 24px); }
.empty-state span { font-size: 52px; margin-bottom: 15px; color: #a8aea9; }
.empty-state strong { color: #626b65; }
.empty-state small { margin-top: 5px; }
.download-button { width: 100%; max-width: 540px; margin: 18px auto 0; border: 0; border-radius: 12px; padding: 15px 18px; background: var(--green); color: white; display: grid; grid-template-columns: 1fr auto; text-align: left; cursor: pointer; box-shadow: 0 8px 20px rgba(31,66,40,.28); }
.download-button span, .download-button small { display: block; grid-column: 1; }
.download-button small { color: #e4d796; font-size: 10px; margin-top: 2px; }
.download-button b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 20px; }
.status { min-height: 18px; margin: 7px 0 0; text-align: center; color: var(--green); font-size: 12px; }
footer { max-width: 1240px; margin: 0 auto; padding: 22px 32px; border-top: 1px solid rgba(255,255,255,.24); display: flex; justify-content: space-between; color: rgba(255,255,255,.78); font-size: 11px; }

@media (max-width: 800px) {
  body { background-position: 58% top; background-attachment: scroll; background-image: linear-gradient(rgba(25,60,34,.86), rgba(25,60,34,.7)), url('assets/salles-background.jpg'); }
  main { padding: 0 16px 50px; }
  .hero { min-height: 72px; }
  .brand-logo { width: 201px; height: 42px; }
  .brand-logo img { width: 220px; left: -10px; top: -81px; }
  .brand-label { display: none; }
  .privacy-pill { display: none; }
  .intro { padding: 38px 4px 30px; }
  .intro::after { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-panel { padding: 24px 18px; }
  .step-body { padding-left: 24px; }
  footer { padding: 18px 20px; }
}

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