/* SERT — Du tracé à la réalisation */
:root {
  --paper: #f4f1e8;
  --paper-2: #ebe6da;
  --ink: #102a35;
  --muted: #596970;
  --hot: #e85d34;
  --cold: #4c91a8;
  --line: #c9c4b8;
  --white: #fffdf8;
  --radius: .35rem;
  --max: 1180px;
  --shadow: 0 18px 45px rgba(16, 42, 53, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(16,42,53,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(16,42,53,.035) 1px, transparent 1px);
  background-size: 24px 24px;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 4px; }
::selection { color: var(--white); background: var(--hot); }

.skip-link {
  position: fixed;
  top: .6rem;
  left: .6rem;
  z-index: 100;
  padding: .65rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 790px); margin-inline: auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.8rem; height: 2px; background: var(--hot); }
.kicker { color: var(--hot); }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -.04em; }
h1 { max-width: 16ch; font-size: clamp(2.55rem, 9vw, 6.9rem); font-weight: 790; }
h2 { max-width: 16ch; font-size: clamp(2rem, 6vw, 4.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.65rem); }
p { margin: 0 0 1rem; }
.lead { max-width: 62ch; color: var(--muted); font-size: clamp(1.08rem, 2.3vw, 1.35rem); }
.small { color: var(--muted); font-size: .88rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 232, .94);
  backdrop-filter: blur(14px);
}
.nav-wrap { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .05em;
  position: relative;
}
.brand-mark::after { content: ""; position: absolute; right: -.55rem; width: .65rem; height: 3px; background: var(--hot); }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 1.03rem; letter-spacing: .08em; }
.brand-copy small { display: none; color: var(--muted); font-size: .67rem; text-transform: uppercase; }
.menu-toggle { display: inline-grid; min-width: 2.8rem; min-height: 2.8rem; place-items: center; border: 1px solid var(--ink); background: transparent; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 1.25rem; height: 2px; background: var(--ink); transition: .2s ease; }
.menu-toggle span { position: relative; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -.4rem; }
.menu-toggle span::after { top: .4rem; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.site-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; padding: 1rem; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.site-nav.open { display: block; }
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: .85rem .3rem; border-bottom: 1px solid var(--line); font-weight: 700; text-decoration: none; }
.site-nav a::before { margin-right: .55rem; color: var(--cold); font-family: ui-monospace, monospace; font-size: .7rem; }
.site-nav li:nth-child(1) a::before { content: "01"; }
.site-nav li:nth-child(2) a::before { content: "02"; }
.site-nav li:nth-child(3) a::before { content: "03"; }
.site-nav li:nth-child(4) a::before { content: "04"; }
.site-nav li:nth-child(5) a::before { content: "05"; }
.site-nav a[aria-current="page"] { color: var(--hot); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 3.2rem;
  padding: .7rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  font-weight: 780;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.btn::after { content: "→"; color: var(--hot); font-size: 1.25rem; }
.btn:hover { transform: translateY(-2px); background: #183b47; }
.btn-light { color: var(--ink); background: transparent; }
.btn-light:hover { background: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }

.hero { padding: clamp(3.2rem, 9vw, 7.5rem) 0 2rem; overflow: hidden; }
.hero-grid { display: grid; gap: 2.2rem; }
.hero-copy .lead { margin-top: 1.3rem; }
.hero-note { padding: 1rem; border-left: 3px solid var(--cold); background: rgba(255,253,248,.65); }
.hero-note strong { display: block; }
.flow-plan {
  min-height: 20rem;
  position: relative;
  border: 1px solid var(--line);
  background: rgba(255,253,248,.7);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.flow-plan::before { content: "PLAN DE FLUX / SERT"; position: absolute; top: .8rem; left: .9rem; color: var(--muted); font-family: ui-monospace, monospace; font-size: .65rem; letter-spacing: .12em; }
.pipe { position: absolute; height: 5px; background: var(--hot); transform-origin: left center; }
.pipe::after { content: ""; position: absolute; right: -7px; top: -5px; width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 50%; background: var(--paper); }
.pipe-a { top: 34%; left: 8%; width: 58%; color: var(--hot); }
.pipe-b { top: 34%; left: 66%; width: 28%; color: var(--hot); transform: rotate(90deg); }
.pipe-c { top: 69%; left: 31%; width: 63%; color: var(--cold); background: var(--cold); }
.pipe-d { top: 35%; left: 31%; width: 34%; color: var(--cold); background: var(--cold); transform: rotate(90deg); }
.node { position: absolute; display: grid; width: 5.3rem; aspect-ratio: 1; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); font-size: .7rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.node-1 { top: 22%; left: 7%; }
.node-2 { top: 22%; right: 7%; }
.node-3 { right: 7%; bottom: 10%; }
.plan-label { position: absolute; left: 7%; bottom: 8%; max-width: 13ch; color: var(--muted); font-family: ui-monospace, monospace; font-size: .7rem; text-transform: uppercase; }
.legend { display: flex; gap: 1rem; padding: .85rem 0 0; color: var(--muted); font-family: ui-monospace, monospace; font-size: .72rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 1.4rem; height: 3px; background: var(--hot); }
.legend span:last-child i { background: var(--cold); }

.data-strip { margin-top: 3rem; border-block: 1px solid var(--line); background: var(--paper-2); }
.data-grid { display: grid; }
.data-item { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.data-item:last-child { border: 0; }
.data-item span { display: block; color: var(--muted); font-family: ui-monospace, monospace; font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; }
.data-item strong { font-size: .95rem; }

.section { padding: clamp(4rem, 10vw, 8rem) 0; }
.section-head { display: grid; gap: 1.3rem; margin-bottom: 2.8rem; }
.section-dark { color: var(--white); background: var(--ink); }
.section-dark .eyebrow, .section-dark .lead, .section-dark .small { color: #b9c7ca; }
.section-dark .eyebrow::before { background: var(--cold); }
.two-col { display: grid; gap: 2rem; }
.editorial-block { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.editorial-block .index { display: block; margin-bottom: 1rem; color: var(--hot); font-family: ui-monospace, monospace; font-size: .8rem; }
.editorial-block p { color: var(--muted); }

.process { counter-reset: step; display: grid; gap: 0; }
.process-item { position: relative; padding: 1.3rem 1rem 2.3rem 4rem; border-left: 3px solid var(--cold); }
.process-item::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 1rem; left: -1.55rem; display: grid; width: 2.9rem; height: 2.9rem; place-items: center; border: 2px solid var(--white); border-radius: 50%; color: var(--ink); background: var(--cold); font-family: ui-monospace, monospace; font-size: .75rem; font-weight: 800; }
.process-item:last-child { border-color: transparent; }
.process-item p { margin-top: .7rem; color: #b9c7ca; }

.split-panel { display: grid; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.split-panel > * { padding: clamp(1.5rem, 5vw, 3.5rem); }
.split-panel .accent { color: var(--white); background: var(--hot); }
.split-panel .accent p { color: #fff2ec; }
.fact-list { margin: 0; padding: 0; list-style: none; }
.fact-list li { display: grid; gap: .2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.fact-list li:last-child { border: 0; }
.fact-list span { color: var(--muted); font-family: ui-monospace, monospace; font-size: .7rem; text-transform: uppercase; }

.page-hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.6rem, 8vw, 6rem); }
.page-hero .lead { margin-top: 1.3rem; }
.breadcrumb { margin-bottom: 2rem; color: var(--muted); font-family: ui-monospace, monospace; font-size: .73rem; text-transform: uppercase; }
.breadcrumb a { text-decoration-thickness: 1px; text-underline-offset: .25em; }

.scope-grid { display: grid; gap: 1rem; }
.scope-item { min-height: 15rem; padding: 1.4rem; position: relative; border: 1px solid var(--line); background: rgba(255,253,248,.78); }
.scope-item::after { content: ""; position: absolute; right: 1.3rem; bottom: 1.3rem; width: 3rem; height: 3rem; border-right: 4px solid var(--hot); border-bottom: 4px solid var(--cold); border-radius: 0 0 1.2rem; }
.scope-item p { margin-top: 1rem; padding-right: 2rem; color: var(--muted); }
.notice { padding: 1.25rem; border: 1px solid var(--line); border-left: 5px solid var(--hot); background: var(--white); }
.notice strong { display: block; margin-bottom: .35rem; }

.contact-layout { display: grid; gap: 2rem; }
.address-card { padding: clamp(1.5rem, 5vw, 3rem); color: var(--white); background: var(--ink); position: relative; overflow: hidden; }
.address-card::after { content: ""; position: absolute; width: 8rem; height: 8rem; right: -3rem; bottom: -3rem; border: 16px double var(--hot); border-radius: 50%; opacity: .65; }
.address-card address { margin-top: 1.5rem; font-style: normal; font-size: clamp(1.25rem, 4vw, 2rem); line-height: 1.35; }
.contact-copy { padding: 1.2rem 0; }

.cta-band { padding: clamp(2rem, 6vw, 4rem) 0; border-block: 1px solid var(--line); background: var(--paper-2); }
.cta-inner { display: grid; gap: 1.5rem; align-items: center; }
.cta-inner h2 { font-size: clamp(1.8rem, 5vw, 3.4rem); }

.site-footer { padding: 3rem 0 1.5rem; color: #d7e0e1; background: #0b2029; }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand p { max-width: 39ch; color: #9fb1b5; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding: .25rem 0; color: #d7e0e1; text-underline-offset: .25rem; }
.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #29424b; color: #8ca2a7; font-family: ui-monospace, monospace; font-size: .7rem; }

@media (min-width: 700px) {
  .container, .narrow { width: min(calc(100% - 3rem), var(--max)); }
  .brand-copy small { display: block; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); align-items: center; }
  .data-grid { grid-template-columns: repeat(3, 1fr); }
  .data-item { padding: 1.2rem 1.5rem; border-right: 1px solid var(--line); border-bottom: 0; }
  .data-item:first-child { padding-left: 0; }
  .section-head { grid-template-columns: 1.1fr .9fr; align-items: end; }
  .two-col, .scope-grid { grid-template-columns: repeat(2, 1fr); }
  .split-panel, .contact-layout { grid-template-columns: .85fr 1.15fr; }
  .cta-inner { grid-template-columns: 1fr auto; }
  .footer-grid { grid-template-columns: 1.3fr .7fr .7fr; }
}

@media (min-width: 940px) {
  .menu-toggle { display: none; }
  .site-nav { display: block; position: static; width: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .site-nav ul { display: flex; align-items: center; gap: 1.4rem; }
  .site-nav a { padding: .5rem 0; border: 0; font-size: .86rem; }
  .site-nav a:hover { color: var(--hot); }
  .flow-plan { min-height: 27rem; }
  .scope-grid { grid-template-columns: repeat(3, 1fr); }
  .scope-item:nth-child(2) { transform: translateY(2rem); }
}

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