/* Margaux & Jordan - deux couleurs, un trait */

:root {
  --creme: #F7F1E4;
  --bleu: #2F6BC5;
  --trait: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* l'attribut hidden gagne toujours, meme sur un element qui a un display en CSS
   (sans cette regle, .erreur et .echec restaient visibles en permanence) */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--creme);
  color: var(--bleu);
  font-family: "Azeret Mono", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--bleu);
  caret-color: var(--bleu);
  scrollbar-color: var(--bleu) var(--creme);
}

::selection {
  background: var(--bleu);
  color: var(--creme);
}

:focus-visible {
  outline: 2px solid var(--bleu);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--creme);
  border-bottom: var(--trait) solid var(--bleu);
}

.nav nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 clamp(0.5rem, 3vw, 2rem);
  padding: 0 0.5rem;
}

.nav a {
  color: var(--bleu);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  padding: 0.85rem 0.35rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current] {
  border-bottom-color: var(--bleu);
}

.nav .monogramme {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-bottom: none;
}

/* petit écran : tout le menu tient sur une seule ligne */
@media (max-width: 430px) {
  .nav a {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    padding: 0.85rem 0.1rem;
  }
  .nav .monogramme { font-size: 0.8rem; }
  .nav nav { gap: 0 0.55rem; }
}

/* ---------- structure ---------- */

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 1.4rem;
}

section {
  padding: 3.2rem 0 1rem;
  scroll-margin-top: 4.2rem;
}

h2 {
  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  letter-spacing: 0.13em;
  text-align: center;
  margin-bottom: 0.4rem;
}

h2::after {
  content: "";
  display: block;
  width: 3.2em;
  border-bottom: 3px solid var(--bleu);
  margin: 0.35rem auto 0;
}

.chapeau {
  text-align: center;
  margin: 1.2rem 0 0;
}

.centre { text-align: center; }

.note {
  font-size: 0.85rem;
}

/* ---------- fil ondulé entre sections ---------- */

.fil {
  display: flex;
  justify-content: center;
  padding: 1.6rem 0 0;
}

.fil svg {
  width: 34px;
  height: 94px;
}

/* ---------- accueil ---------- */

.hero {
  text-align: center;
  padding-top: 2.4rem;
}

.tour {
  width: min(78vw, 330px);
  height: auto;
  margin: 0 auto 1.6rem;
  display: block;
}

h1 {
  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(2rem, 9vw, 2.9rem);
  letter-spacing: 0.11em;
  line-height: 1.25;
}

.esperluette { letter-spacing: 0; }

.sous-titre {
  font-weight: 500;
  font-size: clamp(1.05rem, 4.6vw, 1.4rem);
  margin-top: 0.1rem;
}

.date {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.13em;
  font-size: 0.95rem;
  margin-top: 1.6rem;
}

.lieu-ligne {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.compte {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  font-weight: 800;
  letter-spacing: 0.13em;
  font-size: 1.15rem;
  margin-top: 1.3rem;
  min-height: 1.4em;
  border: 2px dashed var(--bleu);
  border-radius: 999px;
  padding: 0.45rem 1.3rem;
}

.compte:empty { display: none; }

sup { font-size: 0.65em; line-height: 0; }

.hero .bouton { margin-top: 1.5rem; }

/* ---------- boutons ---------- */

.bouton {
  display: inline-block;
  color: var(--bleu);
  background: transparent;
  border: var(--trait) solid var(--bleu);
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}

.bouton:hover {
  background: var(--bleu);
  color: var(--creme);
}

.bouton-plein {
  background: var(--bleu);
  color: var(--creme);
}

.bouton-plein:hover {
  background: transparent;
  color: var(--bleu);
}

/* ---------- programme ---------- */

.frise {
  list-style: none;
  position: relative;
  margin: 2.2rem 0 2rem;
  padding-left: 0;
}

.frise::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 27px;
  border-left: 2px solid var(--bleu);
}

.frise li {
  position: relative;
  display: flex;
  gap: 1.3rem;
  align-items: flex-start;
  padding: 0 0 2rem;
}

.frise li:last-child { padding-bottom: 0.4rem; }

.picto {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  background: var(--creme);
  position: relative;
  padding: 4px;
}

.picto.grande {
  width: 72px;
  height: 72px;
  flex: none;
  margin: 0 auto 0.6rem;
  display: block;
}

.heure {
  font-weight: 800;
  letter-spacing: 0.13em;
  font-size: 0.8rem;
}

.frise h3 {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.11em;
  margin: 0.1rem 0 0.15rem;
}

.frise .note { max-width: 26ch; }

/* ---------- coupon RSVP ---------- */

