/* ------------------------------------------------------------------
   Margaux & Lubin - 5 juin 2027
   Direction artistique reprise du faire-part :
   rose poudre, encre bordeaux, illustrations au trait.
------------------------------------------------------------------- */

/* ---------- polices auto-hebergees (aucun appel externe) ---------- */
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/playfair-display-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/playfair-display-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/playfair-display-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Kaushan Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/kaushan-script-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Alfa Slab One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/alfa-slab-one-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Karla"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/karla-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Karla"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/karla-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Karla"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/karla-latin-600-normal.woff2") format("woff2");
}

:root {
  --rose: #ffe1e1;
  --rose-fonce: #fbd2d2;
  --papier: #fff8f6;
  --bordeaux: #a31521;
  --bordeaux-fonce: #7d0f19;
  --encre: #5c1218;
  --encre-douce: #96595e;
  --trait: #f0c9c9;
  --vert: #2f6b3c;
  --ombre: 0 22px 60px -30px rgba(92, 18, 24, .45);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --script: "Kaushan Script", "Brush Script MT", cursive;
  --slab: "Alfa Slab One", Georgia, serif;
  --sans: "Karla", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--encre);
  background: var(--rose);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ---------- motifs du faire-part ---------- */
.decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.decor-img {
  position: absolute;
  opacity: .2;
  transition: opacity .6s ease, transform .6s ease;
  filter: saturate(.35);
}
body.accueil .decor-img { opacity: 1; filter: none; }

.decor--coiffe    { top: 2vh;  left: 1vw;   width: clamp(90px, 11vw, 170px); }
.decor--mouette   { top: 4vh;  right: 2vw;  width: clamp(95px, 12vw, 185px); }
.decor--cigogne   { top: 34vh; left: 2vw;   width: clamp(95px, 12vw, 185px); }
.decor--bouteille { bottom: 0;  right: 0;   width: clamp(105px, 14vw, 215px); }

@media (max-width: 900px) {
  /* Sur petit ecran les motifs restent en fond, jamais par-dessus le texte. */
  .decor--coiffe    { top: -1vh;  left: -7vw;  width: 92px; }
  .decor--mouette   { top: 1vh;   right: -6vw; width: 96px; }
  .decor--cigogne   { top: auto;  bottom: 6vh; left: -9vw;  width: 104px; }
  .decor--bouteille { bottom: -2vh; right: -9vw; width: 110px; }
  .decor-img { opacity: .1; }
  body.accueil .decor-img { opacity: .3; filter: saturate(.5); }
}

/* ---------- barre de progression ---------- */
.progression {
  position: fixed; inset: 0 0 auto 0; height: 4px;
  background: rgba(163, 21, 33, .12); z-index: 20;
}
.progression-barre {
  height: 100%; width: 0; background: var(--bordeaux);
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- scene ---------- */
#scene {
  position: relative; z-index: 1;
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 52px 16px 24px;
}
.etape { width: 100%; display: flex; justify-content: center; }
.etape[hidden] { display: none; }

