/* =========================================================================
   Merch sur la Lune — Brief page styles
   ========================================================================= */

/* `[hidden]` must win over display:flex/block utility classes (.field,
   .brief__form, .place__group...) at equal specificity. */
[hidden] { display: none !important; }

.brief-app { min-height: 100vh; display: flex; flex-direction: column; }

.brief-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px; border-bottom: 2px solid var(--encre);
  background: var(--coton); position: sticky; top: 0; z-index: 30;
}
.brief-back {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--encre); padding: 10px 14px;
  border: 2px solid var(--encre); box-shadow: 3px 3px 0 var(--lune);
  transition: all 120ms var(--ease-out);
}
.brief-back:hover { background: var(--encre); color: var(--coton); }
.brief-back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--lune); }

/* ===================== layout: single column ===================== */
.brief {
  flex: 1;
  display: block;
}

/* ---------- INTRO BAND ---------- */
.brief__intro {
  position: relative; overflow: hidden;
  background: var(--lune); border-bottom: 2px solid var(--encre);
  padding: 58px 64px 60px;
}
.brief__intro-copy { position: relative; z-index: 2; }
.brief__intro .eyebrow { margin-bottom: 20px; }
.brief__intro-title {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(46px, 6.2vw, 92px); line-height: .88; text-transform: uppercase;
  letter-spacing: -.015em; margin: 0 0 20px; color: var(--encre);
  max-width: 12ch;
}
.brief__intro-sub {
  font-size: 18px; line-height: 1.55; color: var(--encre); max-width: 520px; margin: 0;
}
.brief__intro-moon {
  position: absolute; top: 50%; right: 52px; transform: translateY(-50%);
  width: 210px; height: 210px; opacity: .5;
  animation: spin-slow 90s linear infinite; z-index: 0; pointer-events: none;
}
.brief__intro-moon img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- FORM ---------- */
.brief__form-wrap {
  padding: 56px 64px 88px;
  max-width: 760px;
}
.brief__form { display: flex; flex-direction: column; gap: 36px; }

.field { display: flex; flex-direction: column; }
.field__label {
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--encre); margin-bottom: 12px; font-weight: 500;
  display: flex; align-items: baseline; gap: 10px;
}
.req { color: var(--lune-deep); }
.opt {
  font-size: 10px; letter-spacing: .12em; color: var(--cendre-2);
  border: 1px solid var(--trace); padding: 2px 7px; border-radius: var(--r-pill);
  text-transform: lowercase;
}

/* underline-only inputs, per brand */
.field__input {
  font-family: var(--ff-body); font-size: 18px; color: var(--encre);
  background: transparent; border: 0; border-bottom: 2px solid var(--encre);
  padding: 10px 2px; outline: none;
  transition: border-color 120ms var(--ease-out), background 120ms var(--ease-out);
}
.field__input::placeholder { color: var(--cendre-2); }
.field__input:focus { border-color: var(--mistral); }
.field__input.is-error { border-color: var(--lune-deep); background: rgba(110,92,132,.06); }
.field__textarea {
  border: 2px solid var(--encre); padding: 14px 16px; resize: vertical; line-height: 1.5;
  font-size: 16px; margin-bottom: 16px;
}
.field__textarea:focus { border-color: var(--mistral); }

