/* =========================================================
   Marceau — page d'accueil hellomarceau.fr
   Palette et rendu repris de l'application (app/ui/web/static/styles.css).
   Aucune ressource externe : polices et images sont dans assets/.
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #24444d;
  --ink-deep: #14333b;
  --muted: #5e6e72;
  --paper: #faf8f4;
  --surface: #fffefb;
  --surface-soft: #f5f2ec;
  --brand: #1e4750;
  --brand-light: #e0e8e8;
  --accent: #c1633b;
  --accent-soft: #f5e2d7;
  /* variantes assombries du cuivre, réservées aux petits textes
     (contraste AA sur fond papier et sur fond cuivre clair) */
  --accent-text: #a4522e;
  --accent-deep: #8f4526;
  --line: #e5e1d8;
  --shadow: 0 16px 45px rgba(30, 71, 80, .08);
  --shadow-lift: 0 22px 60px rgba(30, 71, 80, .13);
  --radius: 22px;
  --titre: "Bricolage Grotesque", "Trebuchet MS", ui-sans-serif, sans-serif;
  --texte: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .lockup strong {
  font-family: var(--titre);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink-deep);
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-deep);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 12px 0;
  z-index: 50;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------- barre du haut ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 248, 244, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lockup-picto { display: block; flex: none; }
.lockup-text { display: grid; line-height: 1.1; }
.lockup strong { font-size: 1.12rem; letter-spacing: -.03em; }
.lockup small {
  font-family: var(--titre);
  font-weight: 400;
  font-size: .68rem;
  color: var(--muted);
  margin-top: 2px;
}
.topbar-link {
  font-weight: 700;
  font-size: .86rem;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 2px;
  white-space: nowrap;
}
.topbar-link:hover { border-bottom-color: var(--accent); }

/* ---------------- boutons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 15px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(30, 71, 80, .22);
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line);
}
.btn-soft { background: var(--brand-light); color: var(--brand); min-height: 44px; font-size: .88rem; }
.btn-lg { min-height: 58px; font-size: 1.02rem; padding-inline: 30px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary:hover { box-shadow: var(--shadow-lift); }
.btn-ghost:hover { background: var(--surface); }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  padding: 46px 0 40px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -160px -30% auto -30%;
  height: 420px;
  background: radial-gradient(closest-side, rgba(224, 232, 232, .95), rgba(250, 248, 244, 0));
  pointer-events: none;
}
.hero-inner { position: relative; }
.eyebrow {
  font-family: var(--titre);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}
h1 { font-size: clamp(2rem, 7.4vw, 3.5rem); font-weight: 800; }
.hl {
  position: relative;
  display: inline-block;
}
.hl::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .06em;
  height: .28em;
  background: var(--accent-soft);
  border-radius: 3px;
  z-index: -1;
}
.lead {
  margin-top: 20px;
  max-width: 56ch;
  font-size: 1.06rem;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--brand);
}
.hero-note .dot {
  flex: none;
  width: 9px; height: 9px;
  margin-top: .5em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

/* ---------------- sections génériques ---------------- */

