/* Louise & Junior — charte : sarcelle (dominante), cuivre (accent), crème (fond) */
/* Polices demandées : déposez les fichiers dans assets/fonts/ (voir LISEZMOI.md). Sinon, des polices proches prennent le relais. */
@font-face { font-family: "Cherie"; src: local("Cherie Demo"), local("Cherie"), url("../assets/fonts/cherie.woff2") format("woff2"), url("../assets/fonts/cherie.otf") format("opentype"), url("../assets/fonts/cherie.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "October Signature"; src: local("October Signature"), url("../assets/fonts/october-signature.woff2") format("woff2"), url("../assets/fonts/october-signature.otf") format("opentype"), url("../assets/fonts/october-signature.ttf") format("truetype"); font-display: swap; }

:root {
  --teal: #15585d;
  --teal-deep: #0e3f43;
  --copper: #b87956;
  --copper-light: #d9a27f;
  --cream: #f2eee4;
  --paper: #f7f4ec;
  --ink: #163f42;
  --ink-soft: rgba(22, 63, 66, .72);
  --on-teal: #f2eee4;
  --on-teal-soft: rgba(242, 238, 228, .74);
  --display: "Cherie", "Playfair Display", "Times New Roman", serif;
  --sign: "October Signature", "Great Vibes", "Brush Script MT", cursive;
  --body: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .25 0 0 0 0 .22 0 0 0 .45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 18px; font-weight: 500; line-height: 1.6;
  background: var(--teal-deep) url("../assets/deco/motif.webp") center / 640px auto repeat;
}
body.locked { overflow: hidden; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
img { max-width: 100%; }

/* Page : une colonne crème posée sur le motif sarcelle */
.page {
  position: relative; isolation: isolate; overflow: hidden;
  max-width: 520px; margin-inline: auto; background: var(--paper);
  box-shadow: 0 0 0 1px #0e3f4333, 0 30px 80px #0008;
}
.page::before { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: .3; mix-blend-mode: multiply; pointer-events: none; z-index: 0; }
.page > * { position: relative; z-index: 1; }
@media (min-width: 700px) { body { padding-block: 36px; } .page { border-radius: 6px; } }

/* Barre du haut : langue */
.topbar {
  position: fixed; z-index: 55; top: max(12px, calc(env(safe-area-inset-top, 0px) + 12px)); right: max(12px, calc(env(safe-area-inset-right, 0px) + 12px));
  display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: #0e3f43d9; backdrop-filter: blur(6px); box-shadow: 0 6px 16px #0003;
}
.topbar button { border: 0; background: none; color: var(--on-teal); font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: .08em; padding: 5px 11px; border-radius: 99px; cursor: pointer; }
.topbar button[aria-pressed="true"] { background: var(--copper); }

/* Décors flottants */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(var(--f, -9px)) rotate(var(--r, 0deg)); } }
.float { display: block; animation: float var(--d, 7s) ease-in-out var(--dl, 0s) infinite; will-change: transform; }
.deco { position: absolute; pointer-events: none; z-index: 3; }
.deco img { display: block; width: 100%; filter: drop-shadow(4px 6px 4px rgba(0,0,0,.18)); }

/* Apparition au défilement */
.reveal { transition: transform 1.1s cubic-bezier(.2,.7,.2,1), opacity 1.1s ease; }
.reveal.pre { transform: translateY(40px); opacity: 0; }

/* Titres */
.eyebrow { font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--copper); text-align: center; }
.title { font-family: var(--display); font-size: clamp(26px, 7vw, 32px); text-align: center; line-height: 1.15; text-wrap: balance; color: var(--teal); }
.sign { font-family: var(--sign); line-height: 1; font-weight: 400; }
.lead { text-align: center; color: var(--ink-soft); max-width: 34ch; margin-inline: auto; text-wrap: pretty; }
.rule { display: block; width: 90px; height: 18px; margin-inline: auto; color: var(--copper); }

/* Sections */
.block { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 44px 24px; text-align: center; }
.card-wrap { position: relative; width: 90%; max-width: 440px; margin: 22px auto; }
.card {
  position: relative; overflow: hidden; border-radius: 14px; padding: 38px 22px 40px; text-align: center;
  background: var(--teal); color: var(--on-teal); box-shadow: 0 10px 0 -4px #0e3f4322, 5px 6px 2px rgba(0,0,0,.22);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.card::before { content: ""; position: absolute; inset: 0; background: url("../assets/deco/motif.webp") center / 520px auto repeat; opacity: .35; mix-blend-mode: soft-light; pointer-events: none; }
.card::after { content: ""; position: absolute; inset: 10px; border: 1px solid #b8795688; border-radius: 9px; pointer-events: none; }
.card > * { position: relative; z-index: 1; }
.card .title { color: var(--on-teal); }
.card .lead { color: var(--on-teal-soft); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 99px; border: 1px solid var(--copper);
  background: var(--copper); color: #fff; padding: 10px 26px; font-family: var(--body); font-weight: 700; font-size: 15px;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: transform .2s, background .2s;
  box-shadow: 0 6px 14px #b8795644;
}
.btn:hover { transform: translateY(-1px) scale(1.02); background: #a96b49; }
.btn.ghost { background: transparent; color: var(--copper); box-shadow: none; }
.btn.ghost:hover { background: #b879561a; }
.btn.light { background: var(--cream); color: var(--teal); border-color: var(--cream); box-shadow: 0 8px 20px #0004; }
.btn.wa { background: #1f8f5f; border-color: #1f8f5f; box-shadow: 0 6px 14px #1f8f5f44; }
.btn.wa:hover { background: #187a50; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* Formulaires */
.field { display: grid; gap: 5px; text-align: left; font-size: 15px; font-weight: 600; }
.input {
  width: 100%; border: 1px solid #15585d40; border-radius: 10px; background: #fffdf8; color: var(--ink);
  font-size: 17px; font-weight: 500; padding: 10px 12px;
}
.input:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px #b8795633; }
textarea.input { min-height: 90px; resize: vertical; }
.note { font-size: 14px; color: var(--ink-soft); text-align: center; }
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 24px)); transform: translate(-50%, 20px);
  background: var(--teal); color: var(--on-teal); padding: 12px 20px; border-radius: 12px; box-shadow: 0 10px 30px #0005;
  opacity: 0; transition: .35s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; font-size: 16px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Musique */
.music {
  position: fixed; z-index: 45; right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px)); bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--copper); background: var(--teal); color: var(--cream); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 20px #0004;
}
.music svg { width: 22px; height: 22px; }
.music.playing svg { animation: spin 5s linear infinite; }
.music .bars { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modale */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: #0b2e31b3; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { position: relative; width: min(420px, 100%); background: var(--paper); border-radius: 16px; padding: 30px 22px 24px; display: grid; gap: 14px; box-shadow: 0 30px 60px #0006; animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
.modal h3 { font-family: var(--display); font-size: 24px; color: var(--teal); text-align: center; line-height: 1.2; }
.modal .close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.modal .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