/* ---------- upload ---------- */
.upload {
  border: 2px dashed var(--encre); background: var(--recycle);
  padding: 26px; cursor: pointer;
  transition: background 120ms var(--ease-out), border-color 120ms var(--ease-out);
}
.upload:hover { background: #d4c9b1; }
.upload.is-over { border-style: solid; border-color: var(--mistral); background: rgba(31,45,122,.06); }
.upload__inner { display: flex; align-items: center; gap: 18px; color: var(--encre); }
.upload__inner svg { flex-shrink: 0; color: var(--lune-deep); }
.upload__txt { display: flex; flex-direction: column; gap: 3px; }
.upload__txt b { font-size: 16px; }
.upload__txt span {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .06em; color: var(--cendre);
}
.upload__txt u { cursor: pointer; }

.upload__list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.upload__item {
  display: flex; align-items: center; gap: 12px;
  background: var(--coton); border: 2px solid var(--encre); padding: 10px 14px;
  box-shadow: 3px 3px 0 var(--lune);
}
.upload__item-name { flex: 0 1 auto; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__item-tag {
  font-family: var(--ff-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--lune); color: var(--encre); padding: 3px 7px; border-radius: var(--r-pill);
  border: 1.5px solid var(--encre); flex-shrink: 0;
}
.upload__item-size { font-family: var(--ff-mono); font-size: 11px; color: var(--cendre-2); margin-left: auto; }
.upload__item-x {
  border: 0; background: transparent; cursor: pointer; font-size: 14px; color: var(--cendre);
  padding: 2px 6px; line-height: 1;
}
.upload__item-x:hover { color: var(--lune-deep); }

/* ---------- checkboxes ---------- */
.checks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.check {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 2px solid var(--encre); padding: 14px 16px; background: var(--coton);
  transition: all 120ms var(--ease-out);
  user-select: none;
}
.check:hover { background: var(--recycle); }
.check__box {
  width: 22px; height: 22px; border: 2px solid var(--encre); flex-shrink: 0;
  position: relative; transition: background 120ms var(--ease-out);
}
.check__box::after {
  content: "✶"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--coton); font-size: 13px; opacity: 0; transition: opacity 120ms var(--ease-out);
}
.check__label { font-size: 16px; font-weight: 500; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check input:checked ~ .check__box { background: var(--encre); }
.check input:checked ~ .check__box::after { opacity: 1; }
.check:has(input:checked) { background: var(--lune); box-shadow: 3px 3px 0 var(--encre); }
.check input:focus-visible ~ .check__box { outline: 2px solid var(--mistral); outline-offset: 2px; }

.other-field { margin-top: 14px; }

/* ---------- quantities by size ---------- */
.qty-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
}
.qty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 2px solid var(--encre); padding: 12px 8px; background: var(--coton);
  transition: all 120ms var(--ease-out);
}
.qty:focus-within { background: var(--lune); box-shadow: 3px 3px 0 var(--encre); }
.qty__label {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; color: var(--encre);
}
.qty__input {
  width: 100%; text-align: center; font-family: var(--ff-body); font-size: 18px; color: var(--encre);
  background: transparent; border: 0; border-bottom: 2px solid var(--encre); padding: 6px 2px; outline: none;
  -moz-appearance: textfield;
}
.qty__input:focus { border-color: var(--mistral); }
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-total {
  margin: 12px 0 0; font-family: var(--ff-mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cendre);
}
.qty-total strong { color: var(--encre); font-size: 14px; }

@media (max-width: 480px) {
  .qty-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========================================================================
   PLACEMENT MODULE
   ======================================================================== */
.place-step {
  border: 2px solid var(--encre); background: var(--recycle);
  padding: 24px; box-shadow: 5px 5px 0 var(--lune);
}
.place-hint {
  font-size: 14px; line-height: 1.5; color: var(--cendre); margin: -2px 0 20px;
}
.place {
  display: grid; grid-template-columns: 1fr 216px; gap: 28px; align-items: center;
}
.place__side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.place__group { display: flex; flex-direction: column; gap: 8px; }
.place__group[hidden] { display: none; }
.place__group:empty { display: none; }
.place__group-label {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cendre-2); display: flex; align-items: baseline; gap: 8px;
}
.place__group-label em { font-style: normal; color: var(--encre); font-weight: 600; letter-spacing: 0; }

/* pills (garment + face) */
.place__tabs, .place__faces { display: flex; flex-wrap: wrap; gap: 8px; }
.place__pill {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 13px; border: 2px solid var(--encre); background: var(--coton); color: var(--encre);
  cursor: pointer; transition: all 120ms var(--ease-out); line-height: 1;
}
.place__pill:hover { background: var(--recycle); }
.place__pill.is-on { background: var(--encre); color: var(--coton); box-shadow: 3px 3px 0 var(--lune); }

