:root {
  --red: #bf162d;
  --field-text: #424242;
  /* Design desktop = artboard 1280px : au-delà, le contenu reste centré à cette taille */
  --pad-left: max(clamp(20px, 4.9vw, 63px), calc((100vw - 1280px) / 2 + 63px));
  --pad-right: max(clamp(20px, 3.3vw, 42px), calc((100vw - 1280px) / 2 + 42px));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
  font-family: 'Montserrat', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.red { color: var(--red); }

/* ---------- Bandeau noir : logo ---------- */
.top {
  position: relative;
  z-index: 2;
  background: #000;
  padding: clamp(14px, 2.8vw, 36px) 0 clamp(20px, 5.9vw, 76px);
  text-align: center;
}

.logo-mark {
  display: inline-block;
  height: clamp(30px, 4.5vw, 58px);
  width: auto;
}

/* ---------- Zone photo ---------- */
.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #000 url("../assets/presales-bg-desktop.jpg") -5.7vw 0 / 111.6% auto no-repeat;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(24px, 4.2vw, 54px);
  background: #000;
  pointer-events: none;
}

.layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 30.4vw, 389px);
  gap: clamp(24px, 4.6vw, 59px);
  align-items: start;
  width: 100%;
  padding: 0 var(--pad-right) clamp(24px, 3vw, 38px) var(--pad-left);
}

/* ---------- Texte ---------- */
.info { text-shadow: 0 0 10px rgba(0, 0, 0, 0.7); }
.info p, .info h1 { margin: 0; }

.kicker {
  font-size: clamp(14px, 2.18vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--red);
}

.headline {
  margin-top: clamp(6px, 1.3vw, 17px) !important;
  font-size: clamp(30px, 4.93vw, 63px);
  font-weight: 900;
  line-height: 1.08;
}

.lead {
  margin-top: clamp(10px, 1.7vw, 22px) !important;
  font-size: clamp(15px, 1.89vw, 24px);
  font-weight: 700;
  line-height: 1.25;
}

.text {
  margin-top: clamp(10px, 2vw, 26px) !important;
  font-size: clamp(13px, 1.47vw, 19px);
  font-weight: 600;
  line-height: 1.28;
}

.cta-text {
  margin-top: clamp(12px, 2vw, 26px) !important;
  font-size: clamp(14.5px, 1.78vw, 23px);
  font-weight: 700;
  line-height: 1.25;
}

.place {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.1vw, 14px);
  margin-top: clamp(24px, 6.1vw, 78px) !important;
  font-size: clamp(11.5px, 1.35vw, 18px);
  font-weight: 400;
  line-height: 1.2;
}
.pin {
  flex: 0 0 auto;
  width: clamp(11px, 1.55vw, 20px);
  height: auto;
  color: var(--red);
}

/* ---------- Formulaire ---------- */
.form-panel {
  container-type: inline-size;
  margin-top: clamp(0px, 2.7vw, 35px);
}

.form-card {
  background: var(--red);
  border-radius: clamp(12px, 1.5vw, 20px);
  padding: 1.75em 0.83em 1.15em;
  font-size: clamp(12px, 4.14cqw, 16.5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.form-title {
  margin: 0 0 2.45em;
  padding: 0 0.6em;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.32;
  text-align: center;
}

.field {
  height: 2.9em;
  margin-bottom: 0.82em;
}

.field input {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0 1.75em;
  border: 0;
  border-radius: 0.85em;
  outline: none;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  font-size: 1.08em;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: var(--field-text); opacity: 1; }

.field.phone-field {
  display: flex;
  align-items: center;
  padding: 0 1.75em;
  border-radius: 0.85em;
  background: #fff;
}
.phone-prefix {
  padding-right: 0.7em;
  border-right: 1px solid #ddd;
  color: #1a1a1a;
  font-size: 1.08em;
  font-weight: 600;
  white-space: nowrap;
}
.phone-field input {
  padding: 0 0 0 0.7em;
  border-radius: 0;
  background: transparent;
}
.phone-field:has(input.field-invalid) {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 5px #ffd400;
}
.phone-field input.field-invalid { box-shadow: none; }

.field input.field-invalid {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 5px #ffd400;
}

.form-error {
  margin: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.9em;
  text-align: center;
}
.form-error:empty { display: none; }
.form-error:not(:empty) { padding: 0.6em 0.8em; margin-bottom: 0.9em; }

.submit-btn {
  display: block;
  width: 11.5em;
  height: 2.69em;
  margin: 0.75em auto 0;
  border: 0;
  border-radius: 0.85em;
  background: #fff;
  color: var(--field-text);
  font: inherit;
  font-size: 1.08em;
  font-weight: 500;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.submit-btn:hover { transform: translateY(-1px); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { opacity: .7; cursor: default; transform: none; }

.privacy-note {
  margin: 1.8em 0 0;
  text-align: center;
  font-size: max(0.67em, 10px);
  line-height: 1.3;
}

/* ---------- Page de remerciement ---------- */
.thanks {
  display: none;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: clamp(24px, 4vw, 60px) clamp(16px, 4vw, 48px);
}

.thanks-card {
  width: min(68%, 870px);
  padding: 2.4em 1.5em;
  border-radius: clamp(12px, 1.5vw, 20px);
  background: var(--red);
  text-align: center;
  font-size: clamp(14px, 1.68vw, 21.5px);
  line-height: 1.3;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.thanks-card p { margin: 0 0 1.5em; }
.thanks-card p:last-child { margin-bottom: 0; }
.thanks-title { font-weight: 700; }

body.is-thanks .layout { display: none; }
body.is-thanks .thanks { display: flex; }
body.is-thanks .top { padding-bottom: clamp(12px, 2vw, 26px); }
body.is-thanks .stage { background-size: 125.2% auto; background-position: 50% 0; }
body.is-thanks .stage::before { display: none; }

/* ---------- Mobile / tablette ---------- */
@media (max-width: 900px) {
  .top { padding: 5vw 0 6vw; }
  .logo-mark { height: max(9vw, 34px); }

  .stage {
    background-image: url("../assets/presales-bg-mobile.jpg");
    background-size: 100% auto;
    background-position: center 0;
  }
  .stage::before { height: 8vw; }
  body.is-thanks .stage { background-size: 100% auto; background-position: center 0; }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 10vw;
    padding: 0 6vw 10vw;
  }

  .kicker { font-size: clamp(13px, 3.9vw, 24px); }
  .headline { margin-top: 2vw !important; font-size: clamp(32px, 10.6vw, 63px); }
  .lead { margin-top: 4vw !important; font-size: clamp(15px, 4.4vw, 24px); }
  .text { margin-top: 3.5vw !important; font-size: clamp(13px, 3.5vw, 19px); }
  .text .br-desktop { display: none; }
  .cta-text { margin-top: 4vw !important; font-size: clamp(14.5px, 4vw, 23px); }
  .place { margin-top: 6vw !important; font-size: clamp(11.5px, 3.2vw, 18px); }
  .pin { width: clamp(12px, 3.4vw, 20px); }

  .form-panel {
    width: min(100%, 460px);
    margin: 0 auto;
  }
  .form-card { font-size: clamp(12px, 3.9cqw, 22px); }
  .field input { font-size: max(1.08em, 16px); }

  .thanks { align-items: flex-start; padding-top: 58vw; }
  .thanks-card {
    width: min(92%, 82vw, 640px);
    font-size: clamp(13px, 3.4vw, 19.5px);
  }
}
