/* Scène « Le rapprochement » — Moyens de paiement. À plat : traits, aplats, bordures fines. Classes préfixées rp-. */
.rp-banque, .rp-pastille, .rp-nom, .rp-route, .rp-ech, .rp-lot, .rp-feuille, .rp-ligne, .rp-facture, .rp-zone, .rp-etat { position: absolute; left: 0; top: 0; }

/* La banque : un pictogramme au trait */
.rp-banque { width: 76px; height: 66px; will-change: transform; }
.rp-banque svg { display: block; width: 100%; height: 100%; fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Intitulés : deux ou trois mots, pas plus */
.rp-nom, .rp-zt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1; white-space: nowrap; }
.rp-nom { transform: translateY(-50%); opacity: 0; }
.rp-nom.rp-axe { transform: translate(-50%, -50%); opacity: 1; }

/* Le chemin du lot vers la banque */
.rp-route { width: 0; border-left: 2px dashed var(--accent); opacity: 0; }
.rp-route::before { content: ""; position: absolute; left: -6px; top: -1px; width: 10px; height: 10px; border-left: 2px solid var(--accent); border-top: 2px solid var(--accent); transform: rotate(45deg); }

/* Les cartes : échéances (temps 1), lignes du relevé et factures (temps 2) */
.rp-ech, .rp-ligne, .rp-facture { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line-fort); color: var(--ink); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.rp-ech span, .rp-ligne span, .rp-facture span { margin-left: auto; }
.rp-ech { display: block; padding: 0; border-radius: 11px; font-size: 14.5px; }
.rp-dans { display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 16px 0 14px; }
.rp-ligne { padding-right: 16px; }
.rp-facture { padding-left: 16px; }
.rp-ech span { font-weight: 600; color: var(--text); }
.rp-ligne i { font-style: normal; font-weight: 600; color: var(--muted); }
.rp-doc { flex: none; width: 12px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linejoin: round; }

