/* ════════════════════════════════════════════════
   JOYSTICK FM — chat.css  v3.0
   Bouton flottant pill + popup draggable / ancrable
   ════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────
   BOUTON FLOTTANT "CHAT DIRECT" (Style Bulle)
   ────────────────────────────────────────────── */
#jfm-chat-toggle {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9999997;
    /* Au-dessus du header, sous la pop-up */

    /* Aspect Bulle Circulaire */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;

    /* Style néon violet */
    background: linear-gradient(135deg, #b44fff, #7b2fbf);
    color: #f0f0ff;
    border: 1px solid rgba(180, 79, 255, 0.55);
    box-shadow: 0 4px 20px rgba(180, 79, 255, 0.45), 0 0 0 1px rgba(180, 79, 255, 0.18);

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Animation de rebond */
}

#jfm-chat-toggle .jfm-chat-label-icon {
    font-size: 1rem;
    line-height: 1;
}

#jfm-chat-toggle:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 28px rgba(180, 79, 255, 0.65), 0 0 0 1px rgba(180, 79, 255, 0.3);
}

#jfm-chat-toggle:active {
    transform: scale(0.97);
}

#jfm-chat-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, #00c3cc, #0077a0);
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 245, 255, 0.4), 0 0 0 1px rgba(0, 245, 255, 0.18);
}

/* Badge de messages non lus */
#jfm-chat-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ff2d78;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255, 45, 120, 0.6);
}

#jfm-chat-badge[hidden] {
    display: none !important;
}

/* ──────────────────────────────────────────────
   OVERLAY FOND (mobile)
   ────────────────────────────────────────────── */
#jfm-chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9989;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

#jfm-chat-overlay.visible {
    display: block;
}

/* ──────────────────────────────────────────────
   POPUP PRINCIPALE
   ────────────────────────────────────────────── */
#jfm-chat-popup[hidden] {
    display: none !important;
}

#jfm-chat-popup {
    position: fixed;
    bottom: 90px;
    right: 80px;
    width: 360px;
    min-width: 260px;
    max-width: calc(100vw - 24px);
    height: 500px;
    min-height: 300px;
    max-height: calc(100vh - 110px);
    z-index: 9991;

    display: flex;
    flex-direction: column;
    overflow: hidden;

    background: #0e0e18;
    border: 1px solid rgba(180, 79, 255, 0.4);
    border-radius: 14px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(180, 79, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    /* Redimensionnable */
    resize: both;

    /* Entrée */
    animation: jfmChatIn 0.26s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes jfmChatIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#jfm-chat-popup.closing {
    animation: jfmChatOut 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes jfmChatOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(0.94) translateY(10px);
    }
}

/* ── Ancrage plein bord ── */
#jfm-chat-popup.jfm-docked-left,
#jfm-chat-popup.jfm-docked-right {
    top: 0 !important;
    bottom: 0 !important;
    width: 340px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0;
    resize: horizontal;
    animation: none;
}

#jfm-chat-popup.jfm-docked-left {
    left: 0 !important;
    right: auto !important;
    border-left: none;
    border-radius: 0 10px 10px 0;
}

#jfm-chat-popup.jfm-docked-right {
    right: 0 !important;
    left: auto !important;
    border-right: none;
    border-radius: 10px 0 0 10px;
}

/* ──────────────────────────────────────────────
   EN-TÊTE (zone drag)
   ────────────────────────────────────────────── */
#jfm-chat-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0.9rem 0.8rem 1.1rem;
    background: linear-gradient(90deg, rgba(180, 79, 255, 0.14), rgba(0, 245, 255, 0.05));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
    cursor: grab;
}

#jfm-chat-header:active {
    cursor: grabbing;
}

#jfm-chat-header-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Orbitron', 'Arial', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #f0f0ff;
}

/* Dot vert "en ligne" */
#jfm-chat-header-title::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #39ff14;
    box-shadow: 0 0 6px #39ff14;
    flex-shrink: 0;
    animation: jfmLivePulse 1.6s ease-in-out infinite;
}

@keyframes jfmLivePulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px #39ff14;
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 12px #39ff14;
    }
}

.jfm-chat-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: default;
}

