/* =========================================================
   Couleurs reprises du faire-part
   ========================================================= */
:root {
  --papier: #FBFAF6;
  --papier-fonce: #F3EFE6;
  --bronze: #6B4E1E;
  --bronze-clair: #8C6A35;
  --encre: #3B342C;
  --encre-douce: #6E665C;
  --sauge: #7E9A7A;
  --lavande: #9A8CC2;
  --rose: #D98FA7;
  --erreur: #A3392F;

  --serif: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --script: "Pinyon Script", "Brush Script MT", cursive;
  --sans: "Jost", "Avenir Next", "Segoe UI", Arial, sans-serif;

  --largeur: 40rem;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(4rem + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--bronze); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; border-radius: 2px; }


/* Repère visuel des textes à compléter (à supprimer quand tout est rempli) */
.a-completer { background: #FFF1B8; outline: 1px dashed #C9A227; padding: 0 .2em; font-style: italic; }

/* ---------- Titres ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--bronze); margin: 0; line-height: 1.2; }
h2 { font-size: 2.1rem; letter-spacing: .02em; text-align: center; }
h3 { font-size: 1.35rem; margin-bottom: .35rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 .8rem; }
.et { font-family: var(--script); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--encre); }

/* ---------- Écran mot de passe ---------- */
.porte {
  position: fixed; inset: 0; z-index: 50;
  background: var(--papier);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 2rem 1.5rem 0; overflow: hidden;
}
body:not(.verrouille) .porte { display: none; }
body.verrouille .entete, body.verrouille main, body.verrouille .pied { display: none; }
.porte-contenu { width: 100%; max-width: 22rem; text-align: center; position: relative; z-index: 1; margin-bottom: 9rem; }
.porte-intro { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--encre-douce); letter-spacing: .06em; margin-bottom: .2rem; }
.noms-porte { font-family: var(--serif); text-transform: uppercase; letter-spacing: .2em; color: var(--bronze); font-size: 1.6rem; margin-bottom: 2rem; }
.noms-porte .et { font-size: 1.5rem; padding: 0 .15em; }
.form-porte label { display: block; font-size: .95rem; color: var(--encre-douce); margin-bottom: .5rem; }
.form-porte input { text-align: center; margin-bottom: 1rem; }
.form-porte .bouton { width: 100%; }
.porte-fleurs { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: max(100%, 40rem); max-width: none; pointer-events: none; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.25rem;
  background: rgba(251, 250, 246, .94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(107, 78, 30, .12);
}
.logo { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .15em; color: var(--bronze); text-decoration: none; }
.logo .et { font-size: 1.2rem; letter-spacing: 0; }
.menu-bouton {
  font: inherit; font-weight: 400; font-size: .95rem; color: var(--bronze);
  background: none; border: 1px solid rgba(107, 78, 30, .35); border-radius: 2rem;
  padding: .35rem 1rem; cursor: pointer; min-height: 2.5rem;
}
.menu {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--papier); border-bottom: 1px solid rgba(107, 78, 30, .15);
  padding: .5rem 1.25rem 1rem;
  box-shadow: 0 12px 24px -16px rgba(59, 52, 44, .25);
}
.menu.ouvert { display: block; }
.menu a { display: block; padding: .7rem 0; text-decoration: none; color: var(--encre); font-weight: 400; border-bottom: 1px solid var(--papier-fonce); }
.menu a:last-child { border-bottom: 0; }

@media (min-width: 52rem) {
  .menu-bouton { display: none; }
  .menu { display: flex; position: static; padding: 0; gap: 1.6rem; background: none; border: 0; box-shadow: none; }
  .menu a { padding: .3rem 0; border: 0; font-size: .95rem; }
  .menu a:hover { color: var(--bronze); }
}

/* ---------- Accueil : le moment fort, fidèle au faire-part ---------- */
.accueil {
  min-height: calc(100svh - 3.9rem);
  display: flex; flex-direction: column; justify-content: space-between;
  text-align: center; overflow: hidden;
}
.accueil-texte { padding: 2.75rem 1.5rem 1rem; }
.accueil-intro { font-family: var(--serif); font-style: italic; font-size: 1.25rem; letter-spacing: .08em; color: var(--encre); margin-bottom: 1.6rem; }
.noms { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.nom { font-family: var(--serif); font-weight: 400; text-transform: uppercase; font-size: clamp(2.4rem, 11vw, 4.5rem); letter-spacing: .22em; margin-right: -.22em; color: var(--bronze); line-height: 1.1; }
.noms > .et { font-size: clamp(1.7rem, 6vw, 2.6rem); line-height: 1; margin: .1rem 0; }
.date { font-family: var(--serif); font-size: clamp(1.8rem, 8vw, 2.6rem); letter-spacing: .25em; margin: 1.4rem -.25em 0 0; color: var(--bronze-clair); }
.lieu { font-size: .95rem; color: var(--encre-douce); margin: .6rem 0 0; }
.compte { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--encre-douce); margin: .3rem 0 0; min-height: 1.6em; }
.accueil-illustration { width: 100%; max-width: 46rem; margin: 0 auto; }