@keyframes entree {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ==================================================================
   PAGE D'ACCUEIL - l'affiche
================================================================== */
.affiche {
  width: 100%; max-width: 640px; text-align: center;
  padding: 10px 8px 30px;
  animation: entree .6s cubic-bezier(.4, 0, .2, 1) both;
}

.affiche-sur {
  font-family: var(--serif); font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  color: var(--bordeaux); margin: 0 0 6px; line-height: 1.15;
}
.affiche-sur--petit { font-size: clamp(1.3rem, 3.4vw, 1.75rem); margin-top: 6px; }

.affiche-script {
  font-family: var(--script); color: var(--bordeaux);
  font-size: clamp(2.7rem, 9vw, 4.4rem); line-height: 1;
  margin: 8px 0 0; transform: rotate(-2.5deg);
}

.affiche-et {
  font-family: var(--serif); font-style: italic; color: var(--bordeaux);
  font-size: clamp(1.1rem, 3vw, 1.5rem); margin: 2px 0;
}

.affiche-slab {
  font-family: var(--slab); color: var(--bordeaux);
  font-size: clamp(2.2rem, 7.6vw, 3.7rem); line-height: 1.05;
  letter-spacing: -.01em; margin: 0;
}
.affiche-slab--bresace { font-size: clamp(2.4rem, 8.4vw, 4rem); margin: 4px 0 6px; }
.affiche-slab--lieu    { font-size: clamp(1.9rem, 6.4vw, 3rem); margin-top: 4px; }
.affiche-slab--merci   { font-size: clamp(1.3rem, 4vw, 1.7rem); margin: 22px 0 0; }

.note--contact {
  border-top: 1px solid var(--trait); padding-top: 20px; margin-top: 26px;
}
.signature {
  font-family: var(--serif); color: var(--bordeaux);
  font-size: 1.05rem; line-height: 1.7; margin: 14px 0 0;
}
.signature span { font-family: var(--script); font-size: 1.5rem; }

.affiche-texte {
  font-family: var(--serif); color: var(--bordeaux);
  font-size: clamp(1.05rem, 2.9vw, 1.35rem); line-height: 1.5;
  margin: 18px auto 0; max-width: 24em;
}
.affiche-texte--serre { margin-top: 26px; }

.affiche-noms {
  margin: 4px 0 10px; display: flex; flex-wrap: wrap;
  align-items: baseline; justify-content: center; gap: .6em;
}
.nom-script {
  font-family: var(--script); color: var(--bordeaux);
  font-size: clamp(2.1rem, 7vw, 3.2rem); line-height: 1.1;
  padding-right: .18em;
}
.nom-et {
  font-family: var(--serif); font-style: italic; color: var(--bordeaux);
  font-size: clamp(1rem, 2.6vw, 1.3rem);
}
.nom-slab {
  font-family: var(--slab); color: var(--bordeaux);
  font-size: clamp(1.9rem, 6.2vw, 2.9rem); line-height: 1.1;
}

.affiche-date {
  font-family: var(--serif); color: var(--bordeaux);
  font-size: clamp(1.5rem, 4.6vw, 2.3rem); margin: 0; line-height: 1.2;
}

.affiche-programme {
  font-family: var(--serif); color: var(--bordeaux);
  font-size: clamp(1rem, 2.7vw, 1.2rem); line-height: 1.6;
  margin: 30px auto 0; max-width: 26em;
  border-top: 1px solid rgba(163, 21, 33, .25);
  border-bottom: 1px solid rgba(163, 21, 33, .25);
  padding: 14px 6px;
}

.affiche-note {
  color: var(--encre-douce); font-size: .92rem; line-height: 1.6;
  margin: 22px auto 26px; max-width: 30em;
}

/* filet decoratif */
.affiche-filet, .filet {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 26px auto; max-width: 260px;
}
.filet { margin: 14px auto 22px; }
.affiche-filet span, .filet span {
  flex: 1; height: 1px; background: rgba(163, 21, 33, .35);
}
.affiche-filet em, .filet em {
  font-style: normal; color: var(--bordeaux); font-size: .9rem;
}

/* ==================================================================
   PAGES DE QUESTIONS - les cartes
================================================================== */
.carte {
  width: 100%; max-width: 560px;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: 18px;
  padding: 38px 36px 32px;
  box-shadow: var(--ombre);
  animation: entree .5s cubic-bezier(.4, 0, .2, 1) both;
  position: relative; overflow: hidden;
}
.carte--large  { max-width: 640px; }
.carte--centre { text-align: center; }

/* liseré bordeaux en haut de carte */
.carte::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(90deg,
    var(--bordeaux) 0 10px, var(--rose-fonce) 10px 20px);
  opacity: .85;
}

.surtitre {
  font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--encre-douce); margin: 4px 0 12px; font-weight: 600;
}

.question {
  font-family: var(--serif); color: var(--bordeaux);
  font-size: clamp(1.5rem, 4.2vw, 2rem); line-height: 1.22;
  font-weight: 500; margin: 0 0 10px;
}

.aide { color: var(--encre-douce); font-size: .95rem; line-height: 1.6; margin: 0 0 26px; }
.note { color: var(--encre-douce); font-size: .88rem; line-height: 1.6; margin: 24px 0 0; }
.rappel {
  font-family: var(--serif); color: var(--bordeaux);
  font-size: 1.1rem; line-height: 1.6; margin: 0 0 24px;
}

/* ---------- champs ---------- */
.champ { display: block; margin-bottom: 18px; text-align: left; }
.label {
  display: block; font-size: .76rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--encre-douce); margin-bottom: 7px;
}

input[type="text"], input[type="email"], textarea, input[type="number"] {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--encre);
  background: #fff; border: 1px solid var(--trait); border-radius: 11px;
  padding: 13px 15px; transition: border-color .18s, box-shadow .18s;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus {
  outline: none; border-color: var(--bordeaux);
  box-shadow: 0 0 0 3px rgba(163, 21, 33, .14);
}
::placeholder { color: #ceaaab; }

/* ---------- compteur ---------- */
.compteur { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 4px; }
.compteur input[type="number"] {
  width: 112px; text-align: center; font-family: var(--serif);
  font-size: 2.4rem; font-weight: 500; padding: 6px 4px; color: var(--bordeaux);
  -moz-appearance: textfield;
}
.compteur input::-webkit-outer-spin-button,
.compteur input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.compteur-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--trait); background: #fff; color: var(--bordeaux);
  font-size: 1.45rem; line-height: 1; cursor: pointer;
  transition: background .16s, border-color .16s, transform .12s;
}
.compteur-btn:hover { background: var(--rose); border-color: var(--bordeaux); }
.compteur-btn:active { transform: scale(.94); }

.compteur-libelle {
  text-align: center; color: var(--encre-douce); font-size: .9rem;
  letter-spacing: .04em; margin: 0 0 24px;
}

/* ---------- paves de choix ---------- */
.choix { display: grid; gap: 12px; margin-bottom: 10px; }
.choix--compact { margin-bottom: 18px; }

