/* ============================================================
   mesdemarchesdeces.fr — “Papier & encre”
   Identité : correspondance soignée. Papier chaud, encre marine,
   Garamond pour la voix, liseré tricolore en signature unique.
   ============================================================ */
:root {
  --ink: #1e2a5e;            /* encre marine (logo) */
  --ink-soft: #5c6684;       /* encre diluée */
  --leaf: #6d84b4;           /* bleu feuille (logo) */
  --paper: #faf9f6;          /* papier chaud */
  --white: #ffffff;
  --line: #e7e5de;           /* filet */
  --sand: #eeece6;
  --sage: #1e2a5e;           /* alias historiques → encre */
  --sage-soft: #eef1f7;      /* lavis bleu très pâle */
  --accent: #8a93b5;
  --alert: #a33d3d;
  --rouge: #b3232f;          /* uniquement le liseré + alertes */
  --ok: #3e7c5b;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(30, 42, 94, .06), 0 8px 24px -18px rgba(30, 42, 94, .25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.65; font-size: 16px;
  -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
img { display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.hidden { display: none !important; }

/* ---------- en-tête ---------- */
header.site { background: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 700;
  font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.logo .wm { white-space: nowrap; }
.logo .lb { color: var(--leaf); }
.logo .logo-emb { width: 34px; height: 34px; }
nav.main { display: flex; gap: 26px; align-items: center; }
nav.main a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; white-space: nowrap;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
nav.main a:hover { color: var(--ink); border-bottom-color: var(--leaf); }
.burger { display: none; }

/* ---------- boutons ---------- */
.btn { display: inline-block; background: var(--ink); color: #fff; border: none; border-radius: 8px;
  padding: 13px 26px; font-size: 15.5px; font-family: var(--sans); font-weight: 600; cursor: pointer;
  text-decoration: none; letter-spacing: .01em; transition: background .15s, transform .06s; }
.btn:hover { background: #16204a; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-weight: 600; }
.btn-ghost:hover { background: var(--sage-soft); }
.btn-big { padding: 16px 34px; font-size: 16.5px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: default; }
.mini { font-size: 13.5px; padding: 8px 13px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--white); cursor: pointer; text-decoration: none; color: var(--ink); font-family: var(--sans);
  transition: border-color .15s, color .15s; min-height: 36px; display: inline-flex; align-items: center; gap: 5px; }
.mini:hover { border-color: var(--ink); }
.mini.lock { color: #a3a49f; }

/* ---------- héros ---------- */
.hero { padding: 74px 0 60px; text-align: center; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.tric { display: inline-flex; height: 2px; width: 96px; margin: 16px 0 26px; }
.tric i { flex: 1; } .tric i:nth-child(1) { background: var(--ink); } .tric i:nth-child(2) { background: transparent; }
.tric i:nth-child(3) { background: var(--rouge); }
.hero h1 { font-family: var(--serif); font-size: clamp(30px, 4.6vw, 46px); font-weight: 500; line-height: 1.22;
  letter-spacing: -.005em; max-width: 730px; margin: 0 auto 20px; text-wrap: balance; }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 600px; margin: 0 auto 34px; }
.hero .sub { margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }
.tagline { font-size: 12px; color: var(--accent); letter-spacing: .18em; text-transform: uppercase; margin-top: 44px; }
.code-mini { margin-top: 36px; display: inline-flex; flex-direction: column; gap: 9px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; box-shadow: var(--shadow); }
.code-mini span { font-size: 13.5px; color: var(--ink-soft); }
.code-mini form { display: flex; gap: 8px; }
.code-mini input { padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 15px;
  width: 215px; text-transform: uppercase; letter-spacing: .05em; background: var(--white); font-family: var(--sans); }
.code-mini input:focus { outline: none; border-color: var(--ink); }
.code-mini .btn-ghost { padding: 11px 18px; }

/* ---------- chiffres clés ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--white);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 26px 22px; text-align: center; border-left: 1px solid var(--sand); }
.stat:first-child { border-left: none; }
.stat .n { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }
.carte-lien { text-decoration: none; display: block; transition: border-color .15s, transform .12s; }
.carte-lien:hover { border-color: var(--ink); transform: translateY(-2px); }
.carte-lien .lire { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--leaf); }

/* ---------- sections ---------- */
.section { padding: 58px 0; }
.section h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(25px, 3vw, 32px); text-align: center;
  margin-bottom: 14px; letter-spacing: -.005em; }
.section .intro-s { text-align: center; color: var(--ink-soft); max-width: 620px; margin: 0 auto 36px; font-size: 16px; }
.trois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.carte { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; box-shadow: var(--shadow); }
.carte h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; margin-bottom: 10px; }
.carte p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- tarifs ---------- */
.tarifs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; margin-top: 40px; }
.tarif { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px;
  display: flex; flex-direction: column; box-shadow: var(--shadow); }
.tarif.star { border: 1.5px solid var(--ink); position: relative; }
.tarif.star::before { content: "Le plus choisi"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 11.5px; letter-spacing: .08em; padding: 4px 16px; border-radius: 20px; }
.tarif .nom { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.tarif .prix { font-family: var(--serif); font-size: 46px; font-weight: 500; margin: 10px 0 2px; line-height: 1; }
.tarif .prix small { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.tarif ul { list-style: none; margin: 20px 0 26px; flex: 1; }
.tarif li { padding: 7px 0 7px 26px; position: relative; font-size: 14.5px; border-top: 1px solid var(--sand); }
.tarif li:first-child { border-top: none; }
.tarif li::before { content: "✓"; position: absolute; left: 2px; color: var(--leaf); font-weight: 700; }
.tarif li.non { color: #a8a9a4; } .tarif li.non::before { content: "—"; color: #cfcfc8; font-weight: 400; }
.tarif .btn, .tarif .btn-ghost { display: block; text-align: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px;
  padding: 16px 20px; transition: border-color .15s; }
.faq details[open] { border-color: var(--leaf); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; position: relative; padding-right: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 21px; font-weight: 400; color: var(--leaf); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 10px; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- pied de page ---------- */
footer.site { border-top: 1px solid var(--line); background: var(--white); margin-top: 48px; padding: 34px 0 28px;
  font-size: 13.5px; color: var(--ink-soft); }
footer.site .cols { display: flex; gap: 46px; flex-wrap: wrap; }
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- questionnaire ---------- */
.q-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--ink); transition: width .35s ease; z-index: 60; }
.q-stage { min-height: calc(100vh - 70px); display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 26px 20px; text-align: center; }
.q-box { max-width: 620px; width: 100%; animation: qin .35s ease; }
@keyframes qin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.q-box h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(23px, 3.4vw, 31px); line-height: 1.3; margin-bottom: 10px; }
.q-aide { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 20px; }
.q-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.q-opt { background: var(--white); border: 1.5px solid var(--line); border-radius: 11px; padding: 15px 18px;
  font-size: 16px; cursor: pointer; font-family: var(--sans); color: var(--ink); text-align: left;
  transition: border-color .12s, background .12s; box-shadow: 0 1px 2px rgba(30,42,94,.04); }
.q-opt:hover { border-color: var(--leaf); }
.q-opt.sel { border-color: var(--ink); background: var(--sage-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.q-multi { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 22px; }
.q-chip { border: 1.5px solid var(--line); background: var(--white); border-radius: 24px; padding: 10px 17px;
  font-size: 14.5px; cursor: pointer; font-family: var(--sans); color: var(--ink); transition: all .12s; }
.q-chip.sel { border-color: var(--ink); background: var(--ink); color: #fff; }
.q-champs { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; text-align: left; }
.q-champs input, .q-champs select { padding: 13px 15px; font-size: 16px; border: 1.5px solid var(--line);
  border-radius: 9px; font-family: var(--sans); background: var(--white); width: 100%; }
.q-champs input:focus, .q-champs select:focus { outline: none; border-color: var(--ink); }
.q-nav { margin-top: 26px; display: flex; gap: 12px; justify-content: center; align-items: center; }
.q-back { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 14px; font-family: var(--sans); }
.q-back:hover { color: var(--ink); }

/* ---------- espace dossier ---------- */
.d-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 20px 0; }
.d-head .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.d-code { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.d-code small { display: block; font-family: var(--sans); font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.progress-ring { font-size: 13.5px; color: var(--ink-soft); }
.d-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 30px 0; align-items: start; }
.bloc { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px;
  margin-bottom: 20px; box-shadow: var(--shadow); }
.bloc h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin-bottom: 10px; }
.delai-titre { font-size: 11.5px; text-transform: uppercase; letter-spacing: .18em; color: var(--leaf);
  margin: 22px 0 6px; font-weight: 700; }
.dem { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--sand); align-items: flex-start; }
.dem:first-of-type { border-top: none; }
.dem input[type=checkbox] { width: 20px; height: 20px; min-width: 20px; margin-top: 2px; accent-color: var(--ink);
  flex-shrink: 0; cursor: pointer; }
.dem .t { flex: 1; }
.dem .t b { font-weight: 600; font-size: 15px; }
.dem.fait .t b { text-decoration: line-through; color: var(--ink-soft); }
.dem .meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.dem .warn { color: var(--alert); font-size: 13px; }
.dem-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge-r { font-size: 11px; background: #f7eeee; color: var(--alert); border-radius: 4px; padding: 2px 8px; font-weight: 600; }
.badge-v { font-size: 11px; background: var(--sage-soft); color: var(--ok); border-radius: 4px; padding: 3px 8px; }
.aide-item { border-left: 3px solid var(--leaf); background: var(--sage-soft); border-radius: 0 10px 10px 0;
  padding: 13px 15px; margin-bottom: 11px; }
.aide-item b { font-size: 15px; }
.aide-item p { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.aide-item .act { font-size: 13.5px; margin-top: 6px; }
.pay-box { background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; padding: 24px; text-align: center; box-shadow: var(--shadow); }
.pay-box .p { font-family: var(--serif); font-size: 38px; font-weight: 500; line-height: 1.1; }
.pieces-list { font-size: 13.5px; color: var(--ink-soft); line-height: 2; }
.msg-ok { background: var(--sage-soft); border: 1px solid var(--leaf); color: var(--ink); border-radius: 10px; padding: 13px 16px; margin-bottom: 16px; }
.msg-err { background: #f9efef; border: 1px solid var(--alert); color: var(--alert); border-radius: 10px; padding: 13px 16px; margin-bottom: 16px; }
.centered { text-align: center; padding: 60px 20px; }
.code-input { font-size: 22px; text-align: center; letter-spacing: .1em; text-transform: uppercase; padding: 14px;
  border: 1.5px solid var(--line); border-radius: 10px; width: 260px; font-family: var(--serif); background: var(--white); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .trois, .tarifs { grid-template-columns: 1fr; }
  .d-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 18px; }
  header.site .wrap { min-height: 58px; }
  .logo { font-size: 16px; gap: 8px; }
  .logo .logo-emb { width: 28px; height: 28px; }

  /* menu replié derrière un bouton */
  .burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px;
    padding: 10px; background: none; border: none; cursor: pointer; margin-right: -10px; }
  .burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
  header.site.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  header.site.open .burger span:nth-child(2) { opacity: 0; }
  header.site.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  nav.main { display: none; }
  header.site.open nav.main { display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%; background: var(--white);
    border-bottom: 1px solid var(--line); box-shadow: 0 14px 28px -18px rgba(30,42,94,.3); }
  header.site.open nav.main a { padding: 15px 22px; font-size: 15.5px; color: var(--ink);
    border-bottom: 1px solid var(--sand); }
  header.site.open nav.main a:last-child { border-bottom: none; }

  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 28px; }
  .hero p.lead { font-size: 16px; margin-bottom: 28px; }
  .btn-big { display: block; width: 100%; max-width: 340px; margin-left: auto; margin-right: auto; }
  .code-mini { width: 100%; max-width: 340px; padding: 16px; }
  .code-mini form { flex-direction: column; width: 100%; }
  .code-mini input { width: 100%; text-align: center; }
  .tagline { margin-top: 34px; }
  .section { padding: 38px 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px 14px; border-top: 1px solid var(--sand); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(odd) { border-left: none; }
  .stat .n { font-size: 26px; }
  .carte, .tarif { padding: 22px 20px; }
  .tarif .prix { font-size: 40px; }
  .tarif .btn, .tarif .btn-ghost { max-width: 300px; margin: 0 auto; width: 100%; }
  .d-head { padding: 14px 0; }
  .d-code { font-size: 19px; }
  .bloc { padding: 17px 16px; }
  .pay-box { padding: 18px 16px; }
  .q-stage { padding: 18px 16px; }
  footer.site .cols { gap: 20px; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
