:root {
  --bg: #ffffff;
  --bg-subtle: #f4f3f1;
  --surface: #ffffff;
  --text: #0d0d0c;
  --text-muted: #605c57;
  --border: #e2dfda;
  --border-strong: #0d0d0c;
  --invert-bg: #0d0d0c;
  --invert-text: #ffffff;
  --invert-muted: #b8b4ae;
  --focus: #0d0d0c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- header ---- */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { height: 28px; width: auto; }
.brand-word {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
  line-height: 1.2;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--text);
  transition: right 0.25s ease;
}
.nav-links a:hover::after { right: 0; }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-cta { display: none; }
@media (min-width: 860px) {
  .nav-cta { display: inline-flex; }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--invert-bg); color: var(--invert-text); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-sm { padding: 9px 16px; font-size: 0.8rem; }

/* ---- hero ---- */
.hero { padding: 88px 0 80px; border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: end; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 24px;
  text-wrap: balance;
}
h1 em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--border-strong);
}
.hero-lede { font-size: 1.1rem; line-height: 1.6; color: var(--text-muted); max-width: 46ch; margin: 0 0 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border); }
.hero-stat { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--border); }
.hero-stat .num { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.hero-stat .label { font-size: 0.82rem; color: var(--text-muted); text-align: right; max-width: 20ch; }

/* ---- section shell ---- */
section { padding: 76px 0; }
.section-border { border-bottom: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.section-head p { color: var(--text-muted); max-width: 44ch; margin: 10px 0 0; line-height: 1.55; }
.kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

/* ---- page head (listing) ---- */
.page-head { padding: 52px 0 40px; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 12px; }
.page-head .hero-lede { margin-bottom: 0; max-width: 60ch; }

/* ---- breadcrumb ---- */
.breadcrumb { padding: 20px 0 0; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .current { color: var(--text); }

/* ---- project header (fiche détail) ---- */
.project-head { padding: 24px 0 44px; border-bottom: 1px solid var(--border); }
.project-head .card-top { margin-bottom: 18px; }
.project-head h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin: 0 0 14px; }
.project-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.88rem; color: var(--text-muted); }
.project-meta span { display: inline-flex; align-items: center; gap: 6px; }
.project-meta svg { flex-shrink: 0; }

/* ---- detail layout ---- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: start; }
.detail-media {
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.detail-media svg { opacity: 0.4; }
.prose h2 { font-size: 1.3rem; margin: 40px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 0.98rem; line-height: 1.7; color: var(--text); margin: 0 0 16px; }
.prose p.lede { font-size: 1.08rem; color: var(--text-muted); }
.fact-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.fact-list li { border-top: 1px solid var(--border); padding-top: 10px; font-size: 0.9rem; }
.fact-list .fact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ---- sidebar (fiche détail) ---- */
.sidebar {
  position: sticky;
  top: 88px;
  border: 1px solid var(--border-strong);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sidebar .price-block { display: flex; flex-direction: column; gap: 4px; }
.sidebar .price-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sidebar .price-value { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sidebar dl { margin: 0; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); padding-top: 18px; }
.sidebar .row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.86rem; }
.sidebar dt { color: var(--text-muted); }
.sidebar dd { margin: 0; font-weight: 600; text-align: right; }
.sidebar .btn { width: 100%; justify-content: center; }
.sidebar .legal-link { font-size: 0.8rem; color: var(--text-muted); text-decoration: underline; text-align: center; }

/* ---- listing preview / project cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.card {
  background: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease;
}
.card:hover { background: var(--bg-subtle); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
}
.tag-saas { background: var(--invert-bg); color: var(--invert-text); border-color: var(--invert-bg); }
.tag-faillite { background: transparent; color: var(--text); }
.tag-vendu { background: transparent; color: var(--text-muted); border-color: var(--border); text-decoration: line-through; }
.tag-star { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); }
.card h3 { font-size: 1.12rem; margin: 0; line-height: 1.3; }
.card p.desc { font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); margin: 0; flex-grow: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--border); font-size: 0.82rem; }
.card-meta .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.card-meta .loc { color: var(--text-muted); }

/* ---- how it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step-num { font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-muted); display: block; margin-bottom: 16px; letter-spacing: 0.02em; }
.step h3 { font-size: 1.08rem; margin: 0 0 10px; }
.step p { font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* ---- categories ---- */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); }
.cat { padding: 40px; display: flex; flex-direction: column; gap: 14px; }
.cat:first-child { border-right: 1px solid var(--border); }
.cat-icon { width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cat h3 { margin: 0; font-size: 1.15rem; }
.cat p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; max-width: 42ch; }
.cat-count { margin-top: auto; padding-top: 16px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }

