/* =========================================================
   Lead magnet « Le guide fiscal de l'apporteur d'affaires » (25/10/2026).
   Posé par scripts/guide-fiscal.py entre <!-- GUIDE-FISCAL:START/END -->.
   Accueil, articles du blog et pages piliers : le bloc s'adapte à la largeur
   de son conteneur (deux colonnes, ou empilé dans une colonne d'article).
   Jetons du design system Referaly.
   ========================================================= */

.rfgf-wrap {
  --gf-primary: #7c3aed;
  --gf-pressed: #5b21b6;
  --gf-tint: #f1ebfe;
  --gf-tint2: #e4d8fc;
  --gf-ink: #1b1726;
  --gf-ink2: #625c73;
  --gf-ink3: #8a8499;
  --gf-rule: #e8e4f0;
  --gf-paper: #f8f7fb;
  container-type: inline-size;
  max-width: 1040px;
  margin: 48px auto;
  padding: 0 24px;
  color: var(--gf-ink);
}
.rfgf-wrap--inline { max-width: none; margin: 24px 0 0; padding: 0; }

.rfgf {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--gf-rule);
  box-shadow: 0 1px 2px rgba(46, 16, 101, .04), 0 18px 40px -28px rgba(46, 16, 101, .35);
}

.rfgf__intro { display: grid; grid-template-columns: 192px minmax(0, 1fr); gap: 28px; align-items: center; }

/* Couverture du guide, dessinée pour sa taille d'affichage : le texte suit la largeur (cqi). */
.rfgf__book {
  position: relative;
  container-type: inline-size;
  margin: 6px 10px 10px 4px;
  transform: rotate(-3deg);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.rfgf__book::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--gf-tint2);
  transform: translate(7px, 5px) rotate(4deg);
}
.rfgf__face {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 210 / 297;
  padding: 10cqi 9cqi 9cqi 12cqi;
  border-radius: 14px;
  overflow: hidden;
  background: var(--gf-primary);
  color: #fff;
  box-shadow: 0 18px 32px -16px rgba(46, 16, 101, .55);
}
.rfgf__face::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4cqi; background: rgba(46, 16, 101, .28); }
.rfgf__face p { margin: 0; }
.rfgf__brand { display: flex; align-items: center; gap: 4cqi; font-size: 7.5cqi; font-weight: 800; letter-spacing: -.01em; }
.rfgf__brand img { width: 13cqi; height: 13cqi; padding: 1.6cqi; border-radius: 3.6cqi; background: #fff; }
.rfgf__face .rfgf__book-title { margin-top: auto; font-size: 10.8cqi; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.rfgf__face .rfgf__book-sub { margin-top: 5cqi; font-size: 6.4cqi; line-height: 1.35; font-weight: 500; color: var(--gf-tint); }
.rfgf__face .rfgf__book-foot { display: flex; justify-content: space-between; gap: 3cqi; margin-top: 9cqi; padding-top: 5cqi; border-top: 1px solid rgba(255, 255, 255, .24); font-size: 6cqi; font-weight: 700; white-space: nowrap; color: var(--gf-tint2); }
.rfgf:hover .rfgf__book { transform: rotate(-1deg) translateY(-3px); }

/* Vignette des blocs posés avant le 25/10 dans les articles du blog automatique */
.rfgf__cover {
  display: block;
  width: 132px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 16px 32px -16px rgba(46, 16, 101, .45);
  transform: rotate(-2deg);
}
.rfgf__intro:has(> .rfgf__cover) { grid-template-columns: 132px minmax(0, 1fr); gap: 24px; align-items: start; }
.rfgf__eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gf-primary); }
.rfgf__title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; color: var(--gf-ink); }
.rfgf__lead { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--gf-ink2); }
.rfgf__list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.rfgf__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--gf-ink); }
.rfgf__list svg { flex: none; width: 18px; height: 18px; margin-top: 1px; padding: 3px; border-radius: 999px; background: var(--gf-tint); fill: var(--gf-primary); }

.rfgf__form { padding: 24px; border-radius: 20px; background: var(--gf-paper); border: 1px solid var(--gf-rule); }
.rfgf__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rfgf__field { display: grid; gap: 6px; margin-bottom: 12px; }
.rfgf__field label { font-size: 12px; font-weight: 600; color: var(--gf-ink); }
.rfgf__field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--gf-rule);
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--gf-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rfgf__field input:focus { outline: none; border-color: var(--gf-primary); box-shadow: 0 0 0 4px var(--gf-tint); }
.rfgf__field input[aria-invalid="true"] { border-color: #b91c1c; }
.rfgf__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.rfgf__btn,
.rfgf a.rfgf__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--gf-primary);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .1s ease;
}
.rfgf__btn svg { width: 18px; height: 18px; fill: currentColor; }
.rfgf__btn:hover, .rfgf a.rfgf__btn:hover { background: var(--gf-pressed); color: #fff; }
.rfgf__btn:active { transform: translateY(1px); }
.rfgf__btn:disabled { background: var(--gf-tint2); color: var(--gf-primary); cursor: default; }
.rfgf__error { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: #b91c1c; }
.rfgf__note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--gf-ink2); }
.rfgf__note a, .rfgf a.rfgf__link { color: var(--gf-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Après l'envoi */
.rfgf__done { text-align: center; padding: 8px 4px; }
.rfgf__done-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 999px; background: #e7f6ec; }
.rfgf__done-icon svg { width: 22px; height: 22px; fill: #15803d; }
.rfgf__done h3 { margin: 12px 0 6px; font-size: 18px; font-weight: 700; color: var(--gf-ink); }
.rfgf__done p { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--gf-ink2); }
.rfgf__done .rfgf__link { display: inline-block; margin-top: 14px; font-size: 14px; }

@container (max-width: 900px) {
  .rfgf { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
}
@container (max-width: 440px) {
  .rfgf { padding: 20px; }
  .rfgf__intro, .rfgf__intro:has(> .rfgf__cover) { grid-template-columns: 1fr; gap: 20px; }
  .rfgf__book { width: 152px; }
  .rfgf__cover { width: 112px; }
  .rfgf__row { grid-template-columns: 1fr; gap: 0; }
  .rfgf__form { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rfgf__btn, .rfgf__book { transition: none; }
  .rfgf:hover .rfgf__book { transform: rotate(-3deg); }
}