.jfm-chat-controls button {
    background: none;
    border: none;
    color: rgba(200, 200, 212, 0.55);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.jfm-chat-controls button:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #f0f0ff;
}

#jfm-chat-close:hover {
    background: rgba(255, 45, 120, 0.18);
    color: #ff2d78;
}

/* ──────────────────────────────────────────────
   ZONE MESSAGES
   ────────────────────────────────────────────── */
#jfm-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scroll-behavior: smooth;
}

#jfm-chat-messages::-webkit-scrollbar {
    width: 4px;
}

#jfm-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#jfm-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(180, 79, 255, 0.35);
    border-radius: 2px;
}

#jfm-chat-messages:empty::before {
    content: 'Aucun message pour l\'instant…';
    color: rgba(107, 107, 127, 0.75);
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    padding: 2rem 1rem;
    display: block;
}

/* ──────────────────────────────────────────────
   UN MESSAGE
   ────────────────────────────────────────────── */
.jfm-chat-msg {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 9px;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    line-height: 1.55;
    word-break: break-word;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.jfm-chat-msg:hover {
    border-color: rgba(180, 79, 255, 0.2);
}

.jfm-chat-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.jfm-chat-name {
    font-family: 'Orbitron', 'Arial', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #00f5ff;
    letter-spacing: 0.06em;
}

.jfm-chat-time {
    font-size: 0.64rem;
    color: rgba(107, 107, 127, 0.85);
    flex-shrink: 0;
}

.jfm-chat-text {
    color: #c8c8d4;
    margin: 0;
}

.jfm-chat-media {
    display: block;
    max-width: 100%;
    max-height: 180px;
    margin-top: 0.4rem;
    border-radius: 7px;
    object-fit: contain;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: opacity 0.15s;
}

.jfm-chat-media:hover {
    opacity: 0.82;
}

/* ──────────────────────────────────────────────
   APERÇU PIÈCE JOINTE
   ────────────────────────────────────────────── */
#jfm-chat-preview {
    padding: 0.45rem 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    flex-shrink: 0;
}

#jfm-chat-preview[hidden] {
    display: none !important;
}

#jfm-chat-preview img {
    max-height: 60px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

#jfm-chat-preview-remove {
    position: absolute;
    top: 4px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.68rem;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    padding: 0;
    transition: background 0.15s;
}

#jfm-chat-preview-remove:hover {
    background: #ff2d78;
}

/* ──────────────────────────────────────────────
   SÉPARATEUR
   ────────────────────────────────────────────── */
#jfm-chat-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(180, 79, 255, 0.4), rgba(0, 245, 255, 0.2), transparent);
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   FORMULAIRE
   ────────────────────────────────────────────── */
#jfm-chat-form {
    flex-shrink: 0;
    padding: 0.65rem 0.8rem 0.8rem;
    background: rgba(6, 6, 12, 0.9);
}

#jfm-chat-input-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

#jfm-chat-username {
    width: 88px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.52rem 0.6rem;
    color: #c8c8d4;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.76rem;
    outline: none;
    transition: border-color 0.15s;
}

#jfm-chat-username:focus {
    border-color: rgba(180, 79, 255, 0.5);
}

#jfm-chat-username::placeholder {
    color: rgba(107, 107, 127, 0.65);
}

#jfm-chat-message {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.52rem 0.6rem;
    color: #c8c8d4;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s;
}

#jfm-chat-message:focus {
    border-color: rgba(0, 245, 255, 0.45);
}

#jfm-chat-message::placeholder {
    color: rgba(107, 107, 127, 0.65);
}

/* Bouton pièce jointe */
#jfm-chat-input-row label[for="jfm-chat-file"] {
    flex-shrink: 0;
    cursor: pointer;
    font-size: 1.05rem;
    color: rgba(107, 107, 127, 0.75);
    padding: 4px 3px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

#jfm-chat-input-row label[for="jfm-chat-file"]:hover {
    color: #00f5ff;
    background: rgba(0, 245, 255, 0.08);
}

/* Bouton envoyer */
#jfm-chat-form button[type="submit"] {
    flex-shrink: 0;
    background: linear-gradient(135deg, #b44fff, #7b2fbf);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.52rem 0.7rem;
    font-family: 'Orbitron', 'Arial', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 10px rgba(180, 79, 255, 0.3);
}

