/* =========================================================
   Sous-pages des fonctionnalités (25/10/2026), une par carte de la grille
   « Tout ce dont vous avez besoin sur une seule plateforme » de l'accueil.
   Pages générées par scripts/fonctionnalites.py : modifier le script, jamais le HTML.
   Jetons du design system Referaly (DESIGN-SYSTEM.md).
   ========================================================= */

.rffx {
  --fx-primary: #7c3aed;
  --fx-pressed: #5b21b6;
  --fx-tint: #f1ebfe;
  --fx-tint2: #e4d8fc;
  --fx-ink: #1b1726;
  --fx-ink2: #625c73;
  --fx-ink3: #8a8499;
  --fx-rule: #e8e4f0;
  --fx-paper: #f8f7fb;
  --fx-ok: #15803d;
  --fx-ok-bg: #e7f6ec;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--fx-ink);
}
.rffx *, .rffx *::before, .rffx *::after { box-sizing: border-box; }
.rffx svg { flex: none; }
.rffx__wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Fil d'Ariane */
.rffx-crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 24px; padding: 0; list-style: none; font-size: 13px; font-weight: 600; color: var(--fx-ink3); }
.rffx-crumb a { color: var(--fx-ink2); text-decoration: none; }
.rffx-crumb a:hover { color: var(--fx-primary); }
.rffx-crumb li + li::before { content: "/"; margin-right: 8px; color: var(--fx-rule); }

/* Boutons */
.rffx-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.rffx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .1s ease;
}
.rffx-btn svg { width: 18px; height: 18px; fill: currentColor; }
.rffx-btn:active { transform: translateY(1px); }
.rffx .rffx-btn--main { background: var(--fx-primary); color: #fff; }
.rffx .rffx-btn--main:hover { background: var(--fx-pressed); color: #fff; }
.rffx .rffx-btn--soft { background: var(--fx-tint); color: var(--fx-primary); }
.rffx .rffx-btn--soft:hover { background: var(--fx-tint2); color: var(--fx-pressed); }
.rffx-note { margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--fx-ink3); }

/* En-tête */
.rffx-hero { padding: 56px 0 72px; background: var(--fx-paper); border-bottom: 1px solid var(--fx-rule); }
.rffx-hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; }
.rffx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px 6px 8px;
  border-radius: 999px; background: var(--fx-tint); color: var(--fx-primary);
  font-size: 13px; font-weight: 700;
}
.rffx-eyebrow svg { width: 18px; height: 18px; fill: currentColor; }
.rffx-hero h1 {
  margin: 0; font-size: clamp(32px, 3.9vw, 48px); line-height: 1.08; font-weight: 800; letter-spacing: -.035em; color: var(--fx-ink);
  text-wrap: balance;
}
.rffx-hero__lead { margin: 20px 0 0; max-width: 56ch; font-size: 18px; line-height: 1.6; color: var(--fx-ink2); }

/* Écrans de l'application, posés dans un panneau teinté et coupés en bas */
.rffx-phones {
  position: relative; height: 520px; overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start; gap: 20px;
  padding: 44px 28px 0; border-radius: 20px;
  background: var(--fx-tint); border: 1px solid var(--fx-tint2);
}
.rffx-phones img {
  display: block; width: 50%; max-width: 250px; height: auto;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -4px 28px -10px rgba(46, 16, 101, .38);
}
.rffx-phones img + img { margin-top: 64px; }
.rffx-phones--one img { width: 62%; max-width: 280px; }
.rffx-phones--short { height: 460px; }

/* Vue rapprochée d'un écran : une carte posée dans le panneau teinté */
.rffx-zoom {
  display: flex; align-items: center; justify-content: center; min-height: 460px;
  padding: 40px 32px; border-radius: 20px; background: var(--fx-tint); border: 1px solid var(--fx-tint2);
}
.rffx-zoom img {
  display: block; width: 100%; max-width: 440px; height: auto; border-radius: 20px; background: var(--fx-paper);
  box-shadow: 0 0 0 1px rgba(46, 16, 101, .06), 0 28px 56px -28px rgba(46, 16, 101, .45);
}

/* Sections explicatives, texte et écran en alternance */
.rffx-split { padding: 88px 0; }
.rffx-split + .rffx-split { padding-top: 0; }
.rffx-split__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.rffx-split--flip .rffx-split__text { order: 2; }
.rffx-step { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 18px; border-radius: 12px; background: var(--fx-primary); color: #fff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rffx-split h2 { margin: 0; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.03em; color: var(--fx-ink); text-wrap: balance; }
.rffx-split__text > p { margin: 16px 0 0; font-size: 16px; line-height: 1.7; color: var(--fx-ink2); max-width: 60ch; }
.rffx-checks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.rffx-checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--fx-ink); }
.rffx-checks svg { width: 22px; height: 22px; padding: 4px; margin-top: 0; border-radius: 999px; background: var(--fx-ok-bg); fill: var(--fx-ok); }

