/* Halleya – feuille de style partagée.
   Concept : l'agenda du consultant. Une semaine qui se remplit est le motif central,
   les heures en chiffres tabulaires, les créneaux réservés en beige.
   Charte : blanc, noir, beige, marron en couleur principale. */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --soft: #f6f1ea;
  --ink: #151311;
  --muted: #6b625a;
  --line: #e9e3da;
  --accent: #7a5235;
  --accent-ink: #ffffff;
  --mark: #eadfcd;
  --mark-ink: #3b2a1d;
  --band: #151311;
  --band-ink: #f6f1ea;
  --band-muted: #b5aa9c;

  --f-display: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-time: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 4.2vw, 2.5rem);
  --step-4: clamp(2.2rem, 5.4vw, 3.4rem);
  --radius: 10px;
  --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141210; --surface: #1b1815; --soft: #1f1b17; --ink: #f2ece3; --muted: #a99d8f; --line: #2f2a24;
    --accent: #c99a72; --accent-ink: #1a120b; --mark: #4a3a2c; --mark-ink: #f4e8d6;
    --band: #0d0c0b; --band-ink: #f2ece3; --band-muted: #9c9083;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141210; --surface: #1b1815; --soft: #1f1b17; --ink: #f2ece3; --muted: #a99d8f; --line: #2f2a24;
  --accent: #c99a72; --accent-ink: #1a120b; --mark: #4a3a2c; --mark-ink: #f4e8d6;
  --band: #0d0c0b; --band-ink: #f2ece3; --band-muted: #9c9083;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--mark); outline-offset: 3px; border-radius: 4px;
}
h1, h2, h3 {
  font-family: var(--f-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(56px, 9vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 650;
  color: var(--muted);
}
.lead { font-size: var(--step-1); color: var(--muted); max-width: 58ch; }
.prose { max-width: 65ch; }

/* En-tête */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 6px; background: var(--accent);
  display: grid; place-items: center; flex: none;
}
.brand-mark::after {
  content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--mark);
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.plain { color: var(--muted); text-decoration: none; font-size: var(--step--1); font-weight: 600; }
.nav a.plain:hover { color: var(--ink); }
@media (max-width: 760px) { .nav a.plain { display: none; } }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn-primary:hover { transform: none; } }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 8vw, 96px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero h1 mark {
  background: linear-gradient(transparent 68%, var(--mark) 68%);
  color: inherit; padding: 0 2px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { font-size: var(--step--1); color: var(--muted); max-width: 52ch; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* Agenda */
.agenda {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; min-width: 0;
}
.agenda-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 12px;
}
.agenda-head strong { font-family: var(--f-display); font-size: 1rem; }
.agenda-head span { font-family: var(--f-time); font-size: .78rem; color: var(--muted); }
.agenda-grid {
  display: grid; grid-template-columns: 48px repeat(5, minmax(0, 1fr));
  font-family: var(--f-time); font-size: .72rem; font-variant-numeric: tabular-nums;
}
.agenda-grid > div { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); min-height: 66px; position: relative; }
.agenda-grid > .t { border-left: 0; color: var(--muted); padding: 4px 6px 0 8px; }
.agenda-grid > .d { color: var(--muted); text-align: center; padding: 8px 2px; min-height: 0; text-transform: uppercase; letter-spacing: .06em; }
.agenda-grid > .d b { display: block; color: var(--ink); font-size: .95rem; letter-spacing: 0; }
.slot {
  position: absolute; inset: 3px; border-radius: 6px; padding: 4px 6px;
  font-family: var(--f-body); font-size: .68rem; line-height: 1.25; overflow: hidden;
}
.slot.busy { background: color-mix(in srgb, var(--muted) 9%, transparent); color: var(--muted); }
.slot.booked { background: var(--mark); color: var(--mark-ink); font-weight: 650; }
.slot.booked.tall { bottom: calc(-100% + 3px); z-index: 1; }
.slot .full, .slot .short { display: block; }
.slot .short { display: none; }
.slot .who { display: block; font-weight: 500; opacity: .8; margin-top: 2px; }
.slot.new { box-shadow: inset 0 0 0 1.5px var(--accent); }
.agenda-foot {
  display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 18px;
  font-size: .78rem; color: var(--muted);
}
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key .k-booked { background: var(--mark); }
.key .k-busy { background: color-mix(in srgb, var(--muted) 22%, transparent); }
.key .k-new { background: var(--mark); box-shadow: inset 0 0 0 1.5px var(--accent); }
@media (max-width: 560px) {
  .slot .who, .slot .full { display: none; }
  .slot .short { display: block; }
  .agenda-grid > div { min-height: 44px; }
}
@media (max-width: 420px) {
  .agenda-grid { grid-template-columns: 38px repeat(5, minmax(0, 1fr)); }
  .slot { font-size: .62rem; padding: 3px 4px; }
}