#jfm-chat-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #c55fff, #9b3fd0);
    box-shadow: 0 4px 16px rgba(180, 79, 255, 0.5);
}

#jfm-chat-form button[type="submit"]:active {
    transform: scale(0.96);
}

#jfm-chat-form button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ──────────────────────────────────────────────
   RESPONSIVE MOBILE
   ────────────────────────────────────────────── */
/* ── Boutons d'administration ── */
.jfm-chat-del-btn {
    background: none;
    border: none;
    color: var(--rose-neon, #ff2d78);
    cursor: pointer;
    font-size: 0.7rem;
    margin-left: auto;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.1s;
}

.jfm-chat-del-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.jfm-chat-meta {
    width: 100%;
}

/* Permet d'aligner la corbeille à droite */

/* ── Correction du formulaire sur Mobile ── */
#jfm-chat-form button[type="submit"] {
    width: auto !important;
    /* Annule le 100% hérité du thème */
    min-width: 35px;
}

/* ── Responsive mobile ── */
@media (max-width: 480px) {
    #jfm-chat-toggle {
        bottom: 80px;
        right: 12px;
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }

    /* Force les dimensions du popup sur mobile, même si une classe dock est active */
    #jfm-chat-popup {
        width: calc(100vw - 16px) !important;
        right: 8px !important;
        left: auto !important;
        top: auto !important;
        bottom: 76px !important;
        max-height: calc(100vh - 100px) !important;
    }

    /* Masque les boutons d'ancrage sur mobile */
    #jfm-chat-dock-left,
    #jfm-chat-dock-right {
        display: none !important;
    }

    /* Réorganisation sur 2 lignes pour taper confortablement */
    #jfm-chat-input-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    #jfm-chat-username {
        display: block !important;
        flex: 1;
    }

    #jfm-chat-message {
        flex: 1 1 100%;
        order: 10;
        margin-top: 4px;
    }
}

/* ──────────────────────────────────────────────
   COMPORTEMENT "FENÊTRE FLOTTANTE" & Z-INDEX
   ────────────────────────────────────────────── */
#jfm-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999997 !important;
    display: none;
    pointer-events: none !important;
}

#jfm-chat-overlay.visible {
    display: block;
}

#jfm-chat-popup {
    z-index: 9999998 !important;
    /* Même couche ou juste en dessous du bouton */
    resize: both;
    /* Permet le redimensionnement */
    overflow: hidden;
}

/* Personnalisation de la poignée de redimensionnement */
#jfm-chat-popup::-webkit-resizer {
    background-color: rgba(26, 150, 165, 0.5);
    border-top-left-radius: 4px;
    border-radius: 3px;
}

#jfm-chat-toggle {
    position: fixed;
    z-index: 9999999 !important;
    transition: all 0.3s ease;
}

/* Changement de couleur quand le chat est ouvert */
#jfm-chat-toggle.chat-open {
    background: linear-gradient(135deg, #ff2d78, #b44fff) !important;
    box-shadow: 0 4px 20px rgba(255, 45, 120, 0.45), 0 0 0 1px rgba(255, 45, 120, 0.18) !important;
    border-color: rgba(255, 45, 120, 0.55) !important;
}

/* ──────────────────────────────────────────────
   BOUTON CHAT — Adaptation quand le floating player est visible
   Le floating player (#floating-player) et le bouton chat (#jfm-chat-toggle)
   sont frères dans le DOM (footer.php), donc on utilise le sélecteur ~
   ────────────────────────────────────────────── */
.floating-player.fp-visible ~ #jfm-chat-toggle {
    bottom: calc(20px + var(--fp-h-desk, 72px)) !important;
    transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .floating-player.fp-visible ~ #jfm-chat-toggle {
        bottom: calc(20px + var(--fp-h-tab, 88px)) !important;
    }
}

@media (max-width: 480px) {
    .floating-player.fp-visible ~ #jfm-chat-toggle {
        bottom: calc(12px + var(--fp-h-mob, 78px)) !important;
    }
}

