/* Landing page Genealogor — CSS autonome, sans framework (mobile d'abord) */
:root {
  --ivory: #fbf9f5;
  --paper: #ffffff;
  --sand: #f3ece0;
  --line: #e4d9c6;
  --ink: #2a2118;
  --muted: #5b4f42;
  --brand: #7a3a10;
  --brand-hover: #632e0b;
  --brand-dark: #2d1b0a;
  --sage: #4f6b55;
  --sage-soft: #e6eee5;
  --blue: #3c5f80;
  --blue-soft: #e5edf5;
  --rose: #b2456a;
  --focus: #1f5fa8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(45, 27, 10, .05), 0 8px 24px rgba(45, 27, 10, .07);
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; margin: 0 0 .6em; color: var(--brand-dark); }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--brand-dark); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 820px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--brand-dark); background: var(--paper); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: var(--ivory); color: var(--brand-dark); }
.btn-light:hover { background: #fff; color: var(--brand); }
.btn-small { min-height: 42px; padding: .5rem 1.1rem; font-size: .95rem; }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 245, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--brand-dark); font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; }
.brand:hover { color: var(--brand-dark); }
.brand img { border-radius: 8px; }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--brand-dark); cursor: pointer;
}
.menu-toggle .icon { width: 24px; height: 24px; }

.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--brand); text-decoration: underline; }

/* Menu mobile ouvert */
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ivory); border-bottom: 1px solid var(--line);
  padding: .5rem 16px 1.25rem; box-shadow: var(--shadow);
}
.site-nav.is-open li a { display: block; padding: .8rem .25rem; border-bottom: 1px solid var(--line); }
.site-nav.is-open .btn { margin-top: 1rem; width: 100%; }

@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: flex; align-items: center; gap: 1.75rem; position: static; padding: 0; background: none; border: 0; box-shadow: none; }
  .site-nav ul { display: flex; gap: 1.5rem; }
  .site-nav.is-open li a { padding: 0; border: 0; display: inline; }
  .site-nav.is-open .btn { margin: 0; width: auto; }
}

/* Hero */
.hero { padding: 3rem 0 4rem; background: radial-gradient(1100px 500px at 85% 0%, var(--sand), transparent 70%), var(--ivory); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 4.5rem 0 5.5rem; } .hero-grid { grid-template-columns: 1fr 1.15fr; gap: 3.5rem; } }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); margin-bottom: .75rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
@media (max-width: 479px) { .cta-row .btn { width: 100%; } }
.hero-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; color: var(--muted); font-size: .95rem; }
.hero-facts li { display: flex; align-items: center; gap: .6rem; }
.hero-facts .icon { color: var(--sage); }

.frame { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.frame-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--sand); }
.frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.hero-visual { position: relative; margin: 0; }
.hero-visual .frame-desktop { margin-right: 0; }
.frame-phone { display: none; }
@media (min-width: 640px) {
  .hero-visual { padding: 0 0 2.5rem; }
  .hero-visual .frame-desktop, .hero-visual figcaption { margin-right: 28%; }
  .frame-phone {
    display: block; position: absolute; right: 0; bottom: 0; width: 26%;
    border-radius: 22px; border: 6px solid var(--brand-dark); background: var(--brand-dark);
  }
  .frame-phone img { border-radius: 15px; }
}
.hero-visual figcaption { margin-top: 1rem; font-size: .9rem; color: var(--muted); }

/* Sections */
.section { padding: 4rem 0; }
@media (min-width: 1024px) { .section { padding: 5.5rem 0; } }
.section-alt { background: var(--sand); }
.section-intro { color: var(--muted); max-width: 46rem; font-size: 1.08rem; margin-bottom: 2.5rem; }

.split { display: grid; gap: 2.5rem; align-items: center; margin-bottom: 3rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr .9fr; gap: 4rem; } }
.split p { color: var(--muted); max-width: 40rem; }

