/* =========================================================================
   Effigie.ca — Styles du formulaire (Soumissionneur + Prise de commande)
   Partagé par soumissionneur.html et commande.html, par-dessus catalogue.css.
   ========================================================================= */
:root{
  --radius-xl: 32px;
  --shadow-card: 0 1px 2px rgba(20,30,60,.04), 0 8px 24px rgba(20,30,60,.06);
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

/* L'attribut hidden doit toujours l'emporter sur les display de classe. */
[hidden] { display: none !important; }

.config {
  background: linear-gradient(160deg, oklch(96% 0.012 170) 0%, oklch(98% 0.006 200) 100%);
  border-radius: var(--radius-xl);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: start;
  border: 1px solid var(--border);
}
.config__copy h3 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.config__copy p { font-size: 16px; color: var(--muted); line-height: 1.6; margin: 0 0 28px; max-width: 460px; }
.config__steps {
  display: flex; flex-direction: column; gap: 14px;
  margin: 0 0 32px; padding: 0; list-style: none;
}
.config__steps li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 15px; color: var(--fg);
}
.config__steps .n {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%; background: var(--fg); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
}

.config__upload {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.upload-tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 999px; margin-bottom: 20px; }
.upload-tabs button { flex: 1; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: none; cursor: pointer; transition: background 200ms, color 200ms; }
.upload-tabs button.active { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.upload-zone {
  position: relative;
  aspect-ratio: 1.1 / 1;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  transition: background 200ms, border-color 200ms;
  overflow: hidden;
}
.upload-zone:hover { background: oklch(96% 0.012 170); border-color: var(--accent); }
.upload-zone::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url('press-upload.webp') center / cover no-repeat;
  opacity: .7;
}
.upload-zone.has-file::before { display: none; }
.upload-zone > * { position: relative; z-index: 1; }
.upload-zone .ph-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,.04);
  display: inline-flex; align-items: center; justify-content: center;
}
.upload-zone .ph-icon svg { width: 24px; height: 24px; stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.upload-zone .lbl { font-size: 14px; color: var(--muted); text-align: center; padding: 0 18px; }
.upload-zone .lbl b { color: var(--fg); }
.upload-zone .sub { font-size: 12px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .04em; text-align: center; padding: 0 12px; }

.upload-config-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 18px;
}
.upload-config-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; min-width: 0; }
.upload-config-row select, .upload-config-row input {
  width: 100%; min-width: 0; max-width: 100%;
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
  font: inherit; font-size: 14px; color: var(--fg);
}
.upload-config-row select:focus, .upload-config-row input:focus, .upload-config-row textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.upload-config-row textarea {
  width: 100%; min-width: 0; max-width: 100%; resize: vertical;
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
  font: inherit; font-size: 14px; color: var(--fg);
}
.upload-config-row label.full { grid-column: 1 / -1; }
.contact-row { margin-top: 12px; }

.upload-thumb { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 16px; background: var(--surface); }
.upload-filename {
  display: none; position: absolute; bottom: 10px; left: 14px; right: 14px;
  color: var(--fg); background: rgba(255,255,255,.86); backdrop-filter: blur(2px);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em;
  padding: 5px 9px; border-radius: 6px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-zone.has-file { background: var(--surface); border-style: solid; border-color: var(--accent); }
.upload-zone.has-file .ph-icon,
.upload-zone.has-file .lbl,
.upload-zone.has-file .sub { display: none; }
.upload-zone.has-file .upload-thumb,
.upload-zone.has-file .upload-filename { display: block; }
.upload-zone.is-pdf .upload-thumb { display: none; }
.upload-zone.is-pdf::after { content: 'PDF'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-60%); font: 800 34px/1 var(--font-display, sans-serif); color: var(--accent); letter-spacing: .04em; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.upload-progress { height: 6px; border-radius: 999px; background: var(--bg); margin: 18px 0 0; overflow: hidden; opacity: 0; transition: opacity 200ms; }
.upload-progress.show { opacity: 1; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 150ms var(--ease-out); }

.upload-status { font-size: 13px; line-height: 1.5; margin: 12px 0 0; min-height: 0; }
.upload-status.error { color: #c0392b; }
.upload-status.ok { color: var(--accent); font-weight: 600; }

.upload-submit {
  margin-top: 18px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--fg); color: #fff;
  padding: 15px 24px; border: none; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform 150ms var(--ease-pop), background 200ms, opacity 200ms;
}
.upload-submit:hover { background: var(--accent); transform: translateY(-1px); }
.upload-submit:disabled { opacity: .55; cursor: progress; transform: none; }

/* boîte de prix en direct (Soumissionneur) */
.prix-box {
  margin-top: 18px; padding: 18px 20px;
  background: linear-gradient(160deg, oklch(96% 0.03 170), oklch(98% 0.012 200));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.prix-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); margin-bottom: 7px; }
.prix-row span:last-child { font-family: var(--font-mono); color: var(--fg); }
.prix-row--tax { font-size: 12.5px; }
.prix-row--total {
  margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 16px; font-weight: 700; color: var(--fg);
}
.prix-row--total span:last-child { font-size: 20px; color: var(--accent); }
.prix-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }

