:root {
  --ink: #142126;
  --muted: #637178;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: #dce4df;
  --teal: #103f48;
  --teal-light: #e8f1ef;
  --gold: #c4923f;
  --red: #8f3f35;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.payment-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 52px);
  background: var(--teal);
  color: var(--white);
}

.payment-brand { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; }
.payment-brand strong, .payment-brand small { display: block; line-height: 1; }
.payment-brand small { margin-top: 5px; color: rgba(255,255,255,.7); font-size: .72rem; text-transform: uppercase; }
.payment-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; font-weight: 850; }

.back-button,
.pay-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.back-button { border: 1px solid rgba(255,255,255,.35); }
.pricing-layout { display: grid; grid-template-columns: minmax(280px, 36%) minmax(0, 1fr); min-height: calc(100vh - 72px); }
.pricing-intro { padding: clamp(36px, 7vw, 86px) clamp(24px, 5vw, 70px); background: #1d3a40; color: var(--white); }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: .76rem; font-weight: 850; text-transform: uppercase; }
.pricing-intro h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1; letter-spacing: 0; }
.pricing-intro > p:not(.eyebrow) { max-width: 560px; color: rgba(255,255,255,.76); line-height: 1.65; }
.pricing-intro > p strong { color: var(--white); }
.rate-reference { margin: 36px 0 0; border-top: 1px solid rgba(255,255,255,.2); }
.rate-reference div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.rate-reference dt { color: rgba(255,255,255,.68); }
.rate-reference dd { margin: 0; font-weight: 800; text-align: right; }

.pricing-workspace { padding: clamp(30px, 6vw, 72px) clamp(16px, 6vw, 84px); }
#servicePaymentForm { width: min(820px, 100%); display: grid; gap: 24px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 16px; font-size: 1.35rem; font-weight: 850; }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.service-option { min-height: 128px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-content: start; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); cursor: pointer; }
.service-option:has(input:checked) { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); background: #fbfdfc; }
.service-option input { position: absolute; opacity: 0; pointer-events: none; }
.service-check { width: 20px; height: 20px; border: 2px solid #9aaba4; border-radius: 4px; background: var(--white); }
.service-option input:checked + .service-check { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 4px var(--white); }
.service-copy { display: grid; align-content: start; gap: 7px; }
.service-copy small { color: var(--muted); line-height: 1.35; }
.service-price { grid-column: 2; color: var(--red); }

.quantity-control,
.email-control { display: grid; gap: 9px; font-weight: 800; }
.quantity-control > span { display: flex; align-items: center; gap: 12px; }
.quantity-control input { width: 110px; }
.quantity-control small { color: var(--muted); font-weight: 500; }
input { min-height: 48px; border: 1px solid #cbd6d0; border-radius: 8px; padding: 0 13px; background: var(--white); color: var(--ink); }
input:focus { outline: 3px solid rgba(196,146,63,.23); border-color: var(--gold); }

.order-summary { border-top: 4px solid var(--gold); padding: 20px; background: var(--white); }
.summary-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.summary-heading h2 { margin: 0; font-size: 1.35rem; }
.summary-heading span { color: var(--muted); font-size: .85rem; }
.selection-list { display: grid; gap: 8px; margin: 18px 0; padding: 0; list-style: none; }
.selection-list:empty::before { content: "Sélectionnez un ou plusieurs services."; color: var(--muted); }
.selection-list li { display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; }
.selection-list span { color: var(--muted); text-align: right; }
.summary-totals { margin: 0; border-top: 1px solid var(--line); }
.summary-totals div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; }
.summary-totals dd { margin: 0; font-weight: 800; text-align: right; }
.hours-row { color: var(--muted); font-size: .88rem; }
.summary-totals .grand-total { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 1.15rem; }
.grand-total dd { color: var(--teal); font-size: 1.45rem; }
.email-control input { width: 100%; }
.pay-button { width: 100%; min-height: 52px; background: var(--gold); color: #21190d; }
.pay-button:disabled { opacity: .55; cursor: not-allowed; }
.secure-note { margin: -10px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.payment-alert { width: min(820px, 100%); margin-bottom: 20px; border-left: 4px solid var(--teal); padding: 14px 16px; background: var(--teal-light); color: #244a45; }
.payment-alert[data-tone="error"] { border-color: var(--red); background: #f7e9e7; color: #71332d; }
.payment-alert[data-tone="success"] { border-color: #39715a; background: #e8f2ec; color: #285741; }

@media (max-width: 900px) {
  .pricing-layout { grid-template-columns: 1fr; }
  .pricing-intro { padding: 34px 20px; }
  .rate-reference { margin-top: 24px; }
}

@media (max-width: 640px) {
  .payment-header { min-height: 64px; padding-inline: 14px; }
  .payment-mark { width: 36px; height: 36px; }
  .back-button { min-height: 40px; padding-inline: 11px; font-size: .82rem; }
  .pricing-workspace { padding-inline: 16px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-option { min-height: 0; }
  .quantity-control > span { align-items: flex-start; flex-direction: column; }
}
