/* Commentaires visiteurs — volet intégré à la visionneuse (lightbox) de la galerie.
   Bouton flottant 💬 + tiroir coulissant (bottom sheet), responsive mobile.
   S'appuie sur le thème du carnet (dégradé violet/bleu). */

/* ── Bouton flottant d'ouverture ─────────────────────────────────────────── */
.jv-cmt-toggle {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.7rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #3a3a52;
    font: 600 0.95rem/1 'Inter', system-ui, sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease, background 0.15s ease;
    z-index: 3;
}
.jv-cmt-toggle:hover { transform: translateY(-2px); background: #fff; }
.jv-cmt-toggle-ico { font-size: 1.2rem; line-height: 1; }
.jv-cmt-badge:empty { display: none; }
.jv-cmt-badge {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Tiroir (bottom sheet) ───────────────────────────────────────────────── */
.jv-cmt-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 100%);
    width: min(560px, 100vw);
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px -8px rgba(20, 10, 40, 0.55);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 4;
    overflow: hidden;
}
.jv-cmt-sheet.is-open { transform: translate(-50%, 0); }

.jv-cmt-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #ececf4;
    flex: 0 0 auto;
}
.jv-cmt-title {
    font: 600 1.05rem/1 'Fraunces', Georgia, serif;
    color: #2a2340;
}
.jv-cmt-close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: #f1f0f8;
    color: #5b5470;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.jv-cmt-close:hover { background: #e4e2f0; }

