/* Maniaque
   Papier millimétré, encre bleue, stylo rouge de correction.
   Une seule audace : l'annotation du titre. Le reste reste sobre et précis. */

:root {
  --paper: #F6F8FA;      /* papier, blanc froid */
  --paper-alt: #ECF1F4;  /* papier de section alternée */
  --grid: #D3E2EA;       /* lignes du millimétré */
  --grid-strong: #B9D0DC;
  --ink: #142850;        /* encre bleu nuit */
  --pencil: #556273;     /* texte secondaire, mine de crayon */
  --red: #D2251B;        /* stylo de correction */
  --red-ink: #B01E15;    /* rouge lisible sur fond clair */

  --font: "Schibsted Grotesk", system-ui, sans-serif;

  /* Échelle typographique (base 18 px, rapport 4:3) */
  --t-small: 0.875rem;
  --t-body: 1.125rem;
  --t-lead: 1.375rem;
  --t-h3: 1.5rem;
  --t-h2: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --t-hero: clamp(3.4rem, 1rem + 7.4vw, 8rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(4.5rem, 3rem + 6vw, 8rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem;
}
.skip:focus { top: 1rem; }

/* Papier millimétré : trame fine de 8 px, trame forte de 40 px */
.grid-paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -1px -1px;
}

/* ---------- Boutons et liens ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  background: var(--red);
  color: #fff;
  font: 600 1.0625rem/1 var(--font);
  text-decoration: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color .15s;
}
.btn:hover { background: var(--red-ink); }
.btn-ink { background: var(--ink); }
.btn-ink:hover { background: #0B1A38; }
.btn-small { min-height: 2.5rem; padding: 0 1rem; font-size: .9375rem; }

.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
  text-decoration-color: var(--grid-strong);
}
.link:hover { text-decoration-color: var(--ink); }
.inline-link { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.inline-link:hover { color: var(--red-ink); }

/* ---------- Barre du haut ---------- */

.bar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(246, 248, 250, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--grid);
}
.bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4rem; gap: 1rem;
}
.wordmark {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.wordmark-small { font-size: 1.25rem; }

/* Il y a de l'IA dans maniaque : les deux lettres portent le rouge de correction */
.ia { color: var(--red); }
.split-text .ia { font-weight: 700; }
/* Dans le titre, elles ne rougissent qu'une fois la retouche livrée */
.js .target .ia { color: inherit; transition: color .4s .6s; }
.js.is-fixed .target .ia { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .js .target .ia { transition: none; } }
.bar-nav { display: flex; align-items: center; gap: 1.75rem; }
.bar-nav a:not(.btn) {
  font-size: .9375rem; font-weight: 500; text-decoration: none; color: var(--pencil);
}
.bar-nav a:not(.btn):hover { color: var(--ink); }
.bar-nav .lang {
  font-weight: 700; color: var(--ink);
  padding: .2rem .45rem; border: 1.5px solid var(--grid-strong); border-radius: 3px;
}
@media (max-width: 760px) {
  .bar-nav a:not(.btn):not(.lang) { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(3.5rem, 2rem + 5vw, 6rem);
  border-bottom: 1px solid var(--grid-strong);
}
.hero-head { position: relative; }

.hero-title {
  font-size: var(--t-hero);
  font-weight: 760;
  line-height: .94;
  letter-spacing: -0.045em;
}
.hero-title .line { display: block; }

.target {
  position: relative;
  display: inline-block;
  font-weight: 760;
  transform: translateX(2px);
}
/* Cadre de sélection rouge, comme sur une maquette annotée */
.target::after {
  content: "";
  position: absolute;
  inset: .02em -.12em -.06em -.12em;
  border: 2px dashed var(--red);
  border-radius: 2px;
  pointer-events: none;
}

.note {
  color: var(--red-ink);
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--red);
  max-width: 18rem;
}
.note-ask { font-style: italic; font-weight: 500; }
.note-done { font-weight: 700; margin-top: .25rem; }
.note-next { font-style: italic; font-weight: 500; margin-top: .6rem; }

@media (min-width: 1200px) {
  .note {
    position: absolute;
    right: 0;
    /* centré sur la 2e ligne du titre */
    top: calc(var(--t-hero) * .94 * 1.5 - .7em);
    margin: 0;
    width: max-content;
    max-width: none;
    white-space: nowrap;
    border-left: 0;
    padding-left: 0;
  }
  /* Trait de renvoi vers le mot encadré */
  .note::before {
    content: "";
    position: absolute;
    right: calc(100% + 1rem);
    top: .7em;
    width: var(--leader, 4rem);
    transition: width .3s;
    border-top: 2px solid var(--red);
  }
}

/* Animation unique : la retouche demandée est appliquée */
.js .note-done, .js .note-next { opacity: 0; }
.js.is-fixed .target { transform: translateX(0); font-weight: 900; }
.js.is-fixed .target::after { border-style: solid; border-width: 1.5px; border-color: rgba(210, 37, 27, .4); }
.js.is-fixed .note-done, .js.is-fixed .note-next { opacity: 1; }
.js .target { transition: transform .5s cubic-bezier(.2, .7, .2, 1), font-weight .5s; }
.js .target::after { transition: border-color .4s .5s; }
.js .note-done { transition: opacity .3s .7s; }
.js .note-next { transition: opacity .4s 1.8s; }
@media (prefers-reduced-motion: reduce) {
  .js .target, .js .target::after, .js .note-done, .js .note-next { transition: none; }
}

.star {
  color: var(--red); text-decoration: none; font-weight: 700;
  font-size: .45em; vertical-align: super; line-height: 0; margin-left: .08em;
}
.meaning { margin-top: 1.5rem; font-size: 1rem; color: var(--pencil); max-width: 36rem; }
.meaning em { font-style: italic; color: var(--ink); }
.star-ref { color: var(--red); font-weight: 700; margin-right: .2rem; }
.hero-foot {
  display: grid;
  gap: 2rem;
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  align-items: end;
}
@media (min-width: 900px) {
  .hero-foot { grid-template-columns: minmax(0, 36rem) auto; justify-content: space-between; }
}
.lede { font-size: var(--t-lead); line-height: 1.45; max-width: 36rem; }
.lede strong { font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }

/* ---------- Sections ---------- */

.section { padding-block: var(--space); }
.section-alt { background: var(--paper-alt); }

h2 {
  font-size: var(--t-h2);
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 20ch;
}
h3 { font-size: var(--t-h3); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }

.section-lede { margin-top: 1.25rem; font-size: var(--t-lead); color: var(--pencil); max-width: 40rem; line-height: 1.45; }

.split { display: grid; gap: 2.5rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
  .split-text { position: sticky; top: 6rem; }
}
.split-text p { margin-top: 1.25rem; max-width: 34rem; color: var(--pencil); }
.split-text strong { color: var(--ink); font-weight: 700; }

.kinds { margin-top: 1.5rem; max-width: 34rem; border-top: 1px solid var(--grid-strong); }
.kinds div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--grid-strong); }
.kinds dt { font-weight: 700; }
.kinds dt .pill { margin-top: 0; }
.kinds dd { margin: 0; color: var(--pencil); font-size: 1rem; }
@media (max-width: 420px) { .kinds div { grid-template-columns: 1fr; gap: .2rem; } }

