/* Innocence Homes — landing « Étude gratuite de votre logement »
   Source des valeurs : Innocence Homes Design System (tokens.json, version du 2026-10-26). Hero A, Plus Jakarta Sans et palette VALIDÉS PAR INNOCENT.
   Points de rupture : mobile < 640px · tablette 640–1023px · desktop ≥ 1024px. Mobile d'abord. */

/* 0. Police auto-hébergée (Plus Jakarta Sans, police variable 400–700, sous-ensemble latin, licence OFL : assets/fonts/OFL.txt) */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}

/* 1. Tokens */
:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-sunk: #f5f5f3;
  --night: #1c1714;
  --on-night: #fffff0;
  --ink: #251c2f;
  --ink-muted: #5e566a;
  --olive: #a09e52;
  --olive-hover: #b3b166;
  --ivory: #fffff0;
  --on-olive: #251c2f;
  --olive-text: #66652b;
  --olive-soft: #f0f0e6;
  --line: #e4e4df;
  --line-strong: #8c8a6a;
  --line-hover: #251c2f;
  --disabled-bg: #ecece6;
  --disabled-text: #6b6577;
  --focus: #251c2f;
  --warning: #8a5a00;
  --shadow-raised: 0 1px 2px rgba(37, 28, 47, .06), 0 8px 24px rgba(37, 28, 47, .06);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 96px;
  --radius-s: 8px; --radius-m: 12px;
  --wrap: 1160px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --header-h: 64px;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--olive-text); }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
.nowrap { white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 32px); margin-inline: auto; padding-inline: var(--gutter) var(--gutter-r); }
.section { padding-block: 56px; }
.section--sunk { background: var(--surface-sunk); }
.label { display: inline-block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--olive-text); }
.h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.015em; }
.lead { font-size: 17px; line-height: 1.55; color: var(--ink-muted); max-width: 52ch; }
.micro { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 30; padding: 10px 14px; background: var(--ink); color: var(--surface); border-radius: var(--radius-s); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 3. Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 52px; padding: 0 28px; border: 1px solid transparent; border-radius: var(--radius-s); font: 600 16px/1.2 var(--font); text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--olive); color: var(--on-olive); }
.btn--primary:hover { background: var(--olive-hover); color: var(--on-olive); }
.btn--on-night:hover { background: var(--olive-hover); color: var(--on-olive); }
.btn[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--line-hover); }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn__arrow { position: relative; width: 16px; height: 1px; background: currentColor; }
.btn__arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.on-night :focus-visible { outline-color: var(--on-night); }

.cta-row { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* 4. Header et navigation */
.header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: auto; height: 28px; }
.brand span { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.nav { display: none; align-items: center; gap: var(--space-6); }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--olive-text); }
.menu-btn { display: inline-flex; min-width: 44px; align-items: center; min-height: 44px; padding: 0 14px; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-s); color: var(--ink); font: 600 14px var(--font); cursor: pointer; }
.mnav { border-top: 1px solid var(--line); }
.mnav a { display: block; padding: 16px var(--gutter-r) 16px var(--gutter); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 500; }
.mnav a:last-child { border-bottom: 0; }

/* 5. Hero A (photo + voile, texte sur l'image) */
.hero { position: relative; overflow: hidden; background: var(--night); color: var(--on-night); }
.hero__img, .hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: rgba(28, 23, 20, .82); }
.hero__inner { position: relative; display: flex; flex-direction: column; gap: 18px; padding-block: 36px 24px; }
.hero__inner > * { max-width: 640px; }
.hero .label { color: var(--olive); }
.hero h1 { font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; color: var(--on-night); }
.hero .lead { color: var(--on-night); opacity: .92; }
.hero__cta { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.hero__cta .micro { color: var(--on-night); opacity: .88; text-align: center; }
.hero__caption { position: relative; padding-block: 0 16px; font-size: 13px; color: var(--on-night); opacity: .8; }

/* 6. Preuves de confiance + photos */
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust p { font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.trust strong { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 600; color: var(--ink); }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.photos picture:first-child { grid-column: 1 / -1; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-m); }
.photos__caption { margin-top: 12px; font-size: 14px; color: var(--ink-muted); }

/* 7. Cartes « Votre situation » */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { display: flex; flex-direction: column; gap: var(--space-2); padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; min-width: 0; transition: border-color .15s; }
.card:hover { border-color: var(--line-hover); }
.card__index { font-size: 15px; font-weight: 600; line-height: 1; color: var(--olive-text); }
.card h3 { font-size: 17px; line-height: 1.4; }
.card p { font-size: 15px; line-height: 1.55; color: var(--ink-muted); }

/* 8. Étapes */
.steps { display: grid; grid-template-columns: 1fr; gap: var(--space-5); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; gap: var(--space-2); counter-increment: step; min-width: 0; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--olive-soft); color: var(--olive-text); font-size: 17px; font-weight: 600; }
.steps h3, .benefits h3 { font-size: 17px; line-height: 1.4; }
.steps p, .benefits p { font-size: 15px; line-height: 1.55; color: var(--ink-muted); }