/* ── Liste des commentaires ──────────────────────────────────────────────── */
.jv-cmt-liste {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.85rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.jv-cmt-item {
    position: relative;
    background: #f7f6fc;
    border: 1px solid #eceaf6;
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}
/* Halo « nouveau depuis ta dernière visite » : bordure et fond légèrement teintés,
   petit badge « Nouveau » dans le coin. Se déclenche au prochain rendu si le seuil
   local est plus vieux que le created_at du commentaire. */
.jv-cmt-item.is-nouveau {
    background: linear-gradient(180deg, #fff8e6 0%, #fefaf0 100%);
    border-color: #f2d68a;
    box-shadow: 0 0 0 1px rgba(232, 176, 40, 0.25);
}
.jv-cmt-item.is-nouveau::after {
    content: 'Nouveau';
    position: absolute;
    top: -8px;
    right: 10px;
    background: linear-gradient(135deg, #f5a524, #e07b1a);
    color: #fff;
    font: 700 0.65rem/1 'Inter', system-ui, sans-serif;
    letter-spacing: 0.03em;
    padding: 3px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    box-shadow: 0 3px 8px -2px rgba(224, 123, 26, 0.55);
}
.jv-cmt-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}
/* ── Bouton « Répondre » sous chaque commentaire ──────────────────────────── */
.jv-cmt-item-actions {
    margin-top: 0.35rem;
    display: flex;
    justify-content: flex-end;
}
.jv-cmt-reply-btn {
    background: none;
    border: 0;
    padding: 2px 6px;
    color: #667eea;
    font: 600 0.78rem/1 'Inter', system-ui, sans-serif;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}
.jv-cmt-reply-btn:hover { background: rgba(102, 126, 234, 0.12); color: #4b5ec2; }
/* ── Réponses indentées (1 niveau, plat sous le parent) ───────────────────── */
.jv-cmt-replies {
    margin: 0.55rem 0 0 0.9rem;
    padding-left: 0.7rem;
    border-left: 2px solid #d9d5ee;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.jv-cmt-replies .jv-cmt-item {
    background: #fff;
    padding: 0.5rem 0.65rem;
    font-size: 0.94em;
}
/* ── Mini-formulaire de réponse (inline sous le commentaire parent) ──────── */
.jv-cmt-mini-form {
    margin-top: 0.55rem;
    padding: 0.6rem 0.7rem;
    background: #fdfdff;
    border: 1px solid #e2ddf3;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.jv-cmt-mini-form .jv-cmt-textarea { min-height: 2.2rem; font-size: 0.9rem; }
.jv-cmt-cancel {
    background: #eef0f6;
    color: #5b5470;
    border: 0;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font: 600 0.85rem/1 'Inter', system-ui, sans-serif;
    cursor: pointer;
}
.jv-cmt-cancel:hover { background: #e2e0ee; }
.jv-cmt-auteur { font-weight: 700; color: #4a3f6b; font-size: 0.92rem; }
.jv-cmt-date { color: #9691a8; font-size: 0.75rem; white-space: nowrap; }
.jv-cmt-msg {
    margin: 0;
    color: #33304a;
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.jv-cmt-vide, .jv-cmt-chargement {
    margin: 0.4rem 0;
    color: #8b86a0;
    font-size: 0.9rem;
    text-align: center;
}

/* ── Formulaire ──────────────────────────────────────────────────────────── */
.jv-cmt-form {
    flex: 0 0 auto;
    border-top: 1px solid #ececf4;
    padding: 0.8rem 1.1rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #fafaff;
}
.jv-cmt-input, .jv-cmt-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.7rem;
    border: 1.5px solid #e2e0ee;
    border-radius: 10px;
    font: 400 0.95rem/1.4 'Inter', system-ui, sans-serif;
    color: #2a2340;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.jv-cmt-textarea { resize: vertical; min-height: 2.6rem; }
.jv-cmt-hint { margin: -0.2rem 0 0; font-size: 0.75rem; color: #9691a8; }
.jv-cmt-input:focus, .jv-cmt-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}
/* Honeypot anti-robots : hors écran, invisible aux humains. */
.jv-cmt-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0; pointer-events: none;
}
.jv-cmt-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.jv-cmt-feedback { font-size: 0.82rem; color: #6b6680; flex: 1 1 auto; }
.jv-cmt-feedback.is-ok { color: #1f9d55; }
.jv-cmt-feedback.is-err { color: #d12b52; }
.jv-cmt-send {
    flex: 0 0 auto;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font: 700 0.92rem/1 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.jv-cmt-send:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(102, 126, 234, 0.6); }
.jv-cmt-send:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

/* ── Bloc commentaires « du jour » (inline dans la page) ─────────────────── */
.jv-cmt-jour {
    margin: 1.4rem 0 0.2rem;
    border-top: 1px solid rgba(102, 126, 234, 0.18);
    padding-top: 0.4rem;
}
.jv-cmt-jour-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: 0;
    padding: 0.6rem 0.2rem;
    cursor: pointer;
    font: 600 0.98rem/1 'Inter', system-ui, sans-serif;
    color: #4a3f6b;
}
.jv-cmt-jour-ico { font-size: 1.2rem; line-height: 1; }
.jv-cmt-jour-label { flex: 0 0 auto; }
.jv-cmt-jour-caret { margin-left: auto; transition: transform 0.2s ease; opacity: 0.6; }
.jv-cmt-jour.is-open .jv-cmt-jour-caret { transform: rotate(180deg); }
.jv-cmt-jour-corps {
    display: none;
    background: #fff;
    border: 1px solid #eceaf6;
    border-radius: 14px;
    margin-top: 0.3rem;
    overflow: hidden;
}
.jv-cmt-jour.is-open .jv-cmt-jour-corps { display: block; }
/* Dans la page, la liste n'a pas besoin de scroll interne ni de hauteur contrainte. */
.jv-cmt-jour-corps .jv-cmt-liste { max-height: none; overflow: visible; }
.jv-cmt-jour-corps .jv-cmt-form { border-top: 1px solid #ececf4; }

/* ── Widget « Derniers mots » (bloc en tête de galerie) ──────────────────── */
.jv-derniers {
    max-width: 960px;
    margin: 1.4rem auto 0.4rem;
    padding: 1rem 1.1rem 1.1rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(102, 126, 234, 0.18);
    border-radius: 16px;
    box-shadow: 0 6px 22px -14px rgba(40, 20, 80, 0.35);
}
.jv-derniers-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
}
.jv-derniers-ico { font-size: 1.35rem; line-height: 1; }
.jv-derniers-titre {
    margin: 0;
    font: 700 1.05rem/1.2 'Fraunces', Georgia, serif;
    color: #2a2340;
}
.jv-derniers-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.55rem;
}
.jv-derniers-item {
    display: block;
    background: #f7f6fc;
    border: 1px solid #eceaf6;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
/* Variante avec miniature de la photo commentée : mini-vignette à gauche. */
.jv-derniers-item.has-thumb {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0.6rem;
    align-items: start;
}
.jv-derniers-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #eceaf6;
}
.jv-derniers-corps { min-width: 0; }

/* Réponses nichées sous leur message parent (arborescence à 1 niveau). */
.jv-derniers-replies {
    margin-top: 0.5rem;
    padding-left: 0.6rem;
    border-left: 2px solid #d9d5ee;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.jv-derniers-reply { min-width: 0; }
.jv-derniers-reply-head {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.15rem;
}
.jv-derniers-reply-ico { color: #9691a8; font-weight: 700; }
.jv-derniers-reply-auteur { font-weight: 700; color: #4a3f6b; font-size: 0.8rem; }
.jv-derniers-reply-cible { color: #7a7690; font-size: 0.72rem; font-style: italic; }
.jv-derniers-reply-date { color: #9691a8; font-size: 0.7rem; margin-left: auto; }
.jv-derniers-reply-msg {
    margin: 0;
    color: #33304a;
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
}
[data-ct="immersif"] .jv-derniers-replies { border-left-color: rgba(255, 255, 255, 0.18); }
[data-ct="immersif"] .jv-derniers-reply-auteur { color: #eceefb; }
[data-ct="immersif"] .jv-derniers-reply-cible { color: #9ea2b8; }
[data-ct="immersif"] .jv-derniers-reply-date { color: #9ea2b8; }
[data-ct="immersif"] .jv-derniers-reply-msg { color: #d3d6e2; }

/* Repli : masque les discussions dont la dernière activité (racine OU réponse
   la plus récente) dépasse le seuil de fraîcheur — la classe .is-old est posée
   par galerie-commentaires.js. Le bouton bascule .is-deplie pour tout révéler. */
.jv-derniers.is-replie .jv-derniers-liste > .jv-derniers-item.is-old { display: none; }
.jv-derniers.is-replie.is-deplie .jv-derniers-liste > .jv-derniers-item.is-old { display: block; }
.jv-derniers.is-replie.is-deplie .jv-derniers-liste > .jv-derniers-item.is-old.has-thumb { display: grid; }

.jv-derniers-actions { margin-top: 0.75rem; display: flex; justify-content: center; }
.jv-derniers-toggle {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(102, 126, 234, 0.28);
    background: rgba(102, 126, 234, 0.10);
    color: #4b5ec2;
    font: 700 0.82rem/1 'Inter', system-ui, sans-serif;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.jv-derniers-toggle:hover { background: rgba(102, 126, 234, 0.18); border-color: rgba(102, 126, 234, 0.45); }
.jv-derniers-toggle:active { transform: translateY(1px); }
[data-ct="immersif"] .jv-derniers-toggle {
    background: rgba(255, 184, 120, 0.14);
    border-color: rgba(255, 184, 120, 0.30);
    color: #ffcfa0;
}
[data-ct="immersif"] .jv-derniers-toggle:hover {
    background: rgba(255, 184, 120, 0.22);
    border-color: rgba(255, 184, 120, 0.50);
}
a.jv-derniers-item:hover,
.jv-derniers-item.is-clickable:hover {
    transform: translateY(-2px);
    border-color: #c6cef6;
    box-shadow: 0 8px 18px -12px rgba(102, 126, 234, 0.55);
}
.jv-derniers-item.is-clickable { cursor: pointer; }
.jv-derniers-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.jv-derniers-auteur { font-weight: 700; color: #4a3f6b; font-size: 0.9rem; }
.jv-derniers-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.14);
    color: #4b5ec2;
    letter-spacing: 0.02em;
}
.jv-derniers-date { color: #9691a8; font-size: 0.75rem; margin-left: auto; }
.jv-derniers-msg {
    margin: 0;
    color: #33304a;
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
}
/* Carte « groupe photo » du widget « Derniers mots » : un tag Jour N ou
   « Commentaire » en tête + un compteur du nombre de mots dans le fil. */
.jv-derniers-groupe-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}
.jv-derniers-groupe-n {
    font-size: 0.7rem;
    font-weight: 700;
    color: #7a7690;
    background: rgba(102, 126, 234, 0.08);
    padding: 2px 7px;
    border-radius: 999px;
}
[data-ct="immersif"] .jv-derniers-groupe-n {
    color: #b9bcd0;
    background: rgba(255, 184, 120, 0.10);
}

/* ── Widget « Derniers mots » : variante thème immersif (fond noir) ──────────
   Le fond hardcodé clair jure sur le #08080a de l'immersif : on le repasse en
   panneau « verre sombre » cohérent avec les chips et les scènes du jour. */
[data-ct="immersif"] .jv-derniers {
    max-width: 720px;
    margin: 2.6rem auto;
    padding: 1.4rem 1.5rem 1.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
[data-ct="immersif"] .jv-derniers-titre { color: #f4f2fb; }
[data-ct="immersif"] .jv-derniers-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.10);
}

/* ── Pastille « cette photo a des commentaires » sur les vignettes ────────── */
.jv-cmt-flag {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.16rem 0.42rem 0.16rem 0.36rem;
    border-radius: 999px;
    background: rgba(20, 20, 32, 0.62);
    color: #fff;
    font: 700 0.72rem/1 'Inter', system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}
.jv-cmt-flag-ico { font-size: 0.82rem; line-height: 1; }
.jv-cmt-flag-n { letter-spacing: 0.01em; }
[data-ct="immersif"] a.jv-derniers-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 184, 120, 0.40);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
}
[data-ct="immersif"] .jv-derniers-auteur { color: #eceefb; }
[data-ct="immersif"] .jv-derniers-tag {
    background: rgba(255, 184, 120, 0.18);
    color: #ffcfa0;
}
[data-ct="immersif"] .jv-derniers-date { color: #9ea2b8; }
[data-ct="immersif"] .jv-derniers-msg { color: #d3d6e2; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .jv-cmt-sheet { width: 100vw; max-height: 80vh; border-radius: 16px 16px 0 0; }
    .jv-cmt-toggle { padding: 0.5rem 0.6rem; font-size: 0.9rem; }
    .jv-derniers { margin: 1rem 0.6rem 0.4rem; padding: 0.9rem; }
    .jv-derniers-liste { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Réactions emoji — pattern Slack-like
   Barre compacte (chips = emojis déjà posés) + bouton `+` qui ouvre un panneau
   grille avec la palette complète. Zéro débordement mobile.
   ══════════════════════════════════════════════════════════════════════════ */

.jv-rx-bar {
    position: absolute;
    left: 50%;
    bottom: 4.5rem;
    transform: translateX(-50%);
    z-index: 3;
    max-width: min(92vw, 520px);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.4rem;
    background: rgba(20, 20, 32, 0.68);
    border-radius: 999px;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.jv-rx-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-width: calc(min(92vw, 520px) - 3rem);
}
.jv-rx-chips:empty { display: none; }
.jv-rx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.34rem 0.55rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font: 600 0.78rem/1 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.jv-rx-chip:hover { background: rgba(255, 255, 255, 0.18); }
.jv-rx-chip:active { transform: scale(0.94); }
.jv-rx-chip.is-mine { background: rgba(255, 184, 120, 0.30); }
.jv-rx-chip.is-mine:hover { background: rgba(255, 184, 120, 0.40); }
.jv-rx-emo { font-size: 1.05rem; line-height: 1; }
.jv-rx-n { min-width: 0.5rem; text-align: left; }

.jv-rx-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem; height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font: 700 1.15rem/1 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.jv-rx-plus:hover { background: rgba(255, 255, 255, 0.28); }
.jv-rx-plus:active { transform: scale(0.92); }
.jv-rx-plus.is-open { background: rgba(255, 184, 120, 0.35); transform: rotate(45deg); }

/* ── Panneau picker (web component emoji-picker-element) ─────────────────── */
/* Positionné fixed dans la viewport (pas dans .gallery-lightbox-content, qui
   est parfois plus étroit que le picker sur photo portrait → débordement). */
.jv-rx-panneau {
    position: fixed;
    left: 50%;
    bottom: 7rem;
    transform: translateX(-50%) scale(0.94);
    transform-origin: bottom center;
    z-index: 10002;
    border-radius: 16px;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}
.jv-rx-panneau.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}
/* Web component <emoji-picker> — thème sombre aligné avec la lightbox. */
.jv-rx-picker {
    display: block;
    width: min(94vw, 340px);
    height: min(55vh, 380px);
    --background: rgba(24, 22, 42, 0.98);
    --border-color: rgba(255, 255, 255, 0.08);
    --indicator-color: #ffb878;
    --input-border-color: rgba(255, 255, 255, 0.14);
    --input-font-color: #fff;
    --input-placeholder-color: rgba(255, 255, 255, 0.5);
    --input-border-radius: 10px;
    --category-emoji-padding: 0.35rem;
    --emoji-padding: 0.35rem;
    --num-columns: 8;
}
.jv-rx-loading {
    width: min(94vw, 340px);
    padding: 1.4rem 0.8rem;
    background: rgba(24, 22, 42, 0.94);
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    font: 500 0.85rem/1.2 'Inter', system-ui, sans-serif;
}

/* ── Pastille total réactions sur les vignettes ──────────────────────────── */
.jv-rx-flag {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.16rem 0.42rem 0.16rem 0.36rem;
    border-radius: 999px;
    background: rgba(20, 20, 32, 0.62);
    color: #fff;
    font: 700 0.72rem/1 'Inter', system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}
.jv-rx-flag-ico { font-size: 0.82rem; line-height: 1; color: #ff6b8a; }
.jv-rx-flag-n { letter-spacing: 0.01em; }
/* La pastille commentaires prend le coin haut-droit ; on décale celle des
   réactions juste en dessous quand elle coexiste. */
.gallery-item .jv-cmt-flag + .jv-rx-flag,
.gallery-item .jv-rx-flag + .jv-cmt-flag { top: 34px; }

@media (max-width: 600px) {
    .jv-rx-bar { bottom: 3.4rem; padding: 0.28rem 0.34rem; }
    .jv-rx-chip { padding: 0.26rem 0.45rem; font-size: 0.72rem; }
    .jv-rx-emo { font-size: 0.98rem; }
    .jv-rx-plus { width: 1.85rem; height: 1.85rem; font-size: 1.05rem; }
    .jv-rx-panneau { bottom: 5.8rem; }
    .jv-rx-picker { --num-columns: 7; height: min(50vh, 340px); }
}