.section { padding: 48px 0; }
.section-soft { background: var(--surface-soft); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.section-head p { margin-top: 8px; color: var(--muted); }
.fine { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.center { text-align: center; }

/* ---------------- démonstration ---------------- */

.demo-section {
  padding: 44px 0 52px;
  background: linear-gradient(180deg, var(--surface-soft), var(--paper) 62%);
  border-top: 1px solid var(--line);
}
.demo {
  display: grid;
  gap: 12px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.panel-tag {
  font-family: var(--titre);
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-light);
  padding: 5px 10px;
  border-radius: 8px;
}
.tag-draft { color: var(--accent-deep); background: var(--accent-soft); }
.clock { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* micro + onde */
.mic-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mic {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
.demo[data-state="rec"] .mic {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(193, 99, 59, .45);
  animation: micPulse 1.8s ease-out infinite;
}
@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0 rgba(193, 99, 59, .40); }
  70%  { box-shadow: 0 0 0 12px rgba(193, 99, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(193, 99, 59, 0); }
}
.wave { display: flex; align-items: center; gap: 3px; height: 26px; flex: 1; }
.wave i {
  flex: 1;
  max-width: 4px;
  height: 4px;
  border-radius: 3px;
  background: var(--brand-light);
  transform-origin: center;
  transition: height .3s ease, background .3s ease;
}
.demo[data-state="rec"] .wave i {
  background: var(--accent-soft);
  height: 22px;
  animation: waveBeat 1.1s ease-in-out infinite;
}
.demo[data-state="rec"] .wave i:nth-child(2n)   { animation-delay: .12s; }
.demo[data-state="rec"] .wave i:nth-child(3n)   { animation-delay: .26s; }
.demo[data-state="rec"] .wave i:nth-child(4n+1) { animation-delay: .38s; }
.demo[data-state="rec"] .wave i:nth-child(5n)   { animation-delay: .5s; }
@keyframes waveBeat {
  0%, 100% { transform: scaleY(.22); }
  35%      { transform: scaleY(1); }
  60%      { transform: scaleY(.5); }
}

.note-text {
  min-height: 8.3em;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink);
}
.caret {
  display: none;
  width: 2px;
  height: 1.05em;
  margin-left: 1px;
  background: var(--accent);
  vertical-align: -.18em;
}
.demo.is-anim[data-state="rec"] .caret { display: inline-block; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  transition: opacity .4s ease, transform .4s ease;
}
.chip svg { color: var(--brand); flex: none; }
.demo.is-anim .chip { opacity: 0; transform: translateY(6px); }
.demo.is-anim .chip.is-in { opacity: 1; transform: none; }

/* flèche de transfert */
.flow {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 58px;
}
.flow-line {
  position: relative;
  display: block;
  width: 2px;
  height: 58px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.flow-fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  background: var(--accent);
  transition: height .9s ease;
}
.flow-mark {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: .45;
  transition: opacity .45s ease, transform .45s ease;
}
.flow-mark.is-on { opacity: 1; transform: scale(1.08); }

/* feuille de devis */
.sheet {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 14px 17px;
  /* Hauteur bornée : le devis est long, la colonne ne doit pas s'étirer.
     Le contenu défile pendant qu'il se remplit. */
  height: clamp(300px, 56vh, 440px);
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #cdc7ba transparent;
  /* ombres de défilement, purement CSS : elles n'apparaissent que
     s'il reste du contenu au-dessus ou en dessous */
  background:
    linear-gradient(#fff, rgba(255, 255, 255, 0)) 0 0 / 100% 22px no-repeat local,
    linear-gradient(rgba(255, 255, 255, 0), #fff) 0 100% / 100% 22px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(20, 51, 59, .11), rgba(20, 51, 59, 0)) 0 0 / 100% 11px no-repeat,
    radial-gradient(farthest-side at 50% 100%, rgba(20, 51, 59, .11), rgba(20, 51, 59, 0)) 0 100% / 100% 11px no-repeat,
    #fff;
}
.sheet:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.sheet::-webkit-scrollbar { width: 8px; }
.sheet::-webkit-scrollbar-thumb { background: #cdc7ba; border-radius: 999px; }
.sheet::-webkit-scrollbar-track { background: transparent; }
.sheet [data-line] { transition: opacity .45s ease, transform .45s ease; }
.demo.is-anim .sheet [data-line] { opacity: 0; transform: translateY(8px); }
.demo.is-anim .sheet [data-line].is-in { opacity: 1; transform: none; }

.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: .72rem;
  color: var(--muted);
}
.sheet-brand { font-family: var(--titre); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.q-title { font-family: var(--titre); font-weight: 700; font-size: 1.02rem; color: var(--ink-deep); }
.q-comment { margin-top: 8px; font-size: .82rem; line-height: 1.5; color: var(--muted); }

/* descriptif : une phrase d'introduction puis une puce par opération,
   comme sur les devis de l'artisan */
.q-intro {
  margin-top: 8px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-deep);
}
.q-ops {
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--muted);
}
.q-ops li {
  position: relative;
  margin-top: 5px;
  padding-left: 15px;
}
.q-ops li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .52em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.q-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--line);
  font-size: .85rem;
}
.q-label em { font-style: normal; color: var(--muted); font-size: .82em; margin-left: 6px; }
.q-amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-labour {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(224,232,232,.5), rgba(224,232,232,0));
  padding-inline: 8px;
  border-radius: 8px 8px 0 0;
}
.q-section {
  margin-top: 16px;
  font-family: var(--titre);
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink-deep);
}
.q-group {
  margin-top: 8px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--accent-text);
}
.q-subtotal {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  font-size: .86rem;
  color: var(--muted);
}
.q-subtotal .q-amount { color: var(--ink-deep); }
.q-total {
  margin-top: 10px;
  border-bottom: 0;
  border-top: 2px solid var(--ink-deep);
  font-size: .96rem;
}
.q-total .q-label { font-family: var(--titre); font-weight: 700; }
.q-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
}
.stamp {
  font-family: var(--titre);
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
  border: 1.5px solid var(--accent-text);
  border-radius: 6px;
  padding: 3px 8px;
  transform: rotate(-3deg);
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.demo-legend { font-size: .8rem; color: var(--muted); flex: 1 1 260px; }

/* ---------------- cartes ---------------- */

.cards { display: grid; gap: 14px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
}
.card-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 15px;
  background: var(--brand-light);
  color: var(--brand);
  margin-bottom: 14px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .93rem; }

