/* Palette « Vert forêt » validée dans Claude Design */
:root {
  --c-light: #C9DCD6;
  --c-ink: #0F3B33;
  --c-accent: #1E7A66;
  --c-rgb: 15, 59, 51;
  --serif: 'DM Serif Display', serif;
  --sans: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #FAF6EE;
  color: var(--c-ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-accent); }
a:hover { color: var(--c-ink); }
img { display: block; }

.page { background: #ffffff; min-height: 100vh; overflow-x: hidden; }

/* Petites capitales des liens */
.link-caps {
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--c-accent);
  text-decoration: none;
}
a.link-caps:hover { color: var(--c-ink); text-decoration: underline; }

/* Bouton pilule */
.pill {
  display: flex;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--c-accent);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}
/* Survol des boutons et cartes à la souris seulement : sur écran tactile, il resterait affiché après le toucher */
@media (hover: hover) { .pill:hover { background: var(--c-ink); color: #ffffff; } }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero-band { height: clamp(240px, 32vw, 380px); overflow: hidden; background: #ffffff; }
.hero-track { display: flex; gap: 4px; height: 100%; width: max-content; will-change: transform; }
.hero-photo { position: relative; flex: none; width: clamp(200px, 24vw, 300px); height: 100%; }
.hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
}
.hero-body { background: var(--c-light); padding: 0 20px clamp(48px, 7vw, 80px); }
.hero-card {
  position: relative;
  width: min(640px, 100%);
  margin: calc(-1 * clamp(40px, 5vw, 64px)) auto 0;
  background: #ffffff;
  padding: clamp(18px, 3vw, 28px) 24px;
  text-align: center;
}
.hero-card h1 {
  margin: 0;
  font: italic 400 clamp(38px, 6vw, 68px)/1.05 var(--serif);
  color: var(--c-ink);
  text-wrap: balance;
}
.hero-card p { margin: 10px 0 0; font-size: clamp(16px, 2vw, 20px); font-weight: 500; }
.rule-title {
  display: flex; align-items: center; gap: 20px;
  max-width: 1100px;
  margin: clamp(40px, 6vw, 64px) auto 24px;
}
.rule-title .rule { flex: 1; height: 1px; background: var(--c-ink); opacity: .5; }
.rule-title h2 { margin: 0; font-size: clamp(18px, 2.2vw, 22px); font-weight: 500; text-align: center; }
.intro {
  max-width: 880px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
  text-align: center; font-size: 16px; line-height: 1.65; text-wrap: pretty;
}
.intro p { margin: 0; }
.intro .intro-strong { font-weight: 600; }

/* ---------- Programme ---------- */
.programme { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.programme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  max-width: 1280px; margin: 0 auto;
}
.programme-text { padding: 0 20px; }
.programme-title { display: flex; align-items: center; margin-left: -20px; }
.programme-line { width: clamp(40px, 10vw, 140px); height: 1px; background: var(--c-ink); }
.programme-heading { position: relative; padding: 20px 0 20px 28px; }
.programme-heading-bg { position: absolute; left: -60px; top: 0; bottom: 0; width: 200px; background: var(--c-light); }
.programme-heading h2 { position: relative; margin: 0; font: italic 400 clamp(36px, 5vw, 56px)/1 var(--serif); }
.venues {
  display: flex; flex-direction: column; gap: 20px;
  margin-top: clamp(32px, 5vw, 56px);
  max-width: 440px; margin-left: auto;
}
.venue {
  display: block;
  background: #ffffff; color: var(--c-ink);
  text-decoration: none;
  padding: 20px 24px;
  box-shadow: 0 10px 30px rgba(var(--c-rgb), .10);
  transition: box-shadow .2s, transform .2s;
}
@media (hover: hover) { .venue:hover { box-shadow: 0 16px 40px rgba(var(--c-rgb), .18); transform: translateY(-2px); color: var(--c-ink); } }
.venue h3 { margin: 0 0 8px; font: 400 26px/1.1 var(--serif); }
.venue p { margin: 0; font-size: 15px; line-height: 1.6; }
.venue .link-caps { margin-top: 12px; }
.programme-photo { position: relative; width: 100%; max-width: 480px; aspect-ratio: 4/5; margin: 0 auto; }
.programme-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 65%;
}

