/* ==========================================================================
   horizonmark.ai v4 stylesheet, carried into v5 as the legal-page shell.
   Paper. One stamp. No dark mode, no gradients, no glow.
   ========================================================================== */

/* --- Fonts, self-hosted ---------------------------------------------------- */

@font-face {
  font-family: 'Barlow Semi Condensed';
  src: url('/fonts/barlow-semi-condensed-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  src: url('/fonts/barlow-semi-condensed-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* --- Tokens ---------------------------------------------------------------- */

:root {
  --papier:      #F6F5F1;
  --blanc:       #FFFFFF;
  --encre:       #141414;
  --plomb:       #55544F;
  --ligne:       #D9D6CE;
  --ambre:       #8A5E14;
  --ambre-grand: #B07A1E;

  --display: 'Barlow Semi Condensed', system-ui, sans-serif;
  --corps:   'Source Sans 3', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --col:      1180px;
  --marge:    48px;
  --rythme:   120px;
  --corps-px: 19px;
}

@media (max-width: 767px) {
  :root { --marge: 20px; --rythme: 72px; --corps-px: 18px; }
}

/* --- Reset ----------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--corps);
  font-size: var(--corps-px);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

/* --- Links and focus ------------------------------------------------------- */

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }

:focus-visible {
  outline: 2px solid var(--encre);
  outline-offset: 2px;
}

.saut-lien {
  position: absolute; left: -9999px; top: 0;
  background: var(--encre); color: var(--papier);
  padding: 12px 20px; z-index: 100;
}
.saut-lien:focus { left: 0; }

/* --- Layout ---------------------------------------------------------------- */

.enveloppe {
  max-width: var(--col);
  margin: 0 auto;
  padding-left: var(--marge);
  padding-right: var(--marge);
}

.section { padding-top: var(--rythme); padding-bottom: var(--rythme); }
.section + .section { border-top: 1px solid var(--ligne); }

/* --- Typography ------------------------------------------------------------ */

.h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
}

.h2-large {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 3.1vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0;
}

.h3 {
  font-family: var(--corps);
  font-weight: 600;
  font-size: var(--corps-px);
  line-height: 1.4;
  margin: 0;
}

.sourdine { color: var(--plomb); }
.appuye   { font-weight: 600; }

.intro {
  font-size: 22px;
  line-height: 1.5;
  max-width: 34ch;
}

.plomb-bloc { color: var(--plomb); max-width: 62ch; }

/* --- Nav ------------------------------------------------------------------- */

.entete {
  border-bottom: 1px solid var(--ligne);
  padding-top: 18px;
  padding-bottom: 18px;
}

