/*
Theme Name: Notre Mariage
Description: Thème sur mesure pour le site d'inscription du mariage. Fond blanc cassé, vert profond, calligraphie.
Version: 2.5.7
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: notre-mariage
*/

:root {
  --papier: #EFEDE6;
  --encre: #2a2a27;
  --discret: #5e5e57;
  --vert: #325c37;
  --vert-fonce: #244428;
  --or: #A8854A;
  --rose: #E8D9D3;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", "Brush Script MT", cursive;
}

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

body {
  margin: 0;
  background-color: var(--papier);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .3 0 0 0 0 .25 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--encre);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

a { color: var(--vert); }
:focus-visible { outline: 2px solid var(--vert); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--papier); padding: .5rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Menu ---------- */
.entete { padding: 1.6rem 1rem 0; }
.menu__liste {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 2.2rem;
}
.menu__liste a {
  display: inline-block; padding: .25rem 0;
  color: var(--encre); text-decoration: none;
  font-size: 1.1rem; font-weight: 600; letter-spacing: .08em;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.menu__liste a:hover,
.menu__liste .current-menu-item > a,
.menu__liste .current_page_item > a,
.menu__liste a[aria-current="page"] { color: var(--vert); border-bottom-color: var(--vert); }

/* ---------- Accueil ---------- */
.hero {
  min-height: calc(100vh - 4.5rem);
  min-height: calc(100svh - 4.5rem);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: clamp(1.5rem, 6vh, 3.5rem);
  padding: 2rem 1.5rem 3rem;
  text-align: center;
}
.hero__trio {
  width: min(100%, 56rem);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  animation: apparition 1.4s ease-out both;
}
.nom {
  font-family: var(--script); font-weight: 400; color: var(--vert);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.2;
  overflow-wrap: anywhere;
}
.nom--1 { text-align: right; }
.nom--2 { text-align: left; }
.date {
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--serif); font-weight: 500; color: var(--vert);
  font-variant-numeric: lining-nums;
  font-size: clamp(4.5rem, 13vw, 8.5rem); line-height: .92;
}
.hero__phrase {
  margin: 0; max-width: 22rem;
  font-size: .9rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; line-height: 1.9;
}

.histoire { max-width: 36rem; margin: 0 auto; padding: 4rem 1.5rem 1rem; text-align: center; font-size: 1.3rem; }
.histoire::before { content: ""; display: block; width: 3rem; height: 1px; background: var(--vert); margin: 0 auto 2.5rem; }
.histoire p { margin: 0 0 1.2em; }

.cta { text-align: center; padding: 2rem 1.5rem 2rem; }
main > .cta:last-child { padding-bottom: 6rem; }
.mystere { max-width: 34rem; margin: 0 auto; padding: 0 1.5rem 5rem; text-align: center; font-size: 1.15rem; color: var(--discret); }
.mystere::before { content: ""; display: block; width: 2.5rem; height: 1px; background: var(--or); margin: 0 auto 1.4rem; }
.mystere p { margin: 0; }

.bouton,
.page button,
.page input[type="submit"],
.wpforms-submit,
.wpcf7-submit {
  display: inline-block; cursor: pointer;
  padding: .95rem 2.4rem;
  border: 1px solid var(--vert); border-radius: 0;
  background: transparent; color: var(--vert);
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700; letter-spacing: .1em;
  text-decoration: none;
  transition: background .25s, color .25s;
}
.bouton:hover, .bouton:focus-visible,
.page button:hover, .page input[type="submit"]:hover,
.wpforms-submit:hover, .wpcf7-submit:hover { background: var(--vert); color: var(--papier); }

/* ---------- Pages (Inscription, Infos pratiques) ---------- */
.page { max-width: 44rem; margin: 0 auto; padding: 3rem 1.5rem 6rem; }
.page__titre {
  margin: 0 0 2.5rem; text-align: center;
  font-family: var(--script); font-weight: 400; color: var(--vert);
  font-size: clamp(2.8rem, 8vw, 4.2rem); line-height: 1.1;
}
.page__texte h2, .page__texte h3 { font-family: var(--serif); color: var(--vert); font-weight: 600; line-height: 1.25; margin: 2.5rem 0 .75rem; }
.page__texte h2 { font-size: 1.9rem; }
.page__texte h3 { font-size: 1.5rem; }
.page__texte img { max-width: 100%; height: auto; }

