/* Reservas MPT — trust-first payment page.
   Tokens light/dark (prefers-color-scheme), accent unique = vert de marque.
   Système de rayons documenté : 12px partout, badges en pill (999px). */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EA0-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-2: #eaeee7;
  --text: #17201a;
  --muted: #57635b;
  --border: #dbe2d8;
  --accent: #005c2f;
  --accent-strong: #004a26;
  --accent-soft: #e3efe5;
  --on-accent: #ffffff;
  --amber: #8a5a10;
  --amber-bg: #f6ecd6;
  --error: #a3271e;
  --error-bg: #f9e9e7;
  --ring: rgba(0, 92, 47, 0.28);
  --shadow: 0 1px 2px rgba(23, 32, 26, 0.05), 0 8px 24px rgba(23, 32, 26, 0.06);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d120f;
    --surface: #151b17;
    --surface-2: #1c241f;
    --text: #e9ede9;
    --muted: #a2ada4;
    --border: #2a352d;
    --accent: #0f7a42;
    --accent-strong: #129150;
    --accent-soft: #16281d;
    --on-accent: #ffffff;
    --amber: #e2b04a;
    --amber-bg: #2a2413;
    --error: #f0928a;
    --error-bg: #331b18;
    --ring: rgba(78, 195, 128, 0.35);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ---------- Header ---------- */
.site {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { display: block; height: 30px; width: auto; }
@media (prefers-color-scheme: dark) {
  .brand-mark { filter: brightness(1.6); }
}
.brand-name { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }

.badge {
  margin: 0;
  padding: 5px 14px;
  border-radius: 999px; /* pill : seule exception au rayon 12px */
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
}
.hidden { display: none; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px 64px;
}
.intro { max-width: 560px; margin-bottom: 32px; }
.intro h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.intro .sub { margin: 0; color: var(--muted); font-size: 17px; max-width: 46ch; }

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}

/* ---------- Form ---------- */
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  margin: 0 0 20px;
  box-shadow: var(--shadow);
}
legend {
  /* float: rend la legend "dans" la carte au lieu de découper la bordure */
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 16px;
  font-weight: 600;
  font-size: 16px;
}
legend + .fields { clear: both; }
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.fields .span2 { grid-column: span 2; }
.pax { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

label { display: block; font-size: 14px; font-weight: 500; }
input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder { color: var(--muted); opacity: 0.8; }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.hint { display: block; margin-top: 5px; font-weight: 400; color: var(--muted); font-size: 13px; }
.hint.ok { color: var(--accent); }
@media (prefers-color-scheme: dark) { .hint.ok { color: #7ed6a3; } }
.hint.err { color: var(--error); }

input[type='file'] { padding: 9px 10px; }
input[type='file']::file-selector-button {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  border-radius: 999px; /* pill, même exception que .badge */
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
}

/* ---------- Pay block ---------- */
.paybox {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}
.total-inline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.total-inline span { color: var(--muted); font-size: 15px; }
.total-inline strong { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }

.terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.terms input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex: none;
}

.pay {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.pay:hover:not(:disabled) { background: var(--accent-strong); }
.pay:active:not(:disabled) { transform: scale(0.98); }
.pay:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.pay:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

.status { margin: 14px 0 0; font-size: 14px; min-height: 1.5em; }
.status.loading { color: var(--muted); }
.status.error {
  color: var(--error);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.status.success {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-weight: 500;
}
@media (prefers-color-scheme: dark) {
  .status.success { color: #7ed6a3; }
}

/* ---------- Summary panel ---------- */
.panel {
  position: sticky;
  top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-photo {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.summary { margin: 0; padding: 20px 24px 8px; }
.summary > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
}
.summary dt { color: var(--muted); font-size: 14px; }
.summary dd { margin: 0; font-size: 14px; font-weight: 500; text-align: right; }
.summary .sum-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.summary .sum-total dt { color: var(--text); font-weight: 600; font-size: 15px; }
.summary .sum-total dd { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; }

.trust {
  margin: 12px 24px 20px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.trust h2 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--accent); }
@media (prefers-color-scheme: dark) {
  .trust h2 { color: #7ed6a3; }
}
.trust p { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.trust p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 32px;
  color: var(--muted);
  font-size: 13px;
}
.foot p { margin: 0; }

/* ---------- Entrance (subtile, coupée si reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .intro, .grid { animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .grid { animation-delay: 0.08s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; gap: 24px; }
  .panel { position: static; order: -1; }
  .panel-photo { height: 150px; }
  .fields { grid-template-columns: 1fr; }
  .fields .span2 { grid-column: auto; }
  fieldset, .paybox { padding: 18px; }
  .wrap { padding: 8px 16px 48px; }
  .site { padding: 16px; }
}
