/* ==========================================================================
   Aplanos — 35 ans — one-page RSVP
   Reproduction fidèle de la maquette PDF (couleurs et mesures échantillonnées
   directement sur le PDF source : page desktop 1024x1830pt, page mobile 700x1600pt)
   ========================================================================== */

:root {
  --navy: #1e3046;
  --navy-line: rgba(255, 255, 255, 0.4);
  --navy-label: rgba(255, 255, 255, 0.85);
  --beige: #c9c0bb;
  --off-white: #ffffff;
  --white: #ffffff;
  --text-navy: #1e3046;
  --error: #d9534f;
  --success: #ffffff;

  --font-serif: "Lora", serif;
  --font-sans: "Inter", sans-serif;

  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--off-white);
  font-family: var(--font-sans);
  color: var(--text-navy);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------------------------------------------------------------------- */
/* Hero (images fournies, non reconstruites en HTML) — pleine largeur,    */
/* chaque zone garde la couleur de fond exacte de l'image qu'elle contient */
/* ---------------------------------------------------------------------- */

.hero {
  width: 100%;
  line-height: 0;
}

.hero-top {
  width: 100%;
  background: var(--off-white);
}

.hero-bottom {
  width: 100%;
  background: var(--beige);
  display: none;
}

.hero-img {
  width: 100%;
  max-width: var(--max-width);
  height: auto;
  margin: 0 auto;
}

@media (min-width: 701px) {
  .hero-bottom {
    display: block;
  }
}

/* ---------------------------------------------------------------------- */
/* Section RSVP — fond bleu marine pleine largeur, contenu centré         */
/* ---------------------------------------------------------------------- */

.rsvp {
  width: 100%;
  background: var(--navy);
  color: var(--white);
  padding: 4.7rem 0 3.6rem;
}

.rsvp-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.rsvp-heading {
  padding: 0 7.3% 0 10.5%;
  margin-bottom: 2.6rem;
}

.rsvp-title {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 2.125rem;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--white);
}

.rsvp-subtitle {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  color: var(--white);
}

.rsvp-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2.5rem 1.5rem;
  padding: 0 7.4% 0 7.3%;
}

/* -- Colonne marque / contact -- */

.rsvp-brand {
  flex: 0 0 auto;
}

.rsvp-logo {
  width: 150px;
  height: auto;
  margin-bottom: 2.4rem;
}

.rsvp-divider {
  width: 105px;
  height: 1px;
  background: var(--navy-line);
  border: 0;
  margin: 0 0 1.1rem;
}

.rsvp-contact {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.65;
  margin: 0;
}

.rsvp-contact a {
  color: inherit;
  text-decoration: none;
}

.rsvp-contact a:hover {
  text-decoration: underline;
}

.rsvp-contact .sep {
  display: none;
}

/* -- Colonne formulaire -- */

.rsvp-form-col {
  flex: 1 1 420px;
  max-width: 578px;
}

.rsvp-form {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.9rem;
}

.field label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-label);
  margin-bottom: 0.9rem;
}

.field input[type="text"],
.field input[type="email"] {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--navy-line);
  border-radius: 0;
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  padding: 0 0 0.5rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease;
}

.field input[type="text"]::placeholder,
.field input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.field input[type="text"]:focus,
.field input[type="email"]:focus {
  border-color: var(--white);
}

.field.has-error input {
  border-color: var(--error);
}

.field-error {
  display: none;
  font-size: 0.75rem;
  color: #ff9d99;
  margin-top: 0.5rem;
}

.field.has-error .field-error,
.presence-group.has-error .field-error {
  display: block;
}

/* -- Choix de présence -- */

.presence-group {
  margin: 0.6rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.presence-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
}

.presence-option {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--white);
}

.presence-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  margin: 0;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.presence-option input[type="radio"]:checked {
  border-color: var(--white);
}

.presence-option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}

.presence-option input[type="radio"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* -- Bouton -- */

.rsvp-actions {
  margin-top: 2.6rem;
}

.btn-confirm {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 221px;
  height: 46px;
  padding: 0 2rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.btn-confirm:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-confirm .btn-label-loading {
  display: none;
}

.btn-confirm.is-loading .btn-label-default {
  display: none;
}

.btn-confirm.is-loading .btn-label-loading {
  display: inline;
}

/* -- Message de confirmation / erreur -- */

.form-status {
  margin-top: 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.5;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  color: var(--white);
}

.form-status.is-error {
  color: #ff9d99;
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------------- */
/* Footer legal (minimal, sous le wrapper)                                */
/* ---------------------------------------------------------------------- */

.legal-footer {
  width: 100%;
  padding: 1rem 7.3%;
  font-size: 0.75rem;
  color: #8a8a8a;
  text-align: center;
  background: #e9e4e0;
}

.legal-footer a {
  color: inherit;
}

/* ---------------------------------------------------------------------- */
/* Mobile ( <= 700px ) — reproduit la mise en page centrée du PDF mobile  */
/* ---------------------------------------------------------------------- */

@media (max-width: 700px) {
  .rsvp {
    padding: 3.4rem 0 3.2rem;
  }

  .rsvp-heading {
    padding: 0 6% 0 6%;
    text-align: center;
    margin-bottom: 1.8rem;
  }

  .rsvp-title {
    font-size: 1.6rem;
  }

  .rsvp-subtitle {
    font-size: 0.85rem;
  }

  .rsvp-body {
    flex-direction: column;
    align-items: center;
    padding: 0 6%;
    gap: 0;
  }

  .rsvp-form-col {
    order: 1;
    width: 100%;
    max-width: 460px;
    flex: 1 1 auto;
  }

  .rsvp-heading + .rsvp-body .rsvp-form-col {
    padding: 0 8%;
  }

  .field {
    margin-bottom: 1.5rem;
  }

  .presence-options {
    justify-content: flex-start;
    gap: 0.4rem 1.5rem;
  }

  .rsvp-actions {
    order: 2;
    width: 100%;
    text-align: center;
    margin-top: 2rem;
  }

  .btn-confirm {
    min-width: 172px;
    height: 42px;
  }

  .rsvp-brand {
    order: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 2.8rem;
  }

  .rsvp-logo {
    width: 118px;
    margin: 0 auto 1.3rem;
  }

  .rsvp-divider {
    display: none;
  }

  .rsvp-contact {
    font-size: 0.75rem;
  }

  .rsvp-contact br {
    display: none;
  }

  .rsvp-contact .sep {
    display: inline;
    margin: 0 0.5em;
    opacity: 0.6;
  }
}

@media (min-width: 701px) and (max-width: 860px) {
  .rsvp-form-col {
    flex-basis: 100%;
    max-width: 100%;
    order: 2;
  }

  .rsvp-brand {
    order: 1;
    margin-bottom: 1rem;
  }

  .rsvp-body {
    align-items: flex-start;
  }
}
