/* Famipil — site vitrine. Palette et ton repris de l'app iOS. */
:root {
  --paper: #F7F5F0;
  --card: #FFFFFF;
  --ink: #0E1A2B;
  --ink-2: #4A5260;
  --mute: #5E6675;
  --line: #E6E3DB;
  --teal: #1A7563;
  --teal-tint: #E4F3EF;
  --amber-text: #83590F;
  --amber-tint: #FBF1DE;
  --red-text: #A2372A;
  --night: #0E1A2B;
  --night-card: #1C2A3D;
  --night-text: #BFD8D5;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --radius: 22px;
  --radius-s: 14px;
  --container: 1200px;
  --section: clamp(64px, 10vw, 144px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-body: clamp(17px, 0.35vw + 15.8px, 19px);
  --t-small: 15px;
  --t-h3: clamp(20px, 0.6vw + 17px, 24px);
  --t-h2: clamp(32px, 2.6vw + 20px, 52px);
  --t-h1: clamp(42px, 4.6vw + 22px, 84px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101418; --card: #1A2027; --ink: #F1F3F5; --ink-2: #C4CAD3; --mute: #9AA3AF; --line: #2B333D;
    --teal: #3FB49B; --teal-tint: #16362F; --amber-text: #F0C878; --amber-tint: #3A2E16; --red-text: #F39A8C;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--teal); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 16px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; }
h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -0.028em; font-weight: 750; }
h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -0.01em; font-weight: 650; }
p { margin: 0; max-width: 62ch; }
.lead { font-size: clamp(19px, 0.6vw + 16px, 23px); color: var(--ink-2); line-height: 1.5; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); }
.muted { color: var(--mute); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: var(--s5); align-items: center; font-size: var(--t-small); }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: var(--radius-s); font-weight: 650; font-size: 17px; text-decoration: none; transition: transform .2s var(--ease), background .2s var(--ease); }
.btn-primary { background: #1A7563; color: #fff; }
.btn-primary:hover { background: #155F51; transform: translateY(-1px); }
.btn-quiet { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn .apple { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { cursor: default; }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 112px) var(--section); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero h1 { margin-block: var(--s4) var(--s5); }
.hero .lead { margin-bottom: var(--s6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.hero-note { margin-top: var(--s5); font-size: var(--t-small); color: var(--mute); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Phone mockups (signature: the big round button) */
.phone { width: min(100%, 330px); aspect-ratio: 9 / 19; margin-inline: auto; border-radius: 48px; padding: 12px;
  background: #0b0f14; box-shadow: 0 40px 80px -40px rgba(14, 26, 43, .45), 0 0 0 1px rgba(255,255,255,.06) inset; }
/* Mockups always show the app's light screen, whatever the site theme. */
.screen { --teal: #1A7563; --teal-tint: #E4F3EF; --line: #E6E3DB; --mute: #5E6675; --amber-text: #83590F; --amber-tint: #FBF1DE; }
.screen .pill.bad { background: #FBE6E3; color: #A2372A; }
.screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: #F7F5F0; color: #0E1A2B;
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 22px 28px; font-size: 15px; }
.screen .island { position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 96px; height: 28px; border-radius: 20px; background: #0b0f14; }
.screen .hello { color: #4A5260; font-size: 15px; }
.screen .box { width: 84px; height: 84px; border-radius: 20px; margin: 22px 0 14px; background: linear-gradient(135deg, #6FB05A, #4C8E3E);
  display: grid; place-items: center; }
.screen .box i { display: block; width: 46px; height: 30px; border-radius: 6px; background: rgba(255,255,255,.28); border: 1px solid rgba(255,255,255,.55); }
.screen .med { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.screen .note { color: #4A5260; margin-top: 4px; }
.big-button { width: 168px; height: 168px; border-radius: 50%; margin: 26px 0 14px; background: #1A7563; color: #fff; display: grid;
  place-items: center; font-size: 25px; font-weight: 800; letter-spacing: -0.01em; box-shadow: 0 24px 40px -18px rgba(26,117,99,.65);
  animation: breathe 3.2s var(--ease) infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.screen .when { color: #1A7563; font-weight: 650; }
.screen .who { color: #5E6675; margin-top: 10px; font-size: 13.5px; line-height: 1.4; }

.screen.night { background: #0E1A2B; color: #fff; text-align: left; align-items: stretch; }
.alert-badge { width: 56px; height: 56px; border-radius: 16px; background: #B4402F; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 30px; }
.screen.night h3 { color: #fff; font-size: 24px; line-height: 1.15; margin: 18px 0 16px; font-weight: 800; }
.night-card { background: #1C2A3D; border-radius: 16px; padding: 14px; color: #BFD8D5; font-size: 13.5px; line-height: 1.45; }
.night-card b { color: #fff; display: block; font-size: 15.5px; margin-bottom: 4px; }
.night-actions { margin-top: auto; display: grid; gap: 8px; }
.night-actions span { display: block; text-align: center; padding: 12px; border-radius: 12px; background: #1A2027; border: 1px solid #2B333D; font-weight: 650; font-size: 14px; color: #F1F3F5; }

/* Day timeline (signature) */
.timeline { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 650; background: var(--line); color: var(--mute); }
.pill.ok { background: var(--teal-tint); color: var(--teal); }
.pill.warn { background: var(--amber-tint); color: var(--amber-text); }
.pill.bad { background: #FBE6E3; color: #A2372A; }
@media (prefers-color-scheme: dark) { .pill.bad { background: #3D1F1B; color: var(--red-text); } }

/* Sections */
section { padding-block: var(--section); }
.section-head { display: grid; gap: var(--s4); margin-bottom: clamp(40px, 5vw, 72px); max-width: 760px; }
.rule { border-top: 1px solid var(--line); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); counter-reset: step; }
.step { display: grid; gap: var(--s3); align-content: start; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--teal); }
.step .timeline { margin-top: var(--s2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split.reverse { grid-template-columns: 1.1fr 0.9fr; }
.split.reverse > :first-child { order: 2; }
.split .copy { display: grid; gap: var(--s5); }
@media (max-width: 900px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); }
.list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--ink-2); }
.list li::before { content: ""; width: 10px; height: 10px; margin-top: .55em; border-radius: 50%; background: var(--teal); }

/* Night band: escalation */
.band { background: var(--night); color: #fff; border-radius: clamp(24px, 3vw, 40px); padding: clamp(40px, 7vw, 96px); }
.band h2 { color: #fff; }
.band .lead { color: var(--night-text); }
.band .eyebrow { color: #7FD3C1; }

/* Facts grid */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--paper); padding: clamp(24px, 3vw, 40px); display: grid; gap: var(--s3); align-content: start; }
.fact p { color: var(--ink-2); font-size: 17px; }
@media (max-width: 820px) { .facts { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s6); display: grid; gap: var(--s3); background: var(--card); }
.plan.featured { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--mute); letter-spacing: 0; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s5) 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 650; font-size: 19px; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 26px; line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: var(--s3); color: var(--ink-2); }

/* Notice */
.notice { border-left: 3px solid var(--teal); padding: var(--s4) var(--s5); background: var(--teal-tint); border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--ink); max-width: 760px; }

/* Footer */
.site-footer { padding-block: var(--s8) var(--s7); border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--mute); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s6); }
.site-footer nav { display: grid; gap: var(--s2); align-content: start; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .legal { margin-top: var(--s7); }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Long-form legal pages */
.prose { max-width: 760px; padding-block: var(--s8) var(--section); }
.prose h1 { font-size: clamp(36px, 3vw + 20px, 56px); margin-bottom: var(--s4); }
.prose h2 { font-size: 26px; margin: var(--s7) 0 var(--s3); letter-spacing: -0.015em; }
.prose p, .prose li { color: var(--ink-2); margin-bottom: var(--s3); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; margin: var(--s4) 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 650; }
.table-wrap { overflow-x: auto; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .big-button { animation: none; }
  .btn, .faq summary::after { transition: none; }
}
