/* ZoneH24 — forum de test (23 oct 2026) : lecteur de réponses (assets/replies.js, reponses.php) */
/* Lecteur posé à côté du message (replies.js) : même haut et même hauteur que lui, le lecteur défile seul */
.rp-side { display: flex; flex-direction: column; }
.rp-flot { position: fixed; z-index: 20; margin: 0 !important; }   /* posé à l'écran (replies.js : top, left, width, height) : il reste quand la page défile */
.rp-flot > .rp { box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.rp-side > .rp { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rp-side .rp-scroll { flex: 1; min-height: 0; }
.rp { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius, 14px); overflow: hidden; }
.rp-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.rp-head b { font-size: 15px; color: var(--text); }
.rp-n { font-size: 12px; color: var(--text-muted); background: var(--bg-card2); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; }
.rp-page { margin-left: auto; color: var(--text-muted); text-decoration: none; font-size: 15px; padding: 2px 6px; border-radius: 8px; }
.rp-back, .rp-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 17px; cursor: pointer; line-height: 1; }
.rp-page:hover, .rp-back:hover, .rp-close:hover { background: var(--bg-card2); color: var(--text); }
.rp-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-h, var(--border)) transparent; }   /* petite barre de défilement */
.rp-flot .rp-scroll { overscroll-behavior: contain; }
@media (min-width: 901px) { .pd-reps .rp-scroll { overscroll-behavior: contain; } }
.rp-item { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .3s; }
.rp-item:hover { background: var(--bg-card2); }
/* Réponses d'une réponse, ouvertes sur place sous elle (24 oct 2026) */
.rp-item.rp-ouvert { background: var(--bg-card2); }
.rp-item.rp-ouvert .rp-rep { color: var(--accent1, #3b82f6); }
.rp-sous { margin-left: 34px; border-left: 2px solid var(--border); border-bottom: 1px solid var(--border); }
.rp-sous .rp-sous { margin-left: 22px; }
.rp-sous > .rp-item { padding: 9px 10px; }
.rp-sous > .rp-item:last-of-type { border-bottom: 0; }
.rp-sous > .rp-form-sous { padding: 6px 10px 8px; border-bottom: 0; }
.rp-sous > .rp-form-sous textarea { font-size: 14px; }
.rp-sous > .rp-form-sous:not(:focus-within) .rp-cnt { visibility: hidden; }   /* le compteur n'apparaît qu'en écrivant */
.rp-sous-wait, .rp-sous > .rp-empty { margin: 0; padding: 8px 12px; color: var(--text-muted); font-size: 13px; }
.rp-av img, .rp-av .avatar-init { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.rp-b { flex: 1; min-width: 0; }
.rp-h { font-size: 13px; }
.rp-h a { font-weight: 700; color: var(--text); text-decoration: none; }
.rp-t { color: var(--text-muted); font-size: 12px; }
.rp-b p { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: var(--text); word-break: break-word; }
.rp-act { display: flex; gap: 18px; margin-top: 6px; }
.rp-act button, .rp-act > span { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--text-muted); font-size: 13px; padding: 4px 6px; margin-left: -6px; border-radius: 14px; cursor: pointer; }
.rp-act button:hover { background: var(--bg-card2); color: var(--text); }
.rp-like.liked { color: var(--like, #ff4d7d); }
/* Fil au-dessus de la réponse ouverte : trait qui relie, comme sur X */
.rp-ctx { border-bottom: 0; position: relative; }
.rp-ctx::before { content: ''; position: absolute; left: 28px; top: 48px; bottom: -4px; width: 2px; background: var(--border); }
.rp-orig .rp-clip { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rp-focus { cursor: default; background: transparent !important; }
.rp-focus p { font-size: 16px; }
.rp-new { background: rgba(59,130,246,.14); }
.rp-form { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.rp-form textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--border); color: var(--text); padding: 6px 2px; font: inherit; font-size: 15px; resize: none; min-height: 34px; max-height: 30vh; overflow-y: auto; }
.rp-form textarea:focus { outline: none; border-bottom-color: var(--accent1, #3b82f6); }
.rp-f { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.rp-cnt { font-size: 11px; color: var(--text-muted); }
.rp-login { padding: 12px; text-align: center; border-bottom: 1px solid var(--border); }
.rp-empty { padding: 18px 12px; margin: 0; text-align: center; color: var(--text-muted); font-size: 13px; }
/* Sous le message (téléphone, ou 💬) */
.rp-inline { margin: 8px 0 14px; position: relative; }   /* un bloc à part sous le message, comme les autres blocs */
/* Réponses sous le message (23 oct 2026, Gérald) : zone de hauteur limitée qui défile, comme le bloc à côté */
.rp-inline .rp-scroll { max-height: clamp(300px, 60vh, 600px); }   /* réglé au pixel près par replies.js (ajusterDessous) */
@media (min-width: 901px) { .rp-inline .rp-scroll { overscroll-behavior: contain; } }

/* Défilement automatique au clic molette (23 oct 2026) : point de départ, curseur, badge « Défilement auto ✕ » */
.rp-auto-mk { position: fixed; z-index: 9999; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; pointer-events: none;
              display: grid; place-items: center; font-size: 17px; line-height: 1; color: var(--text, #e6e9ef);
              background: var(--bg-card, #16212d); box-shadow: 0 0 0 1px var(--border, #2a3747), 0 2px 8px rgba(0,0,0,.35); }
.rp-auto, .rp-auto * { cursor: ns-resize !important; }
.rp-auto.rp-auto-s, .rp-auto.rp-auto-s * { cursor: s-resize !important; }
.rp-auto.rp-auto-n, .rp-auto.rp-auto-n * { cursor: n-resize !important; }
.rp-auto-pill { position: absolute; right: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
                padding: 4px 10px; border-radius: 999px; border: 0; font: 600 12px/1.2 inherit; cursor: pointer !important;
                background: var(--t-accent, #f4b860); color: var(--t-accent-text, #1a1206); opacity: .92; }
.rp-auto-pill b { font-weight: 700; }

/* 23 oct 2026 (Gérald) : « Répondre à @… » doit se lire comme une indication (où écrire), pas comme un texte déjà écrit */
.rp-form textarea::placeholder { color: var(--text-muted, #8f98a8); -webkit-text-fill-color: var(--text-muted, #8f98a8); opacity: .55; }

/* 23 oct 2026 (Gérald, d'après Voice) : bloc à côté — la zone pour répondre en bas du bloc, champ arrondi + bouton rond ➤ */
.rp-bas { flex: none; border-top: 1px solid var(--border); padding: 10px 12px; }
.rp-bas .rp-form { padding: 0; border: 0; display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.rp-bas .rp-form textarea { flex: 1; min-width: 0; box-sizing: border-box; min-height: 40px; max-height: 120px; padding: 9px 12px;
                            font-size: 14.5px; line-height: 20px; scrollbar-width: none;   /* pas de petites flèches de défilement */
                            border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input, transparent); }
.rp-bas .rp-form textarea::-webkit-scrollbar { display: none; }
.rp-bas .rp-form textarea:focus { border-color: var(--accent1, #3b82f6); }
.rp-bas .rp-f { display: contents; }
.rp-bas .rp-send { order: 1; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
                   display: grid; place-items: center; font-size: 16px; line-height: 1;
                   background: var(--t-accent, var(--accent1, #3b82f6)); color: var(--t-accent-text, #fff); }
.rp-bas .rp-send:disabled { opacity: .4; cursor: default; }
.rp-bas .rp-cnt { order: 2; flex-basis: 100%; margin: -2px 0 0 4px; }
.rp-bas .rp-form:not(:focus-within) .rp-cnt { display: none; }   /* le compteur n'apparaît qu'en écrivant */
.rp-bas .rp-login { padding: 0; border: 0; }