.generations { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.generations svg { width: 100%; height: auto; }
.gen-links path { fill: none; stroke: var(--line); stroke-width: 2.5; }
.gen-nodes circle { stroke: #fff; stroke-width: 3; }
.n-blue { fill: var(--blue); }
.n-rose { fill: var(--rose); }
.n-root { fill: var(--brand); }
.gen-labels text { font-family: var(--font-sans); font-size: 11px; fill: var(--muted); }
.generations figcaption { font-size: .9rem; color: var(--muted); margin-top: .75rem; }

.subhead { font-size: 1.4rem; margin-bottom: 1.25rem; }
.profiles, .features, .benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .profiles { grid-template-columns: repeat(3, 1fr); } }
.profile-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.profile-card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Cartes fonctionnalités */
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1rem;
  background: var(--sage-soft); color: var(--sage);
}
.feature:nth-child(3n+2) .feature-icon { background: var(--blue-soft); color: var(--blue); }
.feature:nth-child(3n) .feature-icon { background: #f6e8dc; color: var(--brand); }

/* Galerie */
.gallery { display: grid; gap: 2rem; }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } .gallery .shot:first-child { grid-column: 1 / -1; } }
.shot { margin: 0; }
.shot figcaption { margin-top: .9rem; color: var(--muted); font-size: .96rem; }
.shot figcaption strong { color: var(--ink); }

.mobile-shots { display: grid; gap: 1.5rem; margin-top: 3.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
.mobile-text { grid-column: 1 / -1; }
.mobile-text p { color: var(--muted); max-width: 32rem; }
@media (min-width: 900px) { .mobile-shots { grid-template-columns: 1.4fr 1fr 1fr; align-items: center; } .mobile-text { grid-column: auto; } }
.frame-phone-figure { margin: 0; max-width: 260px; justify-self: center; width: 100%; }
.frame-phone-static { border-radius: 24px; border: 6px solid var(--brand-dark); background: var(--brand-dark); }
.frame-phone-static img { border-radius: 17px; }
.frame-phone-figure figcaption { text-align: center; margin-top: .6rem; font-size: .9rem; color: var(--muted); }

/* Bénéfices */
@media (min-width: 768px) { .benefits { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; } }
.benefits li { border-left: 3px solid var(--sage); padding: .25rem 0 .25rem 1.25rem; }
.benefits p { color: var(--muted); margin: 0; }

/* Confiance */
.trust-grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.trust-card p, .trust-card li { color: var(--muted); font-size: .96rem; }
.trust-card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; }
.trust-card-muted { background: transparent; border-style: dashed; }
.note { background: var(--blue-soft); border-radius: 10px; padding: .8rem 1rem; font-size: .93rem; color: var(--ink) !important; margin: .5rem 0 0; }

/* Installation */
.steps-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .steps-grid { grid-template-columns: 1fr 1.1fr; gap: 3rem; } }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1rem 1rem 3.75rem; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.install-cards { display: grid; gap: 1rem; }
.install-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem; }
.install-card h3 { display: flex; align-items: center; gap: .5rem; font-family: var(--font-sans); font-size: 1.02rem; font-weight: 700; margin-bottom: .35rem; }
.install-card h3 .icon { color: var(--sage); }
.install-card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* FAQ */
.faq { display: grid; gap: .75rem; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.25rem; position: relative;
  font-weight: 600; color: var(--brand-dark); min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.25rem; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 1.25rem 1.1rem; margin: 0; color: var(--muted); }

/* Appel final */
.final-cta { background: var(--brand-dark); color: #f3ece0; text-align: center; padding: 4.5rem 0; }
.final-cta h2 { color: #fff; }
.final-cta p { color: #e4d9c6; max-width: 36rem; margin: 0 auto 2rem; font-size: 1.1rem; }
.final-cta :focus-visible { outline-color: #fbd38d; }

/* Pied de page */
.site-footer { background: #1f1308; color: #d9ccb6; padding: 2.5rem 0; font-size: .95rem; }
.footer-inner { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .footer-inner { grid-template-columns: auto 1fr; align-items: center; } .footer-note { grid-column: 1 / -1; } }
.brand-footer { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
@media (min-width: 900px) { .site-footer ul { justify-content: flex-end; } }
.site-footer a { color: #f3ece0; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #fbd38d; }
.footer-note { margin: 0; color: #b9aa92; font-size: .85rem; }