/* ---------------- bloc « il écrit comme vous » ---------------- */

.split-text { max-width: 62ch; }
.split-text h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin-bottom: 14px; }
.split-text > p { color: var(--muted); }
.ticks { display: grid; gap: 11px; margin-top: 20px; }
.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: .95rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .38em;
  width: 16px; height: 9px;
  border-left: 2.4px solid var(--accent);
  border-bottom: 2.4px solid var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}

/* ---------------- garantie ---------------- */

.promise {
  background: var(--brand);
  color: #fff;
  padding: 40px 0;
}
.promise-inner { display: flex; gap: 18px; align-items: flex-start; }
.promise-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.promise h2 { color: #fff; font-size: clamp(1.4rem, 4.6vw, 1.95rem); }
.promise p {
  margin-top: 12px;
  color: rgba(255, 255, 255, .82);
  max-width: 62ch;
}

/* ---------------- lignes logiciels ---------------- */

.rows { display: grid; gap: 12px; }
.row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.row h3 { font-size: 1.02rem; margin-bottom: 5px; }
.row p { color: var(--muted); font-size: .91rem; }
.row-state {
  flex: none;
  align-self: flex-start;
  font-family: var(--titre);
  font-weight: 700;
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 9px;
  margin-top: 3px;
}
.state-ok { background: var(--brand-light); color: var(--brand); }
.state-alt { background: var(--surface-soft); color: var(--muted); border: 1px solid var(--line); }

/* ---------------- auteur ---------------- */

.author { max-width: 64ch; }
.author-mark { display: block; margin-bottom: 16px; }
.author h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin-bottom: 14px; }
.author p { color: var(--muted); }
.author strong { color: var(--ink-deep); }

/* ---------------- contact ---------------- */

.contact-inner { text-align: center; max-width: 56ch; margin-inline: auto; }
.contact h2 { font-size: clamp(1.6rem, 5.4vw, 2.3rem); }
.contact-inner > p { margin-top: 12px; color: var(--muted); }
.contact .btn { margin-top: 22px; }

/* ---------------- pied ---------------- */

.footer {
  background: var(--ink-deep);
  color: rgba(255, 255, 255, .68);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: .86rem;
}
.footer .lockup strong { color: #fff; }
.footer .lockup small { color: rgba(255, 255, 255, .58); }
.footer a { color: #fff; }

/* ---------------- écrans larges ---------------- */

@media (min-width: 700px) {
  .wrap { padding-inline: 32px; }
  .hero { padding: 76px 0 60px; }
  .section { padding: 70px 0; }
  .demo-section { padding: 66px 0 76px; }
  .panel { padding: 24px; }
  .sheet { padding: 22px 20px 24px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .row { flex-direction: row; gap: 16px; }
  .note-text { font-size: 1.05rem; min-height: 5em; }
  .q-comment { font-size: .87rem; line-height: 1.55; }
  .q-intro { font-size: .87rem; line-height: 1.55; }
  .q-ops { font-size: .86rem; line-height: 1.5; }
  .q-row { font-size: .89rem; padding: 9px 0; }
  .promise { padding: 56px 0; }
}

@media (min-width: 920px) {
  .demo {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1.08fr);
    gap: 0;
    align-items: center;
  }
  .flow { min-height: 0; align-self: stretch; }
  .flow-line { width: 100%; height: 2px; }
  .flow-fill { inset: 0 auto 0 0; height: auto; width: 0; transition: width .9s ease; }
  .note-text { min-height: 6.8em; }
}

/* ---------------- animation réduite ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .chip, .sheet [data-line] { opacity: 1 !important; transform: none !important; }
  .sheet { scroll-behavior: auto; }
  .caret { display: none !important; }
}


/* ---- barre des corps de métier (démonstration) ---- */

/* La liste des métiers est ouverte : ces cinq-là ne sont que des exemples. */
.section-note {
  margin-top: 10px;
  font-size: .92rem;
  color: var(--ink-deep);
}
.trades-wrap { margin: 0 0 22px; }
.trades-lead {
  margin: 0 0 10px;
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
}
.trades {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trades-more {
  display: inline-flex;
  align-items: center;
  font-size: .82rem;
  font-weight: 600;
  font-style: italic;
  color: var(--muted);
  background: none;
  border: 1px dashed #cdc7ba;
  border-radius: 999px;
  padding: 7px 15px;
}
.trades button {
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.trades button:hover { color: var(--ink-deep); border-color: var(--brand); }
.trades button.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.trades button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }


/* ---- page de mentions légales ---- */
.split-text h3 {
  margin-top: 30px;
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.split-text h3:first-of-type { margin-top: 22px; }
.split-text p { margin-bottom: 12px; line-height: 1.65; }
.split-text p + p { margin-top: 10px; }
