/* ---------------------------------------------------------------
   Wignet — feuille de style unique
   Esthétique : papier électronique, encre noire, cadre de tableau.
   --------------------------------------------------------------- */

:root {
  --ink: #14130f;
  --ink-soft: #4a4740;
  --ink-faint: #8a857a;
  --paper: #f5f2ea;
  --paper-warm: #ebe6db;
  --paper-deep: #e0dace;
  --line: #d5cec0;
  --accent: #9a5b2c;
  --panel: #191814;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Trame très légère façon grain de papier */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .035;
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 4px 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* height: auto est indispensable : sans lui, les attributs width/height
   des balises <img> écrasent la hauteur calculée et déforment l'image. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------------------------------------------------------- en-tête */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 242, 234, .88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 14px;
}

.brand-mark {
  width: 26px; height: 18px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  position: relative;
  flex: none;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--ink);
  border-radius: 1px;
}

.nav { display: flex; gap: 30px; align-items: center; }
.nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--ink); }

.nav-toggle { display: none; }

/* ---------------------------------------------------------- titres */

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 .5em;
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 .6em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 .5em;
}

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 22px;
}

.lead { font-size: 1.22rem; line-height: 1.6; color: var(--ink-soft); }

/* ---------------------------------------------------------- sections */

section { padding: 96px 0; position: relative; z-index: 1; }
section.tight { padding: 64px 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.band-warm { background: var(--paper-warm); }
.band-dark { background: var(--panel); color: var(--paper); }
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--paper); }
.band-dark .lead, .band-dark p { color: #c9c4b8; }
.band-dark .kicker { color: #8a8478; }

/* ---------------------------------------------------------- héros */

.hero { padding: 90px 0 70px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
}

.hero p.lead { max-width: 34em; }

.hero-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 26px 60px -28px rgba(20, 19, 15, .55);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); background: #000; }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* --------------------------------------------------- bandeau chiffres */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats div { padding: 30px 24px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b {
  display: block;
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 8px;
}
.stats span { font-size: 13.5px; color: var(--ink-faint); letter-spacing: .04em; }

/* ---------------------------------------------------------- grilles */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse .split-text { order: 2; }

.feature .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: .1em;
  display: block;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.feature p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

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

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(20, 19, 15, .5); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.card-body { padding: 26px 26px 30px; }
.card-body p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px 11px;
  margin-bottom: 14px;
}

/* -------------------------------------------------- rendus d'écran */

/* Un rendu 800 × 480 présenté comme une planche imprimée. */
.screen {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: #000;
}
.screen img { width: 100%; aspect-ratio: 5 / 3; object-fit: contain; }
.screen figcaption {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.band-dark .screen figcaption { background: #221f1a; border-top-color: #3a382f; color: #8a8478; }

.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* ---------------------------------------------------------- galerie */

.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.gallery figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--paper-deep); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.g-wide { grid-column: span 4; aspect-ratio: 4 / 3; }
.g-tall { grid-column: span 2; aspect-ratio: 3 / 4; }
.g-half { grid-column: span 3; aspect-ratio: 4 / 3; }
.g-third { grid-column: span 2; aspect-ratio: 4 / 3; }

/* ---------------------------------------------------------- étapes */

.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-n {
  counter-increment: step;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--ink-faint);
}
.step-n::before { content: counter(step, decimal-leading-zero); }
.step h3 { margin-bottom: .35em; }
.step p { margin: 0 0 12px; color: var(--ink-soft); }
.step p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- code */

code, kbd {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 6px;
}
pre {
  background: var(--panel);
  color: #e6e1d5;
  padding: 20px 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* ---------------------------------------------------------- tableau */

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
td.mono { font-family: var(--mono); font-size: 13.5px; }

/* ---------------------------------------------------------- FAQ */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 44px 22px 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 1.35rem;
  color: var(--ink-faint);
  transition: transform .2s;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 22px; color: var(--ink-soft); max-width: 62ch; }

/* ---------------------------------------------------------- citation */

blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.35;
  max-width: 20ch;
}
blockquote + .attrib { margin-top: 22px; font-size: 13.5px; color: var(--ink-faint); letter-spacing: .06em; }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding: 56px 0 44px;
  font-size: 14.5px;
  color: var(--ink-faint);
  position: relative;
  z-index: 1;
}
.foot-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.foot-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------------- utilitaires */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.center .lead, .center p { margin-left: auto; margin-right: auto; }
.maxw { max-width: 56ch; }
.maxw-center { max-width: 56ch; margin-left: auto; margin-right: auto; }
.note {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .hero-grid, .split, .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse .split-text { order: 0; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .screens { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(1), .stats div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .g-wide, .g-tall, .g-half, .g-third { grid-column: span 1; aspect-ratio: 4 / 3; }
  section { padding: 68px 0; }

  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 28px 20px;
    transform: translateY(-120%);
    transition: transform .28s ease;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:hover, .nav a.on { border-bottom-color: var(--line); }

  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 8px 12px;
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--ink);
  }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 20px; }
  .grid-3, .grid-4, .gallery { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .step-n { font-size: 1.5rem; }
}

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