:root {
  color-scheme: light;
  --ink: oklch(0.18 0.045 232);
  --ink-2: oklch(0.28 0.05 232);
  --paper: oklch(0.955 0.042 188);
  --paper-2: oklch(0.985 0.012 200);
  --screen: oklch(0.99 0.006 205);
  --line: oklch(0.62 0.048 205);
  --muted: oklch(0.42 0.035 224);
  --cyan: oklch(0.78 0.14 205);
  --orange: oklch(0.72 0.19 45);
  --red: oklch(0.61 0.18 22);
  --violet: oklch(0.56 0.16 292);
  --mint: oklch(0.82 0.14 164);
  --shadow: 18px 18px 0 oklch(0.18 0.045 232 / 0.16);
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 84px, oklch(0.18 0.045 232 / 0.08) 84px 85px, transparent 85px),
    linear-gradient(180deg, var(--paper) 0, oklch(0.94 0.052 190) 48%, oklch(0.98 0.02 83) 100%);
  font-family: "Gill Sans", "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.56;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

p {
  max-width: 72ch;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(16px, 3vw, 42px);
  border-bottom: 2px solid var(--ink);
  background: oklch(0.955 0.042 188 / 0.93);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  border: 2px solid var(--ink);
  background: var(--orange);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.78rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 850;
}

nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
}

nav a:hover {
  border-color: var(--ink);
  background: var(--screen);
}

main {
  position: relative;
}

.hero {
  width: min(var(--max), calc(100% - 36px));
  min-height: min(760px, calc(100vh - 72px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 0.82fr);
  grid-template-areas:
    "copy form"
    "rest viewport"
    "viewport2 viewport";
  gap: clamp(28px, 4vw, 64px) clamp(30px, 6vw, 80px);
  align-items: start;
  align-content: center;
  padding: clamp(46px, 7vw, 96px) 0 clamp(34px, 6vw, 74px);
}

.hero-copy {
  grid-area: copy;
  position: relative;
  z-index: 2;
}

.hero-form {
  grid-area: form;
  align-self: start;
  position: relative;
  z-index: 3;
}

.hero-rest {
  grid-area: rest;
  position: relative;
  z-index: 2;
}

.hero .viewport {
  grid-area: viewport;
  align-self: center;
}

.signal {
  width: fit-content;
  margin-bottom: 18px;
  border: 2px solid var(--ink);
  background: var(--mint);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--ink-2);
  font-size: clamp(1.15rem, 1.75vw, 1.42rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  padding: 0 18px;
  font-size: 0.95rem;
  font-weight: 950;
}

.button.primary {
  background: var(--ink);
  color: var(--paper-2);
}

.button.secondary {
  background: var(--screen);
  color: var(--ink);
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

/* ---- Carte formulaire (hero + section contact) ---- */
.lead-card {
  border: 2px solid var(--ink);
  background: var(--screen);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
}

.lead-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.lead-card-head b {
  border: 2px solid var(--ink);
  background: var(--cyan);
  padding: 4px 9px;
}

.lead-card-title {
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.04;
}

.lead-card-sub {
  margin-bottom: 18px;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.lead-form {
  display: grid;
  gap: 10px;
}

.lead-form input,
.lead-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
}

.lead-form textarea {
  resize: vertical;
  min-height: 84px;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: 3px solid var(--cyan);
  outline-offset: 0;
}

.lead-submit {
  min-height: 50px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  font-family: inherit;
  font-weight: 950;
  cursor: pointer;
}

.lead-submit:hover {
  background: var(--orange);
  color: var(--ink);
}

.lead-success {
  margin: 6px 0 0;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: var(--mint);
  font-weight: 950;
}

.viewport {
  border: 2px solid var(--ink);
  background: var(--screen);
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}

.viewport-top {
  min-height: 50px;
  display: grid;
  grid-template-columns: 14px 14px 14px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper-2);
}

.viewport-top span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
}

.viewport-top span:nth-child(2) {
  background: var(--cyan);
}

.viewport-top span:nth-child(3) {
  background: var(--mint);
}

.viewport-top strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-left: 10px;
  font-size: 0.82rem;
}

.serp-map {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
}

.old-serp,
.ai-serp {
  position: relative;
  z-index: 2;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  padding: 18px;
}

.old-serp {
  align-self: start;
  min-height: 370px;
}

.ai-serp {
  align-self: end;
  min-height: 430px;
  background:
    linear-gradient(135deg, oklch(0.78 0.14 205 / 0.22), transparent 38%),
    var(--paper-2);
}

.old-serp p,
.ai-serp p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.result {
  display: block;
  height: 38px;
  margin-bottom: 18px;
  border: 2px solid var(--line);
  background: linear-gradient(90deg, var(--cyan), var(--screen));
}

.result.long {
  width: 100%;
}

.result.medium {
  width: 78%;
}

.result.short {
  width: 52%;
}

.answer {
  border: 2px solid var(--ink);
  background: var(--screen);
  padding: 16px;
}

