@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: oklch(0.985 0.005 240);
  --surface: oklch(0.965 0.01 240);
  --ink: oklch(0.20 0.025 255);
  --ink-soft: oklch(0.46 0.02 255);
  --blue: oklch(0.55 0.15 255);
  --blue-tint: oklch(0.95 0.025 255);
  --amber: oklch(0.70 0.19 50);
  --amber-tint: oklch(0.95 0.035 50);
  --line: oklch(0.90 0.01 245);
  --radius: 10px;
  --container: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3, .brand { font-family: "Space Grotesk", "Public Sans", system-ui, sans-serif; letter-spacing: -0.01em; }
img, svg { max-width: 100%; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- nav / footer ---------- */
.site-nav { border-bottom: 1px solid var(--line); }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; flex-wrap: wrap; gap: 12px; }
.brand { font-size: 18px; font-weight: 700; color: var(--ink); }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links a { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.nav-links a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.nav-links a:hover { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; padding-block: 26px; flex-wrap: wrap; gap: 10px; }
.site-footer a, .site-footer span { color: var(--ink-soft); font-size: 13.5px; }
.site-footer a:hover { color: var(--ink); }

/* ---------- background texture (grille + cellules, floutée) ---------- */
.hero, .section--tint {
  position: relative;
  overflow: hidden;
}
.hero::before, .section--tint::before {
  content: "";
  position: absolute;
  inset: -16px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Crect x='104' y='52' width='26' height='26' fill='oklch(0.55 0.15 255)' opacity='0.055'/%3E%3Crect x='182' y='182' width='26' height='26' fill='oklch(0.70 0.19 50)' opacity='0.075'/%3E%3Crect x='26' y='208' width='26' height='26' fill='oklch(0.20 0.025 255)' opacity='0.02'/%3E%3C/svg%3E"),
    linear-gradient(to right, oklch(0.55 0.15 255 / 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.55 0.15 255 / 0.028) 1px, transparent 1px);
  background-size: 260px 260px, 26px 26px, 26px 26px;
  filter: blur(5px);
  z-index: 0;
  pointer-events: none;
}
.hero::before { background-position: top center; }
.hero > .container, .section--tint > .container { position: relative; z-index: 1; }

.section--motif { position: relative; overflow: hidden; }
.section--motif .motif-watermark { position: absolute; right: -40px; bottom: -50px; opacity: 0.06; pointer-events: none; z-index: 0; }

/* ---------- section rhythm ---------- */
.section { padding-block: 64px; }
.section--tint { background: var(--surface); }
.section h2 { font-size: 26px; margin: 0 0 18px; text-wrap: balance; display: flex; align-items: center; gap: 12px; }
.section h2::before { content: ""; width: 9px; height: 9px; border-radius: 2.5px; background: var(--blue); flex-shrink: 0; }
.prose p { max-width: 68ch; font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin: 0; }
.prose--center { text-align: center; }
.prose--center p { margin-inline: auto; }
@media (max-width: 640px) { .section { padding-block: 44px; } }

/* ---------- hero ---------- */
.hero { padding-block: 64px 56px; }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; max-width: 680px; margin-inline: auto; }
.hero h1 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.18; margin: 0; text-wrap: balance; }
.hero__sub { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: 60ch; }