/* ---------- RSVP ---------- */
.rsvp { padding: clamp(24px, 4vw, 48px) 20px clamp(64px, 9vw, 112px); }
.rsvp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
  max-width: 1180px; margin: 0 auto;
}
.rsvp-media { position: relative; padding: 0 0 40px 0; max-width: 420px; }
.rsvp-media-bg { position: absolute; left: -20vw; right: 15%; top: 22%; bottom: 0; background: var(--c-light); }
.rsvp-photo { position: relative; height: clamp(380px, 46vw, 520px); overflow: hidden; }
.rsvp-photo img { width: 100%; height: 100%; object-fit: cover; }
.rsvp-text { max-width: 480px; }
.rsvp-text h2 { margin: 0 0 20px; font: italic 400 clamp(28px, 4vw, 48px)/1.05 var(--serif); white-space: nowrap; }
.rsvp-text p { margin: 0 0 14px; font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.rsvp-text .rsvp-last { margin-bottom: 28px; }
.rsvp-text .rsvp-deadline { margin: 12px 0 0; font-size: 13px; text-align: center; }

/* ---------- Périgord ---------- */
.perigord { background: var(--c-light); padding: clamp(56px, 8vw, 96px) 20px; }
.perigord-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.perigord h2 { margin: 0; font: italic 400 clamp(36px, 5vw, 56px)/1.05 var(--serif); }
.perigord-inner > p { margin: 12px 0 0; font-size: 16px; }
.topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-top: clamp(40px, 6vw, 64px);
}
.topic { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.topic-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
}
.topic h3 { margin: 0; font: 400 26px/1.1 var(--serif); }
.topic p { margin: 0; font-size: 14px; line-height: 1.55; max-width: 240px; text-wrap: pretty; }
.topic button {
  margin-top: 6px;
  padding: 10px 20px;
  border: 1.5px solid var(--c-ink);
  background: transparent; color: var(--c-ink);
  font: 700 12px var(--sans);
  letter-spacing: .08em;
  cursor: pointer;
}
@media (hover: hover) { .topic button:hover { background: var(--c-ink); color: #ffffff; } }

/* ---------- FAQ ---------- */
.faq { padding: clamp(56px, 8vw, 96px) 20px; }
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(40px, 6vw, 80px);
  max-width: 1180px; margin: 0 auto;
  align-items: start;
}
.faq h2 { margin: 0 0 36px; font: italic 400 clamp(36px, 5vw, 56px)/1.05 var(--serif); }
.faq-list { display: flex; flex-direction: column; gap: 24px; font-size: 16px; line-height: 1.6; }
.faq-list h3 { margin: 0; font-size: 16px; font-weight: 700; }
.faq-list p { margin: 2px 0 0; text-wrap: pretty; }
.faq-pill { width: min(260px, 100%); margin: 32px auto 0; padding: 12px 24px; }
.faq-media {
  position: relative;
  height: clamp(520px, 62vw, 700px);
  max-width: 560px; width: 100%;
  justify-self: center;
}
.faq-bg, .faq-photo { position: absolute; width: 54%; height: 42%; }
.faq-bg { z-index: 1; background: var(--c-light); }
.faq-photo { z-index: 2; }
.faq-bg-1 { left: 0; top: 0; }
.faq-photo-1 { left: 6%; top: 5%; }
.faq-bg-2 { right: 0; bottom: 0; }
.faq-photo-2 { right: 6%; bottom: 5%; }

/* Cadre recadré : l'image couvre le cadre, décalée selon data-x / data-y (cf. main.js) */
.framed { overflow: hidden; }
.framed img {
  position: absolute; left: 50%; top: 50%;
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

/* ---------- Footer ---------- */
.footer { background: var(--c-light); color: var(--c-ink); padding: clamp(32px, 4vw, 44px) 20px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.footer-date { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.footer-contact { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.footer-contact a { color: var(--c-accent); text-underline-offset: 3px; }
.footer-contact a:hover { color: var(--c-ink); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(var(--c-rgb), .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
/* Fenêtre ouverte : la page derrière ne défile plus */
html.modal-open { overflow: hidden; }
.modal {
  position: relative;
  width: min(680px, 100%);
  max-height: 100%;   /* hauteur du voile, qui suit l'écran visible (100vh ignore la barre d'outils de l'iPhone) */
  overflow: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  padding: clamp(24px, 4vw, 44px);
}
.modal-close {
  position: absolute; right: 12px; top: 12px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--c-ink);
  font-size: 26px; line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
@media (hover: hover) { .modal-close:hover { background: var(--c-light); } }
.modal-head { display: flex; align-items: center; gap: 14px; }
.modal-icon {
  flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-light);
  display: flex; align-items: center; justify-content: center;
}
.modal-head h2 { margin: 0; font: italic 400 clamp(30px, 4vw, 42px)/1.05 var(--serif); }
.modal-intro { margin: 16px 0 24px; font-size: 16px; line-height: 1.6; }

.modal-item { padding: 16px 0; border-top: 1px solid var(--c-light); }
.modal-item h3 { margin: 0 0 4px; font: 400 21px/1.2 var(--serif); }
.modal-item p { margin: 0; font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.modal-item .item-cta { margin-top: 8px; }
/* Lien pas encore disponible (groupe WhatsApp) : libellé grisé, non cliquable, suivi d'un badge
   qui passe dessous quand la place manque */
.modal-item .item-cta.is-soon { flex-wrap: wrap; align-items: center; gap: 6px 10px; color: rgba(var(--c-rgb), .45); cursor: default; }
.modal-item .badge {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--c-light);
  color: var(--c-ink);
  font-size: 10px;
  letter-spacing: .08em;
  white-space: nowrap;
}
.modal-item .item-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 8px; }

/* Menus déroulants des hébergements */
.groups { display: flex; flex-direction: column; border-bottom: 1px solid var(--c-light); }
.group { border-top: 1px solid var(--c-light); }
.group-toggle {
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0;
  border: 0; background: transparent;
  color: var(--c-ink);
  text-align: left; cursor: pointer;
  font: inherit;
  scroll-margin-top: 12px;
}
.group-heading { margin: 0; font: inherit; }
.group-text { flex: 1; min-width: 0; }
.group-title { display: block; font: 400 22px/1.2 var(--serif); }
.group-desc { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.group-count { flex: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.group-chevron {
  flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-light);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .15s, color .15s;
}
@media (hover: hover) { .group-toggle:hover .group-chevron { background: var(--c-ink); color: #ffffff; } }
.group-chevron::before {
  content: '';
  width: 8px; height: 8px; margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.group-toggle[aria-expanded="true"] .group-chevron { transform: rotate(180deg); }
.group-items { display: flex; flex-direction: column; padding: 0 0 12px; }
.group-items[hidden] { display: none; }
.lodging { padding: 12px 0; border-top: 1px solid rgba(var(--c-rgb), .12); }
.lodging-head {
  display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between;
  gap: 2px 16px;
}
.lodging h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.lodging-time { font-size: 13px; font-weight: 600; white-space: nowrap; }
.lodging p { margin: 2px 0 0; font-size: 14px; line-height: 1.5; }
.lodging-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 6px; }

/* ---------- Formulaire (formulaire.html) ---------- */
.form-head { background: var(--c-light); padding: clamp(20px, 3vw, 28px) 20px clamp(56px, 8vw, 96px); }
.form-head-nav { max-width: 1100px; margin: 0 auto; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #ffffff; color: var(--c-ink);
  text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
}
@media (hover: hover) { .back-link:hover { background: var(--c-ink); color: #ffffff; } }
.form-head-text { max-width: 640px; margin: clamp(32px, 5vw, 56px) auto 0; text-align: center; }
.form-head h1 { margin: 0; font: italic 400 clamp(40px, 6vw, 64px)/1.05 var(--serif); text-wrap: balance; }
.form-head-intro {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: clamp(20px, 3vw, 28px);
  font-size: 16px; line-height: 1.65; text-wrap: pretty;
}
.form-head-intro p { margin: 0; }
.form-head-intro .intro-strong { font-weight: 600; }

.form-main { padding: clamp(8px, 2vw, 24px) 20px clamp(64px, 9vw, 104px); }
.form-wrap, .thanks { max-width: 720px; margin: 0 auto; }
.form-wrap[hidden], .thanks[hidden] { display: none; }
.form-section { padding: clamp(32px, 5vw, 48px) 0; }
.form-section + .form-section { border-top: 1px solid var(--c-light); }
.section-title { display: flex; align-items: center; gap: 16px; }
.section-num {
  flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-light);
  display: flex; align-items: center; justify-content: center;
  font: 400 20px/1 var(--serif);
}
.section-title h2 { margin: 0; font: italic 400 clamp(30px, 4.2vw, 42px)/1.05 var(--serif); text-wrap: balance; }
.req-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; }
.req-note .nowrap { white-space: nowrap; }   /* « faire-part » ne se coupe pas au trait d'union */
.req { color: var(--c-accent); }
.stack { display: flex; flex-direction: column; gap: 14px; }

.field-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
.field-row .field { flex: 1 1 200px; }
.field-row .field-full { flex-basis: 100%; }
.field-row .field-zip { flex: 0 1 140px; }
.field-row .field-country { flex-basis: 160px; }
/* Sous 352 px de large, Pays et Code postal ne tiennent plus côte à côte : le code postal,
   seul sur sa ligne, prend toute la largeur comme les autres champs */
@media (max-width: 351px) { .field-row .field-zip { flex-grow: 1; } }
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(var(--c-rgb), .3);
  border-radius: 0;
  background: #ffffff; color: var(--c-ink);
  font: 400 16px/1.4 var(--sans);
  outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--c-ink); }
.input[aria-invalid="true"] { border-color: #B3472D; }
.input::placeholder { color: rgba(var(--c-rgb), .45); }
.textarea { display: block; padding: 14px; line-height: 1.6; resize: vertical; }
.remove-btn {
  flex: none;
  width: 48px; height: 48px;
  border: 1.5px solid rgba(var(--c-rgb), .3);
  background: #ffffff; color: var(--c-ink);
  font-size: 22px; line-height: 1;
  cursor: pointer;
}
@media (hover: hover) { .remove-btn:hover { border-color: var(--c-ink); } }

/* Listes répétables (personnes, chansons) : deux champs par ligne, empilés quand la place manque.
   Avec plusieurs lignes, la colonne du bouton « retirer » est réservée partout pour aligner les champs,
   et le bouton reste à côté du premier champ. */
.item-list { display: flex; flex-direction: column; gap: 20px; }
.item-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; gap: 12px; }
.item-list.removable .item-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) 48px; }
.item-row .remove-btn, .item-row .remove-slot { grid-column: -2 / -1; grid-row: 1; }

.add-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 13px; line-height: 1.5; }
.add-row[hidden], #add-song-row[hidden] { display: none; }
.add-link {
  padding: 8px 0;
  border: 0; background: transparent;
  color: var(--c-accent);
  font: 700 12px var(--sans); letter-spacing: .08em;
  cursor: pointer;
}
@media (hover: hover) { .add-link:hover { color: var(--c-ink); } }

.error-msg { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; color: #B3472D; }
.error-msg[hidden] { display: none; }
.error-msg a { color: #B3472D; }
/* Blocs de questions : 28px sous le titre de la partie, 36px entre deux blocs */
.form-section > .q { margin-top: 28px; }
.form-section > .q + .q { margin-top: 36px; }
.q > .field-row, .q > .stack, .q > .textarea { margin-top: 14px; }
.q-address .error-msg { margin-top: 12px; }
.stack > .error-msg { margin-top: -2px; }   /* 12 px, comme ailleurs : l'écart de .stack est de 14 px */
.q h3 { margin: 0; font-size: 16px; font-weight: 700; text-wrap: pretty; }
.q-hint { margin: 2px 0 0; font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.q-hint .nowrap { white-space: nowrap; }   /* « dites-nous » ne se coupe pas au trait d'union */
.q-list { display: flex; flex-direction: column; gap: 36px; margin-top: 28px; }
.q .chips { margin-top: 14px; }
.sub-q { margin-top: 20px; padding-left: 16px; border-left: 1.5px solid var(--c-light); }
.sub-q[hidden], .sub-q [hidden], .cond[hidden] { display: none; }
.sub-q-label { margin: 0; font-size: 13px; font-weight: 600; }
.sub-q .chips { margin-top: 10px; }
.sub-q .error-msg { margin-top: 12px; }
/* « Qui ? » avec précision (régime, instrument) : les prénoms en colonne, les champs alignés à côté */
.who-rows { display: grid; grid-template-columns: fit-content(60%) minmax(0, 1fr); align-items: center; gap: 10px 12px; }
.who-rows > :not(.who-row) { grid-column: 1 / -1; }
.who-row { display: contents; }
.who-row .chip { grid-column: 1; justify-self: start; }
.who-row .input { grid-column: 2; }
/* Sur téléphone, à côté du prénom, le champ serait trop étroit (93 px à 320 px de large) :
   il passe dessous, sur toute la largeur, et un écart plus grand sépare deux personnes */
@media (max-width: 480px) {
  .who-rows { grid-template-columns: minmax(0, 1fr); }
  .who-row .input { grid-column: 1; }
  .who-row + .who-row .chip { margin-top: 10px; }
}

/* Puces de réponse : sélection portée par aria-pressed */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1.5px solid var(--c-ink);
  border-radius: 999px;
  background: #ffffff; color: var(--c-ink);
  font: 500 15px/1.2 var(--sans);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.chip[aria-pressed="true"] { background: var(--c-ink); color: #ffffff; }
.chip[aria-pressed="true"]::before { content: '✓'; }
/* Survol à la souris seulement, comme les autres boutons */
@media (hover: hover) {
  .chip:hover { background: var(--c-light); }
  .chip[aria-pressed="true"]:hover { background: var(--c-accent); }
}

.submit-zone {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding-top: clamp(32px, 5vw, 48px);
  border-top: 1px solid var(--c-light);
  text-align: center;
}
.submit-zone .error-msg { margin-bottom: 4px; font-size: 14px; }
.submit-btn { width: min(320px, 100%); border: 0; font-family: var(--sans); cursor: pointer; }
.submit-btn:disabled { opacity: .6; cursor: wait; }
.submit-note { margin: 0; font-size: 13px; line-height: 1.5; }

.thanks {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: clamp(48px, 8vw, 96px) 0;
  text-align: center;
}
.thanks h2 { margin: 0; font: italic 400 clamp(36px, 5vw, 56px)/1.05 var(--serif); text-wrap: balance; }
.thanks h2 .nowrap { white-space: nowrap; }
.thanks p { margin: 0; max-width: 480px; font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.thanks .pill { margin-top: 16px; }

/* Champ piège anti-spam : hors écran plutôt que display:none, que certains robots repèrent */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