.entete-grille {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.marque {
  font-family: var(--display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.entete-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.tel-entete { white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--ligne); }
.tel-entete:hover { border-bottom-color: var(--encre); }

.bascule { text-decoration: none; border-bottom: 1px solid var(--ligne); }
.bascule:hover { border-bottom-color: var(--encre); }

@media (max-width: 767px) {
  .entete-grille { gap: 14px; }
  .marque { flex: 1 1 auto; }
  .entete-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 18px;
    min-width: 0;
  }
  .entete-actions .bouton { padding: 14px 18px; }
}

/* --- Buttons and CTA rows -------------------------------------------------- */

.bouton {
  display: inline-block;
  background: var(--encre);
  color: var(--papier);
  font-family: var(--corps);
  font-weight: 600;
  font-size: var(--corps-px);
  line-height: 1.2;
  padding: 16px 26px;
  border-radius: 2px;
  border: 2px solid var(--encre);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.bouton:hover { background: var(--papier); color: var(--encre); }

.rangee-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 32px;
}

.cta-tel { text-decoration: none; }
.cta-tel a { border-bottom: 1px solid var(--ligne); text-decoration: none; }
.cta-tel a:hover { border-bottom-color: var(--encre); }

.sous-cta { margin-top: 18px; color: var(--plomb); }

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

.heros { padding-top: 72px; padding-bottom: var(--rythme); }

@media (max-width: 767px) {
  .heros { padding-top: 44px; }
  .sourcil { margin-bottom: 22px; }
}

.heros-grille {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 56px;
  align-items: start;
}

.sourcil { color: var(--plomb); margin-bottom: 26px; max-width: 46ch; }

.heros .h1 { max-width: 15ch; }
.heros .intro { margin-top: 26px; }

.lien-secondaire { display: inline-block; margin-top: 22px; }

@media (max-width: 979px) {
  .heros-grille { grid-template-columns: 1fr; gap: 44px; }
  .heros .h1 { max-width: none; }
  .heros .intro { max-width: none; }
}

/* --- Artifact: la soumission ----------------------------------------------- */

.artefact { max-width: 460px; }

.puce-message {
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: 2px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  color: var(--plomb);
}
.puce-entete {
  display: block;
  color: var(--encre);
  margin-bottom: 8px;
  font-size: 15px;
}

.carte {
  position: relative;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(20, 20, 20, 0.05);
  padding: 22px 24px 26px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.carte-entete {
  display: flex;
  justify-content: space-between;
  gap: 4px 16px;
  flex-wrap: wrap;
  font-size: 15px;
  line-height: 1.4;
  color: var(--encre);
}
.carte-entete span + span { color: var(--plomb); }

.carte-regle { border: 0; border-top: 1px solid var(--ligne); margin: 14px 0; }

.carte-objet { color: var(--plomb); }

.ligne-poste {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0;
}
.ligne-poste span:first-child { color: var(--plomb); }
.ligne-poste span:last-child { white-space: nowrap; }

.ligne-total { padding: 4px 0; }
.ligne-total.est-total span { color: var(--ambre); font-size: 17px; }

.carte-pied {
  position: relative;
  min-height: 62px;
  margin-top: 10px;
}

.tampon {
  position: absolute;
  right: 0;
  bottom: 0;
  border: 2px solid var(--ambre-grand);
  color: var(--ambre);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.03em;
  padding: 9px 12px;
  white-space: nowrap;
  transform: rotate(-5deg);
  transform-origin: center;
}

.tampon.attend { opacity: 0; }

.tampon.atterrit {
  animation: atterrissage 420ms cubic-bezier(0.16, 0.84, 0.44, 1) forwards;
}

@keyframes atterrissage {
  from { opacity: 0; transform: rotate(-9deg) scale(1.08); }
  to   { opacity: 1; transform: rotate(-5deg) scale(1); }
}

.legende {
  margin-top: 18px;
  color: var(--plomb);
  font-size: var(--corps-px);
  line-height: 1.5;
}
.legende a { display: inline-block; margin-top: 6px; color: var(--encre); }

@media (prefers-reduced-motion: reduce) {
  .tampon.attend, .tampon.atterrit {
    opacity: 1;
    animation: none;
    transform: rotate(-5deg);
  }
  * { transition: none !important; }
}

/* --- S2 Recognition -------------------------------------------------------- */

.reconnaissance { margin-top: 48px; max-width: 74ch; }
.reconnaissance li { padding: 18px 0; }
.reconnaissance li b { font-weight: 400; color: var(--encre); }
.reconnaissance li span { color: var(--plomb); }

.fermeture { margin-top: 40px; max-width: 52ch; }

.sous-titre { margin-top: 22px; color: var(--plomb); }

/* --- S3 Method ------------------------------------------------------------- */

.methode-grille {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

.etapes { max-width: 62ch; }

.etape { display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 26px 0; }
.etape + .etape { border-top: 1px solid transparent; }

.etape-num {
  font-family: var(--display);
  font-weight: 500;
  font-size: 40px;
  line-height: 1;
  color: var(--ambre-grand);
}

.etape-nom { font-family: var(--corps); font-weight: 600; font-size: 22px; line-height: 1.3; }
.etape-meta { color: var(--plomb); margin-top: 4px; }
.etape-corps { color: var(--plomb); margin-top: 12px; }

.arithmetique { margin-top: 44px; color: var(--plomb); max-width: 56ch; }

/* nudge the analyse card down so it lands beside step 2 */
.analyse-colonne { padding-top: 104px; }

@media (max-width: 979px) {
  .methode-grille { grid-template-columns: 1fr; gap: 44px; }
  .analyse-colonne { padding-top: 0; }
}

/* --- Artifact: l'analyse --------------------------------------------------- */

.carte-analyse {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(20, 20, 20, 0.05);
  padding: 20px 22px 22px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  max-width: 460px;
}

.tableau-fuites { width: 100%; border-collapse: collapse; font-size: 15px; }
.tableau-fuites th {
  text-align: left;
  font-weight: 400;
  color: var(--encre);
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--ligne);
}
.tableau-fuites th:last-child, .tableau-fuites td:last-child { padding-right: 0; }
.tableau-fuites td {
  vertical-align: top;
  color: var(--plomb);
  padding: 12px 10px 12px 0;
}
.tableau-fuites tr + tr td { border-top: 1px solid var(--ligne); }
.tableau-fuites .montant { color: var(--ambre); white-space: nowrap; }

.analyse-pied { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ligne); color: var(--encre); }

/* --- S4 Who ---------------------------------------------------------------- */

.qui-grille {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 56px;
  align-items: start;
}

.portrait { border-radius: 2px; width: 100%; height: auto; }

.portrait-absent {
  border: 1px solid var(--ligne);
  border-radius: 2px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plomb);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.qui-corps > * + * { margin-top: 26px; }

@media (max-width: 979px) {
  .qui-grille { grid-template-columns: 1fr; gap: 36px; }
  .portrait, .portrait-absent { max-width: 320px; }
}

/* --- S5 Installs ----------------------------------------------------------- */

.groupes { margin-top: 48px; display: grid; gap: 56px; }
.groupe-titre { margin-bottom: 8px; }
.groupe li { padding: 16px 0; max-width: 70ch; }
.groupe li b { font-weight: 600; }
.groupe li span { color: var(--plomb); }

/* --- S6 Fit ---------------------------------------------------------------- */

.ajustement {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 12px;
}
.ajustement h2 { margin-bottom: 22px; }
.ajustement li { padding: 12px 0; color: var(--plomb); max-width: 44ch; }

@media (max-width: 767px) {
  .ajustement { grid-template-columns: 1fr; gap: 44px; }
}

/* --- S7 Founding (switchable) ---------------------------------------------- */

body[data-founding="off"] #fondation { display: none; }
body[data-founding="off"] #fondation + .section { border-top: 0; }

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

.questions { margin-top: 44px; display: grid; gap: 38px; max-width: 72ch; }
.question-q { margin-bottom: 10px; }
.question-r { color: var(--plomb); }

/* --- S9 Final + footer ----------------------------------------------------- */

.pied {
  border-top: 1px solid var(--ligne);
  padding-top: 44px;
  padding-bottom: 56px;
  color: var(--plomb);
}
.pied-ligne { max-width: 70ch; }
.pied-liens { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.pied-liens a { text-decoration: none; border-bottom: 1px solid var(--ligne); }
.pied-liens a:hover { border-bottom-color: var(--encre); }

/* --- Legal pages ----------------------------------------------------------- */

.legal { max-width: 70ch; padding-top: 64px; padding-bottom: 80px; }
.legal h1 { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 4vw, 52px); line-height: 1.06; margin: 0 0 28px; }
.legal h2 { font-family: var(--display); font-weight: 600; font-size: 32px; line-height: 1.12; margin: 44px 0 14px; }
.legal h3 { font-family: var(--corps); font-weight: 600; font-size: var(--corps-px); margin: 28px 0 8px; }
.legal p, .legal li { color: var(--plomb); }
.legal p { margin: 0 0 18px; }
.legal ul, .legal ol { margin: 0 0 18px; padding-left: 22px; list-style: disc; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--encre); }