.answer b {
  display: block;
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.answer span {
  display: block;
  height: 13px;
  margin-bottom: 9px;
  background: oklch(0.18 0.045 232 / 0.18);
}

.answer .tiny {
  width: 48%;
}

.sources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.sources i,
.followups em {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--mint);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
}

.sources i:nth-child(2) {
  background: var(--orange);
}

.sources i:nth-child(3) {
  background: var(--cyan);
}

.followups {
  display: grid;
  gap: 8px;
}

.followups em {
  min-height: 42px;
  justify-content: start;
  padding: 0 12px;
  background: var(--screen);
}

.routes {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.routes path {
  fill: none;
  stroke: var(--red);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 3 14;
}

.definition-strip,
.era,
.surface,
.appear,
.method,
.audience,
.audit,
.contact,
.faq {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.definition-strip {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(18px, 4vw, 52px);
  align-items: start;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: clamp(22px, 4vw, 42px) 0;
}

.definition-strip strong {
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.9;
}

.definition-strip p {
  margin-bottom: 0;
  color: var(--ink-2);
  font-size: clamp(1.1rem, 1.8vw, 1.38rem);
}

.section-intro {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 34px);
  align-items: start;
  margin-bottom: clamp(24px, 4vw, 42px);
}

.section-intro span,
.section-number {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--ink);
  background: var(--orange);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 950;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 5.5vw, 5.6rem);
  line-height: 0.95;
  font-weight: 950;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1;
}

.era,
.surface,
.appear,
.method,
.audience,
.audit,
.contact,
.faq {
  padding: clamp(70px, 10vw, 132px) 0 0;
}

.era-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--ink);
  background: var(--paper-2);
}

.era-grid article {
  min-height: 360px;
  padding: clamp(18px, 2.5vw, 28px);
  border-right: 2px solid var(--ink);
}

.era-grid article:last-child {
  border-right: 0;
  background: var(--ink);
  color: var(--paper-2);
}

.era-grid b {
  display: inline-flex;
  margin-bottom: 84px;
  border: 2px solid currentColor;
  padding: 4px 10px;
  font-size: 0.9rem;
}

.era-grid p,
.method p,
.audience p,
.faq p {
  color: var(--ink-2);
}

.era-grid article:last-child p {
  color: oklch(0.88 0.025 190);
}

.surface {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 78px);
  align-items: start;
}

.surface .section-number {
  margin-bottom: 20px;
  background: var(--cyan);
}

.surface-flow {
  border: 2px solid var(--ink);
  background: var(--screen);
}

.flow-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
  border-bottom: 2px solid var(--ink);
}

.flow-row:last-child {
  border-bottom: 0;
}

.flow-row.accent {
  background: var(--orange);
}

.flow-row b {
  font-size: 1.5rem;
  line-height: 1;
}

.flow-row p {
  margin-bottom: 0;
}

.appear-layout {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 76px);
  align-items: start;
}

.query-stack {
  display: grid;
  gap: 0;
  transform: rotate(1.2deg);
}

.query-stack div {
  min-height: 76px;
  display: flex;
  align-items: center;
  border: 2px solid var(--ink);
  border-bottom: 0;
  background: var(--screen);
  padding: 0 18px;
  font-weight: 950;
}

.query-stack div:last-child {
  border-bottom: 2px solid var(--ink);
}

.query-stack div:nth-child(2) {
  margin-left: 26px;
  background: var(--cyan);
}

.query-stack div:nth-child(3) {
  margin-left: 52px;
  background: var(--mint);
}

.query-stack div:nth-child(4) {
  margin-left: 78px;
  background: var(--orange);
}

.query-stack div:nth-child(5) {
  margin-left: 104px;
  background: var(--paper-2);
}

.appear-copy {
  padding-top: 8px;
}

.appear-copy > p {
  margin-bottom: 24px;
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 2px solid oklch(0.18 0.045 232 / 0.18);
  color: var(--ink-2);
}

li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 16px;
  height: 16px;
  background: var(--red);
}

.method {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 88px);
}

.method-title {
  position: sticky;
  top: 104px;
  align-self: start;
}

.method-title .section-number {
  margin-bottom: 22px;
  background: var(--violet);
  color: var(--paper-2);
}

.method-title p {
  margin-top: 22px;
}

.method-rail {
  border-top: 2px solid var(--ink);
}

.method-rail article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: clamp(22px, 3.4vw, 38px) 0;
  border-bottom: 2px solid var(--ink);
}

.method-rail span {
  width: fit-content;
  height: fit-content;
  border: 2px solid var(--ink);
  background: var(--screen);
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.method-rail h3,
.method-rail p {
  grid-column: 2;
}

.method-rail p {
  margin-bottom: 0;
}

.audience-lines {
  border-top: 2px solid var(--ink);
}

.audience-lines p {
  max-width: none;
  margin: 0;
  padding: 24px 0;
  border-bottom: 2px solid var(--ink);
  font-size: clamp(1.18rem, 2vw, 1.75rem);
  line-height: 1.35;
}

.audit {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.62fr);
  gap: clamp(26px, 5vw, 76px);
  align-items: start;
}