/* La case à cocher d’une échéance, et la coche (commune aux pastilles) */
.rp-case { position: relative; flex: none; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--line-fort); }
.rp-plein { position: absolute; inset: -1.5px; display: grid; place-items: center; border-radius: 5px; background: var(--accent-fonce); opacity: 0; }
.rp-v { display: block; width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rp-pastille { display: grid; place-items: center; border-radius: 50%; background: var(--accent-fonce); opacity: 0; z-index: 7; will-change: transform, opacity; }

/* Le lot : un paquet, son total. Seul objet qui flotte (il voyage) */
.rp-lot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-radius: 13px; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--flottant); color: var(--ink); line-height: 1; white-space: nowrap; opacity: 0; z-index: 5; will-change: transform, opacity; }
.rp-lot div { display: grid; gap: 8px; }
.rp-lot div b { font-size: 15px; font-weight: 700; }
.rp-lot div i { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-lot span { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-lot span b { font-size: 19px; font-weight: 700; color: var(--accent-texte); }

/* Le relevé : une feuille, un emplacement par ligne. Une ligne partie laisse son emplacement, pointé */
.rp-feuille, .rp-zone { border-radius: 14px; background: var(--bg-doux); border: 1px solid var(--line); opacity: 0; }
.rp-trace { position: absolute; display: grid; place-items: center; border-radius: 9px; border: 1px dashed var(--line-fort); }
.rp-trace .rp-v { stroke: var(--muted); opacity: 0; }
.rp-trace.alerte { border-color: var(--ambre); }

/* La paire : même montant, les deux cartes n’en font plus qu’une */
.rp-ligne.ok, .rp-facture.ok { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } /* contour de 2 px, sans changer la boîte */
.rp-ligne.ok span, .rp-facture.ok span { color: var(--accent-texte); }
.rp-ligne.ok { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rp-facture.ok { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* La zone « Rapproché » */
.rp-zt { position: absolute; left: 16px; top: 16px; }
.rp-compte { position: absolute; right: 10px; top: 9px; padding: 4px 11px; border-radius: var(--r-pilule); font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
/* Temps fort : tout ce qui pouvait se rapprocher l’est, l’exception est signalée ; le compte passe en aplat */
.rp-compte.fait { background: var(--accent-fonce); color: #fff; }

/* L’exception : la seule ligne qui demande quelqu’un */
.rp-ligne.alerte { border-color: var(--ambre); }
.rp-ligne.alerte i, .rp-ligne.alerte span { color: var(--ambre-texte); }
.rp-etat { transform: translate(-50%, -50%); padding: 5px 12px; border-radius: var(--r-pilule); background: var(--surface); border: 1px solid var(--ambre); font-size: 12px; font-weight: 700; color: var(--ambre-texte); line-height: 1.2; white-space: nowrap; opacity: 0; }

/* Relief : la feuille du relevé et la zone « Rapproché » sont le support ; la banque et les échéances sont posées ;
   lignes et factures glissent à la même hauteur (une paire reste d’un seul tenant) ; le lot, qui voyage, est tenu en main. */
.rp-banque { translate: 0 0 calc(10px * var(--relief)); }
.rp-ech, .rp-ligne, .rp-facture, .rp-etat, .rp-pastille { translate: 0 0 calc(14px * var(--relief)); }
.rp-lot, .rp-pastille.rp-haut { translate: 0 0 calc(40px * var(--relief)); }

/* Petit écran : composition verticale, cartes plus petites */
.rp-compact .rp-banque svg { stroke-width: 3.4; }
.rp-compact .rp-nom, .rp-compact .rp-zt { font-size: 10.5px; }
.rp-compact .rp-ech { border-radius: 9px; font-size: 12.5px; }
.rp-compact .rp-dans { gap: 9px; padding: 0 13px 0 10px; }
.rp-compact .rp-case { width: 16px; height: 16px; border-radius: 4px; }
.rp-compact .rp-plein { border-radius: 4px; }
.rp-compact .rp-v { width: 10px; height: 10px; }
.rp-compact .rp-lot { padding: 0 14px; border-radius: 11px; }
.rp-compact .rp-lot div { gap: 5px; }
.rp-compact .rp-lot div b { font-size: 12.5px; }
.rp-compact .rp-lot div i { font-size: 11px; }
.rp-compact .rp-lot span { font-size: 10.5px; }
.rp-compact .rp-lot span b { font-size: 15px; }
.rp-compact .rp-ligne, .rp-compact .rp-facture { gap: 6px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; }
.rp-compact .rp-ligne i { font-size: 10.5px; letter-spacing: .04em; }
.rp-compact .rp-doc { width: 10px; height: 12px; }
.rp-compact .rp-feuille, .rp-compact .rp-zone { border-radius: 10px; }
.rp-compact .rp-trace { border-radius: 7px; }
.rp-compact .rp-ligne.ok { border-radius: 7px 7px 0 0; }
.rp-compact .rp-facture.ok { border-radius: 0 0 7px 7px; }
.rp-compact .rp-zt { left: 10px; top: 10px; }
.rp-compact .rp-compte { right: 8px; top: 6px; padding: 3px 9px; font-size: 13px; }
.rp-compact .rp-etat { padding: 3px 9px; font-size: 11px; }
/* Relief plus bas : la feuille du relevé ne fait qu’une rangée, une ligne trop haute en déborderait */
.rp-compact .rp-banque { translate: 0 0 calc(6px * var(--relief)); }
.rp-compact .rp-ech, .rp-compact .rp-ligne, .rp-compact .rp-facture, .rp-compact .rp-etat, .rp-compact .rp-pastille { translate: 0 0 calc(8px * var(--relief)); }
.rp-compact .rp-lot, .rp-compact .rp-pastille.rp-haut { translate: 0 0 calc(28px * var(--relief)); }