/* --- Utilities (secondary pages) ------------------------------------------- */

.h1-court  { max-width: 18ch; }
.mesure    { max-width: 52ch; }
.ecart     { margin-top: 26px; }
.ecart-l   { margin-top: 32px; }

/* Dead since 2026-08-25: no phone number appears anywhere on the site, and the legal
   pages never carried one. Rules removed rather than left to rot. */

/* --- Print ----------------------------------------------------------------- */

@media print {
  @page { size: Letter; margin: 18mm; }
  :root { --rythme: 26px; --marge: 0px; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.45; }
  .entete-actions, .saut-lien, .lien-secondaire { display: none; }
  .bouton { background: none; color: #000; border: 1px solid #000; padding: 6px 10px; }
  .section, .heros { padding-top: 20px; padding-bottom: 20px; break-inside: avoid; }
  .section + .section { border-top: 1px solid #ccc; }
  .heros-grille, .methode-grille, .qui-grille { grid-template-columns: 1fr; gap: 22px; }
  .carte, .carte-analyse, .puce-message { box-shadow: none; border-color: #999; }
  .tampon { border-color: #000; color: #000; opacity: 1 !important; animation: none !important; transform: rotate(-5deg) !important; }
  a[href^="http"]::after { content: ""; }
  .h1 { font-size: 26pt; }
  .h2, .h2-large { font-size: 16pt; }
}