/* 9. Mises en page à deux colonnes */
.split { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
.analyse { display: grid; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.analyse li { display: grid; align-content: start; gap: 4px; padding-block: 16px; border-top: 1px solid var(--line-strong); font-size: 15px; color: var(--ink-muted); }
.analyse b { font-size: 16px; font-weight: 600; color: var(--ink); }
.benefits { display: grid; grid-template-columns: 1fr; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.benefits li { display: grid; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.limits { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.limits li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; font-size: 16px; line-height: 1.55; }
.limits svg { margin-top: 3px; }
.note { padding: 20px; background: var(--olive-soft); border-radius: var(--radius-m); font-size: 16px; line-height: 1.55; }

/* 10. FAQ */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding: 18px 0; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 24px; font-weight: 400; line-height: 1; color: var(--olive-text); }
.faq details[open] summary::after { content: "–"; }
.faq details p { max-width: 65ch; padding-bottom: 18px; color: var(--ink-muted); }

/* 11. CTA final + footer */
.on-night { background: var(--night); color: var(--on-night); }
.final { padding-block: 64px; }
.final__inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.final img { width: auto; height: 40px; }
.final h2 { color: var(--on-night); }
.final p { max-width: 52ch; opacity: .88; }
.final .btn { width: 100%; }
.footer { padding-block: 40px calc(40px + 76px); border-top: 1px solid rgba(255, 255, 240, .14); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-5); }
.footer .brand { color: var(--on-night); }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer a { color: var(--on-night); }
.footer small { flex-basis: 100%; font-size: 13px; opacity: .78; }

/* 12. CTA collant mobile : apparaît quand le CTA du hero sort de l'écran, disparaît sur le CTA final */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); box-shadow: var(--shadow-raised); transform: translateY(110%); transition: transform .2s; }
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta .btn { width: 100%; min-height: 48px; }

/* Tablette ≥ 640px */
@media (min-width: 640px) {
  .section { padding-block: 72px; }
  .h2 { font-size: 30px; }
  .hero h1 { font-size: 42px; line-height: 1.1; }
  .hero__inner { padding-block: 72px 48px; gap: 22px; }
  .hero__shade { background: linear-gradient(90deg, rgba(28, 23, 20, .9) 0%, rgba(28, 23, 20, .74) 60%, rgba(28, 23, 20, .45) 100%); }
  .hero__cta { flex-direction: row; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
  .hero__cta .micro { text-align: left; }
  .photos { grid-template-columns: 2fr 1fr 1fr; }
  .photos picture:first-child { grid-column: auto; }
  .photos img { height: 100%; }
  .cards { grid-template-columns: 1fr 1fr; gap: 16px; }
  .cards .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analyse { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .benefits { grid-template-columns: 1fr 1fr; }
  .final .btn { width: auto; }
  .footer { padding-bottom: 40px; }
  .sticky-cta { display: none; }
}

/* Desktop ≥ 1024px */
@media (min-width: 1024px) {
  :root { --header-h: 72px; }
  .section { padding-block: var(--space-8); }
  .h2 { font-size: 34px; }
  .lead { font-size: 19px; }
  .brand img { height: 32px; }
  .nav { display: flex; }
  .menu-btn, .mnav { display: none; }
  .hero__inner { padding-block: 128px 72px; gap: 28px; }
  .hero h1 { font-size: 52px; }
  .hero__shade { background: linear-gradient(90deg, rgba(28, 23, 20, .92) 0%, rgba(28, 23, 20, .78) 45%, rgba(28, 23, 20, .25) 100%); }
  .hero__caption { padding-bottom: 28px; }
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); padding-block: var(--space-6); }
  .photos { gap: 16px; margin-top: 48px; }
  .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cards .card:last-child:nth-child(odd) { grid-column: auto; }
  .card { padding: var(--space-5); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; align-items: start; }
  .analyse li { padding-block: 18px; }
  .limits li { font-size: 17px; }
  .final { padding-block: var(--space-8); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Publication sans photos tant que les autorisations propriétaires manquent (classe sur <html>) */
.sans-photos .hero__img, .sans-photos .hero__caption, .sans-photos .photos, .sans-photos .photos__caption { display: none; }
