/* ===========================================================
   À DISTANCE — une messagerie nocturne au-dessus de la ville
   =========================================================== */
body.distance {
  --theme: #3a7bd5;
  --theme-2: #ff6fa0;
  --bulle-jeu: #1d2742;
  --bulle-moi: linear-gradient(135deg, #ff6fa0, #c2185b);
  --panneau: rgba(14, 20, 40, 0.88);
  background: #0a1020;
}
.distance .marque h1 em { color: var(--theme-2); text-shadow: 0 0 24px rgba(255, 111, 160, 0.6); }
.ville { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, #0a1020 0%, #16204a 60%, #2b1a4a 100%); }
.lumieres {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38vh;
  background:
    radial-gradient(circle, rgba(255, 210, 120, 0.8) 0 1.2px, transparent 2px) 0 0 / 18px 22px,
    radial-gradient(circle, rgba(140, 190, 255, 0.6) 0 1px, transparent 1.6px) 9px 11px / 26px 30px,
    linear-gradient(180deg, transparent, rgba(6, 10, 24, 0.95) 30%);
  -webkit-mask-image: linear-gradient(to top, #000 60%, transparent);
  mask-image: linear-gradient(to top, #000 60%, transparent);
  animation: clignote 5s steps(4) infinite;
  opacity: 0.55;
}
@keyframes clignote { 50% { background-position: 3px 0, 12px 11px, 0 0; } }

.lien-coeurs { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 2.2rem; }
.lien-coeurs i { position: relative; width: 70px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #3a7bd5, #ff6fa0); box-shadow: 0 0 12px #ff6fa0; }
.lien-coeurs i::after { content: '♥'; position: absolute; top: 50%; left: 0; transform: translate(-50%, -55%); font-size: 1rem; color: #ff6fa0; animation: voyage 2s ease-in-out infinite; }
@keyframes voyage { 50% { left: 100%; } }
.segments.petits button { font-size: 0.75rem; padding: 9px 0; }
.note-privee { margin: -4px 0 0; font-size: 0.74rem; color: var(--muted); text-align: center; line-height: 1.4; }

/* ---------- Conversation ---------- */
.chat-ecran { gap: 8px; padding-left: 10px; padding-right: 10px; }
.chat-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.connexion { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.perso.mini { width: 46px; height: 58px; border-radius: 50% 50% 14px 14px; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.12), transparent 70%); overflow: hidden; flex: none; }
.faisceau-lien { position: relative; flex: 1; max-width: 140px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #3a7bd5, #ff6fa0); box-shadow: 0 0 12px #ff6fa0; }
.faisceau-lien i { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px #ff6fa0; transform: translate(-50%, -50%); animation: voyage 2.4s ease-in-out infinite; }
.faisceau-lien .km { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-size: 0.66rem; color: var(--muted); white-space: nowrap; }

.fil { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 10px; scroll-behavior: smooth; }
.bulle-msg { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 0.95rem; line-height: 1.4; animation: arrive 0.35s cubic-bezier(.2, 1.3, .4, 1); overflow-wrap: anywhere; }
.bulle-msg.jeu { align-self: flex-start; background: var(--bulle-jeu); border: 1px solid rgba(255, 255, 255, 0.08); border-bottom-left-radius: 6px; }
.bulle-msg.moi { align-self: flex-end; background: var(--bulle-moi); color: #fff; border-bottom-right-radius: 6px; }
.bulle-msg.systeme { align-self: center; max-width: 90%; background: none; color: var(--muted); font-size: 0.78rem; text-align: center; padding: 2px 8px; }
.bulle-msg.defi { border: 1px solid rgba(255, 111, 160, 0.5); box-shadow: 0 0 24px -8px #ff6fa0; }
.bulle-msg .type { display: inline-block; margin-bottom: 6px; padding: 3px 9px; border-radius: 999px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(255, 111, 160, 0.18); color: #ff9fbf; }
.bulle-msg .defi-texte { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; line-height: 1.25; color: #fff; }
.ecrit { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--bulle-jeu); }
.ecrit i { width: 7px; height: 7px; border-radius: 50%; background: #8fa2d6; animation: points 1s ease-in-out infinite; }
.ecrit i:nth-child(2) { animation-delay: 0.15s; }
.ecrit i:nth-child(3) { animation-delay: 0.3s; }
@keyframes points { 50% { transform: translateY(-5px); opacity: 0.5; } }
@keyframes arrive { from { opacity: 0; transform: translateY(10px) scale(0.95); } }

.barre-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; flex: none; padding-bottom: 2px; }
.action-chat { min-height: 46px; padding: 8px 6px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(29, 39, 66, 0.9); color: var(--text); font: 700 0.84rem var(--sans); cursor: pointer; }
.action-chat.principale { background: var(--bulle-moi); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(194, 24, 91, 0.4); }
.action-chat:disabled { opacity: 0.4; cursor: default; }
.action-chat:active { transform: scale(0.97); }

/* ---------- Partage ---------- */
.voile { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 8, 18, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.voile[hidden] { display: none !important; }
.feuille { width: 100%; max-width: 520px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #121a33; border-top: 1px solid rgba(255, 255, 255, 0.12); animation: monte 0.35s cubic-bezier(.2, 1.1, .4, 1); }
@keyframes monte { from { transform: translateY(100%); } }
.feuille h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.6rem; }
.apercu { margin: 0 0 14px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); font-size: 0.92rem; line-height: 1.45; white-space: pre-line; }
.partages { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.partage { display: grid; place-items: center; min-height: 48px; border-radius: 14px; font: 700 0.95rem var(--sans); text-decoration: none; border: 0; cursor: pointer; color: #fff; }
.partage.wa { background: #1fa855; }
.partage.sms { background: #3a7bd5; }
.partage.autre { background: #6b3fa0; }
.partage.copie { background: rgba(255, 255, 255, 0.1); }