.page label { display: block; margin: 1.4rem 0 .2rem; font-weight: 600; }
.page input[type="text"], .page input[type="email"], .page input[type="tel"],
.page input[type="number"], .page select, .page textarea {
  width: 100%; font: inherit; color: inherit; background: transparent;
  border: 0; border-bottom: 1px solid var(--vert); border-radius: 0; padding: .6rem 0;
}
.page textarea { min-height: 7rem; border: 1px solid var(--vert); padding: .6rem; }
.page input[type="radio"], .page input[type="checkbox"] { accent-color: var(--vert); }
.page input[type="submit"], .page button { margin-top: 1.8rem; }

/* ---------- Pied de page ---------- */
.pied { padding: 2rem 1rem 3rem; text-align: center; font-family: var(--script); font-size: 1.8rem; color: var(--vert); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  body { font-size: 1.15rem; }
  .entete { padding: 1.2rem .75rem 0; }
  .menu__liste { gap: .3rem 1.1rem; }
  .menu__liste a { font-size: .98rem; letter-spacing: .03em; white-space: nowrap; }
  .hero { padding: 1.5rem 1rem 2.5rem; }
  .hero__trio { gap: .5rem; }
  .nom { font-size: clamp(1.4rem, 7.4vw, 1.95rem); white-space: nowrap; overflow-wrap: normal; }
  .date { font-size: clamp(3.4rem, 18vw, 4.8rem); }
}

/* ---------- Alliances, bandeau photo, arche ---------- */
.alliances { width: 64px; height: auto; fill: none; stroke: var(--or); stroke-width: 1.4; }
.hero__texte { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.hero__lieu { margin: 0; font-size: 1.2rem; font-weight: 600; letter-spacing: .04em; color: var(--vert); }
.bandeau { position: relative; margin: 0; height: clamp(230px, 44vh, 440px); overflow: hidden; }
.bandeau img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 58% 45%; }
.bandeau::before, .bandeau::after { content: ""; position: absolute; left: 0; right: 0; height: 32%; pointer-events: none; }
.bandeau::before { top: 0; background: linear-gradient(var(--papier), rgba(239, 237, 230, 0)); }
.bandeau::after { bottom: 0; background: linear-gradient(rgba(239, 237, 230, 0), var(--papier)); }
.bandeau + .histoire { padding-top: 2rem; }
.bandeau + .histoire::before { display: none; }
.page__arche { display: block; width: 100%; max-width: 34rem; height: auto; margin: 0 auto 1rem; mix-blend-mode: multiply; }

/* ---------- Infos pratiques ---------- */
.carte { background: var(--rose); border: 1px solid rgba(168, 133, 74, .4); padding: 1.1rem 1.4rem; }
.carte p { margin: 0; }
.carte__jour { font-size: 1.5rem; font-weight: 700; color: var(--vert); }
.plan iframe { display: block; width: 100%; height: 340px; border: 1px solid rgba(168, 133, 74, .4); filter: saturate(.75); }
.plan__liens { margin: 1rem 0 0; }
.bouton--petit { padding: .6rem 1.4rem; font-size: 1rem; }
.parkings { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(168, 133, 74, .4); }
.parkings li { display: flex; flex-direction: column; gap: .1rem; padding: 1rem 0; border-bottom: 1px solid rgba(168, 133, 74, .4); }
.parking__nom { font-size: 1.25rem; font-weight: 700; color: var(--vert); }
.parking__detail { font-size: 1.05rem; color: var(--discret); }
.parkings a { margin-top: .2rem; font-weight: 600; }
.note { margin-top: 1.4rem; font-size: 1.05rem; color: var(--discret); }