.prix-note--brod { color: var(--fg); background: oklch(97% 0.02 90); border: 1px solid oklch(88% 0.05 80); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; }

/* bloc visuel de référence (placé en dernier, facultatif sauf broderie) */
.soum-upload { margin-top: 22px; }
.soum-upload__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; margin: 0 0 12px; }
.soum-upload__head b { color: var(--fg); font-weight: 700; }
.soum-upload__tag { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .03em; color: var(--muted); }

/* consentement infolettre / promos (au-dessus de « Afficher mon prix ») */
.optin-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 20px 0 4px; font-size: 13.5px; color: var(--fg); line-height: 1.45;
  cursor: pointer;
}
.optin-row input[type="checkbox"] {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
  accent-color: var(--accent); cursor: pointer;
}

/* bouton « Afficher mon prix » : variante contour, distinct de l'action finale */
.price-reveal { background: var(--surface); color: var(--fg); border: 1.5px solid var(--fg); }
.price-reveal:hover { background: var(--fg); color: #fff; }

/* sous-note de l'action finale (broderie : délai de réponse) */
.submit-subnote { font-size: 12px; color: var(--muted); text-align: center; margin: 8px 0 0; }

/* lien vers le dépôt des fichiers finaux après une commande */
.post-order-cta {
  display: block; text-align: center; margin: 14px 0 0;
  padding: 13px 20px; border-radius: 999px;
  background: oklch(95% 0.04 170); color: var(--accent);
  font-weight: 600; font-size: 14.5px; text-decoration: none;
  transition: background 200ms;
}
.post-order-cta:hover { background: oklch(91% 0.06 170); }

/* bannière « vous personnalisez cet article » (commande.html via le panier) */
.perso-banner { max-width: 760px; margin: 0 auto 8px; padding: 11px 16px; border-radius: var(--radius-sm); background: oklch(95% 0.04 170); color: var(--accent); font-size: 14px; text-align: center; }

/* ===== Caisse (caisse.html) ===== */
.caisse-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .caisse-grid { grid-template-columns: 1fr; } }
.order-sum { background: linear-gradient(160deg, oklch(96% 0.012 170), oklch(98% 0.006 200)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.order-sum h3 { margin: 0 0 14px; font-size: 16px; }
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.order-line__t { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.order-line__t span { font-size: 12px; color: var(--muted); }
.order-line__q { font-family: var(--font-mono); }
.order-line__p { font-family: var(--font-mono); font-size: 14px; white-space: nowrap; }
.order-tot { margin-top: 14px; }
.order-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.order-row span:last-child { font-family: var(--font-mono); color: var(--fg); }
.order-row--total { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 17px; font-weight: 700; color: var(--fg); }
.order-row--total span:last-child { font-size: 19px; color: var(--accent); }
.order-empty { font-size: 14px; color: var(--muted); }
.account-bar { font-size: 13.5px; color: var(--muted); margin: 0 0 18px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.account-bar:empty { display: none; }
.account-bar a { color: var(--accent); font-weight: 600; }
.account-bar b { color: var(--fg); }
.pay-method.is-locked { opacity: .6; }
.pay-method__lock { color: #b45309; font-weight: 600; }
.pay-h { margin: 0 0 12px; font-size: 16px; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pay-method { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color 150ms, background 150ms; }
.pay-method:has(input:checked) { border-color: var(--accent); background: oklch(97% 0.03 170); }
.pay-method input { margin-top: 2px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.pay-method__body { display: flex; flex-direction: column; gap: 3px; }
.pay-method__body b { font-size: 14.5px; }
.pay-method__body small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pay-panel { background: var(--bg); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.pay-note { font-size: 13px; color: var(--fg); line-height: 1.5; margin: 0 0 10px; }
.pay-interac { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.pay-interac span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pay-interac b { font-family: var(--font-mono); font-size: 16px; }
.pay-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.upload-config-row label.req span::after { content: ' *'; color: var(--accent); }
.checkout-done { max-width: 620px; margin: 8px auto 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 34px; }
.checkout-done h2 { font-family: var(--font-display); font-size: 28px; text-transform: uppercase; margin: 0 0 14px; }
.checkout-done p { font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.done-interac { background: oklch(96% 0.03 170); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; margin: 0 0 12px; }
.done-interac b { font-family: var(--font-mono); font-size: 20px; }
.done-hint { font-size: 13px; color: var(--muted); }
.done-acts { margin-top: 18px; }
.done-acts .upload-submit { display: inline-flex; width: auto; text-decoration: none; }

/* note d'aide sous le formulaire */
.config__note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 14px 0 0; }

/* guide des fichiers (page Prise de commande) */
.file-guide { margin: 0; padding: 0; list-style: none; }
.file-guide li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--fg); margin: 0 0 14px; line-height: 1.5; }
.file-guide li b { display: block; }
.file-guide li small { color: var(--muted); }
.file-guide .ic {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px;
  background: oklch(95% 0.04 170); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
}
.badge-info { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: oklch(95% 0.04 170); padding: 5px 12px; border-radius: 999px; margin: 0 0 18px; }

@media (max-width: 900px) {
  .config { grid-template-columns: 1fr; padding: 36px 26px; }
}