@media (max-width: 360px) {
    .floating-player.fp-visible ~ #jfm-chat-toggle {
        bottom: calc(12px + var(--fp-h-xs, 64px)) !important;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .floating-player.fp-visible ~ #jfm-chat-toggle {
        bottom: calc(12px + 52px) !important;
    }
}

/* Notificateur de nouveaux messages */
.jfm-chat-scroll-notifier {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #b44fff;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: eggPop 0.3s ease;
}

.jfm-chat-scroll-notifier:hover {
    background: #c55fff;
}

/* ======================================================
   BADGE DE MESSAGES NON LUS
   ====================================================== */
#jfm-chat-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    right: auto;
    background: #ff2d55;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    font-family: var(--font-tech, 'Inter', sans-serif);
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 5px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 45, 85, 0.6), 0 0 0 2px rgba(8, 8, 14, 0.9);
    animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    pointer-events: none;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ======================================================
   PULSE DU BOUTON CHAT (quand un toast arrive)
   ====================================================== */
#jfm-chat-toggle.jfm-chat-pulse {
    animation: chatPulse 0.6s ease;
}

@keyframes chatPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.2); box-shadow: 0 0 20px rgba(180, 79, 255, 0.6); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ======================================================
   TOAST NOTIFICATION POPUP
   ====================================================== */
.jfm-chat-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: rgba(18, 18, 32, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(180, 79, 255, 0.35);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    z-index: 10000000;
    cursor: pointer;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(180, 79, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateX(120%) scale(0.9);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.jfm-chat-toast.jfm-toast-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Sortie normale (pas suck-in) */
.jfm-chat-toast.jfm-toast-out {
    opacity: 0;
    transform: translateX(120%) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Entete du toast */
.jfm-toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 6px;
}

.jfm-toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.jfm-toast-name {
    font-family: var(--font-tech, 'Inter', sans-serif);
    font-weight: 700;
    font-size: 0.8rem;
    color: #b44fff;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jfm-toast-close {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.jfm-toast-close:hover {
    color: #ff2d55;
    background: rgba(255, 45, 85, 0.1);
}

/* Corps du toast */
.jfm-toast-body {
    padding: 2px 14px 10px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.jfm-toast-media {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.jfm-toast-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Barre de timer (cooldown) */
.jfm-toast-timer {
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.jfm-toast-timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #b44fff, #00f5ff);
    border-radius: 0 0 14px 14px;
    animation: toastTimerShrink 6s linear forwards;
}

@keyframes toastTimerShrink {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* Hover sur le toast */
.jfm-chat-toast:hover {
    border-color: rgba(180, 79, 255, 0.6);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 16px rgba(180, 79, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.jfm-chat-toast:hover .jfm-toast-timer-bar {
    animation-play-state: paused;
}

/* ======================================================
   ANIMATION SUCK-IN (aspiration vers le bouton chat)
   ====================================================== */
.jfm-chat-toast.jfm-toast-suckin {
    animation: suckIn 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
    pointer-events: none;
}

@keyframes suckIn {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    40% {
        opacity: 0.8;
        transform: translateX(calc(var(--suck-x, 0px) * 0.1)) translateY(calc(var(--suck-y, 0px) * 0.1)) scale(0.85);
    }
    100% {
        opacity: 0;
        transform: translateX(var(--suck-x, 0px)) translateY(var(--suck-y, 0px)) scale(0.15);
    }
}

/* ======================================================
   RESPONSIVE TOAST
   ====================================================== */
@media (max-width: 480px) {
    .jfm-chat-toast {
        top: 10px;
        right: 10px;
        left: auto;
        width: calc(100vw - 20px);
        max-width: none;
    }
}

@media (max-width: 360px) {
    .jfm-toast-header {
        padding: 8px 10px 4px;
    }
    .jfm-toast-body {
        padding: 2px 10px 8px;
        font-size: 0.7rem;
    }
    #jfm-chat-badge {
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 0.6rem;
    }
}

/* ======================================================
   PREVENTION DU ZOOM iOS (Inputs)
   ====================================================== */
@media screen and (max-width: 768px) {
    #jfm-chat-message,
    #jfm-chat-username {
        font-size: 16px !important;
    }
}