/* ---------- Formulaire d'inscription ---------- */
[hidden] { display: none !important; }
.inscription fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.inscription p { margin: 0; }
.inscription legend { padding: 0; margin: 1.8rem 0 .4rem; font-weight: 700; font-size: 1.3rem; color: var(--vert); }
.option { display: flex; align-items: center; gap: .7rem; margin: .5rem 0 !important; font-weight: 500 !important; }
.option input { width: 1.2rem; height: 1.2rem; flex: none; }
.bloc { margin-top: .6rem !important; }
.invite { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid rgba(168, 133, 74, .4); }
.invite__titre { margin: 0 0 .2rem; font-size: 1.25rem; font-weight: 700; color: var(--vert); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.message { padding: 1rem 1.3rem; margin: 0 0 1.5rem; border: 1px solid var(--vert); background: rgba(50, 92, 55, .08); }
.message p { margin: 0; }
.message--erreur { border-color: #8a2d2d; background: rgba(138, 45, 45, .08); }

/* ---------- Typographie du texte d'accueil ---------- */
.histoire { max-width: 32rem; padding: 2.2rem 1.5rem 0; font-size: 1.35rem; line-height: 1.7; text-wrap: balance; }
.bandeau + .histoire { padding-top: 1.8rem; }
.histoire p { margin: 0 0 .7em; text-wrap: balance; }
.histoire p:last-child { margin-bottom: 0; }
.cta { padding-top: 2.4rem; }
.mystere { max-width: 30rem; font-size: 1.1rem; line-height: 1.7; }
.mystere p { text-wrap: balance; }
@media (max-width: 640px) {
  .histoire { font-size: 1.2rem; }
  .bandeau + .histoire { padding-top: 1.4rem; }
  .bouton { letter-spacing: .06em; padding: .9rem 1.6rem; }
  .mystere { font-size: 1.05rem; }
}

.delai { max-width: 34rem; margin: 0 auto 2rem; text-align: center; font-size: 1.1rem; line-height: 1.7; color: var(--discret); text-wrap: balance; }

.parking__marche { font-weight: 700; color: var(--vert); font-size: 1.05rem; }

/* ---------- Espace privé ---------- */
.ep__main.page { max-width: 68rem; }
.ep__boite { max-width: 26rem; margin: 0 auto; }
.ep__aide { text-align: center; color: var(--discret); }
.ep__haut { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ep__haut .page__titre { margin: 0; text-align: left; }
.ep__cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 2rem 0 1.5rem; }
.ep__carte { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.3rem; background: var(--rose); border: 1px solid rgba(168, 133, 74, .4); line-height: 1.35; }
.ep__chiffre { font-size: 2.6rem; font-weight: 700; color: var(--vert); line-height: 1; }
.ep__table { overflow-x: auto; margin: .5rem 0 2rem; }
.ep__table table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ep__table th { padding: .5rem .8rem; text-align: left; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--discret); border-bottom: 1px solid var(--or); white-space: nowrap; }
.ep__table td { padding: .7rem .8rem; border-bottom: 1px solid rgba(168, 133, 74, .3); vertical-align: top; }
.ep__table ol { margin: 0; padding-left: 1.2rem; }

@keyframes apparition { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero__trio { animation: none; }
  * { transition: none !important; }
}

/* Onglets de l'espace privé */
.ep__onglets { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--rose); border-bottom: 1px solid rgba(168,133,74,.4); position: sticky; top: 0; z-index: 20; }
.ep__onglets a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; text-decoration: none; color: var(--vert); font-weight: 700; border: 1px solid transparent; }
.ep__onglets a[aria-current="page"] { background: var(--vert); color: #fff; }
.ep__onglets form { margin-left: auto; }
.ep__onglets button { min-height: 44px; padding: 0 1rem; background: transparent; border: 1px solid rgba(168,133,74,.6); border-radius: 999px; color: var(--vert); font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- Harmonie des textes d'accueil (v2.1.1) ---------- */
.histoire, .mystere { max-width: 32rem; margin-left: auto; margin-right: auto; text-align: center; }
.histoire { font-size: 1.45rem; line-height: 1.5; color: var(--encre); padding-bottom: 0; }
.histoire p { margin: 0 0 1.3rem; }
.histoire .l { display: block; }
.histoire p:last-child { margin-bottom: 0; font-size: 1.2rem; color: var(--discret); line-height: 1.65; }
.histoire p:last-child .l { display: inline; }
.mystere { padding: 0 1.5rem 5rem; }
.mystere::before { margin-bottom: 1.8rem; }
.mystere .mystere__lead { margin: 0 0 1.1rem; font-size: 1.45rem; font-style: italic; line-height: 1.5; color: var(--vert); text-wrap: balance; }
.mystere .mystere__suite { margin: 0; font-size: 1.2rem; line-height: 1.65; color: var(--discret); text-wrap: balance; }
@media (max-width: 640px) {
  .histoire { font-size: 1.35rem; }
  .histoire p:last-child, .mystere__suite { font-size: 1.12rem; }
  .mystere__lead { font-size: 1.4rem; }
}

.hero__lieu { text-wrap: balance; line-height: 1.45; }
@media (max-width: 640px) { .hero__lieu { font-size: 1.1rem; max-width: 20rem; } }

/* ---------- Textes d'accueil : une seule taille (v2.1.1) ---------- */
.histoire, .mystere { font-size: 1.4rem; line-height: 1.55; color: var(--encre); }
.histoire p, .histoire p:last-child, .mystere .mystere__lead, .mystere .mystere__suite { font-size: inherit; line-height: inherit; color: inherit; font-style: normal; }
.histoire p { margin: 0 0 1.2rem; }
.histoire p:last-child { margin-bottom: 0; }
.histoire p:last-child .l { display: block; }
.mystere .mystere__lead { margin: 0 0 1.2rem; }
@media (max-width: 640px) { .histoire, .mystere { font-size: 1.3rem; } }

/* ---------- Page inscription : textes agrandis (v2.1.1) ---------- */
.delai { font-size: 1.4rem; line-height: 1.55; color: var(--encre); max-width: 32rem; margin-bottom: 1.2rem; }
.mystere--page { padding: 0 0 2.5rem; margin: 1.8rem auto 0; }
.mystere--page::before { margin-bottom: 1.5rem; }
@media (max-width: 640px) { .delai { font-size: 1.3rem; } }

/* Saisie papier & onglets (v2.4) */
.ep__onglets { flex-wrap: nowrap; overflow-x: auto; gap: .3rem; padding: .5rem .6rem; }
.ep__onglets a { padding: 0 .7rem; font-size: .95rem; white-space: nowrap; flex: none; }
.ep__onglets button { padding: 0 .8rem; font-size: .95rem; white-space: nowrap; }
.ep__onglets form { flex: none; }
.ep__papier { display: inline-block; padding: 0 .5rem; border-radius: 99px; background: var(--rose); color: var(--vert); font-size: .8rem; font-weight: 700; }
.saisie__photo { margin: 1rem 0 .5rem; position: sticky; top: 61px; z-index: 5; background: var(--papier); padding: .3rem 0; }
.saisie .saisie__btn { display: flex; align-items: center; justify-content: center; min-height: 52px; margin: 0; border: 1px dashed var(--vert); color: var(--vert); font-weight: 700; cursor: pointer; background: #fff; text-align: center; }
.saisie .saisie__btn.petit { min-height: 40px; border-style: solid; font-size: .95rem; }
#photo-apercu { display: block; width: 100%; max-height: 22vh; object-fit: contain; margin-top: .4rem; background: #fff; border: 1px solid rgba(168,133,74,.4); cursor: zoom-in; }
#photo-apercu.grand { max-height: 70vh; cursor: zoom-out; }
.saisie__astuce { margin: .2rem 0 0 !important; font-size: .85rem; color: var(--discret); text-align: center; }
.saisie small { font-weight: 400; color: var(--discret); }
.saisie .option { margin-top: 1rem !important; }
