/* assets/css/rv_comments.css — v4.75.1 — widget commentaires (version legere) */
.rv-comments { margin-top: 0.3rem; }

/* Declencheur : simple lien texte discret (span, pas de bouton -> echappe le style California). */
.rv-cmt-toggle { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--text3); font-size: 0.76rem; font-weight: 600; padding: 1px 2px; border-radius: 6px; user-select: none; -webkit-user-select: none; line-height: 1.3; }
.rv-cmt-toggle:hover { color: var(--text2); }
.rv-cmt-toggle.rv-cmt-open { color: var(--accent2, #8b5cf6); }
.rv-cmt-ico { font-size: 0.82rem; }
.rv-cmt-n { font-variant-numeric: tabular-nums; }
.rv-cmt-lbl { font-weight: 600; }
.rv-cmt-see { color: var(--accent2, #8b5cf6); font-weight: 600; }
/* Placement inline (ex. a cote du coeur sur la fiche jeu). */
.rv-cmt-inline { display: inline-flex; vertical-align: middle; }
.rv-cmt-inline .rv-comments { margin-top: 0; }

/* Bandeau des derniers commentaires facon fil d actu (defilement en JS via requestAnimationFrame,
   transform inline en !important -> insensible au theme California). Clic -> pop-up. */
.rv-cmt-preview { display: block; max-width: 100%; margin: 2px 0; font-size: 0.75rem; color: var(--text2); cursor: pointer; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.rv-cmt-track { display: inline-flex; align-items: center; white-space: nowrap; will-change: transform; }
.rv-cmt-track b { color: var(--text); font-weight: 600; }
.rv-cmt-sep { color: var(--accent2, #8b5cf6); margin: 0 0.5rem; }

/* ===== Mini pop-up (modale) de commentaires ===== */
.rv-cmt-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-end; justify-content: center; }
.rv-cmt-modal[hidden] { display: none; }
.rv-cmt-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.rv-cmt-dialog { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 480px; max-height: 82vh; background: var(--bg3, #fff); border: 1px solid var(--border); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 44px rgba(0,0,0,0.35); overflow: hidden; }
.rv-cmt-mhead { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
.rv-cmt-mtitle { font-weight: 700; font-size: 0.9rem; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-cmt-mt2 { font-weight: 500; color: var(--text2); }
.rv-cmt-close { flex: none; cursor: pointer; color: var(--text3); font-size: 0.9rem; line-height: 1; padding: 3px 7px; border-radius: 7px; user-select: none; -webkit-user-select: none; }
.rv-cmt-close:hover { color: var(--text); background: var(--bg2); }
.rv-cmt-mbody { flex: 1; overflow-y: auto; padding: 0.85rem 1rem; min-height: 90px; }
.rv-cmt-mfoot { padding: 0.7rem 1rem; border-top: 1px solid var(--border); background: var(--bg3, #fff); }
@media (min-width: 640px) {
  .rv-cmt-modal { align-items: center; }
  .rv-cmt-dialog { border-radius: 16px; max-height: 76vh; }
}

/* Fil : pas d encadre lourd, juste un leger retrait. */
.rv-cmt-panel { margin-top: 0.35rem; padding: 0.15rem 0 0 0.1rem; }
.rv-cmt-list { display: flex; flex-direction: column; gap: 0.7rem; }
.rv-cmt { font-size: 0.82rem; line-height: 1.4; }
.rv-cmt-head { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.rv-cmt-meta { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.rv-cmt-track .rv-badge, .rv-cmt-track .rv-lvl, .rv-cmt-meta .rv-badge, .rv-cmt-meta .rv-lvl { vertical-align: middle; }
.rv-cmt-track .rv-badge, .rv-cmt-track .rv-lvl { transform: scale(0.88); }
/* v5.35.5 — avatar (anneau cosmetique Vestiaire deja inclus par rvUserAvatarHtml cote
   serveur) + effet de nom sur le pseudo du bandeau qui defile, meme habillage que la
   modale de commentaires et les pastilles Suit/Suivi. */
.rv-cmt-tickauthor { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.rv-cmt-tickauthor .rv-ava { width: 18px !important; height: 18px !important; }
.rv-cmt-tickname { color: var(--text); font-weight: 600; }
.rv-cmt-author { font-weight: 600; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.rv-cmt-author:hover .rv-cmt-authorname { text-decoration: underline; }
/* v5.35.2 — avatar (avec anneau cosmetique Vestiaire deja inclus par rvUserAvatarHtml
   cote serveur) + effet de nom sur le pseudo, meme habillage que les chips Suit/Suivi. */
.rv-cmt-author .rv-ava { width: 22px !important; height: 22px !important; }
.rv-cmt-authorname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.rv-cmt-when { color: var(--text3); font-size: 0.68rem; }
/* Croix de suppression : discrete, en debut de ligne. */
.rv-cmt-del { cursor: pointer; color: var(--text3); opacity: 0.45; font-size: 0.68rem; line-height: 1; padding: 0 1px; user-select: none; -webkit-user-select: none; }
.rv-cmt-del:hover { opacity: 1; color: #dc2626; }
.rv-cmt-confirm { font-size: 0.7rem; color: var(--text2); white-space: nowrap; }
.rv-cmt-confirm .sep { color: var(--text3); margin: 0 1px; }
.rv-cmt-yes { color: #dc2626; font-weight: 600; cursor: pointer; }
.rv-cmt-no { color: var(--text3); font-weight: 600; cursor: pointer; }
.rv-cmt-txt { color: var(--text2); white-space: pre-wrap; word-break: break-word; margin-top: 1px; }
/* Votes pouce haut / bas : discrets, spans (hors style California). */
.rv-cmt-actions { display: flex; gap: 0.4rem; margin-top: 0.2rem; }
.rv-cmt-vote { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; color: var(--text3); font-size: 0.7rem; padding: 1px 6px; border-radius: 999px; user-select: none; -webkit-user-select: none; line-height: 1.4; }
.rv-cmt-vote:hover { background: var(--bg2); color: var(--text2); }
.rv-cmt-vote .ico { font-size: 0.78rem; filter: grayscale(0.5); }
.rv-cmt-vote.is-on .ico { filter: none; }
.rv-cmt-vote .n { font-variant-numeric: tabular-nums; }
.rv-cmt-up.is-on { color: #16a34a; background: rgba(22, 163, 74, 0.1); }
.rv-cmt-down.is-on { color: #dc2626; background: rgba(220, 38, 38, 0.1); }
.rv-cmt-empty, .rv-cmt-hint, .rv-cmt-loading { color: var(--text3); font-size: 0.76rem; font-style: italic; }

/* Saisie : slim, avec un petit bouton envoyer (span). */
.rv-cmt-form { display: flex; gap: 0.4rem; margin-top: 0.5rem; align-items: center; }
.rv-cmt-input { flex: 1; min-width: 0; padding: 0.32rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 0.82rem; }
.rv-cmt-input:focus { outline: none; border-color: var(--accent2, #8b5cf6); }
.rv-cmt-send { flex: none; cursor: pointer; padding: 0.32rem 0.7rem; border-radius: 8px; background: var(--accent2, #8b5cf6); color: #fff; font-size: 0.76rem; font-weight: 600; user-select: none; -webkit-user-select: none; line-height: 1.3; }
.rv-cmt-send:hover { filter: brightness(1.06); }
.rv-cmt-send.is-busy { opacity: 0.55; pointer-events: none; }

/* v5.35.2 — mini-editeur WYSIWYG (gras/italique/emoji), meme mecanique que la messagerie
   (contenteditable + document.execCommand), applique au champ de saisie des commentaires. */
.rv-cmt-form2 { margin-top: 0.5rem; }
.rv-cmt-toolbar { display: flex; align-items: center; gap: 4px; position: relative; margin-bottom: 0.3rem; }
/* v5.35.3 — la popover s ouvrait vers le BAS (top:30px), mais le mini-editeur est colle
   au bord bas de la modale de commentaires : elle se faisait rogner par l overflow de la
   modale (Guillaume : "je vois pas tout"). Ouverture vers le HAUT desormais (comme le
   popover emoji de la messagerie, meme raison : compose bar en bas d une zone scrollable).
   v5.35.4 — meme en ouvrant vers le haut, la modale peut rester courte (0 commentaire =
   peu de hauteur disponible) et rogner encore le HAUT de la popover (Guillaume : toujours
   pas tout visible). Fix definitif : grille plus large (6 colonnes au lieu de 5, moins de
   hauteur necessaire) + max-height/overflow-y propres a la popover, qui devient ainsi
   scrollable EN INTERNE et ne depend plus jamais de la place disponible autour d elle. */
.rv-cmt-emoji-pop { display: none; position: absolute; bottom: 34px; top: auto; left: 0; z-index: 50; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); padding: 8px; width: 236px; max-width: calc(100vw - 40px); max-height: min(220px, 45vh); overflow-y: auto; flex-wrap: wrap; gap: 2px; align-content: flex-start; }
.rv-cmt-row { display: flex; gap: 0.4rem; align-items: flex-end; }
.rv-cmt-row .rv-cmt-input { min-height: 2.4em; max-height: 30vh; overflow-y: auto; line-height: 1.4; }
.rv-cmt-row .rv-cmt-send { align-self: flex-end; }
.rv-cmt-input[contenteditable]:empty:before { content: attr(data-placeholder); color: var(--text3); pointer-events: none; }
.rv-cmt-input b, .rv-cmt-input strong { font-weight: 700; }
.rv-cmt-input i, .rv-cmt-input em { font-style: italic; }
.rv-cmt-txt b, .rv-cmt-txt strong { font-weight: 700; }
.rv-cmt-txt i, .rv-cmt-txt em { font-style: italic; }