.pave {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid #ecdcdc; border-radius: 14px;
  padding: 17px 20px; font-family: var(--sans);
  transition: border-color .16s, background .16s, box-shadow .16s, transform .12s;
}
.pave:hover {
  border-color: rgba(163, 21, 33, .55);
  box-shadow: 0 10px 26px -18px rgba(163, 21, 33, .8);
  transform: translateY(-1px);
}
.pave.actif {
  background: var(--rose); border-color: var(--bordeaux);
  box-shadow: 0 0 0 2px rgba(163, 21, 33, .18);
}
.pave.actif .pave-titre::after {
  content: ' \2713'; font-family: var(--sans); font-size: .9em;
}

#blocAdresse { margin-top: 22px; }

.pave-titre {
  display: block; font-family: var(--serif); font-size: 1.15rem;
  color: var(--bordeaux); margin-bottom: 3px;
}
.pave-sous { display: block; font-size: .87rem; color: var(--encre-douce); }

/* ---------- encarts d'information ---------- */
.encart {
  border: 1px solid var(--trait); border-left: 4px solid var(--bordeaux);
  background: #fff; border-radius: 12px;
  padding: 20px 22px; margin: 0 0 16px; text-align: left;
}
.encart--programme { background: var(--rose); border-left-color: var(--bordeaux); }
.encart--sobre { border-left-color: var(--trait); }

.encart-titre {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 500;
  color: var(--bordeaux); margin: 0 0 10px;
}
.encart p { margin: 0 0 10px; font-size: .95rem; line-height: 1.65; }
.encart p:last-child { margin-bottom: 0; }
.encart-plus { color: var(--encre-douce); }
.encart-mail {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin: 4px 0 14px;
}
.encart--attention { border-left-color: var(--bordeaux); background: var(--rose); }
.label--centre {
  text-align: center; margin: 22px 0 4px;
  display: block; font-size: .76rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--encre-douce);
}

.puces { margin: 10px 0 0; padding-left: 20px; font-size: .93rem; line-height: 1.75; }
.puces li::marker { color: var(--bordeaux); }

.mail {
  display: inline-block; color: var(--bordeaux); font-weight: 600;
  text-decoration: none; font-size: 1.02rem;
  background: var(--rose); border: 1px dashed rgba(163, 21, 33, .45);
  border-radius: 9px; padding: 9px 16px; word-break: break-word;
}
.mail:hover { background: var(--rose-fonce); }

.encart-tel { margin-top: 12px !important; }
.tel {
  color: var(--bordeaux); font-weight: 600; text-decoration: none;
  border-bottom: 2px solid rgba(163, 21, 33, .3); white-space: nowrap;
}
.tel:hover { border-bottom-color: var(--bordeaux); }

/* ---------- recapitulatif ---------- */
.recap {
  margin: 0 0 24px; border: 1px solid var(--trait); border-radius: 14px;
  background: #fff; overflow: hidden; text-align: left;
}
.recap > div {
  display: flex; gap: 16px; padding: 12px 18px;
  border-bottom: 1px solid var(--trait); font-size: .93rem;
}
.recap > div:last-child { border-bottom: none; }
.recap dt { flex: 0 0 42%; color: var(--encre-douce); margin: 0; }
.recap dd { flex: 1; margin: 0; font-weight: 500; white-space: pre-line; }

/* ---------- boutons ---------- */
.nav { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.nav .btn--principal { margin-left: auto; }

.btn {
  font-family: var(--sans); font-size: .96rem; font-weight: 600;
  padding: 13px 26px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; transition: background .16s, transform .12s, box-shadow .16s;
}
.btn--principal {
  background: var(--bordeaux); color: var(--rose);
  box-shadow: 0 12px 26px -16px rgba(163, 21, 33, .95);
}
.btn--principal:hover { background: var(--bordeaux-fonce); }
.btn--principal:active { transform: translateY(1px); }
.btn--principal[disabled] { opacity: .6; cursor: progress; }

.btn--discret { background: transparent; color: var(--encre-douce); border-color: var(--trait); }
.btn--discret:hover { background: var(--rose); color: var(--bordeaux); border-color: var(--bordeaux); }

.affiche .btn--principal { padding: 16px 44px; font-size: 1rem; }
#revoirInfos { margin-top: 4px; }

/* ---------- erreurs ---------- */
.erreur {
  background: #fff0ef; border: 1px solid #f0c0be; color: #8f2e2e;
  border-radius: 10px; padding: 11px 14px; font-size: .9rem; margin: 0 0 16px;
  text-align: left;
}

.coche { margin-bottom: 14px; }

/* ---------- pied ---------- */
.pied {
  position: relative; z-index: 1;
  text-align: center; padding: 18px 16px 26px;
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(163, 21, 33, .5);
}

/* ---------- mobile ---------- */
@media (max-width: 560px) {
  .carte { padding: 30px 22px 26px; border-radius: 15px; }
  #scene { padding: 38px 12px 16px; }
  .nav { flex-wrap: wrap; }
  .nav .btn { flex: 1 1 auto; }
  .recap > div { flex-direction: column; gap: 3px; }
  .recap dt { flex: none; }
  .encart { padding: 17px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
