/* Réseaux, suite : compteur de caractères, lien WhatsApp, aperçu de grille Instagram */

/* ── Compteur de caractères ── */
.rp-zone { min-height: 150px; }
.rp-total { min-height: 20px; font-size: 14px; color: var(--muted); }
.rp-lignes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-ligne { display: grid; gap: 7px; align-content: start; min-width: 0; padding: 13px 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); --jauge: #17a35c; }
.rp-ligne[data-etat="juste"] { --jauge: #e08a00; }
.rp-ligne[data-etat="trop"] { --jauge: var(--red); background: var(--tint); box-shadow: 0 0 0 1px rgba(238, 47, 59, .35); }
.rp-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rp-nom { min-width: 0; font-size: 15px; color: var(--text); }
.rp-nom b { font: 600 15px/1.3 var(--head); color: var(--ink); }
.rp-compte { flex: none; font: 600 15px/1.3 var(--head); font-variant-numeric: tabular-nums; color: var(--ink); }
.rp-ligne[data-etat="trop"] .rp-compte { color: var(--red-deep); }
.rp-jauge { height: 8px; border-radius: 8px; background: var(--soft); overflow: hidden; }
.rp-ligne[data-etat="trop"] .rp-jauge { background: #fff; }
.rp-jauge i { display: block; height: 100%; border-radius: 8px; background: var(--jauge); transition: width .25s var(--ease), background .25s; }
.rp-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 13px; color: var(--muted); }
.rp-reste { font-weight: 600; color: var(--text); }
.rp-ligne[data-etat="trop"] .rp-reste { color: var(--red-deep); }
.rp-coupe { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; line-height: 1.4; color: var(--text); }
.rp-coupe span { min-width: 0; overflow-wrap: anywhere; }
.rp-voir { flex: none; height: 34px; padding: 0 12px; }

/* ── Lien WhatsApp ── */
.rp-msg { min-height: 96px; }
.rp-etat { margin: -4px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.rp-etat[data-genre="erreur"] { color: var(--red-deep); }
.rp-etat[data-genre="ok"] { color: #0b7a3b; }
.inp.rp-faux { border-color: var(--red); }
.rp-qr { position: relative; display: grid; place-items: center; width: 100%; max-width: 270px; }
.rp-qr canvas.rp-attente { opacity: .35; }
.rp-qr-vide { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; font-size: 15px; line-height: 1.45; text-align: center; color: var(--muted); }
.rp-lien { display: block; width: 100%; padding: 11px 13px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); font: 500 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; max-height: 132px; overflow-y: auto; user-select: all; }
.rp-lien.rp-attente { color: var(--muted); user-select: none; }
.rp-acts { justify-content: center; }
.rp-inactif { opacity: .6; pointer-events: none; }

/* ── Aperçu de grille Instagram ── */
.rp-plan { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.rp-tel { padding: 14px 0 0; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 34px -24px rgba(12, 12, 24, .4); overflow: hidden; }
.rp-profil { display: flex; align-items: center; gap: 18px; padding: 0 16px; }
.rp-avatar { flex: none; width: 58px; height: 58px; border-radius: 50%; background: #e4e4ea; }
.rp-chiffres { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rp-chiffres i { height: 26px; border-radius: 8px; background: linear-gradient(#e4e4ea 0 9px, transparent 9px 17px, #eeeef2 17px); }
.rp-bio { display: grid; gap: 7px; padding: 14px 16px 16px; }
.rp-bio i { height: 8px; width: 38%; border-radius: 8px; background: #e4e4ea; }
.rp-bio i + i { width: 62%; background: #eeeef2; }
.rp-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.rp-case { position: relative; display: block; min-width: 0; padding: 0; aspect-ratio: var(--rapport, .75); background: var(--soft); overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rp-case img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.rp-case.choisie::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--red); }
.rp-case.porte { z-index: 3; cursor: grabbing; border-radius: 6px; box-shadow: 0 16px 30px -10px rgba(12, 12, 24, .55); }
.rp-grille.tri .rp-case:not(.porte) { opacity: .82; }
.rp-cote { display: grid; gap: 14px; align-content: start; min-width: 0; }
.rp-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); }
.rp-choix button { height: 40px; border-radius: 11px; font: 600 14px/1 var(--body); color: var(--muted); transition: background .2s, color .2s; }
.rp-choix button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(12, 12, 24, .08); }
.rp-detail { display: grid; gap: 10px; justify-items: start; padding: 14px; border-radius: 16px; background: var(--soft); }
.rp-vue { position: relative; width: 100%; max-width: 240px; max-height: 300px; border-radius: 10px; overflow: hidden; background: #000; }
.rp-vue img { display: block; width: 100%; height: 100%; object-fit: fill; }
.rp-cadre { position: absolute; box-shadow: 0 0 0 2px #fff, 0 0 0 999px rgba(12, 12, 24, .62); }
.rp-bilan { font-size: 15px; line-height: 1.45; color: var(--text); }

@media (max-width: 700px) {
  .rp-lignes { grid-template-columns: 1fr; }
  .rp-plan { grid-template-columns: 1fr; }
  /* la maquette laisse une marge de chaque côté : on peut faire défiler la page sans attraper une photo */
  .rp-tel { width: calc(100% - 56px); max-width: 340px; margin: 0 auto; }
}