/* Problème */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }
.pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pains li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.pains li:first-child { padding-top: 0; }
.pains strong { font-size: var(--step-1); font-family: var(--f-display); letter-spacing: -0.01em; }
.pains span { color: var(--muted); }
.question {
  margin-top: 28px; font-family: var(--f-display); font-size: var(--step-1); font-weight: 650;
  border-left: 4px solid var(--mark); padding: 4px 0 4px 18px; max-width: 46ch;
}

/* Étapes */
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 52px); max-width: 720px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps li {
  counter-increment: s; padding: 22px 22px 22px 0; border-top: 1px solid var(--ink);
  display: grid; gap: 10px; align-content: start; min-width: 0;
}
.steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.steps .when { font-family: var(--f-time); font-size: .8rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps h3::before { content: counter(s) ". "; color: var(--muted); }
.steps p { color: var(--muted); font-size: .98rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; }
}
.role {
  margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 28px;
  padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted);
}
.role b { font-family: var(--f-display); color: var(--ink); }

/* Exemple chiffré */
.ledger { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
#exemple { background: var(--soft); }
.ledger > div { padding: 22px 18px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.ledger > div + div { border-left: 1px solid var(--line); }
.ledger .n { font-family: var(--f-display); font-weight: 800; font-size: var(--step-2); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ledger .l { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.ledger .hl { background: var(--mark); color: var(--mark-ink); }
.ledger .hl .l { color: var(--mark-ink); opacity: .8; }
@media (max-width: 860px) {
  .ledger { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ledger > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .ledger > div:nth-child(-n+2) { border-top: 0; }
  .ledger > div:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .ledger > div:last-child { grid-column: 1 / -1; border-left: 0 !important; }
}
.fine { font-size: var(--step--1); color: var(--muted); margin-top: 14px; max-width: 70ch; }

/* Tarifs */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; display: grid; gap: 18px; align-content: start; min-width: 0;
}
.plan.featured { border-color: var(--accent); }
.plan-tag { font-size: var(--step--1); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.price { font-family: var(--f-display); font-weight: 800; font-size: var(--step-3); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 1.5px;
  background: var(--accent);
}
.guarantees {
  margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--line);
}
.guarantees div { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; min-width: 0; }
.guarantees b { font-family: var(--f-display); }
.guarantees span { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .guarantees { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { display: grid; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--f-display); font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.6rem; font-weight: 400; color: var(--muted);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 66ch; }

/* Bande finale */
.band { background: var(--band); color: var(--band-ink); }
.band .wrap { padding-block: clamp(56px, 9vw, 96px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.band h2 { color: var(--band-ink); }
.band p { color: var(--band-muted); }
.band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.band li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.band li span { font-family: var(--f-time); color: var(--band-muted); font-size: .85rem; }
.band .btn-primary { background: var(--band-ink); color: var(--band); }
@media (max-width: 820px) { .band .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-size: var(--step--1); color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }

/* Pages juridiques */
.legal { padding-block: clamp(40px, 7vw, 80px); }
.legal .prose { display: grid; gap: 16px; }
.legal h1 { font-size: var(--step-3); margin-bottom: 8px; }
.legal h2 { font-size: var(--step-1); margin-top: 24px; }
.legal p, .legal li { color: var(--ink); }
.legal .muted { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.legal table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .92rem; background: var(--surface); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 700; background: color-mix(in srgb, var(--line) 45%, transparent); }
.todo { background: var(--mark); color: var(--mark-ink); padding: 0 4px; border-radius: 3px; font-weight: 650; }
