/* ============================================================
   Mariage Valérie & Yannick — 10.10.2026
   Palette : bleu nuit + terracotta + crème
   ============================================================ */

:root {
  --navy:           #2e2d79;
  --navy-dk:        #1f1e5a;
  --navy-soft:      #4d4ca0;

  --terracotta:     #a55b1e;
  --terracotta-dk:  #8a4a15;
  --terracotta-lt:  #c4763d;

  --cream:          #fbf5eb;

  --ink:            #2e2d79;
  --ink-soft:       #4d4ca0;
  --ink-mute:       #8e8db8;

  --border:         #d9d4e8;
  --border-strong:  #b9b3d0;

  --font:           "Jost", "Futura PT", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-serif:     "scotch-deck", "Didot", "Bodoni 72", Georgia, serif;
  --font-script:    "scribo-rough-regular", "Brush Script MT", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden; /* coupe les débordements horizontaux (image mobile 160%) */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--ink);
}

/* ============================================================
   HERO — fond navy + medallion statique
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  background-color: #2e2d79;
  background-image: url('images/fond-mariage.png');
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 60px 28px 70px;
  text-align: center;
  color: #ffffff;
}

.hero__medallion-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.medallion {
  display: block;
  width: 160px;
  height: auto;
  max-width: 45vw;
}

.hero__divider {
  width: 1px;
  height: 70px;
  background: rgba(255, 255, 255, 0.55);
  margin: 32px auto 28px;
}

.hero__phrase {
  font-family: var(--font-serif);
  font-size: 20px;
  color: #ffffff;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 28px;
}

.hero__date {
  font-family: var(--font-script);
  font-size: 48px;
  color: #ffffff;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 34px;
  opacity: 1;
}

.hero__variant {
  display: none; /* remplacé par le diptyque horaires */
}

/* ---------- Diptyque horaires / lieux ---------- */

.hero__schedule {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 680px;
  margin: 16px auto 0;
  padding: 0;
}

.hero__schedule::before {
  content: '';
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.55);
}

.schedule-block {
  padding: 0 28px;
  color: #ffffff;
}

.schedule-block--left  { text-align: right; }
.schedule-block--right { text-align: left;  }

.schedule-block__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}

.schedule-block__time {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  margin: 0 0 4px;
}

.schedule-block__place {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

/* ============================================================
   FORMULAIRE
   ============================================================ */

.form-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 60px 28px 100px;
}

.form-intro {
  text-align: center;
  margin-bottom: 44px;
}

.form-intro h2 {
  font-size: 24px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

form { display: block; }

.field-group { margin-bottom: 28px; }

.field-group__label {
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.field-group__help {
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
  margin: -8px 0 14px;
  line-height: 1.5;
}

/* ---------- Inputs ---------- */

.input {
  width: 100%;
  padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:hover { border-color: var(--navy); }

.input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(165, 91, 30, 0.20);
}

.input::placeholder { color: var(--ink-mute); }

textarea.input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
  font-family: var(--font);
}

/* ---------- Presence Oui / Non ---------- */

.presence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.presence__option {
  display: block;
  position: relative;
  cursor: pointer;
}
.presence__option input { position: absolute; opacity: 0; pointer-events: none; }

.presence__card {
  display: block;
  width: 100%;
  padding: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
}

.presence__option:hover .presence__card { border-color: var(--navy); }

.presence__option input:checked + .presence__card {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(165, 91, 30, 0.20);
}

.presence__option input:focus-visible + .presence__card {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

/* ---------- Conditional : Yes / No ---------- */

.conditional-yes,
.conditional-no { display: none; }

form.is-present .conditional-yes,
form.is-absent  .conditional-no  { display: block; }

/* ---------- People count (radios 1 à 8) ---------- */

.people-count {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.people-count__option {
  display: block;
  position: relative;
  cursor: pointer;
}
.people-count__option input { position: absolute; opacity: 0; pointer-events: none; }

.people-count__card {
  display: block;
  width: 100%;
  padding: 14px 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  text-align: center;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.people-count__option:hover .people-count__card { border-color: var(--navy); }

.people-count__option input:checked + .people-count__card {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(165, 91, 30, 0.20);
}

.people-count__option input:focus-visible + .people-count__card {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

/* ---------- Participants (journée) ---------- */

.participants {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.participant__menu-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Le diptyque journée a plus de lignes : on resserre les marges */
.schedule-block__time + .schedule-block__place {
  margin-top: 10px;
}

/* ---------- Participants ---------- */

.participants {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.participant {
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  padding: 18px 20px;
}

.participant__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.participant__number {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.participant__remove {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.participant__remove:hover { color: var(--terracotta); }

.participant__menu {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.menu-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.menu-choice__option { position: relative; cursor: pointer; }
.menu-choice__option input { position: absolute; opacity: 0; pointer-events: none; }

.menu-choice__card {
  display: block;
  padding: 11px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  font-size: 15px;
  color: var(--navy);
  text-align: center;
  font-weight: 500;
}

.menu-choice__option:hover .menu-choice__card { border-color: var(--navy); }

.menu-choice__option input:checked + .menu-choice__card {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: #ffffff;
}

/* ---------- Add participant ---------- */

.add-participant {
  appearance: none;
  display: inline-block;
  margin-top: 14px;
  padding: 11px 18px;
  background: transparent;
  border: 1.5px dashed var(--border-strong);
  border-radius: 6px;
  color: var(--navy);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.add-participant:hover {
  border-color: var(--terracotta);
  border-style: solid;
  color: var(--terracotta);
  background: #ffffff;
}

/* ---------- Submit ---------- */

.submit-row { margin-top: 28px; text-align: center; }

.btn-submit {
  appearance: none;
  display: inline-block;
  padding: 14px 40px;
  background: var(--terracotta);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-submit:hover { background: var(--terracotta-dk); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Success ---------- */

.success {
  display: none;
  text-align: center;
  padding: 60px 24px 40px;
}

.success.is-visible { display: block; }

.success__merci {
  font-family: var(--font-script);
  font-size: 64px !important;
  color: var(--terracotta) !important;
  margin: 0 0 14px;
  line-height: 1;
}

.success p {
  color: var(--ink-soft);
  max-width: 380px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 24px 28px 40px;
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
  .hero { padding: 50px 0 50px; }
  .medallion { width: 110px; }
  .hero__divider { height: 40px; margin: 22px auto 20px; }
  .hero__phrase { font-size: 14.5px; margin-bottom: 20px; }
  .hero__date { font-size: 32px; margin-bottom: 26px; }

  /* Diptyque garde 2 colonnes sur mobile, séparateur vertical, tailles réduites */
  .hero__schedule {
    max-width: 100%;
  }
  .schedule-block { padding: 0 13px; }
  .schedule-block__title { font-size: 14.5px; }
  .schedule-block__time,
  .schedule-block__place { font-size: 13.5px; }
  .presence { grid-template-columns: 1fr; }
  .menu-choice { grid-template-columns: 1fr; }

  /* Bouton submit : même dimension que Oui/Non, espacement réduit */
  .submit-row { margin-top: 18px; }
  .btn-submit {
    display: block;
    width: 100%;
    padding: 16px;
  }
}
