/* Espace Pro — interface de commande et de suivi. */
.pro-shell {
  max-width: 1240px;
  padding: 38px 22px 88px;
}

.pro-head {
  align-items: flex-end;
  gap: 22px;
  margin: 0 0 26px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.pro-head > div { max-width: 760px; }
.pro-head h1,
.pro-card h2,
.pro-category,
.pro-sub h3 {
  font-family: var(--font-body);
  letter-spacing: -.025em;
}

.pro-head h1 {
  max-width: 25ch;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.12;
  font-weight: 700;
}

.pro-head p {
  max-width: 66ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.pro-head > a { min-height: 46px; flex: 0 0 auto; }

.pro-grid {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 24px;
}

.pro-card {
  padding: 24px;
  margin-bottom: 16px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(60, 36, 21, .045);
}

.pro-card h2 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
}

.pro-card > p {
  margin: 0 0 18px;
  max-width: 72ch;
  font-size: 13.5px;
  line-height: 1.55;
}

.pro-fields { gap: 15px 16px; }

.pro-field {
  gap: 7px;
  font-size: 13px;
  line-height: 1.35;
}

.pro-field input,
.pro-field select,
.pro-field textarea {
  min-height: 46px;
  padding: 11px 13px;
  border-color: #c9bbaa;
  border-radius: 9px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.pro-field textarea { min-height: 82px; resize: vertical; }
.pro-field input:hover,
.pro-field select:hover,
.pro-field textarea:hover { border-color: #a88e70; }

.pro-field input:focus-visible,
.pro-field select:focus-visible,
.pro-field textarea:focus-visible,
.pro-product input:focus-visible {
  border-color: var(--gold-dark);
  outline: 3px solid rgba(183, 123, 27, .22);
  outline-offset: 1px;
}

.pro-auth-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.pro-auth-actions .btn,
.pro-auth-actions #pro-reset,
.pro-google-btn,
.pro-actions .btn,
.pro-summary > .btn { min-height: 46px; }
.pro-auth-actions #pro-reset {
  grid-column: 1 / -1;
  min-height: 40px;
  border-color: transparent;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
}
.pro-auth-actions #pro-reset:hover { color: var(--gold-dark); background: var(--surface-2); }
.pro-google-btn { width: 100%; }
.pro-auth-divider { margin: 5px 0; }

.pro-category {
  margin: 20px 0 10px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.pro-products { gap: 10px; }

.pro-product {
  min-width: 0;
  min-height: 86px;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 10px;
  padding: 10px;
  border-color: #e4dbcf;
  background: var(--surface);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.pro-product:hover { border-color: #c49a59; box-shadow: 0 2px 7px rgba(60, 36, 21, .07); }
.pro-product.is-selected { border-color: var(--gold-dark); background: #fbf5eb; box-shadow: inset 0 0 0 1px rgba(149, 99, 20, .12); }
.pro-product img { width: 58px; height: 58px; border: 1px solid #eee7df; }
.pro-product strong { font-size: 13px; line-height: 1.4; }
.pro-product small { margin-top: 3px; font-size: 12px; }
.pro-product input { width: 58px; min-height: 42px; border-color: #c9bbaa; background: #fff; }

.pro-summary {
  top: 104px;
  padding: 23px;
  border-color: #4b3527;
  background: var(--night-bg);
  color: #f7f1e8;
  box-shadow: none;
}

.pro-summary h2 { color: #fffaf2; }
.pro-summary #pro-selected,
.pro-summary .pro-summary-line { color: #e8ddd0; font-size: 13px; line-height: 1.45; }
.pro-summary-line strong { color: #fffaf2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pro-summary-line.total { border-color: rgba(255, 255, 255, .2); color: #fffaf2; font-size: 17px; }
.pro-summary-line.total strong { color: #f0c56e; font-size: 21px; }
.pro-summary .pro-note { margin: 15px 0; color: #e2d6c8; font-size: 12px; line-height: 1.55; }
.pro-summary > .btn { display: flex; align-items: center; justify-content: center; font-weight: 700; }
.pro-summary > .btn:disabled { cursor: not-allowed; opacity: .55; filter: saturate(.65); }
.pro-summary #pro-cancel-edit { color: #fffaf2; border-color: rgba(255, 255, 255, .45); }
.pro-summary #pro-cancel-edit:hover { background: rgba(255, 255, 255, .1); }
.pro-summary .pro-status { color: #f7e6bc; font-size: 13px; line-height: 1.45; }
.pro-summary .pro-status.error { color: #ffc1b7; }

.pro-status { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
.pro-sub { padding: 16px; background: var(--surface); }
.pro-sub h3 { font-size: 16px; line-height: 1.35; }
.pro-sub .pro-actions .btn { min-height: 42px; }
.pro-invoice,
.pro-message { padding: 13px 0; line-height: 1.5; }

.pro-shell :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .pro-shell { max-width: 760px; padding-top: 30px; }
  .pro-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pro-summary { position: static; }
}

@media (max-width: 620px) {
  .pro-shell { padding: 24px 14px calc(56px + env(safe-area-inset-bottom, 0px)); }
  .pro-head { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; }
  .pro-head h1 { max-width: 19ch; font-size: 30px; }
  .pro-head p { margin-top: 8px; font-size: 14px; }
  .pro-head > a { width: 100%; justify-content: center; }
  .pro-card { padding: 18px 16px; margin-bottom: 13px; border-radius: 14px; }
  .pro-card h2 { font-size: 18px; }
  .pro-fields { gap: 12px; }
  .pro-auth-actions { grid-template-columns: 1fr 1fr; }
  .pro-auth-actions .btn { padding-inline: 10px; font-size: 13px; }
  .pro-product { grid-template-columns: 54px minmax(0, 1fr) 54px; gap: 9px; }
  .pro-product img { width: 54px; height: 54px; }
  .pro-product input { width: 54px; }
  .pro-summary { padding: 18px 16px; }
  .pro-catalog-card { scroll-margin-bottom: 124px; }
}

@media (max-width: 620px) {
  html.pro-catalog-in-view .pro-shell { padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
  html.pro-catalog-in-view .pro-summary-line.total {
    position: fixed;
    z-index: 80;
    left: 14px;
    right: 14px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    padding: 10px 14px 8px;
    border: 1px solid #5b4330;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: #302015;
  }
  html.pro-catalog-in-view .pro-summary > #pro-submit {
    position: fixed;
    z-index: 80;
    left: 14px;
    right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto !important;
    min-height: 50px;
    margin: 0 !important;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pro-field input,
  .pro-field select,
  .pro-field textarea,
  .pro-product { transition: none; }
}

:root[data-theme="dark"] .pro-summary { background: #24170f; border-color: #5b4330; }
:root[data-theme="dark"] .pro-field input,
:root[data-theme="dark"] .pro-field select,
:root[data-theme="dark"] .pro-field textarea,
:root[data-theme="dark"] .pro-product input { background: #201c18; color: #f3eee4; border-color: #78634d; }
:root[data-theme="dark"] .pro-product { background: #26211c; border-color: #55483b; }
:root[data-theme="dark"] .pro-product.is-selected { background: #34291b; border-color: #d0a447; }