/* ---------- Sections ---------- */
.bloc { position: relative; max-width: var(--largeur); margin: 0 auto; padding: 4.5rem 1.5rem 1rem; }
.bloc + .bloc::before { content: ""; position: absolute; top: 1.5rem; left: 50%; width: 3rem; height: 1px; background: var(--bronze); opacity: .35; transform: translateX(-50%); }
.chapo { text-align: center; color: var(--encre-douce); max-width: 32rem; margin: .6rem auto 2.25rem; }
.sous-titre { margin-top: 2.25rem; }
.motif { position: absolute; width: 4.5rem; opacity: .9; }
.motif-libellule { top: 2.6rem; left: .5rem; }
.motif-papillon { top: 2.8rem; right: .75rem; width: 3.6rem; }
.deux-colonnes { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .deux-colonnes { grid-template-columns: 1fr 1fr; gap: 2.5rem; } .motif-libellule { left: -2rem; } .motif-papillon { right: -1rem; } }

.lien { color: var(--bronze); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.liste-simple { padding-left: 1.2rem; margin: 0; }
.liste-simple li { margin-bottom: .5rem; }
.encart { margin-top: 2rem; padding: 1.5rem; background: var(--papier-fonce); border-radius: .3rem; border-left: 3px solid var(--sauge); }
.chargement { color: var(--encre-douce); font-style: italic; }

/* ---------- Programme : une vraie frise (le contenu est une suite) ---------- */
.frise { list-style: none; margin: 0; padding: 0; }
.frise .jour {
  font-family: var(--serif); font-size: 1.45rem; color: var(--bronze);
  margin: 2rem 0 1rem; padding-bottom: .3rem; border-bottom: 1px solid rgba(107, 78, 30, .25);
}
.frise .jour:first-child { margin-top: 0; }
.frise li:not(.jour) { display: grid; grid-template-columns: 5.2rem 1fr; gap: 1rem; padding: .55rem 0; }
.frise .heure { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--bronze-clair); padding-top: .05rem; }
.frise h3 { font-size: 1.2rem; margin-bottom: .15rem; }
.frise p { margin: 0; font-size: 1rem; color: var(--encre-douce); }

