/* CODCAS Solutions — landing page
   Implemented from "CODCAS Solutions.dc.html" (design canvas). */

:root {
  --bg:            oklch(0.985 0.005 75);
  --bg-alt:        oklch(0.965 0.007 78);
  --surface:       oklch(0.99 0.004 75);
  --ink:           oklch(0.24 0.012 60);
  --ink-2:         oklch(0.42 0.012 60);
  --ink-3:         oklch(0.50 0.012 60);
  --ink-4:         oklch(0.52 0.012 60);
  --line:          oklch(0.90 0.008 70);
  --line-strong:   oklch(0.82 0.01 70);
  --accent:        oklch(0.55 0.115 51);
  --accent-hover:  oklch(0.47 0.10 51);
  --accent-bright: oklch(0.62 0.115 51);
  --accent-light:  oklch(0.70 0.12 51);
  --on-accent:     oklch(0.99 0.004 75);

  --sans:  'IBM Plex Sans', Helvetica, Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(20px, 5vw, 80px);
  --maxw: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

::selection { background: oklch(0.90 0.055 65); color: var(--ink); }

h1, h2, h3, p, dd, dl, ol { margin: 0; }
ol { padding: 0; list-style: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
}
.skip-link:focus { left: 8px; top: 8px; color: var(--bg); }

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: oklch(0.985 0.005 75 / 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-name-soft { color: var(--ink-4); font-weight: 400; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  font-size: 14.5px;
}

.nav-link { color: oklch(0.40 0.012 60); }
.nav-link:hover { color: var(--ink); }

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm { padding: 9px 17px; font-size: 14.5px; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: oklch(0.30 0.012 60);
}
.btn-ghost:hover { border-color: var(--accent); color: oklch(0.30 0.012 60); }

.btn-invert {
  padding: 16px 32px;
  background: var(--accent-light);
  color: oklch(0.20 0.012 60);
  font-weight: 600;
  font-size: 16px;
}
.btn-invert:hover { background: oklch(0.80 0.10 51); color: oklch(0.20 0.012 60); }

/* ── Shared section furniture ───────────────────────────── */

.eyebrow {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section {
  padding: clamp(60px, 9vw, 112px) var(--gutter);
  border-top: 1px solid var(--line);
}
.section-alt { background: var(--bg-alt); }

.section-title {
  margin-bottom: clamp(40px, 5vw, 64px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-title-narrow { max-width: 20ch; }
.section-title-tight { margin-bottom: 22px; max-width: none; }

.section-lede {
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 80px);
}
.split > * { min-width: 0; }
.split-top { align-items: start; }

/* ── Hero ───────────────────────────────────────────────── */

.hero { padding: clamp(60px, 10vw, 132px) var(--gutter) clamp(52px, 7vw, 96px); }

.hero .eyebrow { margin-bottom: 30px; }

.hero-title {
  margin-bottom: 30px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.6vw, 82px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  max-width: 17ch;
  text-wrap: balance;
}

.hero-lede {
  margin-bottom: 40px;
  max-width: 60ch;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact {
  min-width: 0;
  background: var(--bg);
  padding: 22px;
}
.fact:first-child { padding-left: 0; }

.fact-label {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.fact-value { font-size: 16px; font-weight: 500; }
.fact-value-accent { color: oklch(0.50 0.115 51); }

/* ── Prestations ────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  min-width: 0;
  padding: 30px 28px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent-bright);
  border-radius: 4px;
}

.card-title {
  margin-bottom: 14px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.card-body {
  margin-bottom: 18px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.card-meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }

/* ── Stack ──────────────────────────────────────────────── */

.spec { min-width: 0; }

.spec-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.spec-row-last { border-bottom: 1px solid var(--line); }

.spec-label { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.spec-value { font-size: 15.5px; line-height: 1.6; }

/* ── Méthode ────────────────────────────────────────────── */

/* Explicit column counts (not auto-fit): 4 steps must divide evenly,
   otherwise a partial row leaves an empty cell showing the grid background. */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

.step {
  min-width: 0;
  background: var(--surface);
  padding: 30px 28px;
}

.step-num { font-family: var(--mono); font-size: 13px; color: var(--accent); }

.step-title { margin: 12px 0 10px; font-size: 18.5px; font-weight: 600; }

.step-body { font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ── FAQ ────────────────────────────────────────────────── */

.faq-item { padding: 22px 0; border-top: 1px solid var(--line); }
.faq-item-last { border-bottom: 1px solid var(--line); }

.faq-q { margin-bottom: 8px; font-size: 17px; font-weight: 600; }
.faq-a { font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ── Contact ────────────────────────────────────────────── */

.contact {
  padding: clamp(72px, 10vw, 128px) var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: oklch(0.97 0.004 75);
}

.contact-inner { max-width: 820px; margin: 0 auto; text-align: center; }

.contact-title {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.contact-lede {
  margin: 0 auto 40px;
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.6;
  color: oklch(0.80 0.008 70);
  text-wrap: pretty;
}

.contact-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  margin-top: 44px;
  font-family: var(--mono);
  font-size: 13px;
  color: oklch(0.75 0.008 70);
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  padding: 30px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: oklch(0.48 0.012 60);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav-link { display: none; }
  .fact, .fact:first-child { padding-left: 0; padding-right: 0; }
  .spec-row { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .skip-link { display: none; }
  body { background: #fff; }
  .contact { background: #fff; color: #000; }
  .contact-lede, .contact-meta { color: #333; }
}

/* ── Legal page ─────────────────────────────────────────── */

.legal { padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(40px, 6vw, 72px); }

.legal-inner { max-width: 720px; margin: 0 auto; }

.legal-title {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.legal-intro {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.legal-date {
  margin-top: 14px;
  padding-bottom: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

.legal-section {
  padding-top: clamp(34px, 4vw, 48px);
  border-top: 1px solid var(--line);
  margin-top: clamp(34px, 4vw, 48px);
}

.legal-h2 {
  margin-bottom: 18px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.legal-p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}
.legal-p + .legal-p { margin-top: 14px; }

.legal-dl { margin-top: 4px; }

.legal-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
  gap: 8px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.legal-row-last { border-bottom: 1px solid var(--line); }

.legal-dt {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.legal-dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
}

/* Placeholder markers — must be empty before the site goes live. */
.todo {
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 1px 7px;
  border-radius: 3px;
  background: oklch(0.92 0.06 85);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.09 80);
  font-family: var(--mono);
  font-size: 12.5px;
  color: oklch(0.38 0.06 60);
}

.legal-back {
  margin-top: clamp(34px, 4vw, 48px);
  padding-top: clamp(34px, 4vw, 48px);
  border-top: 1px solid var(--line);
  font-size: 15px;
}

@media (max-width: 640px) {
  .legal-row { grid-template-columns: 1fr; gap: 4px; }
}
