/* Ma Lettre - premium, simple, Apple-like. White + ink + one blue accent. */
:root {
  --ink: #1c2030;
  --ink-2: #6b6f7d;
  --bg: #ffffff;
  --gray: #faf6ea;            /* warm cream, like the app surfaces */
  --line: rgba(28, 32, 48, 0.12);
  --line-2: rgba(28, 32, 48, 0.07);
  --navy-1: #2d3856;
  --navy-2: #1a2540;
  --gold: #c8a85a;
  --gold-deep: #9a7a2e;
  --gold-text: #6b5320;
  --cream: #fdfaf1;
  --green: #1d7a3e;
  --max: 1080px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.01em;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.07; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 740px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 14px; top: 14px; background: #fff; padding: 10px 14px; border-radius: 10px; z-index: 99; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: 17px; padding: 13px 26px; border-radius: 980px; transition: background .2s ease, transform .12s ease; cursor: pointer; letter-spacing: -0.01em; }
.btn-primary {
  background: linear-gradient(180deg, var(--navy-1), var(--navy-2));
  color: #f5edd8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 26px -10px rgba(26,37,64,.5);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 8px 17px; font-size: 14.5px; box-shadow: none; }
.link { color: var(--navy-1); font-size: 17px; font-weight: 500; }
.link:hover { text-decoration: underline; }
.link span { color: var(--gold-deep); font-weight: 600; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.72); backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid var(--line-2); }
.nav-row { display: flex; align-items: center; height: 52px; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.logo-ic { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.hero-ic { width: 78px; height: 78px; border-radius: 18px; box-shadow: 0 12px 30px -10px rgba(26,37,64,.42); margin-bottom: 22px; }
.closer-ic { width: 92px; height: 92px; border-radius: 21px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.5); margin-bottom: 26px; }
.nav-links { display: flex; gap: 28px; margin: 0 auto 0 12px; }
.nav-links a { font-size: 14px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

/* hero */
.hero { padding: 84px 0 0; text-align: center; overflow: hidden; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.eyebrow { color: var(--gold-deep); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.hero h1 { font-size: clamp(44px, 7.4vw, 88px); font-weight: 650; margin-top: 8px; }
.hero-sub { margin-top: 24px; max-width: 22em; font-size: clamp(19px, 2.4vw, 24px); color: var(--ink-2); font-weight: 400; }
.hero-cta { margin-top: 34px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center; }

/* phone mockup */
.phone { margin-top: 64px; }
.phone-body {
  position: relative; width: 300px; aspect-ratio: 300 / 614;
  background: #1c1c1e; border-radius: 54px; padding: 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 40px 80px -30px rgba(0,0,0,.4), inset 0 0 0 2px rgba(255,255,255,.06);
}
.phone-island { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 96px; height: 28px; background: #000; border-radius: 16px; z-index: 3; }
.phone-screen { position: relative; height: 100%; background: var(--gray); border-radius: 44px; overflow: hidden; padding: 50px 16px 16px; text-align: left; }
.app-bar { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 12px; }
.app-seg { display: inline-flex; align-items: center; gap: 2px; background: rgba(28,32,48,.06); border-radius: 980px; padding: 5px 6px; }
.app-seg-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--navy-2); border-radius: 980px; padding: 4px 9px; font-size: 12px; font-weight: 700; }
.app-seg-on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); color: var(--gold-deep); }
.app-seg-div { width: 1px; height: 14px; background: rgba(28,32,48,.14); }
.app-prof { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(28,32,48,.06); color: var(--navy-2); }
.app-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 14px; color: var(--gold-deep); }
.app-head-ic { color: var(--gold-deep); flex: 0 0 auto; }
.app-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.app-count { font-size: 11px; font-weight: 700; color: var(--gold-text); background: rgba(200,168,90,.18); border-radius: 980px; padding: 2px 8px; }
.app-send { margin-left: auto; align-self: center; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(180deg,#f7ecd0,#efdcb2); color: var(--gold-deep); border: 1px solid rgba(120,90,40,.4); flex: 0 0 auto; }
.app-card { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); padding: 14px; display: flex; gap: 12px; margin-bottom: 12px; }
.app-doc { width: 42px; height: 54px; flex: 0 0 42px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 6px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.app-doc i { height: 3px; border-radius: 2px; background: rgba(0,0,0,.14); }
.app-doc i:nth-child(2) { width: 70%; }
.app-doc i:last-child { width: 50%; background: var(--gold); }
.app-doc-sm { height: 40px; flex-basis: 36px; width: 36px; }
.app-meta { min-width: 0; flex: 1; }
.app-name { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.app-date { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.app-time { list-style: none; margin: 12px 0 0; padding: 0; }
.app-time li { position: relative; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #9aa0a6; padding-bottom: 9px; }
.app-time li b { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #c9ccd1; flex: 0 0 auto; z-index: 1; }
.app-time li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 13px; bottom: -2px; width: 2px; background: #d7dade; }
.app-time li.on { color: var(--green); font-weight: 600; }
.app-time li.on b { background: var(--green); border-color: var(--green); }
.app-time li.on:not(:last-child)::before { background: rgba(29,122,62,.35); }
.app-card-mini { align-items: center; }

/* sections */
.section { padding: 110px 0; text-align: center; }
.section-gray { background: var(--gray); }
.title { font-size: clamp(30px, 4.2vw, 48px); font-weight: 650; }
.subtitle { margin: 16px auto 0; max-width: 30em; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 60px; text-align: left; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font-size: 18px; font-weight: 600; color: var(--navy-1); }
.section-gray .step-n { background: var(--gray); }
.step h3 { font-size: 23px; margin-top: 20px; }
.step p { margin-top: 8px; color: var(--ink-2); font-size: 16.5px; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 58px; text-align: left; }
.price-card { background: #fff; border: 1px solid var(--line-2); border-radius: 22px; padding: 26px 22px; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.price-card-hl { box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 0 0 2px rgba(200,168,90,.55) inset; }
.price-tag { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.price-desc { margin-top: 10px; color: var(--ink-2); font-size: 15px; flex: 1; }
.price-amt { margin-top: 22px; font-size: 21px; font-weight: 650; letter-spacing: -0.02em; }
.fineprint { margin-top: 28px; color: var(--ink-2); font-size: 13px; }

/* features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 58px; text-align: left; }
.feature h3 { font-size: 19px; }
.feature p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; }

/* faq */
.faq { margin-top: 48px; text-align: left; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 24px 40px 24px 4px; font-size: 19px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 21px; font-size: 24px; font-weight: 300; color: var(--ink-2); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 4px 24px; color: var(--ink-2); font-size: 16.5px; max-width: 44em; }

/* closer / download */
.closer-inner { display: flex; flex-direction: column; align-items: center; }
.store-badges { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; justify-content: center; }
.store { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 14px; min-width: 176px; transition: transform .12s ease; }
.store:hover { transform: translateY(-2px); }
.store span { font-size: 11px; color: rgba(255,255,255,.7); }
.store strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

/* footer */
.foot { background: var(--gray); padding: 40px 0 30px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.foot-logo { font-weight: 600; font-size: 17px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { font-size: 13px; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }
.foot-fine { margin-top: 20px; font-size: 12px; color: #86868b; }

/* mobile sticky cta */
.mobile-cta { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; display: none; text-align: center; background: linear-gradient(180deg,#2d3856,#1a2540); color: #fff; font-size: 16px; font-weight: 500; padding: 15px; border-radius: 980px; color: #f5edd8; box-shadow: 0 10px 26px -8px rgba(26,37,64,.5); }

/* reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,1,.36,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* responsive */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 36px; max-width: 460px; margin-inline: auto; }
  .pricing { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .section { padding: 76px 0; }
  .hero { padding: 56px 0 0; }
  .nav-links { display: none; }
  .pricing, .features { grid-template-columns: 1fr; }
  .mobile-cta { display: block; }
  .nav .btn-sm { display: none; }
  main { padding-bottom: 80px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}

/* ============ A4 COMPOSER (home) ============ */
.compose { padding: 56px 0 92px; }
.compose-wrap { display: grid; grid-template-columns: 1fr minmax(380px, 460px); gap: 60px; align-items: center; }
.compose-head { text-align: left; }
.compose-head h1 { font-size: clamp(40px, 4.6vw, 62px); font-weight: 650; margin-top: 10px; }
.compose-sub { margin-top: 20px; max-width: 20em; font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); }

.compose-main { width: 100%; min-width: 0; }
.paper-shell { width: 100%; max-width: 460px; margin: 0 auto; }

@media (max-width: 900px) {
  .compose-wrap { grid-template-columns: 1fr; gap: 38px; }
  .compose-head { text-align: center; }
  .compose-sub { margin-left: auto; margin-right: auto; }
}
/* Inline aperçu: the real rendered PDF in place of the editable paper. */
.paper-apercu { display: flex; flex-direction: column; gap: 14px; }
.apercu-page { display: block; width: 100%; height: auto; border: .5px solid rgba(120,90,40,.16); border-radius: 4px; box-shadow: 0 22px 48px -18px rgba(60,45,20,.22), 0 1px 2px rgba(15,23,42,.06); background: #fff; }
.paper {
  background: linear-gradient(180deg, #fdfbf4 0%, #faf6ec 100%);
  border: .5px solid rgba(120,90,40,.12); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 1px 2px rgba(15,23,42,.05), 0 22px 48px -18px rgba(60,45,20,.22), 0 44px 82px -32px rgba(60,45,20,.12);
  aspect-ratio: 1 / 1.414; overflow: hidden; text-align: left;
  font-family: "Charter","Tinos","Source Serif Pro","Iowan Old Style",Georgia,"Times New Roman",serif;
}
.paper-pad { padding: 30px 30px 22px; height: 100%; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.zone { display: block; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; margin: -6px -10px; cursor: pointer; transition: background .15s ease, border-color .15s ease; font-family: inherit; }
.zone:hover { background: rgba(200,168,90,.09); border-color: rgba(200,168,90,.38); }
.zone-tag { display: block; font-family: var(--sans); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-deep); margin-bottom: 4px; }
.zone-body { display: block; white-space: pre-line; font-size: 12px; line-height: 1.55; color: #374151; font-weight: 500; }
.zone-body[data-empty="true"] { color: #b3a892; font-style: italic; }
.zone-sender { max-width: 62%; }
.zone-recipient-row { display: flex; justify-content: flex-end; margin-top: 16px; }
.zone-recipient { max-width: 62%; }
.zone-recipient .zone-tag, .zone-recipient .zone-body { text-align: right; }

.paper-date { text-align: right; font-size: 11px; color: #6b7280; margin: 20px 0 12px; }
.paper-ar { text-align: right; font-size: 10px; font-style: italic; color: rgba(17,24,39,.55); margin-bottom: 12px; }

.zone-objet { margin-top: 2px; }
.paper-objet { display: block; font-size: 12.5px; line-height: 1.5; color: #0f172a; padding: 9px 11px; background: linear-gradient(180deg, rgba(45,56,86,.10), rgba(45,56,86,.05)); border-left: 3px solid var(--navy-1); border-radius: 6px; }
.paper-objet b { font-weight: 700; }
#vObjet[data-empty="true"] { color: #8a93a8; font-style: italic; }

.paper-greeting { margin-top: 16px; font-size: 12.5px; color: #111827; font-weight: 500; }
.paper-body { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.bl { height: 7px; border-radius: 999px; background: rgba(17,24,39,.08); }
.bl-gap { margin-top: 8px; }
.w50{width:50%}.w70{width:70%}.w85{width:85%}.w88{width:88%}.w90{width:90%}.w92{width:92%}.w94{width:94%}.w96{width:96%}
.paper-sign { margin-top: auto; display: flex; justify-content: flex-end; padding-top: 16px; }
.bl-sign { width: 92px; height: 16px; border-radius: 4px; background: linear-gradient(110deg, transparent 30%, rgba(45,56,86,.18) 50%, transparent 70%), rgba(45,56,86,.10); transform: rotate(-3deg); }

.compose-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 36px; }
.rar-toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; position: relative; }
.rar-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.rar-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.rar-toggle input:checked + .rar-box { background: var(--navy-1); border-color: var(--navy-1); }
.rar-toggle input:checked + .rar-box::after { content: ""; width: 5px; height: 9px; border: solid #f5edd8; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }
.compose-alt { font-size: 14px; color: var(--ink-2); }
.compose-alt a { color: var(--navy-1); font-weight: 600; }
.compose-alt a:hover { text-decoration: underline; }
.compose-done { font-size: 14.5px; color: var(--green); font-weight: 600; }

/* editor sheet */
.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15,18,28,.42); animation: shFade .2s ease; }
.sheet-card { position: relative; width: 100%; max-width: 460px; background: #fff; border-radius: 22px 22px 0 0; padding: 14px 22px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px -10px rgba(0,0,0,.3); animation: shUp .26s cubic-bezier(.2,1,.36,1); }
.sheet-grip { display: block; width: 38px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.16); margin: 2px auto 14px; }
.sheet-title { font-size: 20px; font-weight: 650; margin-bottom: 16px; }
.sheet-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.sheet-fields .row { display: flex; gap: 10px; }
.fld { width: 100%; box-sizing: border-box; padding: 13px 14px; font-size: 16px; font-family: var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.fld:focus { border-color: var(--navy-1); box-shadow: 0 0 0 3px rgba(45,56,86,.12); }
.fld::placeholder { color: #a7adba; }
.sheet-card .btn-primary { width: 100%; }
@media (min-width: 560px) { .sheet { align-items: center; } .sheet-card { border-radius: 22px; animation: shPop .2s ease; } }
@keyframes shFade { from { opacity: 0; } }
@keyframes shUp { from { transform: translateY(100%); } }
@keyframes shPop { from { opacity: 0; transform: scale(.96); } }

/* BAN address autocomplete dropdown */
.fld-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 6; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 32px -12px rgba(0,0,0,.24); overflow: hidden; max-height: 240px; overflow-y: auto; }
.fld-suggest[hidden] { display: none; }
.fld-suggest-row { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 11px 14px; cursor: pointer; }
.fld-suggest-row:last-child { border-bottom: 0; }
.fld-suggest-row:hover, .fld-suggest-row:focus { background: rgba(45,56,86,.06); outline: none; }
.fs-main { font-size: 15px; font-weight: 500; color: var(--ink); }
.fs-sub { font-size: 12.5px; color: var(--ink-2); }

/* generated letter text in the A4 */
.fld-ta { resize: vertical; min-height: 50px; line-height: 1.45; font-family: var(--sans); }
.paper-body.is-text { display: block; margin-top: 14px; }
.paper-para { font-size: 11.5px; line-height: 1.62; color: #1f2937; margin-bottom: 8px; text-align: justify; white-space: pre-line; hyphens: auto; }
.paper-closing { margin-top: 10px; }
.paper-sign-name { font-size: 11.5px; color: #1f2937; font-weight: 500; }
.compose-err { font-size: 14px; color: #b3261e; font-weight: 500; }

/* post-generation action bar (matches app) */
.compose-actions { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 440px; }
.act-edit { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.act-text { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; border-radius: 999px; color: #9a7a2e; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: -.1px; cursor: pointer; padding: 6px 12px; -webkit-tap-highlight-color: transparent; transition: transform .16s cubic-bezier(.34,1.56,.64,1), background .16s ease, color .16s ease; }
.act-text:active { transform: scale(.95); opacity: .7; }
.act-text svg { width: 15px; height: 15px; flex: 0 0 auto; transition: transform .22s cubic-bezier(.34,1.56,.64,1); }
@media (hover: hover) {
  .act-text:hover { background: rgba(120,90,40,.09); color: #7d6320; transform: translateY(-1.5px); }
  .act-text:hover svg { transform: scale(1.18) rotate(-7deg); }
}
.act-text.on { color: #1d7a3e; }
.act-sep { color: rgba(120,90,40,.35); font-weight: 700; }
.act-send { display: flex; gap: 10px; }
.act-postal { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 58px; min-height: 58px; border-radius: 16px; border: 0; cursor: pointer; background: linear-gradient(180deg,#2d3856,#1a2540); color: #f5edd8; font-family: var(--sans); font-size: 17.5px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 14px 34px -10px rgba(26,37,64,.6); transition: transform .12s ease, filter .15s ease; }
.act-postal svg { width: 21px; height: 21px; }
.act-postal svg { width: 19px; height: 19px; color: #d8bc78; }
.act-postal:hover { filter: brightness(1.08); } .act-postal:active { transform: scale(.985); }
.act-export { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 22px; border-radius: 16px; border: 1.5px solid rgba(120,90,40,.4); background: linear-gradient(180deg,#fffdf7,#f6ecd6); color: var(--gold-text); font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .12s ease; }
.act-export svg { width: 17px; height: 17px; color: var(--gold-deep); }
.act-export:active { transform: scale(.98); }
/* "Recevoir ce courrier chez moi": quiet outline secondary, clearly subordinate
 * to the primary "Envoyer par la poste" CTA. */
.act-postal-self { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 9px; height: 44px; border-radius: 13px; border: 1px solid rgba(120,90,40,.26); background: transparent; color: var(--gold-text); font-family: var(--sans); font-size: 13.5px; font-weight: 550; cursor: pointer; transition: transform .12s ease, background .15s ease; }
.act-postal-self svg { width: 16px; height: 16px; color: var(--gold-deep); flex: 0 0 auto; }
.act-postal-self:hover { background: rgba(120,90,40,.05); } .act-postal-self:active { transform: scale(.985); }
/* Posting is the finish: full-width primary, value strip above, export demoted.
 * compose-actions uses gap:16px, so tighten paired/captioned elements with negatives. */
.act-postal { width: 100%; box-sizing: border-box; }
.postal-value { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 14px; margin-bottom: -2px; }
.pv-item { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--gold-text); }
.pv-item svg { width: 14px; height: 14px; color: var(--gold-deep); flex: 0 0 auto; }
.compose-actions .act-postal-self { margin-top: -6px; }
.act-export-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: -4px 0 0; padding: 6px; background: none; border: 0; cursor: pointer; color: #8a7a52; font-family: var(--sans); font-size: 13.5px; font-weight: 600; }
.act-export-link svg { width: 16px; height: 16px; }
.act-export-link:active { opacity: .55; }
.act-export-caption { text-align: center; font-family: var(--sans); font-size: 11.5px; font-weight: 500; color: #b6a378; margin-top: -14px; }
.act-attachlist { font-size: 13px; color: var(--ink-2); text-align: center; }
.paper-para[contenteditable="true"], .paper-objet [contenteditable="true"] { outline: 2px solid rgba(45,56,86,.28); outline-offset: 3px; border-radius: 4px; }

@media print {
  body * { visibility: hidden; }
  .paper, .paper * { visibility: visible; }
  .paper { position: absolute; left: 0; top: 0; width: 100%; max-width: none; margin: 0; aspect-ratio: auto; border: 0; box-shadow: none; border-radius: 0; }
  .paper-pad { overflow: visible; height: auto; padding: 20mm 18mm; }
  .zone { border: 0 !important; background: transparent !important; }
  .sign-add, .coach, .pager, .attach-bar, .paper-writing { display: none !important; }
  .nav, .mobile-cta, .compose-head, .compose-cta, .section, .foot, .sheet { display: none !important; }
  @page { margin: 0; }
}

/* ===== two-column: text + actions left, A4 right ===== */
.compose-wrap { align-items: start; }
.compose-left { display: flex; flex-direction: column; gap: 30px; padding-top: 6px; }
.compose-cta { align-items: flex-start; margin-top: 0; width: 100%; }
.act-edit { justify-content: flex-start; }
.act-send { width: 100%; }
.compose-alt { text-align: left; }

/* coaching bubble + active-zone pulse */
.coach { display: flex; align-items: center; gap: 10px; width: fit-content; margin: 0 auto 18px; padding: 10px 16px; background: linear-gradient(180deg,#fffdf7,#f6ecd6); border: 1px solid rgba(120,90,40,.35); border-radius: 999px; color: var(--gold-text); font-size: 14.5px; font-weight: 600; box-shadow: 0 6px 18px -8px rgba(120,90,40,.35); position: relative; animation: coachBob 2.6s ease-in-out infinite; }
.coach[hidden] { display: none; }
.coach-dot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg,#2d3856,#1a2540); color: #f5edd8; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.coach::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: #f6ecd6; border-right: 1px solid rgba(120,90,40,.35); border-bottom: 1px solid rgba(120,90,40,.35); }
@keyframes coachBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.zone-next { position: relative; background: rgba(200,168,90,.10); border-color: rgba(200,168,90,.5); }
.zone-next::after { content: ""; position: absolute; inset: -2px; border-radius: 10px; border: 2px solid rgba(200,168,90,.7); animation: zonePulse 1.8s ease-out infinite; pointer-events: none; }
/* App-style premium cue bubble beside the active field (sender/recipient). */
.zone-cue { display: none; }
.zone-next .zone-cue {
  display: inline-flex; align-items: center; position: absolute; z-index: 6; top: 50%;
  padding: 9px 13px; border-radius: 14px; white-space: nowrap;
  background: linear-gradient(180deg,#fffdf7,#f6ecd6); border: 1.5px solid rgba(154,122,46,.5);
  color: var(--gold-text); font-family: var(--sans); font-size: 12.5px; font-weight: 650; letter-spacing: -.1px;
  box-shadow: 0 8px 22px -10px rgba(120,90,40,.45); pointer-events: none;
}
.zone-next .zone-cue::before {
  content: ""; position: absolute; width: 10px; height: 10px;
  background: #fffdf7; border: 1.5px solid rgba(154,122,46,.5);
}
.zone-sender.zone-next .zone-cue { left: calc(100% + 16px); transform: translateY(-50%); animation: cueNudgeL 2.6s ease-in-out infinite; }
.zone-sender.zone-next .zone-cue::before { left: -6px; top: 50%; margin-top: -5px; transform: rotate(45deg); border-right: 0; border-top: 0; }
.zone-recipient.zone-next .zone-cue { right: calc(100% + 16px); transform: translateY(-50%); animation: cueNudgeR 2.6s ease-in-out infinite; }
.zone-recipient.zone-next .zone-cue::before { right: -6px; top: 50%; margin-top: -5px; transform: rotate(45deg); border-left: 0; border-bottom: 0; }
@keyframes cueNudgeL { 0%,100% { transform: translateY(-50%) translateX(0); } 50% { transform: translateY(-50%) translateX(5px); } }
@keyframes cueNudgeR { 0%,100% { transform: translateY(-50%) translateX(0); } 50% { transform: translateY(-50%) translateX(-5px); } }
@keyframes zonePulse { 0% { opacity: .7; transform: scale(1); } 70% { opacity: 0; transform: scale(1.03); } 100% { opacity: 0; transform: scale(1.03); } }

@media (max-width: 900px) {
  .compose-left { align-items: center; text-align: center; }
  .compose-cta { align-items: center; }
  .act-edit { justify-content: center; }
  .compose-alt { text-align: center; }
}

.compose-actions[hidden] { display: none; }

/* attachment preview pages + pager */
.paper { position: relative; }
.paper-attach { position: absolute; inset: 0; background: #fff; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 12px; }
.paper-attach[hidden] { display: none; }
.paper-attach canvas, .paper-attach img { max-width: 100%; height: auto; border: 1px solid var(--line-2); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.attach-loading { color: var(--ink-2); font-size: 14px; padding: 30px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.pager[hidden] { display: none; }
.pager-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy-1); font-size: 21px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .12s ease, background .15s ease; }
.pager-btn:hover { background: var(--gray); }
.pager-btn:active { transform: scale(.94); }
.pager-btn:disabled { opacity: .38; pointer-events: none; }
.pager-label { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* animated ellipsis in the generating bubble */
.dots { display: inline-flex; }
.dots i { font-style: normal; opacity: .2; animation: dotBlink 1.3s infinite both; }
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
@keyframes dotBlink { 0%, 75%, 100% { opacity: .2; } 38% { opacity: 1; } }

/* once expéditeur / destinataire are filled, drop the helper tag label */
.zone:has(.zone-body[data-empty="false"]) .zone-tag { display: none; }

/* signature zone on the letter + draw pad */
.sign-zone { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; background: transparent; border: 0; cursor: pointer; padding: 6px 8px; border-radius: 8px; transition: background .15s ease; font-family: inherit; }
.sign-zone:hover { background: rgba(200,168,90,.08); }
.sign-img { max-width: 150px; max-height: 54px; object-fit: contain; }
.sign-add { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sans); font-size: 10.5px; font-weight: 600; color: var(--gold-deep); border: 1px dashed rgba(120,90,40,.5); border-radius: 8px; padding: 5px 9px; }
.sign-name { font-size: 11.5px; color: #1f2937; }
.sign-name:empty { display: none; }
.sigsheet { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; }
.sigsheet[hidden] { display: none; }
.sig-sub { color: var(--ink-2); font-size: 14px; margin: -8px 0 14px; }
.sig-pad-wrap { background: linear-gradient(180deg,#fdfbf4,#faf6ec); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sig-pad { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sig-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.sig-clear { background: transparent; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 18px; height: 48px; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.sig-actions .btn-primary { flex: 1; }
@media (min-width: 560px) { .sigsheet { align-items: center; } }

/* signature: hide the "Ajouter une signature" hint once a signature exists */
.sign-add[hidden] { display: none; }

/* Exporter: icon only, a bit bigger */
.act-export { width: 56px; min-width: 56px; padding: 0; flex: 0 0 auto; gap: 0; }
.act-export svg { width: 22px; height: 22px; }

/* "Rédaction en cours" animation inside the A4 */
.paper-writing { margin: 16px 0 0; display: flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--gold-deep); pointer-events: none; }
.paper-writing .pw-pen { flex: 0 0 auto; transform-origin: 50% 50%; animation: pwFloat 1.8s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes pwFloat { 0%,100% { transform: translateY(0) scale(1); opacity: .75; } 50% { transform: translateY(-2.5px) scale(1.08); opacity: 1; } }
.paper-writing[hidden] { display: none; }
.paper.is-generating .bl {
  background-image: linear-gradient(100deg, rgba(28,32,48,.07) 32%, rgba(200,168,90,.6) 50%, rgba(28,32,48,.07) 68%);
  background-size: 200% 100%;
  animation: blSweep 1.7s cubic-bezier(.4,0,.2,1) infinite;
  transform-origin: left center;
}
.paper.is-generating .bl:nth-child(1){animation-delay:0s}
.paper.is-generating .bl:nth-child(2){animation-delay:.09s}
.paper.is-generating .bl:nth-child(3){animation-delay:.18s}
.paper.is-generating .bl:nth-child(4){animation-delay:.27s}
.paper.is-generating .bl:nth-child(5){animation-delay:.36s}
.paper.is-generating .bl:nth-child(6){animation-delay:.45s}
.paper.is-generating .bl:nth-child(7){animation-delay:.54s}
.paper.is-generating .bl:nth-child(8){animation-delay:.63s}
@keyframes blSweep { 0% { background-position: 180% 0; } 100% { background-position: -80% 0; } }

/* attached-document dismiss bar on top of the A4 */
.paper-attach { padding-top: 50px; align-items: flex-start; }
.attach-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line-2); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.attach-bar[hidden] { display: none; }
.attach-bar-name { flex: 1; min-width: 0; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-bar-x { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.attach-bar-x:hover { background: rgba(179,38,30,.12); color: #b3261e; }

/* real store badges */
.compose-alt { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.alt-label { font-size: 14px; color: var(--ink-2); }
.store-badges-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.store-badge { display: inline-flex; transition: transform .12s ease; }
.store-badge:hover { transform: translateY(-1px); }
.store-badge img { display: block; height: 40px; width: auto; }
.store-badges .store-badge img { height: 48px; }
@media (max-width: 900px) { .compose-alt { align-items: center; } .store-badges-row { justify-content: center; } }

/* ===== postal mode chooser + payment sheet ===== */
.postalsheet .sheet-card, .paysheet .sheet-card { max-width: 480px; max-height: 92vh; overflow-y: auto; }
.postal-modes { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.pm-group { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #9a8e6e; margin: 8px 2px 2px; }
.pm-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line-2); border-radius: 16px; padding: 13px 14px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.pm-opt.on { border-color: rgba(154,122,46,.65); background: linear-gradient(180deg,#fffdf6,#faf2dd); }
.pm-radio { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; border: 2px solid rgba(0,0,0,.18); display: inline-flex; align-items: center; justify-content: center; }
.pm-opt.on .pm-radio { border-color: var(--gold-deep); background: var(--gold-deep); color: #fff; }
.pm-opt.on .pm-radio::after { content: "✓"; font-size: 12px; }
.pm-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-titlerow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-title { font-size: 16px; font-weight: 650; color: var(--ink); }
.pm-desc { font-size: 13px; color: var(--ink-2); }
.pm-price { font-weight: 700; font-size: 16px; color: var(--ink); white-space: nowrap; }
/* Upgrade deltas read as a small "+ X €" add-on pill; base keeps the plain price. */
.pm-delta { font-weight: 800; font-size: 15px; color: var(--gold-deep); background: rgba(184,146,60,.13); padding: 3px 9px; border-radius: 9px; }
.pm-opt.on .pm-delta { background: rgba(255,255,255,.72); }
.pm-conseille { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gold-deep); background: rgba(184,146,60,.16); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.pm-advised:not(.on) { border-color: rgba(154,122,46,.38); background: linear-gradient(180deg,#fffdf9,#fffaf0); }
.pm-more { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; padding: 9px; margin-top: 2px; background: none; border: none; color: var(--ink-2); font-size: 14px; font-weight: 650; cursor: pointer; font-family: inherit; }
.pm-more:hover { color: var(--ink); }
.postal-helper { font-size: 13px; color: var(--ink-2); line-height: 1.4; margin: 0 2px 12px; }
.postal-secure { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 10px 0 0; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.postal-secure svg { color: #9a8e6e; }
.postal-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
#postalEreFields[hidden] { display: none; }
.ere-consent { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.ere-consent input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--navy-1); flex: 0 0 auto; }
.postal-err, .pay-err { color: #b3261e; font-size: 13.5px; font-weight: 500; margin-top: 10px; }
.postal-err[hidden], .pay-err[hidden] { display: none; }
.postalsheet .btn-primary, .paysheet .btn-primary { width: 100%; }
.pay-element { margin: 4px 0 16px; min-height: 40px; }
.pay-success { text-align: center; padding: 10px 0; }
.pay-success[hidden] { display: none; }
.pay-check { width: 58px; height: 58px; margin: 4px auto 14px; border-radius: 50%; background: var(--green); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; }
.pay-success h3 { font-size: 21px; }
.pay-success p { color: var(--ink-2); margin: 10px 0 20px; font-size: 15px; }

/* mode chooser: stack title + description */
.pm-title, .pm-desc { display: block; }
.pm-desc { margin-top: 3px; }

/* inline postal + payment panels (replace the action bar) */
.postal-inline, .pay-inline { width: 100%; max-width: 460px; text-align: left; }
.postal-inline[hidden], .pay-inline[hidden] { display: none; }
.panel-back { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; color: var(--navy-1); font-size: 14px; font-weight: 600; cursor: pointer; padding: 2px 0; margin-bottom: 12px; }
.panel-back:hover { color: var(--gold-deep); }
.panel-title { font-size: 22px; font-weight: 650; }
.panel-sub { color: var(--ink-2); font-size: 14.5px; margin: 8px 0 14px; line-height: 1.5; }
.postal-inline .btn-primary, .pay-inline .btn-primary { width: 100%; }

/* Aperçu button + preview modal */
.paper-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.paper-toolbar[hidden] { display: none; }
.preview-btn { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; color: var(--navy-1); cursor: pointer; box-shadow: 0 1px 3px rgba(11,20,36,.06); transition: transform .12s ease, background .15s ease; }
.preview-btn:hover { background: var(--gray); }
.preview-btn:active { transform: scale(.97); }
.preview-btn svg { width: 16px; height: 16px; }
.previewmodal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; }
.previewmodal[hidden] { display: none; }
.preview-card { position: relative; width: min(680px, 94vw); height: min(90vh, 920px); background: #fff; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px -20px rgba(0,0,0,.55); }
.preview-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); font-weight: 650; font-size: 15px; }
.preview-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); font-size: 18px; line-height: 1; cursor: pointer; }
.preview-x:hover { background: rgba(0,0,0,.12); }
.preview-frame { flex: 1; width: 100%; border: 0; background: #525659; }

/* Éditer · Améliorer · Joindre row, under the A4 */
.paper-actions { margin-top: 16px; display: flex; justify-content: center; }
.paper-actions[hidden] { display: none; }
/* Frosted pill bar, identical to the app's edit-bar. */
.paper-actions .act-edit { flex-wrap: nowrap; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid rgba(120,90,40,.14); box-shadow: 0 1px 4px rgba(20,16,40,.06); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* generated text written in, word by word */
.reveal-word { opacity: 0; animation: wordIn .42s ease forwards; }
@keyframes wordIn { from { opacity: 0; filter: blur(1.5px); } to { opacity: 1; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .reveal-word { opacity: 1; animation: none; } }
.compose-head[hidden] { display: none; }

.postal-pages { font-size: 13px; color: var(--gold-text); background: rgba(200,168,90,.12); border-radius: 10px; padding: 9px 12px; margin: 0 0 12px; }
.postal-pages[hidden] { display: none; }

.btn[hidden] { display: none; }

/* Mes lettres: nav + modal + order timeline */
.nav-track { font-size: 14px; font-weight: 600; color: var(--navy-1); }
.nav-track:hover { color: var(--gold-deep); }
.ml-link { display: block; width: 100%; background: transparent; border: 0; color: var(--navy-1); font-size: 14px; font-weight: 600; cursor: pointer; padding: 12px 0 2px; }
.ml-link:hover { color: var(--gold-deep); }
#mlCode { text-align: center; font-size: 22px; letter-spacing: 8px; font-weight: 700; }
.ml-empty { color: var(--ink-2); font-size: 15px; text-align: center; padding: 20px 0; }
.ml-order { border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(11,20,36,.05); }
.ml-order-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ml-order-mode { font-weight: 650; font-size: 16px; }
.ml-order-date { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.ml-track { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--green); margin-top: 4px; }
.ml-tl { list-style: none; margin: 13px 0 0; padding: 0; }
.ml-tl li { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #9aa0a6; padding-bottom: 9px; }
.ml-tl li b { width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid #c9ccd1; flex: 0 0 auto; z-index: 1; }
.ml-tl li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px; background: #d7dade; }
.ml-tl li.is-done, .ml-tl li.is-current { color: var(--green); font-weight: 600; }
.ml-tl li.is-done b, .ml-tl li.is-current b { background: var(--green); border-color: var(--green); }
.ml-tl li.is-done:not(:last-child)::before, .ml-tl li.is-current:not(:last-child)::before { background: rgba(29,122,62,.35); }

/* "Voir un exemple" demo button + fill flash */
.demo-btn { display: inline-flex; align-items: center; gap: 7px; margin-top: 24px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--navy-1); cursor: pointer; box-shadow: 0 1px 3px rgba(11,20,36,.06); transition: transform .12s ease, background .15s ease; }
.demo-btn:hover { background: var(--gray); }
.demo-btn:active { transform: scale(.97); }
.demo-btn:disabled { opacity: .55; pointer-events: none; }
.demo-btn svg { width: 13px; height: 13px; }
.zone.demo-flash { animation: demoFlash .56s ease; }
@keyframes demoFlash { 0%, 100% { background: transparent; } 45% { background: rgba(200,168,90,.22); } }

/* prominent "Créer ma lettre" CTA after the demo */
.preview-btn.reset-prominent {
  position: relative;
  background: linear-gradient(180deg,#2d3856,#1a2540);
  color: #f5edd8; border-color: transparent;
  padding: 11px 22px; font-size: 14.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 26px -8px rgba(26,37,64,.55);
  animation: resetBob 2.2s ease-in-out infinite;
}
.preview-btn.reset-prominent:hover { filter: brightness(1.08); background: linear-gradient(180deg,#2d3856,#1a2540); }
.preview-btn.reset-prominent svg { color: #d8bc78; }
.preview-btn.reset-prominent::after {
  content: ""; position: absolute; inset: -3px; border-radius: 999px;
  border: 2px solid rgba(216,188,120,.65); pointer-events: none;
  animation: resetRing 1.9s ease-out infinite;
}
@keyframes resetBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes resetRing { 0% { opacity: .7; transform: scale(1); } 70% { opacity: 0; transform: scale(1.13); } 100% { opacity: 0; transform: scale(1.13); } }
@media (prefers-reduced-motion: reduce) { .preview-btn.reset-prominent { animation: none; } .preview-btn.reset-prominent::after { animation: none; opacity: 0; } }


/* Mes lettres: full page */
.meslettres-page { position: fixed; top: 53px; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg); overflow-y: auto; }
.meslettres-page[hidden] { display: none; }
.mlp-head { position: sticky; top: 0; z-index: 2; background: rgba(255,255,255,.85); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line-2); }
.mlp-head-row { display: flex; align-items: center; height: 60px; gap: 16px; }
.mlp-back { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; color: var(--navy-1); font-size: 15px; font-weight: 600; cursor: pointer; }
.mlp-back:hover { color: var(--gold-deep); }
.mlp-back svg { width: 18px; height: 18px; }
.mlp-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.mlp-body { padding: 44px 24px 90px; max-width: 640px; }
.mlp-auth { max-width: 420px; margin: 10px auto 0; }
.mlp-h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 650; }
.mlp-sub { color: var(--ink-2); margin: 12px 0 22px; font-size: 16px; line-height: 1.5; }
.mlp-auth .fld { margin-bottom: 12px; }
.mlp-auth .btn-primary { width: 100%; }
.mlp-orders-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.mlp-logout { width: auto; }

/* in-place zone editor: the A4 box itself turns editable, same look */
.paper-pad { position: relative; }
.zone { transition: background .15s ease, border-color .15s ease, padding .18s ease, box-shadow .18s ease; }
.zone.editing { background: #fffdf6; border-color: rgba(200,168,90,.6); padding: 16px 18px; box-shadow: 0 14px 34px -16px rgba(154,122,46,.45); }
.zone-sender.editing, .zone-recipient.editing { max-width: 78%; }
.zone.editing .zone-tag { display: block !important; margin-bottom: 8px; }
.zone-body[hidden] { display: none; }
.zone-edit { display: block; }
.zone-edit .ze-line { display: block; white-space: nowrap; position: relative; margin: 5px 0; }
.zone-recipient .zone-edit .ze-line { text-align: right; }
.ze-in { font: inherit; font-size: 12px; line-height: 1.55; color: #374151; font-weight: 500; background: transparent; border: 0; border-bottom: 1px dashed rgba(200,168,90,.55); padding: 0; margin: 0 1px; outline: none; vertical-align: baseline; }
.ze-in.ze-full { display: block; width: 100%; }
.zone-recipient .ze-in { text-align: right; }
.ze-in:focus { border-bottom-color: var(--gold-deep); border-bottom-style: solid; }
.ze-in::placeholder { color: #b3a892; font-style: italic; }
/* "Générer la lettre" button overlaid on the body skeleton, under the objet */
.paper-bodywrap { position: relative; }
.paper-gen { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 14px; pointer-events: none; background: linear-gradient(180deg, rgba(253,251,244,.82), rgba(253,251,244,.36) 55%, rgba(253,251,244,0)); }
.paper-gen[hidden] { display: none; }
.paper-gen-btn { pointer-events: auto; cursor: pointer; border: 0; border-radius: 12px; padding: 12px 24px; font-family: var(--sans); font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; color: #f5edd8; background: linear-gradient(180deg, #2d3856, #1a2540); box-shadow: 0 12px 28px -10px rgba(26,37,64,.55), inset 0 1px 0 rgba(255,255,255,.14); transition: transform .12s ease, filter .12s ease; }
.paper-gen-btn:hover { filter: brightness(1.05); }
.paper-gen-btn:active { transform: scale(.985); }
/* Clarify card: clean Apple/Stripe-style form, in normal flow (no clipping). */
.paper-clarify { margin: 6px 0 2px; display: flex; flex-direction: column; padding: 20px; font-family: var(--sans); background: #fff; border: 1px solid rgba(17,24,39,.08); border-radius: 18px; box-shadow: 0 6px 24px -10px rgba(17,24,39,.14), 0 1px 2px rgba(17,24,39,.04); }
#paperClarify[hidden] { display: none; }
.pc-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.pc-spark { color: #2f63ee; font-size: 15px; line-height: 1.35; flex: 0 0 auto; }
.pc-title { font-size: 15px; font-weight: 600; color: #111827; letter-spacing: -.02em; line-height: 1.3; }
.pc-sub { font-size: 12.5px; font-weight: 400; color: #8a90a0; margin-top: 4px; line-height: 1.4; }
.pc-q { margin-bottom: 14px; }
.pc-label { display: block; font-size: 13px; font-weight: 550; color: #374151; margin-bottom: 7px; letter-spacing: -.01em; }
.pc-input { width: 100%; box-sizing: border-box; padding: 12px 13px; font-size: 16px; font-family: var(--sans); color: #111827; background: #fff; border: 1px solid rgba(17,24,39,.14); border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
.pc-input:focus { border-color: #2f63ee; box-shadow: 0 0 0 3px rgba(47,99,238,.14); }
.pc-input::placeholder { color: #aab0bd; }
.pc-go { width: 100%; margin-top: 6px; padding: 13px 24px; border-radius: 12px; font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; color: #fff; background: linear-gradient(180deg, #2f63ee 0%, #1f49d4 100%); box-shadow: 0 8px 20px -8px rgba(31,73,212,.5), inset 0 1px 0 rgba(255,255,255,.2); }
.pc-skip { display: block; width: 100%; margin-top: 11px; background: none; border: 0; cursor: pointer; color: #8a90a0; font-family: var(--sans); font-size: 13.5px; font-weight: 500; }
.pc-skip:active { opacity: .55; }
/* objet inline editor */
.objet-edit .obj-line { display: flex; align-items: baseline; gap: 6px; white-space: normal; }
.objet-edit .obj-line b { font-weight: 700; font-size: 12.5px; color: #0f172a; }
.obj-objet { flex: 1; min-width: 0; font-size: 12.5px; color: #0f172a; }
.obj-details { font-size: 11.5px; }

.zone-date { width: max-content; max-width: 100%; margin: 14px 0 6px auto; padding: 6px 10px; }
.zone-date .paper-date { margin: 0; }
.zone-date.editing { margin-left: auto; }
.zone-date .zone-edit { text-align: right; }
.zone-date .ze-line { white-space: nowrap; color: #6b7280; font-size: 11px; }
.zone-date .ze-in { font-size: 11px; color: #6b7280; }
.ze-date { font-family: var(--sans); }
.ze-cont { display: block; width: 100%; margin-top: 14px; background: linear-gradient(180deg,#2d3856,#1a2540); color: #f5edd8; border: 0; border-radius: 9px; padding: 10px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: -.01em; cursor: pointer; transition: transform .12s ease; }
.ze-cont:active { transform: scale(.99); }

/* Postal dispatch timer — premium urgency card (editable day + live countdown) */
.postal-dispatch { display: flex; align-items: center; gap: 13px; margin: 0 0 16px; padding: 14px 16px; border-radius: 18px; background: radial-gradient(130% 150% at 0% 0%, rgba(31,73,212,.08), transparent 58%), linear-gradient(180deg, #ffffff, #f9fbff); border: 1px solid rgba(31,73,212,.20); box-shadow: 0 14px 34px -20px rgba(31,73,212,.45), 0 1px 3px rgba(11,20,36,.05); }
.postal-dispatch[hidden] { display: none; }
.pd-ico { flex: 0 0 auto; width: 26px; height: 26px; color: #1f49d4; }
.pd-copy { flex: 1 1 auto; min-width: 0; }
.pd-head { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 800; color: #1a2540; letter-spacing: -.015em; cursor: pointer; }
.pd-edit { flex: 0 0 auto; color: #1f49d4; opacity: .8; }
.pd-date { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.pd-cd { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13px; color: #5a6473; }
.pd-cd[hidden] { display: none; }
.pd-live { position: relative; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #1d7a3e; }
.pd-live::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(29,122,62,.55); animation: pdLivePulse 1.8s ease-out infinite; }
@keyframes pdLivePulse { 0% { transform: scale(.5); opacity: .9; } 70% { transform: scale(1.9); opacity: 0; } 100% { transform: scale(1.9); opacity: 0; } }
.pd-lead { color: #8a8270; }
.pd-time { font-weight: 800; color: #1f49d4; font-variant-numeric: tabular-nums; letter-spacing: .015em; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .pd-live::after { animation: none; } }

/* demo hand cursor: glides to "Générer" and taps it */
.demo-cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; transform-origin: 8px 2px; filter: drop-shadow(0 5px 9px rgba(0,0,0,.30)); transition: transform .72s cubic-bezier(.4,.05,.2,1); will-change: transform; }
.demo-cursor[hidden] { display: none; }
.demo-cursor.is-tap { transition: transform .13s ease; }
.demo-ripple { position: fixed; z-index: 9998; pointer-events: none; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(245,237,216,.95); background: rgba(245,237,216,.40); animation: demoRipple .58s ease-out forwards; }
@keyframes demoRipple { from { transform: scale(.4); opacity: .95; } to { transform: scale(3.2); opacity: 0; } }
.paper-gen-btn.demo-pressed { transform: scale(.95); filter: brightness(.96); }

/* dispatch urgency: countdown warms (amber) then alarms (red) near the 17h cut-off */
.postal-dispatch.pd-urgent .pd-time { color: #b8801b; }
.postal-dispatch.pd-urgent .pd-live { background: #c8860a; }
.postal-dispatch.pd-urgent .pd-live::after { border-color: rgba(200,134,10,.6); }
.postal-dispatch.pd-critical .pd-time { color: #d6453a; }
.postal-dispatch.pd-critical .pd-live { background: #d6453a; }
.postal-dispatch.pd-critical .pd-live::after { border-color: rgba(214,69,58,.6); animation-duration: 1.1s; }

/* email-first postal flow (matches the app: email step, then mode d'envoi) */
#postalEmailStep .fld { margin: 16px 0 12px; }
#postalEreFields { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 0; }
#postalModeStep #postalContinue { margin-top: 14px; }

/* === Landing-page SEO content: model letter + FAQ + internal links === */
.lp-doc { padding: 72px 0 96px; text-align: left; border-top: 1px solid var(--line-2); }
.lp-doc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.lp-doc-h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 650; letter-spacing: -0.02em; margin: 0 0 14px; }
.lp-doc-lead { color: var(--ink-2); font-size: 18px; line-height: 1.55; margin: 0 0 28px; max-width: 40em; }
.lp-model { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); padding: 32px 34px; font-family: "Charter","Tinos","Source Serif Pro","Iowan Old Style",Georgia,serif; font-size: 17px; line-height: 1.7; color: #2a2f3e; }
.lp-model p { margin: 0 0 16px; }
.lp-model p:last-child { margin-bottom: 0; }
.lp-model-objet { font-family: var(--sans); font-size: 15px; color: var(--ink); padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.lp-doc-note { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; margin: 22px 0 56px; max-width: 40em; }
.lp-faq { margin-top: 14px; border-top: 1px solid var(--line); }
.lp-faq-item { border-bottom: 1px solid var(--line); }
.lp-faq-item summary { list-style: none; cursor: pointer; padding: 20px 28px 20px 4px; position: relative; font-size: 17px; font-weight: 600; color: var(--ink); }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after { content: "+"; position: absolute; right: 6px; top: 17px; font-size: 24px; font-weight: 300; color: var(--ink-2); transition: transform .2s ease; }
.lp-faq-item[open] summary::after { transform: rotate(45deg); }
.lp-faq-item p { padding: 0 4px 22px; color: var(--ink-2); font-size: 16.5px; line-height: 1.6; max-width: 44em; }
.lp-doc-aside { position: sticky; top: 88px; }
.lp-aside-h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px; color: var(--ink); }
.lp-related { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; }
.lp-related li { border-bottom: 1px solid var(--line-2); }
.lp-related a { display: block; padding: 11px 2px; font-size: 14.5px; color: var(--ink-2); line-height: 1.35; transition: color .15s ease; }
.lp-related a:hover { color: #1f49d4; }
.lp-aside-all { font-size: 14px; font-weight: 600; color: #1f49d4; }
@media (max-width: 860px) {
  .lp-doc { padding: 56px 0 76px; }
  .lp-doc-wrap { grid-template-columns: 1fr; gap: 40px; }
  .lp-doc-aside { position: static; }
  .lp-model { padding: 24px 22px; }
}