/* design thumbnails */
.place__thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.place__thumb {
  width: 48px; height: 48px; border: 2px solid var(--encre); background: var(--coton);
  padding: 0; cursor: grab; overflow: hidden; transition: box-shadow 120ms var(--ease-out);
  display: grid; place-items: center;
  background-image:
    linear-gradient(45deg, #0001 25%, transparent 25%, transparent 75%, #0001 75%),
    linear-gradient(45deg, #0001 25%, transparent 25%, transparent 75%, #0001 75%);
  background-size: 12px 12px; background-position: 0 0, 6px 6px;
}
.place__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.place__thumb.is-on { box-shadow: 3px 3px 0 var(--lune); border-color: var(--encre); outline: 2px solid var(--encre); }

/* preset chips */
.place__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.place__chip {
  font-family: var(--ff-body); font-size: 13px; font-weight: 500;
  padding: 8px 12px; border: 2px solid var(--encre); background: var(--coton); color: var(--encre);
  border-radius: var(--r-pill); cursor: pointer; transition: all 120ms var(--ease-out); line-height: 1;
}
.place__chip:hover { background: var(--recycle); }
.place__chip.is-on { background: var(--lune); box-shadow: 3px 3px 0 var(--encre); }

/* size range */
.place__range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; margin: 2px 0 0; background: var(--encre); outline: none; cursor: pointer; }
.place__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px;
  background: var(--coton); border: 2px solid var(--encre); box-shadow: 2px 2px 0 var(--lune);
}
.place__range::-moz-range-thumb {
  width: 22px; height: 22px; background: var(--coton); border: 2px solid var(--encre); border-radius: 0;
}

/* stage */
.place__stagewrap { display: flex; flex-direction: column; gap: 10px; }
.place__stage {
  position: relative; width: 100%; aspect-ratio: 200 / 248;
  background: var(--coton); border: 2px solid var(--encre); overflow: hidden;
  touch-action: none;
}
.place__garment { position: absolute; inset: 0; width: 100%; height: 100%; }
.place__zone {
  position: absolute; border: 1.5px dashed var(--lune-deep); pointer-events: none;
  opacity: .5;
}
.place__design {
  position: absolute; transform: translate(-50%, -50%);
  cursor: grab; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 1px 0 rgba(22,19,15,.25));
  touch-action: none;
}
.place__stage.is-dragging .place__design { cursor: grabbing; }
.place__stage.is-dragging .place__zone { opacity: 1; border-color: var(--encre); }
.place__stage.is-over {
  outline: 2px dashed var(--mistral); outline-offset: -2px;
  background: rgba(31,45,122,.06);
}
.place__stage.is-over .place__zone { opacity: 1; border-color: var(--mistral); }
.place__caption {
  font-family: var(--ff-hand); font-size: 19px; color: var(--lune-deep); text-align: center;
  transform: rotate(-1deg); margin-bottom: 2px;
}
/* full-width footnote at the bottom of the placement box */
.place__batnote {
  display: block; margin: 20px 0 0; padding-top: 16px;
  border-top: 1.5px solid var(--trace);
  font-size: 12.5px; line-height: 1.5; color: var(--cendre-2);
}
.place__batnote em { font-style: normal; font-weight: 700; color: var(--encre); }

/* ---------- submit ---------- */
.brief__submit { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 4px; }
.brief__submit-note {
  font-family: var(--ff-hand); font-size: 22px; color: var(--lune-deep); transform: rotate(-1deg);
}

/* ---------- success ---------- */
.brief__done { padding: 24px 0; max-width: 480px; }
.brief__done-moon { width: 84px; height: 84px; margin-bottom: 28px; }
.brief__done-moon img { width: 100%; height: 100%; object-fit: contain; }
.brief__done .eyebrow { margin-bottom: 16px; }
.brief__done-title {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(44px, 5vw, 72px); line-height: .9; text-transform: uppercase;
  letter-spacing: -.015em; margin: 0 0 20px;
}
.brief__done-title span { color: var(--lune-deep); }
.brief__done-sub { font-size: 17px; line-height: 1.6; color: var(--fg-2); margin: 0 0 32px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .brief__intro { padding: 44px 28px 48px; }
  .brief__intro-moon { width: 150px; height: 150px; right: 20px; opacity: .4; }
  .brief__intro-sub { max-width: 420px; }
  .brief__form-wrap { padding: 44px 28px 64px; max-width: none; }
  .brief-hdr { padding: 14px 24px; }
}
@media (max-width: 680px) {
  .brief__intro-moon { display: none; }
  .brief__intro-title { max-width: none; }
  .place { grid-template-columns: 1fr; gap: 22px; }
  .place__stagewrap { order: -1; }
  .place__stage { max-width: 240px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .checks { grid-template-columns: 1fr; }
}