/* ---------- Formulaires ---------- */
input[type="text"], input[type="number"], textarea {
  width: 100%; font: inherit; font-weight: 400; font-size: 1rem; /* 16 px min : évite le zoom auto sur iPhone */
  color: var(--encre); background: #fff;
  border: 1px solid rgba(107, 78, 30, .3); border-radius: .3rem;
  padding: .75rem .9rem; min-height: 3rem;
}
textarea { resize: vertical; min-height: 4.5rem; }
input:focus, textarea:focus { outline: 2px solid var(--bronze); outline-offset: 1px; border-color: var(--bronze); }
.bouton {
  font: inherit; font-weight: 500; font-size: 1.05rem; letter-spacing: .04em;
  color: var(--papier); background: var(--bronze);
  border: 0; border-radius: 2rem; padding: .85rem 2rem; min-height: 3rem; cursor: pointer;
}
.bouton:hover { background: var(--bronze-clair); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton-secondaire { display: inline-block; text-decoration: none; background: transparent; color: var(--bronze); border: 1px solid var(--bronze); }
.bouton-secondaire:hover { background: var(--bronze); color: var(--papier); }
.lien-bouton { font: inherit; background: none; border: 0; color: var(--bronze); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: .5rem 0; }
.message-erreur { color: var(--erreur); font-weight: 400; margin: .8rem 0 0; }

.form-rsvp { display: flex; flex-direction: column; gap: 1.4rem; }
#details-presence { display: flex; flex-direction: column; gap: 1.4rem; }
#details-presence[hidden] { display: none; }
.champ { margin: 0; padding: 0; border: 0; min-width: 0; }
.champ label, .champ legend, .etiquette { display: block; font-weight: 400; color: var(--encre); margin-bottom: .45rem; padding: 0; }
.champ-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.choix { display: flex; flex-direction: column; gap: .5rem; }
.choix label { display: flex; align-items: center; gap: .7rem; font-weight: 300; margin: 0; padding: .65rem .9rem; background: #fff; border: 1px solid rgba(107, 78, 30, .2); border-radius: .3rem; cursor: pointer; min-height: 3rem; }
.choix label:has(input:checked) { border-color: var(--bronze); background: #FFFDF8; box-shadow: inset 0 0 0 1px var(--bronze); }
.choix input { accent-color: var(--bronze); width: 1.15rem; height: 1.15rem; margin: 0; flex-shrink: 0; }
.ages { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .75rem; }
.ages label { font-size: .9rem; color: var(--encre-douce); margin-bottom: .25rem; }
.aide { font-size: .9rem; color: var(--encre-douce); margin: .4rem 0 0; }
.aide-haut { margin: -.3rem 0 .45rem; }
.champ-invalide input, .champ-invalide .choix label { border-color: var(--erreur); }
.form-rsvp .bouton { align-self: center; }

.merci { text-align: center; padding: 2rem 1.5rem; background: var(--papier-fonce); border-radius: .3rem; }
.merci:focus { outline: none; }
.merci-titre { font-family: var(--serif); font-size: 1.6rem; color: var(--bronze); margin-bottom: .5rem; }

/* ---------- Liste de mariage ---------- */
.rib { margin: 0; }
.rib div { margin-bottom: .5rem; }
.rib dt { font-size: .85rem; color: var(--encre-douce); }
.rib dd { margin: 0; font-weight: 400; word-break: break-all; }
.copier { font: inherit; font-size: .9rem; margin-left: .5rem; background: none; border: 1px solid rgba(107, 78, 30, .35); color: var(--bronze); border-radius: 1rem; padding: .1rem .7rem; cursor: pointer; }

/* ---------- À découvrir ---------- */
.decouvertes { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1.25rem; }
.decouvertes li { padding-left: 1rem; border-left: 2px solid var(--lavande); }
.decouvertes h4 { margin-bottom: .2rem; }
.decouvertes p { margin: 0; color: var(--encre-douce); }
@media (min-width: 40rem) { .decouvertes { grid-template-columns: 1fr 1fr; } }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid rgba(107, 78, 30, .2); }
.faq summary {
  list-style: none; cursor: pointer;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 500; color: var(--bronze);
  padding: 1rem 2rem 1rem 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font-size: 1.5rem; color: var(--bronze-clair); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1rem; margin: 0; }

/* ---------- Pied de page ---------- */
.pied { margin-top: 4rem; text-align: center; overflow: hidden; }
.pied-fleurs { width: max(100%, 40rem); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.pied-texte { font-family: var(--serif); text-transform: uppercase; letter-spacing: .2em; color: var(--bronze); font-size: 1.2rem; margin: 1.5rem 0 0; }
.pied-texte .et { font-size: 1.2rem; }
.pied-date { font-family: var(--serif); letter-spacing: .25em; color: var(--bronze-clair); margin: .2rem 0 .8rem; }
.pied-contact { font-size: .95rem; color: var(--encre-douce); padding: 0 1.5rem; margin-bottom: 1rem; }

/* ---------- Le domaine : carrousel ---------- */
.carrousel { position: relative; margin: 0 -1.5rem; }
.carrousel-piste {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.carrousel-piste::-webkit-scrollbar { display: none; }
.carrousel-piste:focus-visible { outline-offset: -3px; }
.carrousel-diapo { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.carrousel-diapo img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--papier-fonce);
}
/* Photos en hauteur ou très allongées : affichées en entier plutôt que recadrées */
.carrousel-diapo img.entiere { object-fit: contain; }
.carrousel-fleche {
  position: absolute; top: calc(50% - 1.2rem); transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0;
  background: rgba(251, 250, 246, .9); color: var(--bronze);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 52, 44, .2);
}
.carrousel-fleche:disabled { opacity: 0; pointer-events: none; }
.carrousel-prec { left: .6rem; }
.carrousel-suiv { right: .6rem; }
.carrousel-points { display: flex; justify-content: center; gap: .1rem; margin-top: .5rem; }
.carrousel-points button {
  width: 1.9rem; height: 1.9rem; border: 0; background: none; cursor: pointer; padding: 0;
  display: grid; place-items: center;
}
.carrousel-points button::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: rgba(107, 78, 30, .25); transition: background .2s; }
.carrousel-points button[aria-current="true"]::before { background: var(--bronze); }
@media (min-width: 40rem) { .carrousel { margin: 0; } .carrousel-diapo img { border-radius: .3rem; } }

