/* ===== Parrainage : castor sur le lac (eau animée) + messages qui arrivent ===== */
/* Vitre du téléphone : un peu plus grande que le trou du cadre, les bords passent sous la bordure */
.lr-par-vitre { position: absolute; left: 31px; top: 64px; width: 442px; height: 496px; overflow: hidden; border-radius: 56px 56px 0 0; background: #6d7470; }
.lr-par-photo { position: absolute; left: -121.5px; top: -10px; width: 699px; height: 932px; max-width: none; }
.lr-par-eau { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.lr-par-eau.pret { opacity: 1; }
.lr-par-cadre { position: absolute; left: -30px; top: 0; width: 566px; height: 566px; max-width: none; pointer-events: none; }

/* Bulles : mêmes positions que la maquette */
.lr-par-fil { position: absolute; inset: 0; }
.lr-msg { position: absolute; box-sizing: border-box; display: flex; align-items: center; border-radius: 24px; font: 500 17px/21.5px -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", system-ui, sans-serif; letter-spacing: -0.35px; box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  opacity: 0; transform: translateY(14px) scale(.86); transition: opacity .35s ease, transform .55s cubic-bezier(0.34, 1.56, 0.64, 1), width .45s cubic-bezier(0.22, 1, 0.36, 1), height .45s cubic-bezier(0.22, 1, 0.36, 1); }
.lr-msg--moi { background: #1b1b1b; color: #fff; padding: 0 20px; transform-origin: 100% 100%; }
.lr-msg--lui { background: #fff; color: #111; padding: 0 20px; transform-origin: 0 100%; }
.lr-msg--penche { --rot: -1.6deg; padding: 0 20px; }
.lr-msg-texte { display: block; white-space: nowrap; opacity: 0; transition: opacity .3s ease .12s; }
.lr-msg-points { position: absolute; top: 50%; display: flex; gap: 5px; margin-top: -4px; opacity: 0; transition: opacity .2s ease; }
.lr-msg--moi .lr-msg-points { right: 20px; }
.lr-msg--lui .lr-msg-points { left: 20px; }
.lr-msg-points i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .35; animation: lr-points 1.1s ease-in-out infinite; }
.lr-msg-points i:nth-child(2) { animation-delay: .15s; }
.lr-msg-points i:nth-child(3) { animation-delay: .3s; }
@keyframes lr-points { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: .9; transform: translateY(-3px); } }

/* 1. « en train d'écrire » : petite bulle avec les trois points, ancrée du bon côté */
.lr-msg.lr-msg--ecrit { opacity: 1; transform: rotate(var(--rot, 0deg)); }
.lr-msg.lr-msg--ecrit .lr-msg-points { opacity: 1; }
/* 2. le message apparaît */
.lr-msg.lr-msg--vu { opacity: 1; transform: rotate(var(--rot, 0deg)); }
.lr-msg.lr-msg--vu .lr-msg-texte { opacity: 1; }

/* Sans animation (préférence de l'appareil ou JavaScript absent) : tout est visible */
html:not(.lr-anim) .lr-msg, .lr-par-statique .lr-msg { opacity: 1; transform: rotate(var(--rot, 0deg)); }
html:not(.lr-anim) .lr-msg-texte, .lr-par-statique .lr-msg-texte { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .lr-msg { opacity: 1; transform: rotate(var(--rot, 0deg)); transition: none; }
  .lr-msg-texte { opacity: 1; transition: none; }
  .lr-msg-points { display: none; }
}