/* ---- pricing teaser (homepage) ---- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); }
.price-card { padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--border); }
.price-card:last-child { border-right: none; }
.price-card.is-highlight { background: var(--bg-subtle); }
.price-card .plan-name { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.price-card .plan-price { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; }
.price-card .plan-condition { font-size: 0.8rem; color: var(--text-muted); margin-top: -8px; }
.price-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--text); }
.price-card li { padding-left: 16px; position: relative; }
.price-card li::before { content: "—"; position: absolute; left: 0; color: var(--text-muted); }

/* ---- filter bar (listing) ---- */
.filter-bar { position: sticky; top: 65px; z-index: 15; background: var(--bg); border-bottom: 1px solid var(--border); padding: 18px 0; }
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: 3px; padding: 10px 14px; flex: 1 1 240px; min-width: 200px; }
.search-field svg { flex-shrink: 0; color: var(--text-muted); }
.search-field input { border: none; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 0.9rem; width: 100%; }
.search-field input::placeholder { color: var(--text-muted); }
select.select-field {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 10px 34px 10px 14px;
  font: inherit;
  font-size: 0.86rem;
  color: var(--text);
  background: var(--bg) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="%23605c57" stroke-width="1.4" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 12px center;
  cursor: pointer;
}
.filter-row .select-field.sort { margin-left: auto; }
.chip-row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--invert-bg);
  color: var(--invert-text);
}
.chip button { all: unset; cursor: pointer; line-height: 1; font-size: 0.9rem; opacity: 0.75; }
.chip button:hover { opacity: 1; }
.chip-clear { font-size: 0.78rem; color: var(--text-muted); text-decoration: underline; align-self: center; }

/* ---- results bar ---- */
.results-bar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.results-count { font-size: 0.9rem; color: var(--text-muted); }
.results-count strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- pagination ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 48px; }
.page-btn {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
}
.page-btn:hover { background: var(--bg-subtle); }
.page-btn.active { background: var(--invert-bg); color: var(--invert-text); border-color: var(--invert-bg); }
.page-btn.disabled { opacity: 0.35; pointer-events: none; }
.page-dots { color: var(--text-muted); padding: 0 4px; }

/* ---- cta band ---- */
.cta-band { background: var(--invert-bg); color: var(--invert-text); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.3rem); max-width: 20ch; text-wrap: balance; }
.cta-inner p { margin: 10px 0 0; color: var(--invert-muted); max-width: 40ch; line-height: 1.55; }
.cta-band .btn-primary { background: var(--invert-text); color: var(--invert-bg); border-color: var(--invert-text); }
.cta-band .btn-ghost { color: var(--invert-text); border-color: var(--invert-muted); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.08); }

/* ---- footer ---- */
footer { padding: 56px 0 40px; }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { height: 24px; }
.foot-brand span { font-size: 0.85rem; color: var(--text-muted); }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { text-decoration: none; font-size: 0.9rem; }
.foot-col a:hover { text-decoration: underline; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; gap: 10px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .price-grid { grid-template-columns: 1fr; }
  .price-card { border-right: none; border-bottom: 1px solid var(--border); }
  .price-card:last-child { border-bottom: none; }
  .wrap { padding: 0 20px; }
  .nav { padding: 16px 20px; }
  .filter-bar { position: static; }
  .filter-row .select-field.sort { margin-left: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