.hero--home { padding-block: 76px 68px; }
.hero--home .hero__inner { max-width: none; text-align: left; align-items: flex-start; }
.hero--home .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero--home h1 { font-size: clamp(30px, 4vw, 42px); }
.hero__art { display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
@media (max-width: 760px) {
  .hero--home .container { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
}

/* ---------- badge / buttons ---------- */
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px;
  background: var(--blue-tint); color: var(--blue); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
}
.btn-primary {
  font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 700; color: white; background: var(--ink);
  border: none; border-radius: 7px; padding: 14px 26px; cursor: pointer; display: inline-block;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .btn-primary { transition: none; } .btn-primary:hover { transform: none; } }
.btn-secondary {
  font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 600; color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 7px; padding: 12px 22px;
  cursor: pointer; display: inline-block;
}
.btn-secondary:hover { background: var(--surface); }

/* ---------- contours — repère "cellule sélectionnée" ---------- */
.step-card, .gallery__frame, .widget-card { position: relative; }
.step-card::before, .gallery__frame::before, .widget-card::before {
  content: ""; position: absolute; top: -5px; left: 18px; width: 9px; height: 9px; border-radius: 2.5px;
  background: var(--blue); box-shadow: 0 0 0 3px var(--bg); z-index: 2;
}

/* ---------- steps / démarche ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-bottom: 22px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 21px; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(to right, var(--blue), var(--amber), var(--blue));
  opacity: 0.35; z-index: 0;
}
.step-card {
  display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 12px; background: var(--bg);
  box-shadow: 0 6px 18px -6px oklch(0.2 0.03 255 / 0.16), 0 2px 6px -2px oklch(0.2 0.03 255 / 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease; z-index: 1;
}
.step-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px -8px oklch(0.2 0.03 255 / 0.22); }
.step-card:nth-child(2)::before { background: var(--amber); }
@media (prefers-reduced-motion: reduce) { .step-card { transition: none; } .step-card:hover { transform: none; } }
.step-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--blue-tint); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.step-card h3 { font-size: 16px; margin: 0; }
.step-card p { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.steps-note { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 6px 0 0; max-width: 70ch; }

/* services page: version longue des step-cards, empilée */
.service-list { display: flex; flex-direction: column; gap: 18px; margin-block: 8px 32px; }
.service-block { display: flex; gap: 18px; align-items: flex-start; padding: 24px; border-radius: 12px; background: var(--bg); position: relative;
  box-shadow: 0 6px 18px -6px oklch(0.2 0.03 255 / 0.14), 0 2px 6px -2px oklch(0.2 0.03 255 / 0.07); }
.service-block::before { content: ""; position: absolute; top: -5px; left: 22px; width: 9px; height: 9px; border-radius: 2.5px; background: var(--blue); box-shadow: 0 0 0 3px var(--bg); }
.service-block:nth-child(2)::before { background: var(--amber); }
.service-block .step-icon { flex-shrink: 0; }
.service-block h3 { font-size: 17px; margin: 0 0 6px; }
.service-block p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; margin: 0; max-width: 62ch; }
.pricing-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.pricing-note p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- gallery / réalisations ---------- */
.gallery-wrap { margin-top: 4px; }
.gallery { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0; }
.gallery__item { scroll-snap-align: start; flex: 0 0 auto; width: min(320px, 78vw); display: flex; flex-direction: column; gap: 10px; }
.gallery__frame { border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px -6px oklch(0.2 0.03 255 / 0.16), 0 2px 6px -2px oklch(0.2 0.03 255 / 0.08); background: var(--bg); }
.gallery__bar { display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.gallery__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--line); }
.gallery__bar span.gallery__tool { margin-left: auto; font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.gallery__shot { display: block; width: 100%; aspect-ratio: 4 / 2.7; object-fit: cover; object-position: top; }
.gallery__caption { font-size: 13px; color: var(--ink-soft); line-height: 1.45; margin: 0; padding-inline: 1px; }
.gallery__caption strong { color: var(--ink); }
.gallery__nav { display: flex; gap: 8px; margin-top: 16px; }
.gallery__nav button { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gallery__nav button:hover { background: var(--surface); }
.gallery__item:nth-child(even) .gallery__frame::before { background: var(--amber); }

/* ---------- faq ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 780px; margin-inline: auto; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 4px 20px; }
.faq-item[open] { border-color: var(--amber); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron { flex-shrink: 0; transition: transform 0.15s ease; color: var(--ink-soft); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .faq-chevron { transition: none; } }
.faq-item p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 18px; }

/* ---------- widgets page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 28px 36px; }
.filters input, .filters select {
  font-family: inherit; font-size: 14px; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--ink);
}
.filters input { flex: 2; min-width: 220px; }
.filters select { flex: 1; min-width: 170px; }

.widget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.widget-card {
  padding: 22px; border-radius: 12px; background: var(--bg);
  box-shadow: 0 6px 18px -6px oklch(0.2 0.03 255 / 0.14), 0 2px 6px -2px oklch(0.2 0.03 255 / 0.07);
}
.widget-card__thumb { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; margin-bottom: 16px; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.widget-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.widget-card__thumb .placeholder-icon { color: var(--blue); opacity: 0.32; }
.widget-eyebrow { font-size: 12px; color: var(--ink-soft); margin: 0 0 4px; }
.widget-card h3 { margin: 0 0 6px; font-size: 17px; }
.widget-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.5; }
.widget-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.widget-source { margin: 12px 0 0; font-size: 13px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid transparent; }
.tag-license { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }
.tag-status-dev { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }
.tag-status-alpha { background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 700; }
.tag-status-beta, .tag-status-stable { background: var(--blue-tint); color: var(--blue); }
.tag-security-no-transfer { background: var(--blue-tint); color: var(--blue); }
.tag-security-transfer { background: var(--amber-tint); color: oklch(0.42 0.16 50); }
#empty-msg { text-align: center; color: var(--ink-soft); padding: 48px 0; }

/* ---------- blog page ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding-block: 40px; }
.empty-state__icon { width: 52px; height: 52px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.empty-state p { margin: 0; font-size: 16px; color: var(--ink-soft); max-width: 46ch; }
.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px;
  border-radius: 12px; background: var(--bg);
  box-shadow: 0 6px 18px -6px oklch(0.2 0.03 255 / 0.12), 0 2px 6px -2px oklch(0.2 0.03 255 / 0.06);
}
.post-item h3 { font-size: 15.5px; margin: 0; font-weight: 600; font-family: "Public Sans", sans-serif; }
.post-status { flex-shrink: 0; font-size: 11.5px; color: var(--ink-soft); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }

/* ---------- contact page ---------- */
.contact-layout { max-width: 520px; margin-inline: auto; }
.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-form label { font-size: 13.5px; font-weight: 600; margin-bottom: -8px; }
.contact-form input, .contact-form textarea {
  font-family: inherit; font-size: 14.5px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--ink);
}
.contact-form .hp-field { position: absolute; left: -9999px; }
.contact-email { margin-top: 22px; font-size: 14px; color: var(--ink-soft); }
.privacy-note { margin-top: 30px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.form-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 22px; font-size: 14px; }
.form-notice.success { background: var(--blue-tint); color: var(--blue); }
.form-notice.error { background: var(--amber-tint); color: oklch(0.42 0.16 50); }

/* ---------- legal page ---------- */
.legal-content h2 { margin-top: 32px; font-size: 17px; }
.legal-content p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }

@media (max-width: 780px) {
  .nav-links { gap: 16px; }
}