/* ---------- Liste de demandes ---------- */

.backlog {
  background: #fff;
  border: 1px solid var(--grid-strong);
  border-radius: 4px;
}
.backlog-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.backlog-table th {
  text-align: left; font-weight: 600; font-size: var(--t-small); color: var(--pencil);
  padding: .9rem 1rem; border-bottom: 1px solid var(--grid-strong);
}
.backlog-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--grid); vertical-align: top; }
.backlog-table td:nth-child(2), .backlog-table th:nth-child(2) { width: 7.5rem; }
.backlog-table td:nth-child(3), .backlog-table th:nth-child(3) { width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--pencil); }

.status { font-size: var(--t-small); font-weight: 600; white-space: nowrap; }
.status::before {
  content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .45rem;
  border: 2px solid var(--pencil); border-radius: 50%; vertical-align: .02em;
}
.req { display: block; }
.pill {
  display: inline-block; margin-top: .45rem;
  padding: .1rem .55rem; border-radius: 999px;
  font-size: .8125rem; font-weight: 600; line-height: 1.5;
  border: 1.5px solid currentColor;
}
.pill-bug { color: var(--red-ink); background: #FDEDEC; border-color: #F2B8B4; }
.pill-tweak { color: var(--ink); background: var(--paper); border-color: var(--grid-strong); }
.pill-feature { color: #fff; background: var(--ink); border-color: var(--ink); }
.is-done .req { color: var(--pencil); text-decoration: line-through; text-decoration-color: var(--grid-strong); }
.is-done .status::before { background: var(--ink); border-color: var(--ink); }
.is-doing .status { color: var(--red-ink); }
.is-doing .status::before { border-color: var(--red); background: linear-gradient(90deg, var(--red) 50%, transparent 50%); }
.is-new td { background: #FFF6F5; }

@media (max-width: 560px) {
  .backlog-table thead { display: none; }
  .backlog-table tr { display: grid; grid-template-columns: 1fr auto; padding: .85rem 1rem; border-bottom: 1px solid var(--grid); column-gap: 1rem; }
  .backlog-table td { padding: 0; border: 0; width: auto !important; text-align: left !important; }
  .backlog-table td:first-child { grid-column: 1 / -1; margin-bottom: .35rem; }
  .backlog-table td:nth-child(3) { text-align: right !important; }
  .is-new { background: #FFF6F5; }
  .is-new td { background: none; }
}

.backlog-form { padding: 1.25rem 1rem 1rem; }
.backlog-form label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: .6rem; }
.backlog-row { display: flex; gap: .5rem; }
.backlog-row input {
  flex: 1; min-width: 0;
  min-height: 3.25rem; padding: 0 .9rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--grid-strong); border-radius: 3px;
}
.backlog-row input::placeholder { color: #8592A3; }
.backlog-row input:focus-visible { outline-offset: 0; }
.backlog-msg { min-height: 1.5em; margin-top: .6rem; font-size: .9375rem; color: var(--pencil); }
@media (max-width: 420px) { .backlog-row { flex-direction: column; } }

/* ---------- Étapes ---------- */

.steps {
  counter-reset: step;
  display: grid; gap: 2.5rem;
  margin-top: 3rem;
}
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.steps li::before {
  content: counter(step);
  display: block; font-size: 3rem; font-weight: 300; line-height: 1; margin-bottom: 1rem;
  font-variant-numeric: tabular-nums; color: var(--grid-strong);
}
.step-meta { color: var(--red-ink); font-weight: 600; font-size: 1rem; margin-top: .3rem; }
.steps li p:last-child { margin-top: .9rem; color: var(--pencil); }

/* ---------- Devis ---------- */

.quote { margin-top: 3rem; }
.quote-table { width: 100%; border-collapse: collapse; }
.quote-table thead th {
  text-align: left; vertical-align: bottom;
  font-size: var(--t-h3); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em;
  padding: 0 1rem 1rem 0; border-bottom: 2px solid var(--ink);
}
.quote-table thead td { border-bottom: 2px solid var(--ink); }
.quote-table tbody th { text-align: left; font-weight: 500; color: var(--pencil); }
.quote-table tbody th, .quote-table tbody td {
  padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--grid-strong); vertical-align: top;
}
.quote-table .num { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.quote-table th[scope="row"] { width: 28%; }
.quote-notes { margin-top: 1.5rem; display: grid; gap: .6rem; max-width: 46rem; font-size: 1rem; color: var(--pencil); }

@media (max-width: 680px) {
  .quote-table thead th { font-size: 1.0625rem; }
  .quote-table .num { font-size: 1.5rem; }
  .quote-table tbody td { font-size: 1rem; }
  .quote-table th[scope="row"] { width: 30%; font-size: .9375rem; }
}

/* ---------- Engagements ---------- */

.promises li { padding: 1.1rem 0; border-bottom: 1px solid var(--grid-strong); color: var(--pencil); }
.promises li:first-child { padding-top: 0; }
.promises strong { display: block; color: var(--ink); font-size: 1.25rem; font-weight: 700; margin-bottom: .2rem; }

.guarantee {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border: 2px solid var(--red);
  border-radius: 4px;
  background: var(--paper);
  transform: rotate(-1deg);
  max-width: 30rem;
}
.guarantee-title { color: var(--red-ink); font-weight: 700; font-size: 1rem; }
.guarantee p:last-child { font-size: 1.625rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-top: .4rem; }

/* ---------- Fondateur ---------- */

.founder p { font-size: var(--t-lead); line-height: 1.5; max-width: 38rem; }
.founder p + p { margin-top: 1.25rem; }
.founder .founder-sign { margin-top: 2rem; font-size: 1.0625rem; font-style: italic; color: var(--pencil); }
.li-link { display: inline-block; margin-top: 1rem; color: var(--ink); line-height: 0; }
.li-link:hover { color: var(--red-ink); }
.li-icon { width: 1.75rem; height: 1.75rem; }

.portrait {
  margin: 2rem 0 0;
  max-width: 20rem;
  border: 1px solid var(--grid-strong);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 0;
  position: relative;
}
.portrait img { display: block; width: 100%; height: auto; }
/* ---------- Comparaison ---------- */

.compare { display: grid; gap: 1.5rem; margin-top: 3rem; }
@media (min-width: 900px) { .compare { grid-template-columns: 1fr 1fr; gap: 0; } }
.compare-col { padding-top: 1.25rem; border-top: 2px solid var(--grid-strong); }
@media (min-width: 900px) {
  .compare-col:first-child { padding-right: 3rem; }
  .compare-col + .compare-col { padding-left: 3rem; border-left: 1px solid var(--grid-strong); }
}
.compare-col .icon { display: block; width: 3rem; height: 3rem; margin-bottom: 1rem; }
.compare-col .icon-brand { width: auto; height: 2.75rem; margin-top: .125rem; margin-bottom: 1.125rem; }
.compare dl { margin-top: 1.5rem; }
.compare dt { font-weight: 600; font-size: 1rem; margin-top: 1.25rem; }
.compare dd { color: var(--pencil); margin-top: .25rem; max-width: 32rem; }
.fine { margin-top: 2.5rem; font-size: 1rem; color: var(--pencil); max-width: 46rem; }

/* ---------- Garanties techniques ---------- */

.assurances { display: grid; gap: 2.5rem; margin-top: 3rem; }
@media (min-width: 760px) { .assurances { grid-template-columns: 1fr 1fr; gap: 3rem 4rem; } }
.assurances > div { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.assurances .icon { display: block; width: 3rem; height: 3rem; margin-bottom: 1rem; }
.assurances p { margin-top: .75rem; color: var(--pencil); max-width: 34rem; }

/* ---------- Refus ---------- */

.refusals li {
  position: relative;
  padding: 1.1rem 0 1.1rem 2.25rem;
  border-bottom: 1px solid var(--grid-strong);
  font-size: 1.25rem; line-height: 1.4;
}
.refusals li:first-child { padding-top: 0; }
.refusals li::before {
  content: ""; position: absolute; left: 0; top: 1.55rem; width: 1.1rem; height: 2px; background: var(--red);
  transform: rotate(-12deg);
}
.refusals li:first-child::before { top: .45rem; }

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

.faq-wrap { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; } }
.faq details { border-bottom: 1px solid var(--grid-strong); }
.faq details:first-child { border-top: 1px solid var(--grid-strong); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 1.15rem 0; font-weight: 600; font-size: 1.1875rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--pencil);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--red); }
.faq details p { padding-bottom: 1.25rem; color: var(--pencil); max-width: 40rem; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- Appel final ---------- */

.cta { padding-block: var(--space); border-top: 1px solid var(--grid-strong); }
.cta h2 { max-width: 16ch; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.5rem); }
.cta p { margin-top: 1.25rem; font-size: var(--t-lead); max-width: 34rem; line-height: 1.45; }
.cta .btn { margin-top: 2rem; }
.cta .cta-alt { font-size: 1rem; color: var(--pencil); margin-top: 1rem; }

/* ---------- Pied de page ---------- */

.foot { border-top: 1px solid var(--grid-strong); padding-block: 2rem; font-size: .9375rem; color: var(--pencil); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 2rem; }
.foot .wordmark { color: var(--ink); }
.foot-inner a { margin-left: auto; }
@media (max-width: 560px) { .foot-inner a { margin-left: 0; } }

/* ---------- Page simple (mentions légales) ---------- */

.page { padding-block: var(--space); }
.page h1 { font-size: var(--t-h2); font-weight: 760; letter-spacing: -0.03em; line-height: 1.05; }
.page h2 { font-size: var(--t-h3); margin-top: 2.5rem; }
.page p { margin-top: .75rem; max-width: 42rem; color: var(--pencil); }

.quote-table .ht { font-size: .5em; font-weight: 600; letter-spacing: 0; color: var(--pencil); }
