/* Savira landing v3 - the stylesheet.
   Layout and colour live in the components' inline styles, ported from the
   design hand-off (designs/drops/savira_website_redesign.zip). This file holds
   only what an inline style cannot express: the self-hosted fonts, hover and
   focus states, media queries and reduced motion.

   ⚠ The fonts are self-hosted on purpose: the CSP (Caddyfile, security_headers)
   is `font-src 'self' data:`, so a Google Fonts link would be blocked. The
   files are copies of app/frontend/public/fonts - same faces as the app since
   the "Ciel et sable" redesign: IBM Plex Sans for text, Familjen Grotesk for
   headline figures (Space Grotesk and Roboto were retired by the founder,
   2026-11-03). ⚠ The Plex files are IBM's own, UNMODIFIED (OFL with the
   Reserved Font Name "Plex": never re-cut them); licences beside them. */

/* IBM Plex Sans 100-700, IBM's split variable files with IBM's ranges. */
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('/fonts/ibm-plex-sans-var-latin1.woff2') format('woff2');
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('/fonts/ibm-plex-sans-var-latin2.woff2') format('woff2');
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('/fonts/ibm-plex-sans-var-latin3.woff2') format('woff2');
  unicode-range: U+0102-0103, U+01CD-01DC, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('/fonts/ibm-plex-sans-var-pi.woff2') format('woff2');
  unicode-range: U+0E3F, U+2000-200D, U+2015, U+2028-2029, U+202F, U+2032-2033, U+2070, U+2074-2079, U+2080-2089, U+2113, U+2116, U+2126, U+212E, U+2150-2151, U+2153-215E, U+2190-2199, U+21A9-21AA, U+21B0-21B3, U+21B6-21B7, U+21BA-21BB, U+21C4, U+21C6, U+2202, U+2206, U+220F, U+2211, U+2215, U+221A, U+221E, U+222B, U+2248, U+2260, U+2264-2265, U+25CA, U+2713, U+274C, U+2B0E-2B11, U+ECE0, U+EFCC, U+FEFF, U+FFFD;
}
/* Familjen Grotesk 400-700, latin: headline money figures only. */
@font-face {
  font-family: 'Familjen Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/familjen-grotesk-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Tokens ─────────────────────────────────────────────
   The app's "Ciel et sable" palette (app/frontend/src/index.css :root), under
   the same names, so a mockup and the page around it speak one language.
   Components use them inline: style="color:var(--ink)". Light only: the
   landing has no dark theme. */
:root {
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-figure: 'Familjen Grotesk', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg: #FBF7F0;          /* cream */
  --paper: #FFFCF8;       /* cards */
  --ink: #13283B;
  --ink-hover: #1F3A52;
  --ink-soft: #5B6B7A;    /* secondary text: 5.3:1 on cream */
  --muted: #6E7C89;       /* small print: 4.4:1 on paper */
  --faint: #A3AEB8;
  --border: #E8DED0;
  --border-strong: #DDD0BE;
  --hair: #F1E9DD;
  --sand-mist: #F4EDE1;
  --sky: #0DA5E9;
  --sky-deep: #0C6E9E;    /* sky text on paper: 5.6:1 */
  --sky-soft: #7DD3FC;
  --sky-mist: #D5F0FF;
  --sand: #F2B880;        /* the glass's savings */
  --sand-mark: #EDAA6E;   /* sand as a chart mark */
  --sand-deep: #A85F2A;
  --glass-bills: #7DD3FC;
  --glass-free: #0EA5E9;
  --glass-outline: #879BAD;
  --needs: #1EA662; --needs-mist: #D6F2EE;
  --wants: #923DFB; --wants-mist: #F0E9FF;
  --success: #039869;
  --danger: #DA4147;
  --shadow: 0 1px 2px rgba(19,40,59,.04), 0 8px 24px -8px rgba(19,40,59,.12);
  --shadow-lg: 0 2px 4px rgba(19,40,59,.05), 0 24px 48px -16px rgba(19,40,59,.22);
  --dawn: radial-gradient(120% 70% at 80% 0%, rgba(213,240,255,.9), transparent 60%),
          radial-gradient(90% 60% at 0% 100%, rgba(242,200,150,.55), transparent 60%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky-deep); text-decoration: none; }
a:hover { color: var(--ink); }
button, input { font-family: inherit; }
img { display: block; }

/* Anchors land below the sticky nav, not under it. */
.lp-anchor { scroll-margin-top: 72px; }

/* Keyboard focus only - a click never draws it. */
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

/* ─── Hover states ───────────────────────────────────────
   ⚠ A property that changes on hover lives HERE, never in the element's inline
   style: an inline declaration outranks any :hover rule. */
.lp-navlink { color: var(--ink-soft); }
.lp-navlink:hover { color: var(--ink); }
.lp-lang { color: var(--ink-soft); }
.lp-lang:hover { color: var(--ink); }
.lp-menu-row { color: var(--ink); }
.lp-menu-row:hover { background: var(--sand-mist); }
.lp-menu-lang { color: var(--ink-soft); }
.lp-menu-lang:hover { color: var(--ink); }
.lp-btn-dark, .lp-btn-dark:hover { color: #FFFFFF; }
.lp-btn-dark { background: var(--ink); }
.lp-btn-dark:hover { background: var(--ink-hover); }
.lp-btn-light { color: var(--ink); border: 1px solid var(--border-strong); }
.lp-btn-light:hover { color: var(--ink); border-color: var(--sky); }
.lp-footlink { color: var(--ink-soft); }
.lp-footlink:hover { color: var(--ink); }
.lp-input { border: 1px solid var(--border-strong); outline: none; }
.lp-input:focus { border-color: var(--sky); }

/* ─── Narrow screens ─────────────────────────────────────
   Five section links, the language switch and the CTA do not fit one row on a
   phone, and a nav that wraps into three sticky rows eats the screen. The full
   row measures about 815px ("Sécurité et confidentialité" included, 2026-11-24),
   so below 900px the section links and the language switch go… */
@media (max-width: 899.98px) {
  .lp-navlinks { display: none !important; }
  .lp-navright > .lp-lang { display: none !important; }
  .lp-navbar { gap: 12px !important; }
}
/* …and they come back in the drawer, opened by a button at the start of the
   bar that exists only below 900px (03-nav.js closes an open drawer when the
   window grows past it). The bar keeps the logo, SAVIRA and the CTA down to
   360px: below 480px it tightens its padding and the CTA. */
.lp-menu-btn { display: none; }
@media (max-width: 899.98px) { .lp-menu-btn { display: inline-flex; } }
@media (min-width: 900px) { .lp-drawer { display: none !important; } }
@media (max-width: 479.98px) {
  .lp-navbar { padding: 12px 16px !important; gap: 10px !important; }
  .lp-navcta { font-size: 13px !important; padding: 9px 14px !important; }
}
.lp-fade { animation: lp-fade .2s ease-out both; }
.lp-slide { animation: lp-slide .3s cubic-bezier(.2,.85,.25,1) both; }
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-slide { from { transform: translateX(-100%); } to { transform: none; } }

/* The spending section's text column follows the list while it scrolls, but
   only when the two columns sit side by side (two 360px tracks + the 56px gap
   + 2 × 28px padding). Stacked, a sticky heading would slide over the list. */
@media (min-width: 832px) {
  .lp-cat-sticky { position: sticky; top: 110px; }
}

/* "Ton cycle en cours": beside a 120px glass, a phone leaves the list about
   150px and "À épargner" breaks in two. Below 560px the list takes the width
   and the glass sits under it. */
@media (max-width: 559.98px) {
  .lp-now-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .lp-now-glass { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* The glass's moving surface (SV.Glass). Two periods drawn, so -50 % loops. */
.lp-wave { animation: lp-wave 10s linear infinite; }
.lp-wave.rev { animation-direction: reverse; }
@keyframes lp-wave { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* The hero's stage. Side by side the laptop and the phone need a wide screen;
   on a phone the laptop's Today is unreadable at that scale, so the phone
   carries the stage alone, larger and centred. */
@media (max-width: 639.98px) {
  .lp-stage { aspect-ratio: auto !important; margin-top: 44px !important; display: flex; justify-content: center; }
  .lp-stage-laptop { display: none; }
  .lp-stage-phone { position: relative !important; right: auto !important; width: min(72%, 300px) !important; }
}

/* The score: the Bilan phone beside the breakdown card while both fit; on a
   phone the card takes the width and the phone sits above it. */
@media (max-width: 759.98px) {
  .lp-score-pair { flex-direction: column !important; }
  .lp-score-pair > div:first-child { width: min(62%, 240px) !important; }
  .lp-score-pair > div:last-child { flex: 0 0 auto !important; width: 100%; }
}

/* The Bank → Powens → Savira diagram: three cards and two hand-overs in a
   row; on a phone they stack and the dashed line turns downwards. */
@media (max-width: 819.98px) {
  .lp-flow { flex-direction: column !important; }
  .lp-flow-arrow { flex: 0 0 auto !important; flex-direction: row !important; justify-content: flex-start !important; gap: 14px !important; padding: 2px 0 2px 26px; text-align: left !important; }
  .lp-flow-line { order: -1; flex: 0 0 2px; }
  .lp-flow-line { width: 2px !important; height: 34px !important; background: repeating-linear-gradient(180deg, var(--sky) 0 8px, transparent 8px 13px) !important; }
  .lp-flow-line > span { right: -5px !important; top: auto !important; bottom: -4px; border-left: 6px solid transparent !important; border-right: 6px solid transparent; border-top: 9px solid var(--sky); border-bottom: 0 !important; }
}

/* /securite/: the table of what leaves the EU turns into one card per
   provider on a phone; the FAQ chevron turns when a question is open. */
@media (max-width: 719.98px) {
  .lp-out-head { display: none !important; }
  .lp-out-row { grid-template-columns: 1fr !important; gap: 4px !important; }
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq[open] .lp-faq-chev { transform: rotate(90deg); }