/* Formules concernées */
.rffx-plan { padding: 0 0 88px; }
.rffx-plan__box {
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
  padding: 24px 28px; border-radius: 20px; background: #fff; border: 1px solid var(--fx-rule);
  box-shadow: 0 1px 2px rgba(46, 16, 101, .04), 0 18px 40px -30px rgba(46, 16, 101, .35);
}
.rffx-plan__box h2 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--fx-ink); }
.rffx-plan__box p { margin: 0; max-width: 70ch; font-size: 14px; line-height: 1.6; color: var(--fx-ink2); }
.rffx .rffx-plan__box a { flex: none; color: var(--fx-primary); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Guide fiscal (pages contrats et paiement, en français) */
.rffx-guide { padding: 0 0 88px; }
.rffx-guide .rfgf-wrap { margin: 0 auto; padding: 0; max-width: none; }

/* Appel final : un panneau violet plein, trois portes d'entrée */
.rffx-end { padding: 0 0 88px; }
.rffx-end__box { padding: 56px; border-radius: 20px; background: var(--fx-primary); color: #fff; }
.rffx-end__head { max-width: 640px; }
.rffx-end h2 { margin: 0; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: #fff; text-wrap: balance; }
.rffx-end__head p { margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.rffx-end__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.rffx .rffx-door {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 20px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff; text-decoration: none;
  transition: background-color .2s ease;
}
.rffx .rffx-door:hover { background: rgba(255, 255, 255, .18); }
.rffx .rffx-door--main { background: #fff; color: var(--fx-ink); border-color: #fff; }
.rffx .rffx-door--main:hover { background: var(--fx-tint); }
.rffx-door__icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; margin-bottom: 8px; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.rffx-door--main .rffx-door__icon { background: var(--fx-tint); }
.rffx-door__icon svg { width: 22px; height: 22px; fill: currentColor; }
.rffx-door--main .rffx-door__icon svg { fill: var(--fx-primary); }
.rffx-door strong { font-size: 17px; font-weight: 700; line-height: 1.3; }
.rffx-door span { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .82); }
.rffx-door--main span { color: var(--fx-ink2); }
.rffx-door__go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 700; }
.rffx-door--main .rffx-door__go { color: var(--fx-primary); }
.rffx-door__go svg { width: 16px; height: 16px; fill: currentColor; }

/* Les autres fonctionnalités */
.rffx-more { padding: 0 0 96px; }
.rffx-more h2 { margin: 0 0 24px; font-size: 22px; font-weight: 700; letter-spacing: -.025em; color: var(--fx-ink); }
.rffx-more__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rffx .rffx-more__card {
  display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 14px 16px; border-radius: 20px;
  background: #fff; border: 1px solid var(--fx-rule); color: var(--fx-ink); text-decoration: none;
  font-size: 14px; font-weight: 700; line-height: 1.35;
  transition: border-color .2s ease, background-color .2s ease;
}
.rffx .rffx-more__card:hover { border-color: var(--fx-tint2); background: var(--fx-paper); }
.rffx-more__icon { display: inline-flex; width: 40px; height: 40px; flex: none; align-items: center; justify-content: center; border-radius: 12px; background: var(--fx-tint); }
.rffx-more__icon svg { width: 22px; height: 22px; fill: var(--fx-primary); }

@media (max-width: 1024px) {
  .rffx-hero__grid, .rffx-split__grid { grid-template-columns: 1fr; gap: 40px; }
  .rffx-split--flip .rffx-split__text { order: 0; }
  .rffx-more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rffx-end__grid { grid-template-columns: 1fr; }
  .rffx-end__box { padding: 40px 28px; }
}
@media (max-width: 640px) {
  .rffx__wrap { padding: 0 16px; }
  .rffx-hero { padding: 32px 0 48px; }
  .rffx-hero__lead { font-size: 16px; }
  .rffx-btns .rffx-btn { width: 100%; }
  .rffx-phones { height: 420px; padding: 28px 14px 0; gap: 12px; }
  .rffx-phones img + img { margin-top: 44px; }
  .rffx-phones--one img { width: 74%; }
  .rffx-zoom { min-height: 0; padding: 24px 16px; }
  .rffx-split { padding: 56px 0; }
  .rffx-plan, .rffx-guide, .rffx-end { padding-bottom: 56px; }
  .rffx-plan__box { padding: 20px; }
  .rffx-end__box { padding: 32px 20px; }
  .rffx-more__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rffx-btn, .rffx-door, .rffx-more__card { transition: none; }
}
