/* =========================================================
   Deux formules : l'app Referaly ou votre app à votre marque.
   Bloc commun (accueil, pages métiers, app mobile, app web),
   posé par scripts/deux-formules.py entre les marqueurs
   <!-- DEUX-FORMULES:START --> et <!-- DEUX-FORMULES:END -->.
   Jetons du design system Referaly (DESIGN-SYSTEM.md).
   ========================================================= */

.rf2f {
  --rf-primary: #7c3aed;
  --rf-primary-pressed: #5b21b6;
  --rf-tint: #f1ebfe;
  --rf-tint2: #e4d8fc;
  --rf-ink: #1b1726;
  --rf-ink2: #625c73;
  --rf-ink3: #8a8499;
  --rf-rule: #e8e4f0;
  --rf-paper: #f8f7fb;
  --brand: #0f766e;
  --brand-tint: #e6f4f2;
  padding: 88px 0;
  background: var(--rf-paper);
  color: var(--rf-ink);
}
.rf2f__inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.rf2f__head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.rf2f__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--rf-ink);
}
.rf2f__sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--rf-ink2); }

.rf2f__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.rf2f__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 24px 28px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--rf-rule);
  box-shadow: 0 1px 2px rgba(46, 16, 101, .04), 0 12px 32px -18px rgba(46, 16, 101, .18);
}
.rf2f__card--brand {
  background: var(--brand-tint);
  border-color: transparent;
  transition: background-color .5s ease;
}

/* --- Visuel : la vraie capture de l'app dans un téléphone --- */
.rf2f__visual {
  position: relative;
  height: 340px;
  margin-bottom: 24px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--rf-tint);
}
.rf2f__card--brand .rf2f__visual { background: rgba(255, 255, 255, .55); }
.rf2f__phone {
  position: absolute;
  left: 50%;
  top: 28px;
  width: 236px;
  height: 500px;
  transform: translateX(-50%);
  border-radius: 30px;
  border: 7px solid var(--rf-ink);
  background: var(--rf-ink);
  overflow: hidden;
  box-shadow: 0 24px 40px -20px rgba(46, 16, 101, .45);
}
.rf2f__phone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  border-radius: 23px;
  transition: opacity .5s ease;
}
.rf2f__phone img[data-off] { opacity: 0; }

/* Plaquette « nom de l'app sur les stores », posée sur le visuel */
.rf2f__store {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px -10px rgba(46, 16, 101, .35);
}
.rf2f__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--rf-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow: hidden;
}
.rf2f__icon img { width: 28px; height: 28px; display: block; }
.rf2f__icon--referaly { background: var(--rf-tint); }
.rf2f__card--brand .rf2f__icon { background: var(--brand); transition: background-color .5s ease; }
.rf2f__store strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--rf-ink); }
.rf2f__store small { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--rf-ink2); }

/* Pastilles de couleur : essayer une marque */
.rf2f__swatches {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px -10px rgba(46, 16, 101, .35);
}
.rf2f__swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: var(--c);
  box-shadow: inset 0 0 0 2px #fff;
  outline: 2px solid transparent;
  outline-offset: 0;
  transition: outline-color .2s ease, transform .2s ease;
}
.rf2f__swatch:hover { transform: scale(1.08); }
.rf2f__swatch[aria-pressed="true"] { outline-color: var(--c); }
.rf2f__swatch:focus-visible { outline-color: var(--rf-ink); }

/* --- Texte des cartes, même structure des deux côtés --- */
.rf2f__card h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; color: var(--rf-ink); }
.rf2f__promise { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: var(--rf-ink2); }
.rf2f__list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.rf2f__list li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.5; color: var(--rf-ink); }
.rf2f__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--rf-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.rf2f__card--brand .rf2f__list li::before { background-color: #fff; }
.rf2f__price {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rf-rule);
  font-size: 15px;
  line-height: 1.5;
  color: var(--rf-ink2);
  font-variant-numeric: tabular-nums;
}
.rf2f__card--brand .rf2f__price { border-top-color: rgba(27, 23, 38, .1); }
.rf2f__price strong { color: var(--rf-ink); font-weight: 800; }

.rf2f__cta { margin-top: 32px; text-align: center; }
.rf2f__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: 14px;
  background: var(--rf-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(46, 16, 101, .55);
  transition: background-color .2s ease, transform .1s ease;
}
.rf2f__btn:hover { background: var(--rf-primary-pressed); color: #fff; }
.rf2f__btn:active { transform: translateY(1px); }
.rf2f__btn svg { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .rf2f { padding: 64px 0; }
  .rf2f__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rf2f__inner { padding: 0 16px; }
  .rf2f__card { padding: 16px 16px 24px; }
  .rf2f__visual { height: 260px; }
  .rf2f__btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .rf2f__card--brand, .rf2f__icon, .rf2f__phone img, .rf2f__swatch { transition: none; }
}