.audit > div:first-child {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  padding: clamp(24px, 4vw, 44px);
}

.audit > div:first-child p:not(.signal) {
  color: oklch(0.86 0.028 190);
}

.audit .signal {
  color: var(--ink);
}

.audit-output {
  border: 2px solid var(--ink);
  background: var(--screen);
  box-shadow: var(--shadow);
  padding: clamp(22px, 3vw, 34px);
}

.audit-output ol {
  margin: 0 0 22px;
  padding-left: 1.35em;
}

.audit-output li {
  padding: 8px 0;
  border: 0;
}

.audit-output li::before {
  display: none;
}

/* ---- Section contact (formulaire on-page) ---- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 0.72fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: start;
}

.contact-intro p:not(.signal) {
  color: var(--ink-2);
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
}

.faq {
  padding-bottom: clamp(70px, 10vw, 120px);
}

details {
  border-top: 2px solid var(--ink);
  background: oklch(0.99 0.006 205 / 0.56);
}

details:last-child {
  border-bottom: 2px solid var(--ink);
}

summary {
  cursor: pointer;
  padding: 22px 0;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  font-weight: 950;
}

details p {
  margin: 0;
  padding: 0 0 24px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  padding: 28px clamp(18px, 3vw, 42px);
}

footer p {
  margin-bottom: 0;
}

footer a {
  font-weight: 900;
}

/* ---- Page legale (mentions / confidentialite) ---- */
.legal {
  width: min(820px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) 0;
}

.legal h1 {
  max-width: none;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin-bottom: 18px;
}

.legal h2 {
  margin-top: 38px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.legal p,
.legal li {
  color: var(--ink-2);
  max-width: none;
}

.legal ul {
  margin: 0 0 16px 22px;
  list-style: disc;
}

.legal li {
  padding: 4px 0;
  border-top: 0;
}

.legal li::before {
  display: none;
}

.legal a.inline {
  font-weight: 900;
  text-decoration: underline;
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "form"
      "rest"
      "viewport";
  }

  .surface,
  .appear-layout,
  .method,
  .audit,
  .contact {
    grid-template-columns: 1fr;
  }

  .viewport {
    transform: none;
  }

  .method-title {
    position: static;
  }

  .era-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .era-grid article:nth-child(2) {
    border-right: 0;
  }

  .era-grid article:nth-child(-n + 2) {
    border-bottom: 2px solid var(--ink);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 18px;
    background:
      linear-gradient(90deg, transparent 0 42px, oklch(0.18 0.045 232 / 0.08) 42px 43px, transparent 43px),
      linear-gradient(180deg, var(--paper) 0, oklch(0.94 0.052 190) 48%, oklch(0.98 0.02 83) 100%);
  }

  .topbar {
    position: static;
    display: grid;
    justify-content: stretch;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .definition-strip,
  .era,
  .surface,
  .appear,
  .method,
  .audience,
  .audit,
  .contact,
  .faq {
    width: min(100% - 22px, 680px);
  }

  /* Mobile form-first : H1 d'abord, formulaire juste en dessous. */
  .hero {
    min-height: auto;
    padding-top: 42px;
    grid-template-areas:
      "copy"
      "form"
      "rest"
      "viewport";
  }

  h1 {
    font-size: clamp(2rem, 8vw, 2.6rem);
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    display: grid;
  }

  .serp-map {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .old-serp,
  .ai-serp {
    min-height: auto;
  }

  .routes {
    display: none;
  }

  .definition-strip,
  .section-intro,
  .flow-row,
  .method-rail article {
    grid-template-columns: 1fr;
  }

  .section-intro {
    gap: 18px;
  }

  .era-grid {
    grid-template-columns: 1fr;
  }

  .era-grid article,
  .era-grid article:nth-child(2) {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
    min-height: auto;
  }

  .era-grid article:last-child {
    border-bottom: 0;
  }

  .era-grid b {
    margin-bottom: 28px;
  }

  .query-stack div:nth-child(n) {
    margin-left: 0;
  }

  .method-rail h3,
  .method-rail p {
    grid-column: 1;
  }

  .sources {
    grid-template-columns: 1fr;
  }

  .lead-submit {
    width: 100%;
  }

  footer {
    display: grid;
  }
}

@media (max-width: 460px) {
  .brand span {
    width: 42px;
  }

  nav a {
    min-height: 34px;
    padding: 0 8px;
  }

  .viewport-top {
    grid-template-columns: 10px 10px 10px minmax(0, 1fr);
    gap: 6px;
    padding: 0 10px;
  }

  .viewport-top span {
    width: 9px;
    height: 9px;
  }

  h2 {
    font-size: clamp(2.15rem, 12vw, 3.8rem);
  }
}
