@font-face { font-family: "Plus Jakarta Sans"; src: url("/static/fonts/PlusJakartaSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/static/fonts/PlusJakartaSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0C1B3A;
  --navy2: #172A50;
  --ocre: #9A4F12;
  --ocre-l: #E0A458;
  --cream: #F2EFE8;
  --light: #F7F7F5;
  --body: #3D4658;
  --body-d: #C9D1E0;
  --line: #DDD8CC;
  --white: #FFFFFF;
  --ok: #2E6B3F;
  --err: #A1301F;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  background: var(--light);
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 16px; }
h1 { font-size: clamp(36px, 6vw, 60px); color: var(--white); max-width: 15ch; }
h2 { font-size: clamp(28px, 4vw, 40px); max-width: 24ch; }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }
a { color: var(--ocre); }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ocre-l); margin-bottom: 14px; }
.eyebrow.dark { color: var(--ocre); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(12, 27, 58, .96); backdrop-filter: blur(6px); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { text-decoration: none; }
.mark { display: inline-grid; font-size: 24px; color: var(--white); white-space: nowrap; }
/* « Familiale Pre Revenaz » at the top of the page, replaced by « FPR » once the page is scrolled */
.mark > span { grid-area: 1 / 1; justify-self: start; border-bottom: 3px solid var(--ocre-l); padding-bottom: 2px;
  transition: opacity .35s ease, transform .35s ease; }
.mark .full { font-weight: 500; word-spacing: .35em; }
.mark .full b { font-weight: 700; }
.mark .short { font-weight: 700; letter-spacing: .12em; opacity: 0; transform: translateY(4px); }
.top.scrolled .mark .full { opacity: 0; transform: translateY(-4px); }
.top.scrolled .mark .short { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .mark > span { transition: none; } }
nav { display: flex; gap: 28px; align-items: center; }
nav a { color: var(--body-d); text-decoration: none; font-size: 15px; font-weight: 700; }
nav a:hover { color: var(--white); }
.nav-cta { color: var(--navy) !important; background: var(--ocre-l); padding: 8px 16px; border-radius: 999px; }
/* Menu button: below 900px, the links open in a panel under the header */
.menu-btn { display: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
  .top-in { position: relative; }
  .menu-btn { display: flex; }
  #nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); padding: 8px 24px 20px; border-top: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 12px 24px rgba(0, 0, 0, .25); }
  #nav.open { display: flex; }
  #nav a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 16px; }
  #nav a.nav-cta { margin-top: 14px; padding: 12px 16px; text-align: center; border-bottom: 0; }
}

/* Hero */
.hero { background: var(--navy); padding: 104px 0 112px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -160px; top: -120px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid var(--navy2); }
.hero .wrap { position: relative; z-index: 1; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--body-d); max-width: 46ch; margin-bottom: 36px; }
.btn { display: inline-block; font: inherit; font-weight: 700; font-size: 16px; color: var(--navy); background: var(--ocre-l); border: 0; border-radius: 999px; padding: 14px 30px; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { background: #E8B573; transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* Sections */
.section { padding: 96px 0; scroll-margin-top: 68px; }
.sub { font-size: clamp(18px, 2.2vw, 21px); color: var(--body); margin: -4px 0 0; max-width: 46ch; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; }
.card p { margin: 0; }
.num { font-weight: 700; font-size: 15px; color: var(--ocre); letter-spacing: .1em; margin-bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; }

.dark-band { background: var(--navy); color: var(--body-d); }
.dark-band h2 { color: var(--white); }
.cr { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 40px 0 48px; }
.cr-item { background: var(--navy2); border-radius: 16px; padding: 28px; }
.cr-c { color: var(--white); font-size: 18px; }
.cr-c strong { color: var(--white); }
.cr-r { color: var(--ocre-l); font-size: 18px; margin: 0; }
.eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; }
.eq-box { background: var(--navy2); color: var(--white); font-weight: 700; font-size: 18px; border-radius: 12px; padding: 22px 16px; text-align: center; display: grid; place-items: center; }
.eq-box.hl { background: var(--ocre-l); color: var(--navy); }
.eq-op { color: var(--ocre-l); font-weight: 700; font-size: 34px; display: grid; place-items: center; padding: 0 6px; }
.eq-note { margin: 32px 0 0; max-width: 62ch; }
.challenge { margin: 48px auto 0; max-width: 46ch; text-wrap: balance; text-align: center; color: var(--ocre-l); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.35; }

/* Contact */
.family { background: var(--cream); }
.family-points { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; margin-top: 40px; }
.family-points > div { border-left: 3px solid var(--ocre-l); padding-left: 18px; }
.family-points h3 { margin: 0 0 8px; }
.family-points p { margin: 0; }
@media (max-width: 860px) { .family-points { grid-template-columns: 1fr; } }
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.form { color: var(--body); background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: grid; gap: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--navy); }
label em { color: var(--ocre); font-style: normal; }
input, textarea { font: inherit; font-size: 16px; color: var(--navy); background: var(--light); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--ocre-l); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy { font-size: 13px; margin: 0; }
.form .btn { justify-self: start; }
.status { margin: 0; font-weight: 700; min-height: 1.6em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
altcha-widget { --altcha-max-width: 100%; }

/* Footer */
.foot { background: var(--navy); color: var(--body-d); font-size: 14px; padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
summary { cursor: pointer; font-weight: 700; }
.legal { max-width: 640px; margin-top: 12px; }
.legal p { margin: 0 0 8px; }

@media (max-width: 860px) {
  .cards, .cr, .contact { grid-template-columns: 1fr; }
  .contact { gap: 24px; }
  .eq { grid-template-columns: 1fr; }
  .eq-op { padding: 0; font-size: 28px; }
  .hero { padding: 72px 0 80px; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .mark { font-size: 20px; }
  #nav { padding: 8px 16px 20px; }
  .row { grid-template-columns: 1fr; }
  .form { padding: 22px; }
}

/* Consent banner (Google Analytics only after « Accepter ») */
.consent { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-left: auto;
  background: var(--white); color: var(--body); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 16px 40px rgba(12, 27, 58, .25); font-size: 14px; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 14px; line-height: 1.5; }
.consent strong { color: var(--navy); font-size: 15px; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.consent-btn { font: inherit; font-weight: 700; font-size: 14px; color: var(--navy); background: var(--white); border: 2px solid var(--navy);
  border-radius: 999px; padding: 9px 22px; cursor: pointer; }
.consent-btn:hover { background: var(--navy); color: var(--white); }
.link-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.legal code { font-size: 13px; }