.coupon {
  position: relative;
  border: var(--trait) dashed var(--bleu);
  border-radius: 4px;
  padding: 2.2rem 1.4rem 1.8rem;
  margin-top: 2rem;
}

.ciseaux {
  position: absolute;
  top: -13px;
  left: 26px;
  width: 44px;
  height: 24px;
  background: var(--creme);
  padding: 0 5px;
}

.champ { margin-bottom: 1.5rem; }

label, legend {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 0.4rem;
}

.optionnel {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: var(--trait) solid var(--bleu);
  border-radius: 0;
  color: var(--bleu);
  font-family: inherit;
  /* jamais sous 16px calculés : en dessous, iOS zoome la page au focus */
  font-size: max(16px, 1rem);
  padding: 0.75rem 0.1rem;
}

input[type="number"] { width: 6ch; }

textarea { resize: vertical; }

fieldset { border: none; }

.choix {
  display: flex;
  gap: 0.8rem;
}

.choix label {
  margin: 0;
}

.choix input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choix span {
  display: inline-block;
  border: var(--trait) solid var(--bleu);
  border-radius: 999px;
  padding: 0.45rem 1.3rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}

.choix input:checked + span {
  background: var(--bleu);
  color: var(--creme);
}

.choix input:focus-visible + span {
  outline: 2px solid var(--bleu);
  outline-offset: 3px;
}

.erreur {
  display: inline-block;
  background: var(--bleu);
  color: var(--creme);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  margin-top: 0.5rem;
}

.champ.invalide input {
  border-bottom: 3px dashed var(--bleu);
}

.cache {
  display: none;
}

/* piège à robots : hors écran, jamais en .cache, qui le désactiverait */
.piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#formulaire .bouton:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.echec {
  display: block;
  background: var(--bleu);
  color: var(--creme);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-radius: 3px;
  margin-top: 0.9rem;
}

.echec a { color: var(--creme); }

#formulaire .bouton {
  width: 100%;
  margin-top: 0.4rem;
}

#merci {
  text-align: center;
  padding: 1rem 0;
}

#merci h3 {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1.1rem;
}

#merci p { margin-top: 0.4rem; }

.lien-modifier {
  background: none;
  border: none;
  color: var(--bleu);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 1.1rem;
  padding: 0.4rem;
}

/* ---------- lieu ---------- */

.aquarelle {
  display: block;
  width: min(100%, 26rem);
  height: auto;
  margin: 1.6rem auto 0.4rem;
  /* fond blanc du dessin fondu dans le crème de la page */
  mix-blend-mode: multiply;
}

.adresse {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

#lieu .note { margin: 0.5rem 0 1.4rem; }

.carte {
  position: relative;
  border: var(--trait) solid var(--bleu);
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}

.carte iframe {
  width: 100%;
  height: 300px;
  border: none;
  /* la carte Google rejoint l'univers du site : presque monochrome */
  filter: grayscale(1) contrast(1.05);
}

.carte::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--creme);
  opacity: 0.14;
  mix-blend-mode: color;
  pointer-events: none;
}

.boutons-carte {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.boutons-carte .bouton {
  width: min(100%, 280px);
  text-align: center;
}

/* ---------- plan du domaine ---------- */

.plan-bloc { margin-top: 2.6rem; }

.plan-titre {
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.11em;
  margin-bottom: 1rem;
}

/* dessin SVG en ligne : il prend le bleu du site via currentColor */
.plandom { margin: 0; }

.plandom svg {
  width: 100%;
  height: auto;
  display: block;
  color: var(--bleu);
}

.plandom-legende ol {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
}

.plandom-legende li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.plandom-legende span {
  flex: 0 0 1.6rem;
  height: 1.6rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------- dormir ---------- */

#dormir .note { margin: 0.5rem 0 1.4rem; }

/* ---------- pied de page ---------- */

footer {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
}

footer svg {
  width: 34px;
  height: 34px;
  margin-bottom: 0.5rem;
}

footer p {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 700;
}

/* ---------- animation du trait : pilotée par script.js ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- écran large ---------- */

@media (min-width: 700px) {
  body { font-size: 16px; }
  main { max-width: 38rem; }
  .carte iframe { height: 360px; }
  .frise .note { max-width: none; }
  .boutons-carte { flex-direction: row; }
  .boutons-carte .bouton { width: auto; }
}

@media (min-width: 900px) {
  main { max-width: 42rem; }
  .tour { width: min(52vw, 400px); }
  .lieu-duo {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: center;
    margin-top: 0.6rem;
  }
  .lieu-duo .adresse { margin-top: 0; }
  .boutons-carte { flex-direction: column; }
  .boutons-carte .bouton { width: min(100%, 280px); }
  .carte iframe { height: 320px; }
}
