:root {
  --fond: #faf7f4;
  --carte: #ffffff;
  --encre: #241f1c;
  --encre-douce: #6b615a;
  --trait: #e6ddd5;
  --lien: #8a4a35;
  --mesure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #161311;
    --carte: #1f1b18;
    --encre: #ede7e1;
    --encre-douce: #a49a92;
    --trait: #332d28;
    --lien: #e0a189;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 3rem 1.25rem 5rem;
  background: var(--fond);
  color: var(--encre);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
}

main {
  max-width: var(--mesure);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

a { color: var(--lien); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--lien); outline-offset: 3px; }

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
}

h2 { margin: 0; font-size: 1.2rem; font-weight: 400; }
h2 a { text-decoration: none; }
h2 a:hover { text-decoration: underline; }

p { margin: 0; }

.entete { display: flex; flex-direction: column; gap: .6rem; }

.surtitre,
.limite {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.limite { letter-spacing: .04em; text-transform: none; font-size: .88rem; }

.moments { display: flex; flex-direction: column; gap: 1rem; }

.moment {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 3px;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.quand,
.ou {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .85rem;
  color: var(--encre-douce);
}

.quand::first-letter { text-transform: uppercase; }

.chapo { color: var(--encre-douce); }

address {
  font-style: normal;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 3px;
  padding: 1rem 1.2rem;
}

.retour {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .85rem;
}

/* --- Grille de reponse ------------------------------------------------- */

.grille { display: flex; flex-direction: column; gap: 1rem; }

.personne {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 3px;
  padding: 1.1rem 1.35rem 1.35rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.personne legend {
  padding: 0 .4rem;
  font-size: 1.05rem;
  color: var(--encre);
}

.ligne-moment {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--trait);
}

.ligne-moment:last-child { padding-bottom: 0; border-bottom: 0; }

.intitule { display: flex; flex-direction: column; gap: .1rem; }
.titre-moment { font-size: 1rem; }

.choix { display: flex; gap: .35rem; flex-shrink: 0; }

.choix label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .6rem;
  border: 1px solid var(--trait);
  border-radius: 999px;
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .82rem;
  color: var(--encre-douce);
}

/* Le point coche porte la couleur d'accent : il reste lisible sans dependre
   d'un fond colore, qui passerait mal en mode sombre. */
.choix input { accent-color: var(--lien); margin: 0; }
.choix label:has(input:checked) { border-color: var(--lien); color: var(--encre); }
.choix label:has(input:focus-visible) { outline: 2px solid var(--lien); outline-offset: 2px; }

.champ-email { display: flex; flex-direction: column; gap: .4rem; }

.champ-email label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .85rem;
  color: var(--encre-douce);
}

.champ-email input {
  font: inherit;
  padding: .6rem .8rem;
  background: var(--carte);
  color: var(--encre);
  border: 1px solid var(--trait);
  border-radius: 3px;
}

.champ-email input:focus-visible { outline: 2px solid var(--lien); outline-offset: 1px; }

button[type="submit"] {
  font: inherit;
  padding: .75rem 1.2rem;
  background: var(--lien);
  color: var(--fond);
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}

button[type="submit"]:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }

.rappel,
.agenda {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: .88rem;
  color: var(--encre-douce);
}
